Hydrogen-based integrated energy and mobility system for a real-life office environment

The current focus on the massive CO2 reduction highlights the need for the rapid development of technology for the production, storage, transportation and distribution of renewable energy. In addition to electricity, we need other forms of energy carriers that are more suitable for energy storage and transportation. Hydrogen is one of the main candidates for this purpose, since it can be produced from solar or wind energy and then stored; once needed, it can be converted back to electricity using fuel cells. Another important aspect of future energy systems is sector coupling, where different sectors, e.g. mobility and energy, work together to provide better services. In such an integrated system, electric vehicles – both battery and hydrogen-based fuel cell – can provide, when parked, electricity services, such as backup power and balancing; when driving they produce no emissions. In this paper we present the concept design and energy management of such an integrated energy and mobility system in a real-life environment at the Shell Technology Centre in Amsterdam. Our results show that storage using hydrogen and salt caverns is much cheaper than using large battery storage systems. We also show that the integration of electric vehicles into the electricity network is technically and economically feasible and that they can provide a flexible energy buffer. Ultimately, the results of this study show that using both electricity and hydrogen as energy carriers can create a more flexible, reliable and cheaper energy system at an office building.


Introduction
In recent years, the European Union has set ambitious targets towards a carbon-free energy transition. After the Paris Agreement of 2015 set a long-term goal of keeping the increase in global average temperature below 2°C above preindustrial levels and aimed to limit the increase to 1.5°C [1], many countries are now developing strict policies to reduce CO 2 and other greenhouse gas emissions significantly by 2050. Consequently, there is increasing interest worldwide in renewable energy production -mainly from solar and wind. The main challenges arising in this context are related to the intermittent nature of these sources, as well as the mismatch between supply and demand. For example, high wintertime heat demand in cold places, just when solar production is low. Hence, there is a great need to find alternative energy carriers alongside electricity. Hydrogen is one of the main candidates for this purpose since it can be produced from -generally cheap -solar and wind energy, it can be stored cheaply in salt caverns, it can be transported via ships and existing gas pipelines to the consumption location and, finally, it can be converted back into electricity using fuel cells.
To achieve the goals set in the Paris Agreement, different sectorsenergy, mobility, industry and so on -need to work together to speed up the required technological, societal and institutional changes. As such, sector coupling is an important aspect in the upcoming energy transition. This is when different sectors help each other to improve their services and capabilities. In this paper, our focus is sector coupling between energy and transport systems.
To integrate electricity and transport systems, we have developed a novel concept known as Car as Power Plant (CaPP) [2] to utilise automotive fuel cells as stationary power production units during nondriving hours (typically at home, or in parking lots during office hours). This involves using the car in what we refer to as the vehicle-to-grid (V2G) mode [3,4]. When parked, its fuel cell unit can deliver power back to the electricity grid to balance it, to offset peak demand or to serve as a baseload power generator. Hydrogen is used as a storage medium so as to decouple the supply of and demand for renewable power in terms of time and distance. CaPP has the potential to replace power plants worldwide, creating an integrated, efficient, reliable, flexible, clean and smart energy and transport system [5].
Recent studies have shown that the integration of energy and transport systems may create synergies in energy transition. As concluded in [6], the high benefit of grid expansion becomes weaker with tighter sector coupling. In [7], a commercial fuel cell electric vehicle and a battery electric vehicle are connected to a zero-energy building and their performance is compared. In [8], the integration of transportation energy with a net zero-energy community utilising captured waste hydrogen from chlor-alkali plants is examined. Integrating smart electricity, smart thermal and smart gas grids to enable 100% renewable energy and transport solutions has been studied in [9]. Moreover, an analysis of hydrogen-distributed energy systems with photovoltaics for load levelling and vehicle refuelling has been reported by the National Renewable Energy Laboratory of the US Department of Energy [10]. The role of hydrogen in low-carbon future energy systems has been studied by several researchers. For example, its crucial and complementary role in the future sustainable energy economy has been discussed in [11]. Hydrogen as an alternative energy carrier in a decarbonized energy system has been studied by both [12,13]. They conclude that hydrogen is an efficient energy vector for the transport and storage of renewable energy and is an enabler of sectoral integration within a decarbonization pathway. Moreover, [14,15] discuss the efficient storage of hydrogen in existing salt caverns. Finally, multi-carrier energy systems have already been designed, with a focus on electricity and natural gas or heat as their energy carriers [16,17].
In most of these studies, however, only battery-powered electric vehicles are considered as a means of energy storage and to deliver electricity back to the grid. Moreover, energy system designs discussed currently in the literature are mostly not integrated with the transport system as we are proposing here, with a significant role for fuel cell and battery electric vehicles in powering the building. Also, whilst some researchers have looked at multi-carrier energy systems, few so far have investigated the combination of electricity and hydrogen as the main carriers.
Our line of research focuses on the system level, and lately we have conducted several studies of the CaPP concept that include analyses of its operation and control, policies and regulations and economic feasibility. We have shown that reaching a fully renewable integrated energy and mobility system is both achievable and viable [18,19]. We have also studied the operational and control aspects of such a system [20,21], as well as institutional aspects of CaPP taking into account the behaviour of various actors in the energy system [22,23]. We have further shown that investing in such energy systems can be profitable for all parties involved [24].
To bridge the abovementioned gaps in the existing research, and as a further step building on our previous publications, this paper focuses on the concept design of the CaPP system in a real-life environment at the Shell Technology Centre in Amsterdam (STCA), which is a combined office and chemical laboratory building. Our work is diverse in its novelty: (1) it presents a tailored design for a real-life environment as a step towards wider implementation of such integrated systems in public places; (2) it uses both hydrogen and electricity as energy carriers and both fuel cell and battery electric vehicles for V2G purposes; (3) it provides a cost analysis of a coupled energy system taking into account the entire supply chain, including production, storage, transport and end users; and (4) it provides an optimal scheduling for the energy management of such a system, with the aim of minimising both production costs and -as an incentive to vehicle owners -degradation of fuel cells and batteries.
The energy system designed for the STCA is based on 100% renewable energy sources (solar and wind) and two energy carriers (electricity and hydrogen), together with electric vehicles (battery and hydrogen-based fuel cell) to deliver electricity back to the building's grid during parking hours for balancing and backup purposes. One important issue when dealing with renewable energy is its storage and the higher dependency of supply on that factor. In the current fossilbased energy system, 20% of all natural gas consumed each winter comes from underground storage [25]. One of our goals in this study is to show the extent to which the supply is dependent on storage in such an integrated energy and mobility system. In addition, we provide techno-economic analysis to evaluate the costs of such a system and provide an optimal scheduling for its energy management and improvement of its operational performance.
The paper is organised as follows. Section 2 describes the research methods used to design the energy system and to calculate its cost. Section 3 describes the energy system at STCA. In Section 4 we describe three possible scenarios and provide the results of our techno-economic and sensitivity analyses for each of them. Section 5 presents the optimal scheduling to minimise energy production costs as well as degradation of the production units. Finally, Section 6 presents our conclusions.

Approach
The research was conducted in a series of steps, as follows.
1. Design and dimensioning of the integrated energy and mobility system at the STCA, based on the requirements given in Section 2.2. 2. Analysing the annual energy demand of the office in two time frames: Near Future (2025-2030) and Mid-Century (2040-2050); see Section 3. 3. Defining different scenarios for each time frame, using different energy carriers (electricity and hydrogen) and different production and consumption units; see Section 4. 4. Calculating the annual energy balance for each scenario by matching demand with solar and wind power production, energy storage and different local production units; see Sections 2.3 and 4. 5. Determining the cost of energy for each scenario and for the two time frames by calculating: a) the total system cost of energy; b) the system levelized cost of energy; and c) the specific cost of energy for the STCA; see Sections 2.4 and 4. 6. Analysing the sensitivity of the cost of energy in the Mid-Century time frame in respect of the set of key assumptions and parameters used; see Sections 4. 7. Optimal scheduling for a systematic use of different production units in the system, with the aim of minimising the degradation costs of the batteries and fuel cells as well as the cost of energy production at the STCA; see Section 5.

Design requirements and dimensioning
The design of the energy system for the STCA fulfils the following design requirements: (1) its energy and transport systems use only electricity and hydrogen as energy carriers; (2) the building uses both electricity and hydrogen for seasonal energy storage; (3) the system can be implemented in existing infrastructure and buildings; (4) it is dependent on a local underground hydrogen pipeline distribution network in the urban area; (5) it uses only renewable energy sources (local solar and large-scale wind); and (6) it is independent of natural gas and district heating grids or any expansion of these systems. Section 3 describes the design and dimensioning of the energy system at the STCA. The dimensioning includes a wide range of relevant aspects such as the number of employees, the building's floor, roof and parking areas and the number of available vehicles.

Energy balance
Our analysis uses the STCA's energy consumption data, covering electricity per 15-min period and natural gas per hour. This data is collected from different consumption units in the building, such as heat pumps, the incinerator and lighting units, and we simulate the supplydemand profile of the energy system based upon it. The key goal of the design is to maintain the energy balance between supply and demand at every 15-min time step.
The first local energy production source at the office is solar. The maximum amount of solar power that can be generated is calculated from the STCA's available roof area, using the building plans. Due to insufficient solar generation capability and a mismatch with the building's load profile (mainly due to lab activities), additional wind power and energy storage are required. Moreover, we include local production options such as a stationary fuel cell and electric vehicles (EVs), both battery (BEVs) and fuel cell (FCEVs), delivering electricity to the building during their parked hours. Henceforth, whenever we refer to EVs delivering electricity to the grid we mean the building's local electricity grid.
A technology choice is made and then, for each scenario, an assessment is conducted covering the efficiencies, sizes, cost and required development time for all the components in the energy system. Component sizes are determined based on average load patterns and the energy balance is calculated taking into account the efficiencies of the different conversion and storage technologies concerned.

Cost of energy
To calculate the cost of energy at the office, we consider three components 1 : •

Total system cost of energy
The TSCoE in €/year is the sum of the Total annual capital and operation and maintenance Costs TC i (€/year) of the n components at the energy system: where the annuity factor AF i is based on the weighted average cost of capital WACC (%) and the economic lifetime of the component LT i (years): In this paper, the WACC of 3% is assumed 2 [26]. The annual OMC i (€/year) is defined as an annual percentage OM i (%) of Q i and IC i : Note that the difference between levelized cost of energy and system levelized cost of energy is that in the latter, we include all transportation, storage, infrastructure, and distribution costs.

Specific cost of energy
The specific cost of energy is defined as the cost of energy per physical unit [27]. For the building's energy consumption, the SCoE B (€/m 2 /year) is defined as the cost of the annual specific energy consumption (SEC B ) (kWh/m 2 /year) by all the energy-consuming equipment within that building per square meter:

System description and design
The real-life environment chosen for the concept design of the CaPP system is the Shell building in Amsterdam known as Shell Technology Centre (STCA), which is a combination of office space and a chemical laboratory. Located in the north of the city, it has a floor area of 76,136 m 2 and is the workplace for about 1000 employees. Its current energy system consists of three heat pumps with a total capacity of 3300 kW heat , rooftop solar panels with a capacity of 51 kW p and 1300 kVA diesel generators for emergency and backup power. It has an incinerator for lab waste and two parking lots with a total of 454 spaces, for both staff and visitors. The building is linked to the national electricity grid with a 10 MW-capacity connection.
The building's current demand profile for four representative months of the year (one in each season) is shown in the upper plot in Fig. 1. The lower plot shows the frequency of certain load demands over the course of one year. Due to its lab activities, this building has a higher load profile than the average office block in the Netherlands 1 The rest of definitions are based on [19]. 2 The 3% WACC is based on 80% loan with 1.5% interest rate, and 20% own investment with 9% internal rate of return (IRR). This WACC falls within the low risk category of real state [26]. [28]. The distribution of energy demand between the office space and the laboratory is presented in Table 1. From the load-profile data, we have calculated that 74% of the load is related to lab activities, 16% to office consumption (estimating 50,000 m 2 allocated as office space, with an annual demand of 60 kWh/m 2 ) and 10% to the heat pumps. Looking at natural gas consumption in the building, 42% is attributable to lab activities (mainly in the incinerator) and the rest to the offices, including kitchen use and the humidification system.
In designing the new energy system, we have taken the current one as our base point and then expanded this using different technologies for energy production.
We have created designs for two representative periods: a Near Future (2025-2030) and a Mid-Century (2040-2050) time frame. As shown in Fig. 2, for each of these periods we have then defined three different scenarios for the design of the energy system: (1) Hydrogen-Electric; (2) All-Electric; and (3) Combined. Our motivation for considering these particular scenarios comes from first comparing the cost of energy in the two extreme cases, namely having a hydrogen grid connection only as in scenario 1 and an electricity grid connection only as in scenario 2. The third scenario, a combination of the first two and with both hydrogen and electricity grid connections, is then designed based on the resulting cost analyses.
In each of these scenarios, we use different production units depending on whether electricity or hydrogen is the main energy carrier. The sizes of the units are also different. Modelling is conducted from the demand side of the energy system. So the size of each component is obtained starting with electricity load, heat demand, etc. Our model takes into account the building's entire supply chain, including production from wind and solar, storage necessities -both seasonal and daily -transport infrastructure, thermal demand, electricity demand and other end uses. For components outside of the physical location of the building, such as the wind turbines and external storage, we model and account for only precisely the capacity we need, obtained from a larger national supply network. As such, the inputs into our model are the demand profiles of different consumption units, solar and wind profiles and physical constraints of the production units, whilst its outputs are the size of each production unit, the supply profile and the system cost of energy.

Scenario analysis and results
In this section we present three different scenarios for the design of the STCA's energy system. For each we simulate the system as follows: (1) simulation of energy demand flows for one year, at 15-min intervals; (2) dimensioning of the wind turbine according to the wind profile and total energy requirements, after subtracting local solar production; (3) establishment of a dispatch priority sequence for components based on the requirements of each scenario (as mentioned under main assumptions in Section 4.1 and 4.2 and in the case descriptions in Section 4.3); (4) for every 15-min time step, solving the energy equation by balancing demand with the available generating components; (5) use of the external storage component, if there is a wind surplus or a supply deficit, to resolve the mismatch; and (6) calculation of the system costs, followed by the sensitivity analysis.

System description
In the first scenario, we design a system with hydrogen as the main energy carrier.
As shown in Fig. 3, here the sole energy infrastructure is the hydrogen grid. It is assumed that this is a converted or retrofitted natural gas grid. Initial investigations indicate that it is indeed feasible to retrofit the existing natural gas infrastructure to create a hydrogen grid with minimal extra costs [29,30]. Hydrogen production is assumed to be centralized offshore, using the electricity from an offshore wind farm, and energy storage is also assumed to be centralized, using salt caverns. At the building, electricity is produced locally from solar panels on the roof and from a stationary fuel cell (SFC), which we assume to be a stacked system of cells of the kind also used in FCEVs. Heating is provided by a hydrogen-fuelled boiler, supplemented with heat extracted from the stationary fuel cell. Cooling is by an air-conditioning (AC) system. On the mobility side, we assume that one third of vehicles parking at the site are battery electric vehicles (BEVs) and two thirds are fuel cell electric vehicles (FCEVs). Both types can be charged and refuelled at the office   location. The vehicles are used during peak load periods and at times of supply-demand mismatch when the solar panels and stationary fuel cell cannot meet the load demand. Note that hydrogen is used for the all lab and other activities where natural gas is currently used; for clarity, we do not show these hydrogen links in the figure.
The main assumptions in this scenario can be summarised as follows.
• Both FCEVs and BEVs deliver constant power of 10 kW to the grid in V2G mode, in order not to overheat the fuel cells and not to degrade the batteries too much.
• In V2G mode, FCEVs are connected directly to the hydrogen grid and so we do not use hydrogen from the tank for electricity production. As such, we include neither the refuelling regimes of FCEVs nor the installation costs of a hydrogen refuelling station in our cost analysis. The cost of hydrogen used from the grid is based on the cost calculation presented in Section 4.2.
• For BEVs, too, we do not take into account the charging pattern at the building. We assume that they arrive with a random level of charge between 50% and 100% and that we discharge them in V2G mode to no less than 20% of battery capacity, which is enough to drive about 100 km. The cost of the electricity used in V2G mode is assumed to be 0.25 €/kWh in Near Future and 0.15 €/kWh in Mid-Century (cf. • We do not consider the on-site production of hydrogen from excess solar energy, using a local electrolyser. This is due to the fact that, based on the size of the local solar generation system and the load profile at the STCA, it is rarely the case that there will be excess solar energy. So, any hydrogen produced in this way would be very expensive due to the low utilisation of the electrolyser.
• Electricity production is prioritised in the following order: solar, stationary fuel cell, FCEVs and finally BEVs. Note that solar and stationary fuel cell generation cover the base load, with electric vehicles used only during peak hours and periods of supply-demand mismatch.
• All current natural gas consumption is replaced by hydrogen.
Based on these assumptions, we have simulated the energy system in the Near Future and Mid-Century time frames with the main goal being to balance supply and demand at 15-min intervals. Figs. 4 and 5 show the annual energy balance for the two time frames, including the energy flows to and from each component in the system. As can be seen, in both cases about 32% of total energy comes from underground storage. Electricity generated from V2G-connected FCEVs is 2836 MWh/ year in Near Future and 1812 MWh/year in Mid-Century. BEVs are rarely used, since we prioritize FCEVs. Fig. 6 shows the box plot for the number of EVs used for energy production over the course of one year. Frequently, up to 100 EVs are needed for balancing purposes in Near Future, and 50 in Mid-Century. Moreover, they are needed mainly between 4:00 and 18:00, with 4:00-6:00 being primarily when the system is starting up for the day and 7:00-18:00 being the office hours responsible for the bulk of energy consumption.

Techno-economic analysis
To obtain the system levelized cost of energy for the building, we first need to calculate the total system cost of energy (TSCoE) (cf. Eqs. (1)-(5)). As explained in Section 2.4, for TSCoE we need to calculate the total cost of each component in the energy system (cf. Eq. (2)) from its investment, operation and maintenance costs and its lifetime. In Appendix A, these values are presented for each component, for both the Near Future and the Mid-Century time frames, in Tables A.9 and A.10. Note that these tables contain all the various components used in all three scenarios.
Using these component costs and Eqs. (3)-(5), the total cost of each component -together with its size, capital cost and operation and maintenance costs -is calculated and presented in Appendix B Table  B.11. The cost distribution bar plots for this scenario are presented in Appendix F Fig. F.20. The size of each component is chosen based on the building's demand profile. As we can see in that table, the size of the wind turbine is relatively large given the building's overall energy demand. This is due to all the energy losses involved in the conversions from electricity to hydrogen and vice versa. For the turbine, a capacity factor of 58.6% is obtained in the model. This is for the AC power coming from the turbine itself, before any transmission or conversion losses. The average efficiency of the electrolyser over a year using the higher heating value (HHV) of hydrogen is 77% (51.1 kWh/kg) is Near Future and 82% (47.9 kWh/kg) in Mid-Century. For simplicity, in the Mid-Century period these technical parameters are kept the same and future technological improvements are instead incorporated into cost parameters. In specifying the size of storage in salt caverns, we only take into account the quantity of hydrogen we need in the system. Table 2 presents the (system) levelized cost of energy for each production unit and for the building's entire energy system using the total cost of each unit and the total energy it produces. All the hydrogen-related costs are based on the HHV of hydrogen. SLCOE e refers to the system levelized cost of electricity and SLCOE h the system levelized cost of heat for the entire energy system (given in €/kWh). SLCOE H2 refers to the system levelized cost of hydrogen production taking into account production, storage, infrastructure and transportation costs (given in €/kg). Finally, SLCOE Office refers to the system levelized cost of energy (electricity, heat, gas) for the entire system and SCOE B the specific cost of energy for the building. As this table shows, the SLCoE for BEVs is one of the highest figures. This is due the high cost of bidirectional chargers and their low utilisation in the system. Since we use the same number of bidirectional chargers in both Near Future and Mid-Century, and because the utilisation of BEVs is even lower in the latter than in the former, the SLCoE of BEVs increases in the Mid-Century time frame.

Sensitivity analysis
The parameters for the mid Mid-Century time frame contain a higher level of uncertainty. For this period, therefore, a sensitivity analysis has been conducted for those parameters with a major impact on SLCoE Office or containing a high degree of uncertainty, such as wind turbine, cost of V2G infrastructure and WACC. Table 3 summarizes the parameters used in this analysis and the range of the value change for each of them. For most, we have added ±25% to the original investment cost or lifetime (cf. Table A.9 in Appendix A for nominal values). For WACC we have chosen 1% and 5% to study the effect of different discount rates on the SLCoE. The nominal value for WACC is 3%, as mentioned in Section 2.4.
The results of the sensitivity analysis are presented in Fig. 7. The vertical red line represents the original value. Percentages shown in the graph are the relative changes to the total system costs in response to the parameter deviations. Based on these results we can conclude that WACC, wind-turbine and hydrogen production costs have the greatest effect on the building's SLCOE.

System description
In the second scenario, we design a system with electricity as the main energy carrier.
As shown in Fig. 8, here the sole energy infrastructure is the electricity grid, which is connected to an offshore wind farm. Further, we investigate two different energy storage systems in this scenario: a local one at the office area and a central one, as shown in Fig. 8, both using a large stationary battery system. Due to lab activities and the need for the incinerator at the STCA, in this case we still use hydrogen to cover the gas demand for incineration. Once again, hydrogen production is assumed to be centralized offshore, using the electricity from an offshore wind farm (for clarity, we do not show the hydrogen links in Fig. 8). Electricity is also produced locally, from solar panels on the roof. Heating and cooling are provided by a storage system using heat pumps. On the mobility side, we assume that two thirds of vehicles parked at the site are BEVs, which can be charged at the office location, and one third are FCEVs, which are refuelled elsewhere. As in the previous scenario, both types of vehicles are used during peak load periods and at times of supply-demand mismatch when the solar panels and wind power cannot meet the load demand.
The main assumptions in this scenario can be summarised as follows.
• As in the previous scenario, both FCEVs and BEVs deliver constant power of 10 kW to the grid in V2G mode.
• In V2G mode, FCEVs draw hydrogen directly from their tanks for electricity production. We make sure that there is always 1 kg of hydrogen left in the tank, which is enough to drive about 100 km. As such, we include neither the refuelling regimes of FCEVs nor driving patterns in our cost analysis. The cost of the hydrogen used from the cars in V2G mode is assumed to be 6 €/kg in Near Future and 4 €/kg in Mid-Century (cf. Table A.10 in Appendix A) and they refuel outside of the office.
• BEVs are charged by excess wind energy from the electricity grid and discharged in V2G mode to no less than 20% of battery capacity,  which is enough to drive about 100 km. The use of an 80% range is also intended to reduce battery degradation. The cost of the energy used in V2G mode is based on the cost calculations for the electricity grid in Section 5.2.
• Electricity production is prioritized in the following order: solar and wind, BEVs, stationary battery system and finally FCEVs. Note that solar and wind primarily cover the base load, with electric vehicles and the stationary battery used only during peak hours and periods of supply-demand mismatch.
• All current natural gas consumption by the lab is replaced with hydrogen, and the rest (e.g. kitchen use) superseded by electric options.
Based on these assumptions, we have simulated the energy system with the main goal being to balance supply and demand at 15-min intervals. Figs. 9 and 10 show the total energy produced over an entire year with a central storage system in the Near Future and Mid-Century time frames, respectively. As can be seen, in this scenario between 26% and 31% of total energy comes from storage (both battery and salt caverns). In Near Future, electricity generated from V2G-connected BEVs is 1898 MWh/year and from FCEVs it is 1315 MWh/year. In the Mid-Century time frame, those figures are 3511 MWh/year from BEVs and 798 MWh/year from FCEVs. As we can see, BEVs are used more frequently here than in the previous scenario as they are prioritized for energy production in this case. Since there is a limit on the battery's state of charge, however, FCEVs are also used quite often. Fig. 11 shows the box plot for the number of EVs used for energy production over the course of one year. As we can see, the average number needed for balancing purposes is below 50 in Near Future and below 70 in Mid-Century. Due to the storage capacity limitations of the BEVs and the stationary battery, however, in this scenario FCEVs are used more often during peak hours and that results in more outliers both time frames. Moreover, the cars are needed mainly between 7:00 and 19:00, i.e. during the office hours responsible for the bulk of energy consumption.

Techno-economic analysis
To obtain the system levelized cost of energy for the building in this scenario, we follow similar steps as in the previous one to first calculate the TSCoE. The investment, operation and maintenance costs and the lifetime of each unit in the energy system are presented in Appendix A  (5), we now calculate the total cost of each component. In this scenario, to specify the size of storage we consider two cases. In the first case, all the energy is stored locally in a very large battery system. Despite its substantial capacity, however, over the course of a year there will still be many hours during which it is full, and we are therefore unable to store excess energy. In such situations we would have dispose of that energy by, for example, giving it to the neighbourhood. There are also many hours when the battery is empty but there is no excess energy to charge it, and so we have to assume that we will need to buy more expensive electricity from an external source. In the second case we still have a local stationary battery with a capacity of 12 MWh to provide backup power, but the bulk of storage occurs centrally in a large stationary battery at the wind farm. As in the previous scenario with salt caverns, here also we only consider the storage cost for the amount of energy we actually draw from this central storage facility. We also use the same efficiency data for the wind turbine and electrolyser as in the previous scenario.
The total cost of each component, together with its size, capital cost and operation and maintenance costs, is presented in Appendix C Table  C.12 for external primary storage and in Table C.13 for storage in a large local battery. As we can see, in this All-Electric scenario the size of the wind turbine is much smaller than in the Hydrogen-Electric scenario since here we do not have any energy conversion and so far less is lost. Another important figure in this scenario is the cost of storage in each of the two cases. Based on these, it is again more economical to store energy centrally in the All-Electric scenario. Our calculation of the system levelized cost of energy is therefore derived from that situation. Table 4 presents the (system) levelized cost of energy for each production unit and for the building's entire energy system based on external storage and using the total cost of and the total energy produced by each unit. Since BEVs are used more often in this scenario, SLCOE BEV is much lower than in the previous one (cf. Table 2).

Sensitivity analysis
The results of the sensitivity analysis for the All-Electric scenario in the Mid-Century time frame, based on the variation of the parameters in Table 3, are shown in Fig. 12.
In this case, WACC and the cost of wind turbine have the greatest effect on the system levelized cost of energy in Mid-Century; the other parameters have more or less similar effects in changing the SLCoE Office .

System description
From the techno-economic analyses of scenarios 1 and 2, it is clear that both are extreme situations with a number of advantages and disadvantages. For our last scenario, therefore, we designed a combined situation with both electricity and hydrogen grid connections. Our goal is to compare its total system cost and the system levelized cost of energy with scenarios 1 and 2. There are several possible design choices in this case, depending on the purpose of the system; more local production and less import from external grids, for instance, or lower  Fig. 9. Sankey diagram showing the annual energy balance for a fully renewable electricity, heating, and transport system at the office in near future for All-Electric scenario. energy costs. We can thus pick different components and different priorities for the source of energy production. In the end, we selected three cases for consideration in this scenario: Case (1) a combined situation with heat pumps; Case (2) a combined situation with a boiler; and Case (3) a combined situation using fixed costs for both electricity and hydrogen grids. Each of these cases is described below.
Case 1. The energy system for this combined situation is shown in Fig. 13. As infrastructure, we have both the electricity grid and the hydrogen grid. Both forms of energy are produced offshore by a wind turbine, and for storage we use salt caverns. Electricity is also produced locally from solar panels on the roof and from a stationary fuel cell. For heating and cooling, we use heat pumps. On the mobility side, half of the cars are BEVs and the other half are FCEVs, and as in the other scenarios we do not take into account their refuelling or recharging patterns. The FCEVs are connected to hydrogen grid in V2G mode and so we use the cost of hydrogen bought from the grid. The cost of electricity delivered to the grid by BEVs in V2G mode is taken from Table A.10 in Appendix A. Note that hydrogen is used for the all lab and other activities where natural gas is currently used; for clarity, we do   not show these hydrogen links in the figure. The order of production in this case is solar and wind first, then stationary fuel cell, then FCEVs and finally BEVs. Case 2. The energy system for this combined situation is shown in Fig. 14. The system design and components in this case are the same as in the previous one, except for heating and cooling. Instead of heat pumps, here we use a hydrogen-fuelled boiler and the collected heat from the stationary fuel cell to cover the demand for heat, whilst for cooling we use an air-conditioning system. The order of electricity production is the same as in Case 1.
Case 3. This has the same setup as Case 1, but we do not design the wind turbine based on the demand profile or take into account storage. Instead, we use fixed costs for both energy carriers. For electricity, the cost is chosen based on the SLCoE Wind obtained from the techno-economic analysis in Section 4.2, i.e. 0.068/kWh in the Near Future time frame and 0.047 €/kWh in Mid-Century. For hydrogen it is chosen based on the SLCoE H2 obtained from the techno-economic analysis in Section 4.1, i.e. 3117 €/kg in Near Future and 1901 €/kg in Mid-Century. The order of energy production is similar to that in Case 1, except that here we use the solar and wind power to cover two thirds of the base load and the stationary fuel cell to cover the other one third. Moreover, we collect and use the heat from the stationary fuel cell. The rest of the demand for heat is met by the heat pumps.
As the results obtained in all three cases are similar, for brevity here we present only those from Case 1. The annual energy distribution for the building in this case is shown in Appendix E Figs. E.18 and E. 19. In all three cases in the Combined scenario, about 24% of total energy used comes from storage. Moreover, since we use both electricity and hydrogen grids, the use of electric vehicles differs quite substantially from that in either the Hydrogen-Electric or the All-Electric scenario. As shown in Fig. 15, here we use both types of EVs much less frequently. The reason for this is that they are needed much less, due to the availability of power from both the electricity grid and the stationary fuel cell. As this pattern is very similar in all three cases in the Combined scenario, we present only the results of Case 1.

Techno-economic analysis
The total costs of components for each of the three cases are presented in Appendix D, in Tables D.14-D. 16. The cost distribution bar plots for Case 1 are shown in Appendix F Fig. F.22; we omit the other two for brevity, as their results are similar. Since we here use both grids and include both electricity and hydrogen-based units, the capacity and hence the cost of each unit is different from those reported in the Hydrogen-Electric and All-Electric scenarios.
The results of the techno-economic analyses of these three cases are presented in the tables below. As we can see in Tables 5 and 6, using the heat pumps or the boiler does not change the SLCoE STCA much. Table 7 shows that using the fixed-grid cost also results in similar system levelized costs of energy as in the other two combined cases.
The sensitivity analyses for the different cases in the Combined scenario shows that the effect of cost variations of different components on the system levelized cost of energy is similar to those in scenarios 1 and 2. Consequently, those results are not presented in this section. Table 8 summarises main results obtained from analysing the three scenarios. The first important result is the significant role of storage in this energy system, since it accounts for between 20% and 30% of the supplied energy. Our results also show that using salt caverns and hydrogen for energy storage is much cheaper than using large battery storage systems. Hence, despite using the external storage option in the All-Electric scenario, its SLCoE Office is still higher than in the Hydrogen-Electric scenario due to higher storage costs. Note that the wind turbine capacity factor is a crucial determinant of the economic results and a lower capacity factor is linked to a higher levelized cost of wind energy. However, this research compares costs between different scenarios, focusing on balancing and storage using various alternatives. Note that the wind energy costs are equal across the scenarios and the size of the wind turbine is the only changing factor depending on the energy demand in each scenario. Thus, while these costs are a significant factor in the total SLCoE Office , they have a marginal effect on the relative evaluation of SLCoE Office of each scenario and do not impact the conclusions of the research, which is aiming to compare energy carrier alternatives and energy storage options.   The other interesting aspect is the system's utilisation of EVs, especially the fact that, in the Hydrogen-Electric scenario, fewer are used in the Mid-Century time frame than in Near Future. And that the reverse is the case in the All-Electric scenario. This is, of course, the result of the system configuration and the order in which the production units are used. The decrease in the utilisation of EVs in the Hydrogen-Electric scenario can be explained by decreasing demand for electricity in Mid-Century, whilst the solar and stationary fuel-cell components have by then become more efficient. The increase in the use of EVs in the All-Electric scenario in Mid-Century may appear counterintuitive at first sight, but can be explained as follows: as solar and wind are intermittent sources of energy, BEVs are employed more often as a back-up; and since BEV parameters such as battery capacity and conversion efficiency are improved in Mid-Century, greater use of EVs is facilitated. Moreover, the sparse utilisation of BEVs in the Hydrogen-Electric scenario means that almost all the stored energy comes from salt caverns. In the All-Electric scenario, since more BEVs are used in Mid-Century their share of storage is higher than in the Near Future period.

Summary of the results
Finally, the results from the Combined scenario confirm our hypothesis that, if we use both electricity and hydrogen in the building's energy system, and different production units and storage options, our energy system is not only more flexible but also more economic. We also see that in all these cases the number of cars operating in V2G mode is quite small by comparison with the total parking capacity of the building. This shows the feasibility of V2G application at such office blocks.

Optimal scheduling
The operational management of an energy system is an important aspect of its performance and so needs to be considered alongside its design. In this section, therefore, we focus on the operational level and provide an optimal scheduling for the deployment of production units in the energy system, with the view to using them -and especially EVs -in a more systematic and efficient way and to minimising production costs.

System model and constraints
The setup of the energy system considered for this aspect of our study is equivalent to the one in Case 1 of the Combined scenario and is presented in Fig. 13. Electricity can either be produced using local units such as solar panels and stationary fuel cells or be drawn from the external electricity grid, which is connected to an offshore wind farm. Moreover, both BEVs and FCEVs are used for load balancing during    peak hours and periods of mismatch between supply and demand. Heating is provided by heat from the stationary fuel cell and by heat pumps. Cooling, too, is provided by the heat pumps. We also have the hydrogen grid, which delivers hydrogen to both the stationary fuel cell and FCEVs. The objective of the system is to use production units more systematically and to minimise the cost of energy production based on the cost of fuel and operation and maintenance costs for each of the controllable production units, i.e. stationary fuel cells and EVs. Moreover, we endeavour to minimise degradation of the stationary fuel cell and of BEVs and FCEVs in V2G mode.
Here, the states of the system are the operating state of the stationary fuel cell, operating states of FCEVs and BEVs and the state of charge of BEVs. We model the system in discrete time and the state equations can be defined as controls the amount of power produced by the j-th BEV at time step k t , is the size of the time step, and dis is the discharge efficiency of a BEV in the V2G mode. Note that the production units FCEV and BEV have n f and n b components, respectively. As well as the abovementioned control variables, we also control the amount of power bought from the electricity grid, P e grid , , the amount of power produced by the stationary fuel cell, u SFC and the amount of power produced by FCEVs, u f i , . In this model, we also include different operational constraints. One of these is related to the production capacity of each production unit pu (stationary fuel cell, FCEV or BEV) and its components at each time step k, which can be written as pu pu pu pu pu (14) taking into account the operating state of each unit at time state k defined in (11)- (10). Here U pu indicates the possible minimum power production of each unit and Ū pu the possible maximum power. Moreover, there is an upper threshold for the power we can buy from the electricity grid, Ū e grid , , which is equal to the wind power generated at time step k. This constraint is defined as In order to make sure that no component of a production unit is switched on and off at the same time, the following constraint is used, pu pu start stop (16) As mentioned before, keeping the balance between supply and demand at each time step k is one of the main goals in the system. To satisfy this balance, we include the following constraint at each time step k, is the power demand of the office at time step k including the load P load and heat pumps demand P HP , P k ( ) solar is the power production of the solar panels system at time step k n , f indicates the number of FCEVs and n b indicates the number of BEVs present at the energy system.
In addition to these constraints, we have included two others related to the fair use of electric vehicles. Using EVs in the V2G mode increases degradation of the battery and fuel cell. To be fair on their owners, therefore, we only use each EV in V2G mode for few hours at a time and we make sure that it is not used again for a certain period thereafter. These values can be defined based on the system requirements and the availability of cars. For the first constraint, we make sure that FCEVs are switched off after being used for T hours, The same constraint holds for BEVs. For the second constraint, we keep the vehicle off for the next T hours once it has been used in the V2G mode; i.e. at each time step k, the following must hold for each FCEV, and the same constraint holds for BEVs. Finally, to minimise electricity consumption by heat pumps, we first use the heat extracted from the stationary fuel cell. The remainder of the demand for heat is then covered by the heat pumps; i.e.
Here, H k ( ) D is the demand for heat at time step k and H e is the extracted heat from the stationary fuel cell at time step k, with H the efficiency of the fuel cell based on the HHV for the heat production and e its efficiency for electricity production. As mentioned before, the demand for heat includes the electricity demanded by the heat pumps for heating and cooling. The electricity demand of the heat pumps at time step k can be written as  (21) where COP month is the coefficient of performance of the heat pump for each month of the year and C HP is the cooling production of the heat pump. Using Eqs. (20) and (21), the power demand in Eq. (17) can be adjusted.
In order to obtain a linear system with continuous and binary variables, we apply the mixed logical dynamical (MLD) formalism, which allows the transformation of logical statements involving continuous variables into mixed-integer linear inequalities. We apply the following equivalences [31] to transform the nonlinear constraints into linear ones: The inequality constraints corresponding to the above auxiliary variables and logical statements can be obtained according to (22). In this way, the system dynamics and the constraints are formulated as mixed-integer linear equations.

Model predictive control
To provide the optimal scheduling, we apply model predictive control (MPC) [32,33]. MPC is an online control technique that relies on a dynamic model of the process, is aimed at optimising a criterion and is capable of handling constraints on inputs or outputs in a systematic way. In MPC, at each iteration the optimal control sequence is computed over a finite horizon, i.e. a finite period of time. MPC uses the receding horizon principle, which means that, after computation of the optimal control sequence, only the first sample is implemented in the next iteration. Subsequently, the horizon is shifted forward one sample and the optimisation restarts with new information on the measurements.
As mentioned before, the objective is to minimise the cost of energy production and degradation of the battery and fuel cell. Hence, the objective function for the optimisation problem can be defined as , where 1 and 2 are weighting factors. The production cost is defined as where pu is the degradation cost of each production unit (stationary fuel cell, FCEV, or BEV).
Having defined the objective function and the constraints, the MPC optimisation problem with prediction horizon N p at each time step k is defined as where J k ( ) is the weighted sum of (23) and (24), T is the stacked vector of control variables (both continuous and binary), C k D k ( ), ( ) and g k ( ) are constraint matrices and the constant vector, respectively, defined based on constraint Eqs. (14)- (20) and the MLD constraints obtained from (22). The optimisation problem (25) and (26) is a mixed-integer linear programming (MILP) problem, which can be solved using the available MILP solvers [34,35].

Results of optimal scheduling
The optimisation problems were solved using the MILP solver from Gurobi in Matlab R2018b on a 3.1 GHz Intel Core i5 processor. We produced the optimal schedule for 48 h based on the building's load profile data from two days in February 2017. The time step t is one hour and for every time step we assumed that all the EVs were available, using the building's entire parking capacity, which is 454 cars.
Remark. The optimisation model can be adjusted to limit the number of cars available at every time step or to take into account more details about their driving patterns.
We assumed the following power capacity limits for each produc- . Moreover, we assumed that the battery of a BEV has a capacity of 60 kWh and that the state of charge of each car at the beginning of each day (00:00 h) was 80%, i.e. 48 kWh. Also, BEVs were not allowed to remain in V2G mode once their state of charge had fallen to 20%. The tank-to-wheel efficiency of the fuel cell for electricity production was 60% in our model, and for heat production it was 24%. We also assumed that the discharge efficiency of a BEV battery is 80.8% and its charging efficiency is 90.7% [36,37]. The weighting factors in the objective function were set at = = 1 1 2 and the degradation costs at The price of electricity bought from the grid was set at 0.042 €/kWh and that of hydrogen at 2.54 €/kg. These choices were based on the cost calculations in the previous sections, and also to ensure that the controller would use both types of EVs. We have observed that if the price of hydrogen and electricity are very close, the controller will not use BEVs as they result in higher production costs. For illustration purposes, we therefore did not use the exact values obtained for electricity and hydrogen in Section 4.2, Table 4 and Section 4.1, Table 2. Fig. 16 shows the optimisation results for a 48-h period. In it we see the demand for power and the power generated by each of the production sources. The solid-cross line shows local solar power generation at the building. The solid line shows power demand after subtracting local solar power generation and the dashed line shows total power generation; since this supply matches the building's demand, these two lines are coincident in the figure. The solid-circle line shows the amount of power bought from the electricity grid, based on the wind profile and grid availability. The wind profile over these two days is a good indicator of one relatively calm day (the first) and one windier one (the second). As mentioned before, since the production capacity of the solar panels is much lower than the building's demand, due to its lab activities, solar is never enough by itself to satisfy that demand. As shown in this figure, on the first day and most of the second, wind production is also way below the building's demand (even after including solar power generation) and so other energy sources are needed. Based on the system objectives of minimising both energy costs and the degradation of batteries and fuel cells (cf. Eqs. (23)), the controller first buys power from the grid (solid-circle line), then uses the stationary fuel cell (dash-dot line). As can be seen on the first day with less wind, even though the stationary fuel cell is used at maximum capacity for most of the day, the sum of the power it generates and that bought from the grid (dash-star line) does not satisfy total demand. This is also the case for few hours on the second day. These periods are when we either have peak load or a supply-demand mismatch due to limited production capacity and the intermittent renewable sources. At these times, both BEVs and FCEVs are used for balancing purposes (dotted line), i.e. match supply with demand.
Based on this control strategy, the total cost of the energy production on these two days is 9045 €. Without optimal scheduling and considering only the system constraints in the production planning, the total generation cost would have been 9308 €. Although the saving derived from optimal scheduling does not seem significant over two days, it would be if it were applied for the entire year. Fig. 17 shows the number of cars used during the peak hours and the hours of mismatch between supply and demand.
As can be seen here, based on the electricity price and the hydrogen price obtained in our model, the controller first mostly uses BEVs and then FCEVs. Note that since we only use BEVs down to 20% of their state of charge, after a few hours they are no longer available. FCEVs, however, since we assume that in V2G mode they are connected directly to the hydrogen grid and we do not use the tank, are always available unless and until our fair-use constraints (cf. (18) and (19)) preclude further utilisation. In this optimisation model, we assume that each EV can be used for four hours at a time, i.e., = T 4 in (18), and that once used in V2G mode it becomes unavailable for the next 12 h, i.e. = T 12 in (19). These values have been chosen considering the actual availability of vehicles at the location. The advantage of optimal scheduling is thus its more systematic and fair usage of the EVs (compare Fig. 17 with Fig. 15) and hence its ability to provide greater incentives for car owners to participate in the V2G plan.
Note that we include only energy production costs in our optimisation model, not investment costs. That is why BEVs are used more than FCEVs at the times when they are both available. In practice, however, given the investment costs for the V2G infrastructure and for bidirectional chargers for FCEVs and BEVs, respectively (cf. Table A.9), there are likely to be more V2G points for FCEVs than for BEVs. And this will change the choices made by the controller. Another important observation regarding this model is that even during peak hours we need fewer than 160 cars. That represents less than half of this building's parking capacity. Our results thus indicate that including cars for balancing and back-up power in the energy system of an office block, and of other buildings in general, is a viable solution and adds both flexibility and reliability to its power supply.

Conclusions and discussions
In this paper we have presented the concept design and energy management of a 100% renewable energy system for a real-life environment: the Shell Technology Centre in Amsterdam. The result is an integrated energy and mobility system in which we use both electricity  and hydrogen as energy carriers and both battery and hydrogen-based fuel cell electric vehicles to deliver electricity to the office grid at times when they are parked there. In this design, we investigate the feasibility of such an integrated system at a real-life environment. We have considered two different time periods -Near Future (2025-2030) and Mid-Century (2040-2050) -and three different scenarios: 1) Hydrogen-Electric; 2) All-Electric; and 3) Combined.
For each of these periods and scenarios, we have conducted a techno-economic analysis to compare the system levelized cost of energy for the building's entire energy system. Furthermore, in order to make systematic and fair use of EVs in V2G mode and to improve the operational performance of the energy system, we have devised an optimal scheduling using model predictive control. Our objective was to minimise degradation of the cars' batteries and fuel cells as well as to minimise the system's energy production costs.
From the results obtained in respect of the three scenarios we investigated, we conclude that the Combined one results in the lowest system levelized cost of energy at the STCA. Furthermore, as in the current energy system, we have observed that, in one system based on 100% renewable sources, between 20 and 30% of the energy supplied comes from storage. This emphasises the important role of storage and its cost in such a system design. As we have seen in our study, storage using hydrogen and salt caverns is much cheaper than using electricity and large batteries. Based on our simulation results, we also conclude that not that many cars are needed for load balancing during peak hours and at times of mismatch between supply and demand. The economic figures show that creating such a system at an office building is both economically and technically feasible, and that including electric vehicles in it provides a flexible energy buffer. Moreover, the results of the optimal scheduling shows that it can improve the efficiency and decrease cost of production even further. Ultimately, the results of this study bring us to conclusion that using both electricity and hydrogen as energy carriers leads to a more flexible, more reliable and cheaper energy system at an office building. The next step is to provide the necessary infrastructure and incentives for the implementation of such an integrated energy and mobility system, especially for buildings with large parking areas such as office blocks, hospitals and airports. In this paper we have taken the first step towards shaping a fair use of electric vehicles in vehicle-togrid mode. Further investigation in this area is required in order to provide effective economic incentives for vehicle owners. One option is to give them a discount on the cost of their fuel based on the kWh they deliver to the electricity grid. Another is that building owners or energy companies own the vehicles and lease them to public users. Furthermore, the infrastructure for vehicle-to-grid solutions and hydrogen refuelling stations needs to be in place in order to be able to implement such integrated systems. Other options, such as heat storage in tanks or underground aquifers, could be also included in the design as alternatives or to complement heat pumps and boilers.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Appendix D. Cost of components in Scenario 3
The total cost of each component used in combined scenario together with their size, capital cost, and operation and maintenance cost are presented in Tables D.14, D.15 and D.16 for each of the Cases 1-3, respectively.  19 show the Sankey diagrams for the annual energy balance at the office in Case 1 of Combined scenario in near future and midcentury, respectively, and the energy flows to and from each component in the energy. system.    Table B.11.  Table C.12 using an external battery storage.  Table D.14.