Optimal operation of multi-vector energy storage systems with fuel cell cars for cost reduction

: Combined borehole (BH) heat storage systems, batteries and power-to-gas system have the potential to shift load, reduce carbon emissions, provide hydrogen for fuel cell cars and save energy costs for end customers on an extended scale. This study proposes an optimal operation strategy for a local multi-vector energy storage system, which includes batteries, BH thermal storage, the power to the gas system and the fuel cell cars system. These storage systems can be divided into the short-term storage system and inter-seasonal storage system or low capacity storage system and high capacity storage system. The optimisation problem is divided into a two-stage framework, (i) the first stage optimisation is seasonal optimisation, which gives an approximate optimal operation plan for BH heat storage systems in the following year; (ii) the second stage develops a day-ahead robust optimal plan for all storage systems. Finally, the algorithm will return to seasonal optimisation to update the operation plan for BH heat storage systems to make results more accurate. The test case of eight nodes illustrates that the combined energy system of photovoltaic, heat pump power to gas, BH and batteries can provide hydrogen to fuel cell cars and significantly save power costs for customers with the optimal operation.


Introduction
In local multi-vector energy systems, electricity, heat, natural gas can optimally interact with each other at various levels, which represents a significant opportunity to increase the technical, economic and environmental performance [1]. Each component in the local multi-vector energy system has its characteristic, which could be very different.
The decarbonisation of the power system has led to more renewable energy use in heating and electricity. Renewable energy is normally cheap and green, but the output is fluctuating. The fluctuation of output is particular for photovoltaic (PV) generation. PV farms can be easily installed on the roof at a competitive price, but its production is significantly affected by temperature, solar irradiation, wind speed and other ambient factors. A significant mismatch of PV and demand will cause a high volume of PV curtailment if no storage system is available. Thus, by installing battery energy-storage systems, more PV generation can be captured by energy time-shift [2].
Since there is a vast difference in heating demand between summer and winter, a large volume of energy storage systems is needed to shift demand and reduce cost. Borehole (BH) interseasonal thermal storage with heat pumps (HPs), for providing space heating is a promising solution to balance the heating demand [3]. During summer, when heating demand is low, HP can transfer heat to BH and increase the temperature of BH [4]. The efficiency of HP is dependent upon the difference in temperature between the BH and the air or sink [5] and thus HP can achieve higher efficiency in winter. A well designed HP system can enable both high efficiency and low operation cost for a local heating system. Besides, the life expectancy of a ground-source HP varies from 20 to 30 years [6,7]. BH usually has a life expectancy over 100 years. In comparison, gas boilers are generally available with the extended warranties of up to 10 years [8].
Batteries unit is another kind of component to shift load and absorb renewable energy. Liu et al. [9] developed a novel charging strategy for PV-based battery switch station, considering the service availability and self-consumption of PV energy. In the case study, the authors compared the strategy with instant charging strategy under different scenarios. The results show this strategy can effectively improve the self-consumption of PV energy. N. Beniwal proposed a simple phase-locked loop-less control for a single-stage solar PV-battery-grid-tied system. Compared to traditional solar PV systems, this system reduced losses due to the absence of a boost converter and a flexible power flow due to the inclusion of a storage source (battery). Both models heavily rely on the batteries, which means a large volume of batteries is needed to achieve their goals. Since batteries will degrade along with charging and discharging cycles, additional maintenance is required every year.
Fuel cell cars are a type of traditional electric vehicles (EVs) which uses a fuel cell, in combination with a battery or supercapacitor, to power its on-board electric motor. Comparing to the EVs, the fuel cell cars are more expensive because of the production costs of fuel cells is relatively high than a regular battery [10]. However, fuel cell cars have the advantage of fast refuelling. Due to the limitation of batteries technology, the plug-in EVs need an average charging time of several hours, but the fuel cell cars only need several minutes to refuel. Compared to regular cars, fuel cell cars have the potential to reduce carbon dioxide emissions by up to 75% during the service life [11]. In the local multi-vector energy system, the surplus power generation by PV panels will be used to power the power to gas (P2G) system and storage in the tank in the local community. The fuel cell cars could use the P2G system to refuel.
To ensure that each component in the local multi-vector energy system interacts with each other at high efficiency, energy storage system and energy conversion system should be optimally operated. A method is presented for combined optimisation of different energy infrastructures such as electricity, gas and district heating systems [12], which can offer the optimal dispatch of multiple energy carriers in general conditions. In paper [13] HPgas boilers are modelled in an integrated manner with a suitable level of details for operational purposes.
This paper proposes a novel combined operation strategy for the local multi-vector energy storage system. In this system, HP, BH, batteries, P2G system and PV farms work together to save energy costs and reduce carbon emissions. PV produces energy to meet local electricity demand and the surplus PV energy is consumed by HP to transfer the energy to meet heat demand. If the heat generated by an HP exceeds the local heat demand, BH will store the extra heat. On the other hand, if the electric price is low, HPs will use the power from the grid to heat BH. If the PV output and HP cannot meet local heat demand, the gap will be met by the power from the grid. As a result, the temperature of BH increases [4], which means HP will achieve a higher performance in winter. Other than storing surplus energy in BH or batteries, another option is to use power-to-gas technologies to transfer electric into gas and store in the gas tank.
In previous models and tools, Liu et al. [14] built an optimal coordinated operation model of comprehensive storage and conversion devices in multi-vector energy communities to minimise cost. Comprehensive energy storage and conversion devices, as well as detailed multi-network energy flows, were modelled using matrix formulation. In the study of Ata et al. [15], a smart multi-energy system architecture with a combination of integrating gas, electricity and heat network was presented for improving optimal operational strategies. Renewable-based multienergy system structure was comprehensively examined through integrating CHPs and HPs on the supply side. In paper [16], a cutting-edge multi-energy system solution for the optimal operation of a grid-connected multiple energy carrier micro-grid incorporating the real-time pricing, demand response programs and the uncertainty associated with day-ahead forecasts has developed. The model in [14][15][16] only considered the price change and demand change during a day, but the seasonal price change and the demand change has not been taken into consideration. By introducing the BH as seasonal thermal storage, costs will fall and carbon-dioxide emission will be reduced. The function of providing hydrogen for EVs is another function comparing to the above-mentioned studies.
This problem is modelled as a two-stage optimisation, whose aim is to find the best optimisation strategy for the storage system to minimise operating costs for the local energy system. The first stage optimisation uses the forecast data of the following year to optimise the operation of HP and BH system. The first-stage optimisation will decide the heat transfers to BH every day. The second stage of optimisation will use a more accurate model to optimise all the storage system and give day-ahead operation planning. Finally, the first stage of optimisation will be executed iteratively after the second-stage optimisation to achieve higher accuracy.
The innovations of the paper are (i) a novel multi-energy local system with multi-vector energy storage systems that can optimally meet heating, electricity demand and the demand of fuel cell cars, and keep BH and HP systems working in high efficiency in seasonal operation is designed, (ii) the multi-energy model is simplified into a two-stage optimisation model to decide the operation strategy. The new model is much easy to solve with iteration methods. (iii) Robust optimisation is utilised to achieve a robust operation plan in day-ahead optimisation with the uncertainty of BH temperature and HP efficiency.

System overview
In this paper, the proposed local energy system consists of a gas system and an electric power system. Fig. 1 shows the energy flow of this system. The green arrows represent electricity flow, red arrows represent heat flow and black arrows represent the gas flow. The primary source of the electric power system is PV farms. The electric power will meet the electrical demand first, and the surplus power will be stored in batteries or be converted into hydrogen by electrolyser and stored in the hydrogen tank. The hydrogen tank is the hydrogen source for fuel cell cars, and can also be transferred into a mix of carbon oxide and hydrogen with a specific ratio by conversion reactor to meet the requirement of a gas tank. If the PV output cannot meet the demand, the shortfall will be supplied by a gas turbine and the electricity system. The heating consists of HP and BH. When the heating demand is high, the HP will transfer heat from BH to consumers. When there is no heating demand, the HP will transfer heat to BH to increase the temperature of BH, achieving higher efficiency in winter [5]. The timing of heating BH depends on the energy price, and the input or output of heating BH relies on the state of charge (SOC). The final objective of this model is to reduce the total energy costs.
This section first briefly introduces each component of the system, where all components will be used to establish the local multi-vector energy storage system.

Electric transmission system
The electric system connects the electric power source, consumers and electricity storage system. The power flow constraints are calculated as below where the angle at node i is i , B ij is susceptance between nodal i and nodal j when i = j, B ij is the susceptance between nodal i and ground when i = j. The amount of real power produced by each generator needs to meet the inequality constraints mentioned below where N PG is the number of generators.

Gas transmission system
The gas system can be simplified to a graph with nodes and branches with abstraction. The most commonly used mass flow equation is the Weymouth equations. The Weymouth equation is most suitable for gas flows in pipelines with diameters of 15 inches or less, for segments of pipeline that are <20 miles in length, and for medium to high pressure (∼100-1000 psia). In a community level gas transmission system, the pressure of the gas in each section of line typically ranges from 200 to 1500 psia. So the pipeline branches follow Weymouth flow in (3) where f k i j is the pipeline flow rate (SCF/hr), p i is the pressure at node i, p 0 is the standard pressure, is the pipeline efficiency (ϵ), D k is the internal diameter of the pipeline(inch), G is gas specific gravity, L k is pipeline length (miles), T 0 is the standard temperature (°R), T ka is average gas temperature, Z a is average gas compressibility factor. Gas flow will lose energy during the process of transportation due to frictional resistance, which will reduce the pressure of the natural gas. As a result, compressor stations should be installed at every certain distance to raise the pressure.
Compressor operation equality constraints are mentioned in (6).
where f k is the gas flow rate through a compressor, Z ki is the gas compressibility factor at the compressor inlet side, T ki is compressor suction temperature, α is specific heat ratio, k is compressor efficiency. The mass flow balance equation at each node can be written in matrix form as the equations below where ω = ω S − ω L , α Tk , Tk and Tk are coefficients, ω S is the gas injection from the gas source, ω L is the gas load.

Heat pump
HP is the major heating device, whose output obeys the following equation: where H HP is the heat output of the HP, HP is the efficiency of the HP, P e is the input power of the HP. HP efficiency is heavily related to condenser outlet temperature and evaporator inlet temperature when the condenser outlet temperature is set to a certain value; the efficiency of HP is calculated by the equation below [3] η HP = aT + b (12) where T is the evaporator inlet temperature. When condenser outlet temperature is 50 °C, a = 0.0918, b = 2.8076.

BH thermal storage
The BH is used for storing hot liquid and providing cooling and heating. BH thermal energy storage is a commonly used storage method which has been studied in the past decades due to its safety and reliability [17]. The BH inter-seasonal storage helps to increase the usage of renewable energy such as solar radiation, and it became trendy during the 1960s [18]. In recent years, in Europe, around 40% of final energy consumption is from residential buildings [19], and thus more BH research based on residential buildings is carried out. Research has been done on the relationship between solar power collection area and storage in [20]. Adhikari et al. [21] studies a power supply system depending on different end-users, which includes heating, domestic hot water and electricity. Compared with the conventional boiler heating system, the primary power consumption decreases with the reduction of CO 2 emissions from space heating with BH installed.
To improve HP efficiency, the underground part of HP will install with BH so it can exchange energy with BH, then the underground part of HP and BH share an equal temperature in the equation below [4].
where V BH is the volume of BH and c BH is the volumetric heat capacity of the BH.

Power-to-gas units and gas turbine
Novel P2G technology has received considerable research and industrial attention worldwide recently because it can transform power into natural gas or hydrogen so that renewable energy can be better utilised during off-peak load periods [22]. It can also help decrease the operational cost for natural gas and electricity systems [23]. There are mainly two steps to transfer power to gas, which is: The energy flow of an integrated system with P2G technology is shown in Fig. 1. In the first step, electrolyser produces hydrogen, and the P2G system can work at 'E-Hy-E' mode. Electrolyser produces hydrogen driven by power during the off-peak periods and the generated hydrogen is stored in the hydrogen tank. The hydrogen tank supplies fuel for fuel cell cars. Therefore, the electrolyser shifts generation peak and decreases renewable energy curtailment. In the second step, the P2G system can work at 'E-Hy-G' mode. Hydrogen produced by electrolyser reacts with carbon oxide to generate natural gas through Sabatier catalysis. Therefore, the unit utilises the off-peak period power as well as reduce fuel costs.
Assume that the P2G system follows a constraint of the below equations (15) where α P2G , β P2G , γ P2G are coefficients, P P2G is the power consumed by P2G system and V 0 is the equivalent volume of gas under standard pressure of gas tank before the P2G system works. V is the gas capacity of the gas tank in the P2G system.

Batteries unit
Compared to P2G unit with an average efficiency of 36%, batteries have a better efficiency [24]. The average efficiency of Li-ion batteries and lead-acid batteries are 95 and 80% [24]. Thus, to store power in batteries is a preferred choice. The battery units should meet constraints in (16) to (21). The batteries can only charge or discharge at one time, so they must satisfy constraint below The batteries have a maximum charge or discharge rate constraints as mentioned in the below equations The SOC of batteries meets the constraints (19)- (21). To ensure the capacity of absorbing surplus power in the next day, the initial SOC and final SOC of batteries unit should be between the interval. where P B charge, t and P B discharge, t are the charging and discharging power of batteries at hour t, SOC t is the SOC of batteries at hour t, SOC 0 is the initial SOC of batteries. B is the efficiency of batteries. Cap is the capacity of batteries.

Fuel cell cars
The fuel of fuel cell cars is diverse, including hydrogen, methane, alcohol and so on. However, the most widely used fuel cell in the car is powered by a hydrogen-driven fuel cell. As the hydrogendriven fuel cell is much more simple in construction and more economy. To popularise the fuel cell cars, the hydrogen refuelling station should be built widely in the local multi-vector energy system. The local multi-vector energy system could generate hydrogen by P2G technology. By using the electrolyser in the local multi-vector energy system, the owner of the fuel cell car does not need to find a hydrogen station, which is uncommon, to fill the gas tank. They got easier access to hydrogen in the local community. During the summer times, the PV output could have exceeded the power demand. The surplus electric power can be used to power the P2G system and meet the demand for fuel cell cars. It is assumed that the total hydrogen consumption of fuel cell cars in the local community is ω car , the constraint of P2G system should be transferred from (15) into the equation below (22) where V 0 is the equivalent volume of gas under standard pressure of gas tank before the P2G system works. V is the gas capacity of the gas tank in the P2G system. The data of ω car are assumed to be known as an extra hydrogen demand.

Two-stage robust optimisation
The problem is too complicated to be solved directly since there are too many variables in the model. To simplify the problem, this model can be divided into seasonal optimisation and day-ahead optimisation.
At the beginning of the year, all the data of energy demand and energy price are from the forecast, and as time goes by, the forecasted data will be updated. So it is inappropriate to give all the operation planning of BH at the beginning. In the first stage optimisation, the forecasted data of energy demand and energy price will be used to generate an initial seasonal plan to BH which contains the total heat input and output in every day and ignore the real-time heat input and output of BH. The initial plan gives a rough charging time to BH and ensures the BH works in safe and economical temperature. The boundary of the temperature of BH and efficiency of corresponding HP in a day will be calculated from the initial plan of BH. Since the BH is seasonal thermal storages which has a relatively large capacity, the interval of BH temperature and HP efficiency will stay in a small interval. Due to the efficiency of HP is an uncertain value in an interval, robust optimisation is used in the second stage optimisation, which is a day-ahead optimisation. The day-ahead optimisation will move forward to generate the optimal planning of P2G unit, gas turbine, batteries, HP and BH in every hour.
In the following day, the temperature of BH and the efficiency of HP in the previous day have been already known, and the data of energy demand and energy price will be forecasted again to reduce errors. Thus, after the second stage optimisation, the first stage optimisation is executed again to update the status of BH. The details of two-stage robust optimisation are given below.

Seasonal optimisation
To make the seasonal optimisation more computationally tractable, all network constraints, charging and discharging of batteries will be ignored. Only the balance of power at the end of each day will be considered. The input and output of the seasonal optimisation are shown in Fig. 2.
The objective function of seasonal optimisation is shown below where p g d is the average price of gas in day d, ω GT d is the total natural gas consumed in a day, P car = kω car d is the equivalent consumption of electric power of fuel cell car, ω car d is the demand of fuel cell car, k is the transfer coefficient, p e d is the price of electricity from the grid and P e d is the power brought from the grid.
The power balance equation of each day is shown below where P PV dt and P GT dt are the powers generated by PV and gas turbine at hour t and day d. P HP dt and P ED dt are the power consumption of HP and other demand at hour t and day d. The model of the gas turbine is simplified as where GHV is the gross heating value of natural gas and GT is the average efficiency of the gas turbine. The temperature of BH should follow the below constraints where V BH is the volume of BH, c BH is the volumetric heat capacity of the BH and T is the temperature of BH. The simplified model of seasonal optimisation makes it easy to solve by the interior point method. After the seasonal optimisation, day-ahead optimisation will follow.

Day-ahead optimisation
After the seasonal optimisation, the rough result of T and HP is calculated. Day-ahead optimisation is needed to generate a robust and accurate plan for P2G unit, gas turbine, batteries, HP and BH. The input and output of the day-ahead optimisation are shown in Fig. 3.
In the day-ahead optimisation, it is assumed that HP remains the same during a day. It follows the following constraints: where U is the uncertainty set of η HP dt . η HP d + 1 and η HP d are from the first stage optimisation. The power flow constraints are converted into (31): where P PV is the maximum PV output, P PV curtail is the PV curtailment, P B is the power output of batteries and P HP and P ED are the power consumption of HP and other demand. HP and BH also follow the constraints (11)- (13). In addition, HP should meet the heating demand. When the heating demand and energy price is low, HP should heat the BH to achieve higher efficiency.
The objective function is to minimise the total cost of gas and electricity consumption.
The additional constraints are listed as: The day-ahead optimisation is a robust optimisation problem. YALMIP is used in the derivation of robust counterpart [25]. The robust counterpart will be solved by fmincon solver.

Iterative optimisation
Before the following day comes, the day-ahead optimisation for the following day should be executed. After the day-ahead optimisation for the first day, the first stage optimisation should be rerun to achieve higher accuracy. Objective (22) should be transferred into the equation below The initial temperature will change into the equation below H BH 0 = η HP 0 P HP 0 is decided by day-ahead optimisation.

Test case
In this section, a five-node electric system and a three-node gas system are used for the model demonstration. As Fig. 4 shows, five PV farms are installed in this system, which is the primary electric power source. The gas system and electric system are connected by a gas turbine and a P2G system. The gas turbine will be installed between node 1 of the electrical system and node 3 of the gas system. The detail data of each component is given in subsection.

Input of the test system
The power output of five PV farms on a typical day is given in Fig. 5. Since the five PV farms have different capacity and installed nearby, the output of PV farms has a similar curve. The PV farms only have output in the daytime, and the peak output appears at noon. The output ratio of each PV farms is approximately equal the capacity ratio of each PV farms. The Fig. 6 shows the total PV output and overall demand. It can be seen that the PV output has a huge uncertainty for one year. PV output is higher during the summer and autumn than spring and winter. The electric demand and heat demand also change with the season, but the difference in electricity demand between summer and winter is much lower than the difference in heat demand. The heat demand is very high during winter but is approximated to be 0 during summer times. The hydrogen demand for fuel cell cars has more fluctuation compared with other demand and have more considerable uncertainties.

Result analysis
The optimal operation strategy for BHis showing in Fig. 7. The result indicates that HP will transfer heat from BH to consumers during the winter and spring. As a result, the temperature of BH will decrease during winter and spring. To balance the temperature of BH and ensure higher efficiency of HP, enough heat should transfer to BH during other times. When there is enough PV or when the price of energy is low during summer and autumn, HP will heat BH to save cost. The consumption of gas or the generation of gas and the power from the grid in a day in four seasons under the time of use (TOU) pricing is shown in Fig. 8. Generally, the gas turbine is the primary power source except for PV, and the grid act as a supplement energy source. When the electricity price is high during the daytime, the system prefers not to buy power from the grid. When the electricity price is low at night, the output of gas turbine will decrease, and the grid will take over the electricity demand or the P2G system will work to transfer electrical power to gas to store energy. In a day of spring and winter, the demand of heating is high, and the PV output is low, so the gas turbine should always generate power to meet the demand and power grid should replace the gas turbine when the electricity price is low at night. The PV output is high in summer, and the heat demand is small, so during the night, the P2G system will converse the electricity into gas. The figure of autumn is from a rainy day, so the PV output is low, gas turbine works in high frequency and still need the power from the grid. To prepare the high heat demand in winter, HP will transfer heat to HP. As there is not a large amount of heat demand during autumn, the curve of gas is smooth. Fig. 9 shows the typical curve of batteries. As there is more PV output during summer and autumn times, batteries charge and discharge more to cover the unbalance of demand and PV output. In winter, the gas turbine will generate more power to meet the demand, so batteries do not need to charge or discharge to avoid degradation.
According to the 2016 UK Government GHG Conversion Factors for Company Reporting [26]. The unit CO 2 emission of UK grid and natural gas is 0.367 and 0.21 Kg/KWh. The result of the test as mentioned above is shown in Table 1. With the storage system installed, both CO 2 emission and total cost dropped. In the basic scenario with the fixed electricity price of 0.12 £/KWh and a fixed gas price of 4.95 £/10 6 ft 3 , the overall CO 2 emission decrease from 3.12 to 2.83 Kt and the total cost drop from 1.07 K£. If the TOU pricing strategy is applied to electricity price from gird, the electricity price will rise during demand peak times and drop during demand valley times. The batteries will absorb more energy from the grid when the electricity price is low and extract more energy during electricity price peak times. So when the pricing strategy moves from fixed to TOU pricing strategy, 9% of the total cost will be saved. When the average electricity price increased to 0.19 £/KWh, natural gas will be used more frequently to reduce cost. As a result, the total cost of natural gas and electrical power will be reduced more under higher average electricity price. With the fuel cell cars connecting to the system, the total cost and carbon-dioxide emission are increased slightly. However, the effectiveness of storage decreased since the P2G system is occupied by fuel-cell cars demand, and the margin of P2G system is reduced.

Conclusion
This paper proposes a novel approach to optimally operate a multivector energy storage system in a local energy system with fuel cell cars. It presents a method to quantify the optimal operation methods for HP, BH thermal storage, batteries and power to the gas system for users to reduce power bills. The problem is modelled a two-stage optimisation problem.
A case study is taken in an eight-node combined gas-electric system as a local energy market. Results illustrate that the combined energy system of PV, HP P2G, BH, batteries can provide hydrogen to fuel cell cars and significantly save power costs for customers with the optimal operation.