**1. Introduction**

During the last decade, people have become increasingly more aware of the environmental impact of their daily routines and consumption behavior. Minimizing the carbon dioxide footprint by replacing fossil fuels with renewable energy sources is therefore a change process driven by the end consumers of products and services. Meanwhile, in the building sector, there has been a trend towards "greener" solutions and more energy efficient constructions. Concepts like net zero energy buildings (NZEB) and nearly zero energy buildings (nZEB) have been studied in several research projects [1,2]. These concepts are striving towards covering a higher share of the building energy demand with on-site generated renewable energy.

Seasonal energy storage can be used to increase the on-site utilization of solar energy installations, like photovoltaic (PV) panels and solar thermal collectors. Storing energy during periods of high on-site energy generation and utilizing the stored energy during periods of low on-site energy generation will increase the utilization rate of the solar energy installations for individual buildings. Hence, seasonal energy storage is an important contributing factor for buildings that are targeting a net zero annual energy balance.

Investing in energy storage also has an economic driving factor. Energy import prices are namely often significantly higher than export prices for household energy consumers [3–5]. By storing energy, household consumers can avoid selling cheap excess energy in the summer and buying it back with a significantly higher price in the winter. The economic benefits of seasonal energy storages are additionally boosted by the falling installation costs of solar PV technologies. Between 2010 and 2018, the total installation cost of solar PV panels dropped by 74% [6].

Optimization-based design methods can be used to maximize the utilization and minimize the cost and environmental impacts of seasonal storage systems. These problems are usually formulated as time series optimization problems, where the design variables set constraints on the system operation in every time step of the annual operation. Different kinds of stochastic optimization method have been used for this purpose. Durão et al. (2014) studied the advantages of using genetic algorithms to optimize a seasonal energy storage of solar thermal energy [7]. Other approaches, such as particle swarm optimization [8] and simulated annealing (SA) [9], have also been used for optimizing similar energy storage systems. Zhang et al. (2018) used harmony search and chaotic search methods based on a SA approach to optimize renewable energy systems including different energy storages [10]. The objective of the optimization by Zhang et al. was to minimize the life-cycle cost of the renewable energy system.

Mixed integer linear programming (MILP) is a demanding optimization problem category. MILP problems include both integer and real variables and tend to become computationally expensive as the number of integer variables increases. Kotzur et al. (2018) proposed a clustering method to solve MILP problems related to the optimization-based design of energy storage systems [11]. The integer variables in the method by Kotzur et al. are of a binary nature and define whether certain components in an energy system exist or not. Steen et al. (2014) solved similar MILP energy storage problems to minimize both the cost and the emissions of a thermal energy storage system by optimizing the system operation and setup [12]. Moreover, Wang et al. (2015) proposed a MILP-based control method that uses day-ahead pricing, weather forecasts and customer preferences to minimize the energy expenditures of a building energy system comprised of a battery and building-integrated solar PV [13]. Pinzon at al. (2017) propose a similar MILP-based control method for smart buildings with integrated solar PV and batteries [14]. Both of these control methods showed favorable results when testing them against simulation software and measured data, respectively.

This paper aims to present and evaluate a novel seasonal energy storage optimization method that uses a time interval halving approach to solve computationally expensive MILP problems. The method is unique since it accepts integer variables in every time step of the annual operation. This implies that the method can handle multi-mode devices. The use of integer control variables for multi-mode devices is essential when developing accurate operational models that are able to separate between different operational modes. The authors have not found any other optimization methods in the literature that can solve seasonal storage optimization problems that include this type of integer control variable.

A case study is presented in this paper in order to examine and evaluate the presented method. The case study examines the optimal operation and design of a seasonal energy storage system for an office building with an over-production of solar energy during the summer season. The seasonal energy storage system uses reversible solid oxide cell (RSOC) technology to convert electrical energy generated by PV to hydrogen gas and to convert hydrogen gas back to electricity, while also generating some heat. The case study is based on a preceding study presented in [15], where the energy storage was only used for short-term grid balancing and did not yet cover the seasonal aspects.

Earlier studies on hydrogen storage system optimization have been done by Castañeda et al. (2013), Luta and Raji (2018), as well as Carapellucci and Giordano (2011) [16–18]. The hydrogen storage systems in these studies use separate electrolyzers and fuel cells and are thus not comparable with the RSOC and hydrogen storage system used in the case study in this paper.
