# Energy Cost Minimization with Hybrid Energy Storage System Using Optimization Algorithm
## 3 Results
### Economic Optimization  
The method of economic optimization is focused on reducing the overall cost of operating of the facility; it should use the energy storage to decrease the usage during peak times and charge in case of surplus or during low-zones of the tariffs. Before the run of the experiments, an analysis of the tariff prices and the degradation costs showed that, according to the calculations, the VRFB should be profitable to use for arbitrage when low tariff and evening peak tariff is considered. It is not profitable to use this storage to move energy from the morning peak to evening peak. The LFP battery has a different degradation cost and RTE, which makes it useful to move energy from the low and morning peak tariff to the evening peak. The using of batteries to increase the surplus of energy produced by PV is always profitable. The execution of the program showed that, very rarely, there is problem with convergence, especially in days with high production from PV modules. On such days there is an excess of energy, which generally creates the multiple solutions that are equivalent for the optimizer. A comparison of the balancing method and the economic optimization method showed that the latter uses HESS all year round (see Figure 16c). However, the energy purchase costs and sell profits are not much different compared to the balancing algorithm (Figure 16d). Figure 15: Results for the energy balancing method—monthly economic indicators: (**a**) purchase cost classified by tariff zones (tariff prices), (**b**) costs, profits and financial balance, (**c**) costs of energy saved by PV generation, (**d**) costs of energy saved by HESS operation. The more detailed view of each month provides a much better picture of the actual performance. In January, the HESS uses a lot of the batteries but only to move energy from the expensive time of the day to the cheaper tariff times. There is almost no difference in the cash flow of selling energy, but there is a visible difference when the cost of buying energy from the grid is considered (Figure 17d). In July, the situation is very different--the energy storage reduces bought energy and consumes less from the surplus of the produced energy (Figure 18a). The total sell profits are higher, but also the cost of import from the grid is higher (Figure 18d). The economic  
Figure 16: Results for the economic optimization method, aggregated monthly: (**a**) grid energy balance, (**b**) energy usage and production (input data), (**c**) activity of the energy storage, (**d**) cost of purchased energy and profit for sold energy. Figure 17: Results for the economic optimization method—data for the month of January, aggregated per day: (**a**) grid energy balance, (**b**) energy usage and production (input data), (**c**) activity of the energy storage, (**d**) cost of purchased energy and profit for sold energy. optimization method in certain situations is more costly compared to the energy balancing method; it is due to the limitation of the optimization process to 24 h; this is the reason for the modified economic optimization, which is described further in the next section. Checking the details of the algorithms, a very clear difference can be seen in the example day in July (Figure 19)--the batteries are discharged slowly and their energy is almost uniformly distributed over the whole period where there is a need to decrease energy usage. Similarly, charging shows no extremes, the speed of charging is decreased but maintained for a longer time. Analyzing the behavior day by day, it is clear that the optimizer is considering the degradation costs--the batteries are charged only to the point that is necessary to cover the single day. On 27 July and 4 October, it is especially visible (Figure 20) that the state of charge of the batteries is not reaching the maximum levels, even when it is possible to fully charge from the surplus of produced energy.