*3.2. 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 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.

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).

**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.

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

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.

**Figure 18.** Results for the economic optimization method—data for the month of July, 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.

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. Generally, the optimizer finds solutions that require smaller power to charge or discharge batteries, which is positive from the durability of the batteries but does not use the full capacity of the batteries when it is possible to charge from the PVs.

**Figure 19.** Results for the economic optimization method—data for 27 July: (**a**) grid power balance, (**b**) energy usage and production (input data), (**c**) batteries power, (**d**) batteries state of charge.

**Figure 20.** Results for the economic optimization method—data for 4 October: (**a**) grid power balance, (**b**) energy usage and production (input data), (**c**) batteries power, (**d**) batteries state of charge.

During winter (Figure 21), the behavior of the batteries shows the typical schedule of the HESS operation used for price arbitrage. Batteries are being charged during off-peak hours, even if it means importing extra amounts of energy from the grid. During the morning peak, the HESS power remains close to zero, while in the evening peak the highest priced batteries are being discharged. Both the VRFB and the LFP battery follow similar patterns. This behavior is consistent with our assumptions, based on the difference in prices between the price zones in the tariff.

**Figure 21.** Results for the economic optimization method—data for 6 February: (**a**) grid power balance, (**b**) energy usage and production (input data), (**c**) batteries power, (**d**) batteries state of charge.

The economic factors clearly show that the economic algorithm that reduces the purchase of energy is the highest tariff (Figure 22a), at the same time increasing the use of energy from the lowest tariff, especially in winter months. The general costs of the system are smaller when compared to the situation without any energy storage and also lower than the benchmark. The arbitrage in winter is decreasing the overall cost of operation of the whole facility. The experiments revealed a problem in which the batteries do not charge fully in case of a surplus of energy (this situation is visible on Figure 19b). This is caused by the fact that there is no value for the optimizer to keep a higher state of charge of the batteries at the end of the day. To solve the issue, the obvious action would be to run the optimization for a longer period (e.g., a week, a month) but then the number of changing variables would be significantly increased, which would bring two problems: the problem with convergence and the extended time of computations.

**Figure 22.** Results for the economic optimization 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.
