# Energy Cost Minimization with Hybrid Energy Storage System Using Optimization Algorithm
## 1 Introduction  
Large scale deployment of energy storage systems (ESS) is seen as a cost-effective solution for deep decarbonization of electric power systems, which also allows the system stability in the presence of intermittent renewable energy sources (RES) to be maintained [1]. ESS are also seen as part of the solution to reduce the reliance on external fossil fuel imports and high electricity prices [2]. Among available technologies, pumped hydro is still leading; however, grid-scale battery storage is gaining momentum with lithium-ion technology leading and flow batteries emerging [3]. In [4], the overview of technologies, optimization objectives and approaches regarding battery energy storage systems are presented. Each battery technology is suited for different applications, ranging from short term power system stabilization requiring high power [5] to energy balancing on a daily basis that requires high capacity [6]. The most popular goal of using ESS is the reduction of the operation costs and the maximization of the self-consumption from RES. The profitability aspects are key for the practical popularization of energy storage. An ESS enhances the possibilities of the system by introducing the possibility of shifting part of the energy usage from the moments when cheap or surplus energy is available to the times when it is most needed and/or most costly. The economic outcome is one of the most popular optimization goals realized by a number of methods using classic, e.g., mixed-integer linear programming [7] and heuristic methods, e.g., deep reinforcement learning [8], genetic algorithm and particle swarm optimization [9]. Energy storage is usually just an element of a more complex system that manages the installations and the whole microgrid. Such systems need to be governed by so called energy management systems (EMS), which have been developed for a long time in various configurations. The key to battery functionality and long life depends largely on the battery management system (BMS) and the EMS [9]. Many such models have been developed; some focus on a very detailed model that includes temperatures, voltages, currents and state of charge, e.g., [10], while others use less detailed models but consider the long-term behavior of the system [11]. Basic concepts and different topologies of EMS are presented in [12]; the review of the different approaches can be found in [13; 14]. In [15], an EMS, including battery management, which was tested in a real-life environment, is presented. Hybrid energy storage systems (HESS), consisting of at least two battery types with complementary characteristics, are seen as a comprehensive solution in many applications [16]. Specifically, stationary microgrids seem to benefit from HESS integration [17]; their role may include energy balancing [18], power quality improvement [19] and off-grid operation [20]. Although most of the articles that focus on the energy management of HESS refer to electric vehicles and battery/supercapacitor combination, stationary applications are less explored. In the review [21], the general classification of energy management systems that are focused on hybrid energy storages is presented. The types of management systems are divided by the objectives and by types, with two general categories: a classical approach and an intelligent approach. There are a few publications regarding EMS that consider hybrid energy storage. In [22], the application of a hybrid storage, consisting of a flow battery and a lithium battery, were simulated for a setup with off-grid renewable power. Ref. [23] shows the advantages of heterogeneous energy storage systems but also explains the possible problems with the implementation of EMS in such a setup, especially when the characteristics of the batteries are substantially different. The challenge in developing a HESS is to create a more optimal environment for batteries of different technologies in order to maximize their lifetime and the benefits resulting from their operation.