Storage sizing for embedding of local gas production in a micro gas grid

In this paper we study the optimal control of a micro grid of biogas producers. The paper considers the possibility to have a local storage device for each producer, who partly consumes his own production, i.e. prosumer. In addition, connected prosumers can sell stored gas to create revenue from it. An optimization model is employed to derive the size of storage device and to provide a pricing mechanism in an effort to value the stored gas. Taking into account physical grid constraints, the model is constructed in a centralized scheme of model predictive control. Case studies show that there is a relation between the demand and price profiles in terms of peaks and lows. The price profiles generally follow each other. The case studies are employed as well to to study the impacts of model parameters on deriving the storage size.


Introduction
The gas supply chain will undergo major changes with the introduction of renewable gases in the distribution grid.The European Union and the Dutch Government have estimated that the sustainable biomass supply will be sufficient to meet approximately 20% of the gas consumption in 2030.This estimation is in line with several targets towards an innovative and sustainable bio-based economy, the sustainable use of natural resources, improved competitiveness, and the transition towards a low-carbon economy [1].
One of the renewable gases is biogas.As is well known, the biogas can be produced by anaerobic digestion.Any agricultural sectors may build the digester to produce biogas from organic waste.Furthermore, they (partly) consume their own gas production.We therefore call them prosumers.
Gas is in The Netherlands mainly used for space heating.Climate and weather patterns cause the gas consumption level to fluctuate at both the micro-and macroscopic levels, whereas gthe biogas production is nearly constant.This leads to a mismatch between the demand and supply that prosumer can mitigate it by using (local) storage.Additionally, connected prosumers can sell stored gas to other prosumers in an effort to create revenue from it.As the installation and integration with the grid of storage device costs money, it is therefore of interest to study the tradeoff between the value created by the storage device and its cost.

EPJ Web of Conferences
There are several possible scenarios for the use of biogas in a micro grid of connected prosumers [3].The first scenario is that prosumers convert the raw biogas into green gas before injecting it into the low pressure gas grid in order to deliver it to their neighbors.The conversion is done to meet the gas quality requirement for the low pressure domestic grid.The second scenario is that each prosumer will have special household appliances that can reliably and safely consume the produced biogas.The third scenario is that prosumers will convert biogas to green gas and transport it in liquid form per lorry to the medium pressure gas grid.This paper is particularly concerned with the second scenario.The first scenario is treated in [3], whereas the third scenario is left for future research.
In this paper, we develop an optimization model aiming at deriving a storage size and at providing a real-time pricing mechanism.The paper first formulates the model in discrete time.We consider the optimization model where the goals are to minimize the total cost in the presence of storage investment and unsatisfied demand, and to maximize expected revenue as a prosumer may satisfy a portion of the neighbor's demand.
The issue of controlling supply-demand balance has been treated in [4] and [5].There it is applied for the electricity grid where the excess electricity production cannot be stored efficiently on a large scale.The papers provide a real-time pricing mechanism which aims at matching the electricity supply and demand.However, the pricing mechanism is not straight forwardly interpretable as an economical unit.In this paper we formulate a dynamic pricing scheme which reflects the degree of local gas imbalance and inventory levels.In this way the prosumer can calculate the expected revenue when he offers his excess production to fulfill a portion of his neighbor's demand.
With respect to the presence of storage device, the amount of gas stored per time unit is controllable even though it is subject to several physical constraints in terms of pipeline pressure and restricted storage size.It is then natural to solve the optimization problem in the model predictive control (MPC) framework, see [6].Recently some efforts have been made to solve optimization problems subject to operational constraints in the power network using MPC, see [4,5], and [7].
The remaining part of the paper is organized as follows.Section 2 describes all components which are involved in our model setting.Section 3 provides the problem formulation along with the MPC framework.Two case studies are employed and presented in Sect. 4 in order to verify the proper working of the MPC optimization framework and to study the impact of model components in deriving the storage size and the pricing mechanism.The key points and further considerations are provided in Sect. 5.

System description
Consider a micro grid of prosumers who exchange biogas through the network.We first briefly provide the system description of each biogas prosumer by introducing some components used in our model setup.

Biogas generation
As is mentioned earlier, biogas is an end product of the anaerobic digestion process.The process begins with breaking down the biodegradable materials, such as animal and agricultural waste, and converts them to produce biogas and co-products.We suggest to see [8] for detail an anaerobic digestion process.The inflow of the digestion tank is considered to be uncontrollable.As one of the end products of the digestion process, the biogas is then formulated as a given signal.The generation level is denoted by g i k for each prosumer i ∈ I := 1, 2, . . ., n at time instant k ∈ Z + .

Demand
The biogas usage at time instant k denoted by d i k .The demand can be satisfied by a prosumer's own generation and/or the amount of gas requested from his neighbors j ∈ I where j = i.There is no chance here to shift the demand in time.In other words, the instantaneous demand d i k should be immediately fulfilled.

Let x i
k ∈ R n indicate the imbalance defined by the difference between the instantaneous demand d i k and the supply provided by a prosumer.The supply can be coming from the instantaneous generation g i k and amount of gas taken the storage device u i k which is a decision variable.u i k is negative if one stores biogas to the storage device, it is positive when one takes gas from the device.As the storage size is restricted, when the local gas generation exceeds the overall demand at the same time as the storage is completely filled, gas will be burned.It is denoted by b i k and considered as a dump load.The dynamics describing the evolution of the imbalance variable at each prosumer i is given by the following discrete time state space equation where the matrix A ∈ R nxn represents information exchanged over the amount of imbalance as we assume that each prosumer can communicate with each of his neighbours.The entries of the A matrix are chosen so that the uncontrollable systems, i.e. neighboring prosumers, are stable in terms of imbalance dynamics.
In order to keep the imbalance within a small range, depending on the hardware (pipeline pressure, etc.), we put physical constraints on the imbalance information, i.e.
where x min and x max respectively indicate the minimum and maximum amount of the imbalance, given in Nm 3 .

Decentralized gas storage
The evolution over time of the gas stored in the inventory device is described by the following discrete time state equation with the initial condition z i 0 .Moreover, the inventory level is bounded by where S i specifies the storage size of a prosumer i.The storage type is not specified here, but it could for instance be a type of above ground low pressure vessels [9].As a consequence of (4), the decision variable u i k can be expressed as EPJ Web of Conferences

Price dynamic
Along with the existence of a storage device, we hypothesize that the prosumer's gas price reflects the degree of local gas imbalance and inventory level.Let p i k ∈ R n be the local price of prosumer i at time slot k, given in e/N m 3 .The price satisfies the following discrete linear time-invariant state space equation where the following holds true.
1. B ∈ R nxn is the information matrix corresponding to the exchanged information over prices among prosumers connected.The entries represent the network topology, where B ij ∈ [0, 1] if the prosumer j is affecting prosumer i in terms of price.Prosumer who does not generate any biogas, i.e. consumer, will not have a local price pattern.2. ∈ [0, 1] is a weighting factor with respect to the local gas imbalance affecting the evolution of price over time unit k, given in e/ Nm 3 2 .3. ∈ [0, 1] is a weighting factor corresponding to the inventory level affecting the change of price, given in e/ Nm 3 2 .
It is explicitly defined in ( 6) that when the inventory level of prosumer i is increasing, his corresponding price is decreasing.If the unsatisfied demand increases, his price increases as well.All components mentioned above are illustrated in Fig. 1.

Problem formulation
We now formulate an optimization problem where prosumer i controls the charging/discharging action u i k optimize the gas flow while guaranteeing that the demand and all constraints mentioned earlier are satisfied.The problem is formulated as a discrete time model.For a given local and exchanged information over imbalance and price as well as storage size and the corresponding burning level, we introduce a cost function min subject to (1)-( 6).The model introduced in (7) combines the effect of the local variables and interconnected states.The objective function formulated above consists of five terms.The quantity of p j k B ji x i k is the cost at which the prosumer i expects others to charge him in order to fulfill his unsatisfied demand with the proposed selling prices coming from other prosumers denoted by p j k .The second term 03005-p.4 3 rd European Energy Conference refers to the cost of transporting the amount of gas requested by prosumer j to prosumer i with c l defines the transmission cost for each unit gas volume Nm 3 .In the model, the cost of transmission depends only on the volume, not on the distance.The third term represents the burning cost of any excess generation at the time the storage is completely filled and there is no more demand to be satisfied.The factor c b defines the weighting factor of such an undesirable activity.In the future research, we are working on the extensive model at which we encounter the undesirable routine by converting the excess generation into liquid form and transporting per lorry to the low pressure gas grid.The fourth term corresponds to the cost of a certain size of storage S i .The last term interprets the revenue that prosumer i expects to receive from other prosumers as he may satisfy other's unsatisfied demand with the proposed selling price of p i k .It is necessary to make the imbalance terms within an absolute sign due to the fact that the unsatisfied demands are always non-positive value according to the formula stated in (1).In fact, we impose the weights A ij and B ij appear in the cost function in effort to guarantee that the price and imbalance information which are taken into consideration in the cost function of prosumer i are originally from the connected prosumers, see R1 in [5].
Remark 1.In the cost function defined in (7), we do not have any cost reflecting the control effort, i.e. c u u i k for instance, where c u penalizes the input trajectory which deviates from 0. In fact here the control action can immediately switch from positive value (taking gas from the storage device) to negative value (storing some excess generation) or the other way around in order to optimize gas flow and no cost is incorporated in the action.
Remark 2. Each prosumer changes his price and imbalance dynamically and synchronously.In other words, the connected prosumers are assumed to have a common clock to update the information.
As is mentioned in Remark 1, the amount of gas stored is controllable.However, it is subject to several physical constraints with respect to the storage size and pipeline pressure.It is therefore natural to construct and solve the optimization problem in a framework of MPC.More detail about the MPC mechanism can be found in [6].To build the problem in the model predictive control framework, we define x (k+l|k) , z (k+l|k) , p (k+l|k) , u (k+l|k) and d (k+l|k) which l ≥ 0 the states and input control at time step k + l predicted at time instant k employing respectively the imbalance (1), storage level (3), price dynamic (6), input control level, and demand pattern.At every time step k, a prediction horizon L, and a given initial storage level z i 0 , MPC calculates the optimal control sequence.Next, only the first control input sequence is implemented in state Eqs.(1), (3), and (6).Subsequently, the horizon is shifted and the new states are estimated at the next sampling time to solve a new optimization problem by making use of the new information.In order to predict the future cost and revenue over a finite prediction horizon L, the optimization problem is reconstructed into

Case studies
The model framework developed in the previous section is applied to two types of micro grid, which are a network of fifteen biogas prosumers and a network of five biogas prosumers and ten consumers.The simulation is performed with the realistic demand pattern provided by DNV KEMA, The Netherlands.

Case study: A micro grid consisting of fifteen prosumers
In the simulation study, a network of fifteen gas prosumers is constructed.Each prosumer has the same level of gas production, i.e. 100 Nm 3 per hour.We consider each of them is a building consisting of 300 households.The demand pattern of a household over a year is shown in Fig. 2. To construct different demand for fifteen prosumers, we multiply the average biogas usage with a random variable between 03005-p.5 0.75 and 1.25 and shift randomly between −2 and +2 hours.The initial storage level is set to be the same at 1000 Nm 3 .Furthermore, the inventory level is bounded between 0 and a restricted storage size S i for each prosumer i. Above ground low pressure vessels with the capacity of 100-2000 Nm 3 are possibly one of the most suitable storage type [8].The charging and discharging amount u i (k+l|k) are dynamically limited by the available gas in the storage device and the storage size, see (5).

EPJ Web of Conferences
For simulation purpose, we set In the simulation, the prediction horizon is set to be 96 sampling period with the sampling period of 15 minutes.The whole year planning period is simulated for each value of S i .In the following subsections, we concern on understanding two points; i) the relation between the demand and price profiles, ii) the impact of burning cost in deriving the storage size.
To address the first point, we set the initial price level at zero value for all prosumers.As is mentioned in (6), the factors and are introduced to investigate the impact of imbalance and inventory levels on local gas pricing.In the simulation, the imbalance and inventory levels are respectively bounded by [−5 Nm 3 , 5 Nm 3 ] and [0, 1000 Nm 3 ].As a result, the impact of imbalance level is much less in a comparison with the impact of inventory level on the local gas pricing.Figure 3a shows that there are clear differences at the price level once we set the factor to be 0.4 and 0.5.Notice also in the figure that the price dynamics more or less follow the demand profile in terms of peaks and lows with some delay.
Figure 3b demonstrates the impact of burning factors on the total cost incurred for the whole year and total amount of gas burned when the storage size is set to be 1000 Nm 3 .It is shown in the figure that the higher we penalize the burning activity, the lower amount of gas to be burned.The total cost is decreasing when the weighting factor of burning activity decreases as well.As we need to take into account the environmental issue towards the amount of gas burned along with prosumers' economical intention, we find out that the burning penalty of 0.5 is a reasonably optimal burning factor.Next, we focus on identifying a unique optimum S i * based on the corresponding cost.As is mentioned earlier, the storage type of above ground low pressure vessels are considered to be the most suitable and common low pressure gas storage.All possible values of the storage size, i.e. 100-2000 Nm 3 are evaluated.The corresponding cost refers to the total predicted cost which is obtained by fifteen prosumers for the whole year.We set the weighting factor of burning activity at 0.5 and the maximum amount of gas burned at 200 Nm 3 /hour in order to take into account the environmental concern.
It portrays in Fig. 3c that the optimal storage size is at 2000 Nm 3 .Notice as well in the figure that the minimum storage size is at 400 Nm 3 to accommodate the demand fluctuation over a year.Detail speaking, when we set S i < 400 Nm 3 the calculation will obtain an infeasible solution in summer period.It relies on the fact that the storage device at the moment is completely full and there is still any excess generation after satisfying the overall demand and burning 200 Nm 3 /hour.

Case study: A micro grid consisting of 5 prosumers and 10 consumers
In this case, an agent i is considered to be a consumer if one does not generate any biogas, i.e. g i k = 0 for all time instants k ∈ Z + .Each consumer represents a street consisting of 10 households.The average biogas consumption of a consumer during the high, medium, and low demand period are respectively 45%, 25%, and 10% of a prosumer's production level, i.e. 100 Nm 3 /hour.The biogas demand profiles of other consumers are varied by a random variable between 0.75 and 1.25 and shifted randomly between −2 and +2 hours.The consumer is not allowed to have a decentralized storage device.As a consequence, the consumer cannot play as a gas distributor.The controllable variable of consumer u i k refers to the amount of gas requested by consumer to any connected prosumers.In contrast with prosumers' goal stated in (8), each consumer i aims at minimizing his local imbalance given by min i∈I x i . Each prosumer and consumer are allowed to share the information to others over their imbalance.It is represented in the entries of A matrix given by A ij = 0.06 for i = j 0.16 otherwise (9) We set the value of A ii to be higher than A ij relying on the fact that the part of imbalance from prosumer i plays more role in regulating his local cost-revenue update calculation.
As is explicitly mentioned earlier, the consumers are depicted as agents i = 1, . . ., 10.They do not generate any price pattern.In contrast, the prosumer's price will affect connected prosumers and 03005-p.7 Figure 4 shows the simulation results during the whole month of May.It is shown in Fig. 4a that the average consumption of the consumer can generally be satisfied by connected prosumers.As a result, the imbalance of a consumer stays close to zero value as is portrayed in Fig. 4b.Each prosumer eventually still has excess generation after satisfying the overall demand.It is depicted by negative values of the prosumer's imbalance in Fig. 4b.

EPJ Web of Conferences
In this case, we study as well the price dynamic of prosumers in the presence of consumers in the micro gas grid.To do so, the initial prices are set to be zero value.Figure 4c shows the price pattern of prosumer 1 and 3.It is confirmed in the figure that the prices generally follow each other.The negative values refer to the selling price.The price profiles intend to stay close to zero as the prosumers are willing to sell the excess generation with an attractive selling price to consumers.

Discussion
The paper has discussed the sizing of decentralized storage device for a micro grid of biogas prosumers.The sizing is based on representative hourly demand profiles and the possibility to exchange the price and imbalance information among prosumers with the objective of minimizing the long run cost incurred due to the storage investment and the cost of fulfilling the unsatisfied gas demand and maximizing the expected revenue of selling any excess generation.We have provided as well the local pricing mechanism reflecting the degree of inventory and imbalance levels.In addition, we have shown how to include biogas consumers with different objective functions.The model has a freedom to take into account which prosumers and consumers have more importance in the cost-revenue update calculation.
The model will be extended in a distributed MPC framework in an effort to deal with the robustness and reliability issues over a network consisting of a larger number of prosumers and consumers.To do so, the centralized model will be decomposed into separate criteria for each prosumer and consumer.Further research to include the possibility to sell any excess generation to the consumers on the low pressure gas grid is currently under study.

Figure 1 .
Figure 1.Physical system illustration of a micro gas grid consisting of n prosumers.Each prosumer produces biogas and operates a decentralized storage device.

Figure 2 .
Figure 2. Mean gas usage of a household per hour [10].

3 )Figure 3 .
Figure 3. a) The relation between demand and price profiles.b) The impact of burning factor on the total cost and amount of gas burned in the case of 1000 Nm 3 storage device.c) The impact of storage size on the total cost obtained by fifteen prosumers for the whole year, when c b = 0.5 and the maximum amount of gas burned is at 200 Nm 3 /hour.

1 Figure 4 .
Figure 4. a) The consumer's demand d i k and the corresponding amount of gas obtained u i k .b) The imbalance of a consumer and prosumer.c) The price dyanmics of prosumer 1 and 3.

Table 1 .
[3]er parameter values involved in the optimization problem can be found in the following table.The parameter values involved in the optimization model[3].