## 4 Results
### Use Case  
In this section, the results obtained with the plant described in the previous section are shown. The first step is to set the design parameters of the EMS according to the characteristics of the plant and the prices of the Spanish energy market in winter time: \(PT\), period from 12:00 to 22:00; \(OT\), period from 22:00 to 12:00; \(SOC_{min}\), 35%; \(SOC_{max}\): 95%; \(TH_{PV}\), 1900 W; \(TH_{PV}^{+}\), 1800 W and \(TH_{PV}^{+}\): 1950 W. The OT and PT values are set by the Spanish energy market. The \(SOC_{max}\) and \(SOC_{min}\) are based on the battery datasheet provided by the manufacturer, which sets an optimum DoD of 60%. The PV threshold is also defined considering the battery datasheet, stating that the power provided by the BESS is always below 2 kW and most of the time around 1 kW or less. A hysteresis value of 100 W for the PV power is also set to avoid frequent state transitions which could be caused by small oscillations of PV. Once the design parameters have been described, Figure 15 shows the results obtained in a 24-h test. The test starts at 6.00 a.m., on the 22 nd of December 2020, to facilitate the comprehension of the experiment, since it begins in a state in which the BESS is already fully charged to the level defined by the \(SOC_{max}\) parameter. Figure 15a presents the hourly energy prices. It can be seen that the \(PT\) period lasts from 12:00 to 22:00 h and the \(OT\) period from 22:00 to 12:00 h. The strategy designed takes  
Figure 15: Use Case: (**a**) energy prices in the market for the day under study; (**b**) Instant Power PV production, Average power PV over the last 15 min and irradiance; (**c**) Power consumed by critical and non-critical loads, power consumed and delivered by the BESS and power delivered by the grid; (**d**) SoC level of the battery; (**e**) EMS states. advantage of the electricity price difference between the two periods, which is around 0.6 \(\mathrm{\upxi}\)/kW. Figure 15b shows the generation of PV power, on a mostly sunny day with different types of clouds to demonstrate the potential of the algorithm. The PV power is shown in blue, the 15-min average PV power in yellow and the irradiance is depicted in red. Analyzing the correlation between the irradiance and PV power measurements, it can be seen that the system is tracking maximum power at all times. The effects produced by the clouds and the potential to use the average PV over the last 15 min is described below, including a zoom of the figure in this working area, Figure 16.  
Figure 15c shows the power consumed by the loads, the power drawn from the grid and the power flow from/to the BESS. Negative values for the power represent consumption and positive values represent supply. The power consumed by the critical loads are shown in blue. These loads have a rated power of 2 kW and are always connected to the power supply. The power consumed by 1-kW non-critical loads are shown in red. These loads are disconnected when the EMS enters the State 5 or Cloud State, which is used to keep the installation in island mode while protecting the maximum discharge current of the BESS. Finally, the power provided to or withdrawn from the BESS is depicted  
Figure 16: Zoom of use case in the tariff change from OT to PT. **(a)** Instant Power PV production, Average power PV over the last 15 min and irradiance; **(b)** power consumed by critical and non-critical loads, power consumed and delivered by the batteries and power delivered by the grid; **(c)** EMS states. in yellow, and the power drawn from the grid in purple. As expected, the installation consumes all the energy provided by the PV system, with the support of the grid and the BESS when required. The BESS charging and discharging strategy is represented in Figure 15d, which shows the BESS SoC. It can be appreciated that the BESS is discharged to the desired level, \(SOC_{min}\), 35%, in the first hours of the PT period, from 12:00 to 18:10. During this time, the BESS powers part of the installation, supporting the PV and the grid supply.