^{1}

^{1}

^{1}

A simulation approach of a smart grid by cooperative bargaining is presented in this paper. Each participant of the smart grid determines its optimal schedule to meet its power and heating demand at minimal costs employing solar panels, fuel cells and batteries. This is done by solving a quadratic optimisation problem which takes the energy prices and the available devices into account. The energy prices are related to the demand and supply in the smart grid, so that a lower demand yields lower prices. The cooperative bargaining game is used to tune the participants’ optimal solution to obtain a Nash equilibrium. The computed solutions of the participants are validated against the capacities and structure of the smart grid by solving a multi-commodity flow problem. The presented model features multiple types of energy, so that they may be substituted to meet the participants’ demand. Furthermore, the participants may also act as supplier and not only as consumer, which allows decentralised generation of energy. The approach is validated in several experiments where effects like negative energy prices if generated energy exceeds the smart grid’s total demand and peak-shaving with even small-capacity batteries are exhibited.

With the emergence of renewable energy generation and storage technologies, like e.g. solar panels or batteries, the notion of smart grids has been developed [

The smart grid model in this paper adopts approaches from [

In order to be able to represent an agent which is capable to utilise the three types of energy, manage the demand-side and also act as a supplier, a selected set of prototype devices are modelled in detail (Section 3). A solar panel can generate power “for free”. It generates power from insolation which requires taking weather data into account. Moreover, the insolation and environmental temperature from weather data influence not only the solar panels’ power generation but also the temperature in the building. A fuel cell is used as a prototype appliance for cogeneration. It is used to generate thermal energy and power by consuming gas. Its purpose is to allow gas as an alternative resource for heating. A battery is used to store power which is essential for peak- shaving, because the required power can be bought at off-peak times and stored until it is needed, as in e.g. [

The agents participate in a cooperative bargaining game according to which they determine their respective optimal strategy to minimise costs (Section 4). This game is introduced to relate energy prices with demand. This allows the agent to compute price-aware optimal strategies. As a consequence, the prices rise at high demand and drop, even below zero, at higher supply than demand.

The bargaining game is designed such that a unique Nash equilibrium exists and is attained by iteratively computing each agent’s best-response independently. The computation of the best-response is determined by solving a quadratic optimisation problem with complementarity constraints (Section 3) which includes, aside a base power load profile, the employment of solar panels, fuel cells, batteries, central heating, and refrigerators. After the Nash equilibrium has been found, the demand and supply are distributed in the smart grid to meet each agent’s requirements. This is done by solving a multi-commodity flow problem through the smart grid (Section 2). If no feasible multi-commodity flow exists, the agents are restricted in their actions to enforce a feasible flow.

Concluding this paper, in Section 5 test cases are presented and discussed. The impact of the different devices and combination of devices are pointed out. In particular, the total and relative costs reduction with respect to other device combinations along with the relation to the peak-to-average ratio (PAR) is elaborated. Peak-shaving could be observed even for a relative small-capacity battery which makes the power load profile almost flat. The fuel cells are used as a surrogate for heating, reducing the costs, but increasing the PAR. The high power generation of solar panels forces the prices of power to drop below zero when the sun shines, if the demand is not high enough to consume the generated power.

Numerous approaches to model smart grids have been published, e.g. [

The presented approach is used to compute a feasible solution. This is done by computing the multi-com- modity flow set by the agents. If this is a feasible solution, nothing else needs to be done. If no feasible solution exists, the demand of all agents in total is reduced by the amount by which the capacities are exceeded. Incorporating this reduction into the agents’ optimisation process (Section 3) yields a feasible solution, excluding the cases where the agents cannot comply with the reduction. This is the case when the line capacities are inadequate, but this is not further treated in this paper.

Extending the approach from [

grid operator (sink), agents, and substations. Let

The multi-commodity flow of each type of energy can be computed separately. Therefore, in the following, the solution of an energy type e is exemplarily elaborated. The textbook approach to express the multi-com- modity flow as a linear optimisation problem is given by [

If no feasible multi-commodity flow exists, we want to be able to determine why it does not exist. Two parameters can be changed to make the flow feasible: The agents’ demands and the grid capacities. Augmenting the grid capacities is a long-term and (financially) expensive process, whereas changing the demands is a short-term process. In this paper, the possibility of increasing the grid capacities is not discussed, because the presented approach aims at a fine temporal resolution (about 15 minutes). Limiting the demands may be unfavourable for the agents, in particular if the demands need to be changed in a way which is difficult to comply for the agent. The case that agents cannot comply is not discussed.

The amount of insufficient grid capacity needs to be identified and then communicated to all agents. This amount is determined by extending the linear optimisation problem (1) by a penalty term

grid’s capacities and a solution is found. If the sum is greater than zero, the agents need to reduce their demands in total by that amount. A straight-forward approach is to uniformly distribute this excess over all agents.

The multi-commodity flow problem essentially depends on the demands

The actions and decisions an agent can autonomously perform are computed by a discrete time dependent quadratic optimisation problem. Its objective is minimising the costs. The details of the cost function are presented in Section 4. In this section, the incorporation of the agents’ demand and supply is elaborated, i.e. the constraints of the optimisation problem. The notation from the previous section is used to denote the considered discrete time interval by

The balance constraint of an agent N at time step

holds. This balance equation must be satisfied for all time steps t and for all types of energy

power

are fixed but vary over time and are derived from a standard load profile [

An agent is restricted to either buy or sell energy of the same type within one time step. This is ensured by adding the complementarity constraint

Since the inflow or outflow must be zero, only the net flow to and from an agent is considered in the optimisation problem. This is an important property when determining the optimum of the objective function in Section 4.

In the following sections, the devices an agent N operates are presented and how they contribute to the total energy produced

The solar panel is a prototype of renewable energy generation. It generates power from environmental influences, in this case insolation, with respect to the temperature. A wind power plant would also fall in this category. The solar panel is of more interest in this paper, because only residential buildings are considered. These buildings can easily be equipped with solar panels, whereas a wind power plant in the backyard is rather undesired.

The solar panel is modelled according to [

The fuel cell is a prototype device for cogeneration. It consumes gas and generates both, electrical power and thermal energy, in this paper. So it can be used as alternative to heat the building. The fuel cell is represented by two coupled generators, one for heat and one for power, similar to [

Batteries play a substantial role in the smart grid. It is possible to store power from, e.g. solar panels, for a later point in time, in case it is currently not needed. Additionally, in demand-response scenarios, they flatten the peaks in the grid’s load profile [

is employed.

A thermodynamic model similar to [

The total thermal energy flux inside a building

where

The thermal conduction and convection are expressed only with respect to the temperature difference of the inside and outside temperature

The thermal energy flux by insolation through windows is determined by

with

The above continuous time equations are discretised with the implicit Euler method. Thus we obtain from (6)

using a fixed time step size

m is the mass,

With this thermodynamic model, it is possible to compute the required thermal energy to keep the temperature within the admissible bounds. In fact, the relation

can readily be used as constraint in the optimisation problem to enforce a temperature within the comfort interval.

As example of smart appliances the smart refrigerator is introduced here. A smart appliance is a device which is entirely operated by an agent, e.g. refrigerator, freezer, dish washer. [

The refrigerator model is directly derived from the thermodynamic model (7) and (8) by changing the parameters and constants accordingly. This way also a freezer model can be derived.

There are two peculiarities to mention. One is that the temperature within the refrigerator is dependent on the temperature within the building, which in turn is dependent on the environmental temperature. So the temperature in the refrigerator can also be influenced by the central heating.

The other peculiarity is that items may be put in or removed from the refrigerator and thus the mass m of the refrigerator’s content is time dependent. When items are added, convective thermal energy is added and the mass of the refrigerator’s content increase. Analogous when items are removed, energy is removed and the mass is decreased.

Since the required thermal energy to stay within the admissible bounds is known from (7) and

The prices of the types of energy play an essential role in the solution of the optimisation problem presented in Section 3 for each agent in the smart grid. The agents are assumed to act rationally and economically, so that they preferably consume energy when the prices are low and save or possibly sell energy when the prices are high. In contrast, the prices should reflect the efforts of the grid operator to supply its agents, and thus the production costs increase with increasing demand. Such a pricing model has to be designed which takes the above aspects into account.

At first, the total costs in the entire grid are determined with respect to the total demand and supply in the smart grid. Note that supply in this context refers to the agent generated supply and not to the grid operator’s supply. Subsequently, the total costs are fairly broken down to each agent. This results in the costs objective function which the respective agents seek to minimise.

There have been cooperative game theoretical approaches [

The three mentioned references only deal with the demand-side. The approach presented in this paper expands [

The central role in the price model has the grid operator. It acts budget balanced, i.e. neither generates profit nor suffers losses. Consequently, the energy is sold for the production price. The costs of a type of energy

Below some properties of the cost function are stated from which a function

Summarising the three cases, an interpretation which penalises any deviation of a self-sustaining equilibrium

Summing up (10) the differentiability and convexity is preserved.

The cost function

With the global costs in the smart grid defined in (11), fair prices for each agent are derived such that the global costs are covered. Based on [

By applying (9), (10) and (12) can be shown to be equivalent. Through division by

From (13) the costs for an agent N with respect to its demand/supply and energy prices are given by

This can be rewritten with respect to agent N and all other agents. For an agent N, only the variables indexed with N can be changed, the other terms are considered fixed. Therefore the game theoretic notation of the negative index

The total cost of an agent N can be expressed analogously to the total cost in the grid in (11) by

With (15) it is possible to define a cooperative bargaining game. Since the configuration varies from agent to agent, the feasible set of the optimisation problem of agent N, as presented in Section 3, is denoted by

• Players: All agents

• Strategies: Each player N selects

• Pay-offs:

In game theory, a pay-off is maximised which in this case is equivalent to minimising costs. The pay-off interpretation is merely a game theoretic convention.

The above game falls in the category of N-person game with a concave pay-off function. By applying (4), the pay-off function becomes strictly concave. The existence and uniqueness of Nash equilibria in strictly concave N-person games was shown in [

holds for all

The optimisation problem which needs to be solved for each agent is a quadratic optimisation problem with complementarity constraints. The objective function and the constraints (4) and (5) are complementary. The other constraints, as presented in Section 3, are linear. By means of the penalty method it is possible to move the complementarity constraints to the objective function and leave the linear constraints unchanged [

with a penalty factor r. This optimisation problem has the same optimum as the original optimisation problem for

With the reformulation in (17), only linear constraints are left. So merely a quadratic linear optimisation problem needs to be solved. There are various ways to solve such kind of problems, e.g. interior point method, augmented Lagrangian methods, or conditional gradient method [

The tests in this section are carried out in scenarios in which the energy demand and weather data are known for all time steps. The simulation of one day during winter with time step size of 15 minutes of nine buildings used the following specifications for each building: The building’s admissible room temperature is from 2025. The fuel cell losslessly generates thermal and electrical energy in a 2:1 ratio and needs 30 minutes to start-up and shut-down, respectively. The maximal thermal power generation is 2.6. The battery can store up to 1 of electrical energy losslessly and at most 0.4 can be fed in or out of it. The solar panel has a peak output power of 2.4. The refrigerator has a temperature tolerance interval of 37 and cooling power of 0.09. Note that the devices in the buildings are identical, but the base demand of electrical power and base thermal energy generation varies from building to building, because they are probabilistically generated as described in Section 3.

The grid operator distributes electrical power, thermal energy and gas over the smart grid. The agents can only sell electrical power and thermal energy; gas can only be consumed.

Algorithm 1. Bargaining game algorithm over a time interval

In the tested scenarios, the buildings were equipped with every possible combination of the above mentioned devices. Only the refrigerator was included in every test case. GNU linear programming kit (glpk) [

In the simulation the peak-to-average ratio (PAR) and the average costs per energy type are evaluated. The PAR relates the peak load in a time interval to the average load. If the peak load is identical to the average load, the PAR is equal to one and represents a perfectly flat load, which is desired. The PAR is depicted in

In

where demand and supply are measured in kilojoule. The virtual price is

In another set of tests, the following devices’ properties were significantly increased: Solar panel’s peak output power was increased to 9.6, battery’s maximum capacity was increased 10 along with increased in-/outflow rates of 4, respectively, and fuel cell’s maximum thermal power generation was increased to 24; the other parameters and other devices and settings were left unchanged. The following test setting uses only one of the above augmented devices. This was carried out to ensure that certain effects can be attributed to a specific device and their properties. The relative change of quantities below refer to the same scenario with the non-augmented properties of the devices.

With the solar panels’ power generation increased a further drop in cost of 8% maximum could be observed along with an increase of the PAR between 1.5% to 4%. This causes the power prices to drop below zero when the sun shines, meaning that one is paid to consume power, as shown in

With the batteries’ increased properties, both, the PAR and costs, reduce further. The power costs decrease by 8% to 9.5%; the PAR is reduced up to 10%. With this behaviour the peak load in the grid can be alleviated by storing power when it is cheap (or is abundantly available) and use it or sell it when it is expensive, as depicted in

Increasing the fuel cell’s power does not have any impact in the above scenarios. The reason for that is that the fuel cell is primarily used for heating and there is only a certain amount of demand to be meet. Thus being able to produce more has no further benefit.

In this paper a game theoretic approach for a multi-energy smart grid simulation has been proposed. The

feasibility of the flow through the smart grid is computed by solving a modified multi-commodity flow problem. The demand and supply itself are computed by finding unique Nash equilibrium in a concave N-person game by iteratively computing the players’ best-response strategies to obtain minimal costs. These strategies are the solutions to the respective player’s quadratic optimisation problem with complementarity constraints. The objective function relates demand and supply to the costs by applying a fair pricing scheme.

The test results show that with this model solar panel, batteries and fuel cells can be used to reduce the energy prices to varying extent. The peak-to-average ratio (PAR) can only be reduced significantly by employing batteries. Solar panels increase the PAR when the sun shines. Moreover, when solar panels generate more power than can be consumed, the prices for power drop below zero. Fuel cells replace the heating and therefore do not flatten the demand but use gas as a heating surrogate. This entails that the heat demand is reduced but the gas demand is increased, which overall yields a financial profit.

A further step is to increase the simulation to city-sized grid to compute the individual behaviour and compare local sub-grid (distributed) optimisation with centralised (global) optimisation. Since the implementation was carried out in C++ and the open source GNU linear programming kit [

ChristianKuschel,HaraldKöstler,UlrichRüde, (2015) Multi-Energy Simulation of a Smart Grid with Optimal Local Demand and Supply Management. Smart Grid and Renewable Energy,06,303-315. doi: 10.4236/sgre.2015.611025