**4. Description and Results Obtained from the Simulation Model Developed**

This section analyzed the case study chosen for the sizing of a SCESS that allows the power injected into the grid by a wave power generation plant to comply with the grid code standards. The generation profile studied is that of the Mutriku port plant located in Biscay (Spain) and managed by Biscay Marine Energy Platform (BIMEP) [52]. The representative study period is slightly longer than 1 month, from 7 May to 19 June 2020. The sampling time of the power measured during this period was 1 s. Figure 10 shows the wave power generation profile generated by 3 of the 16 water column converters during said period (in blue). The total power generated by the plant (in red) is also displayed (N.B.: criterion: negative sign is generated power). It can be seen how the power generated by the OWCs is highly variable due to the oscillating nature of the wave resource itself [53]. The generation

peaks can reach values of up to 10 times the mean value. Just as a curiosity, the maximum power peak in the generation period occurred on June 11, with a value of 163 kW.

**Figure 10.** Power profile of three representative turbines of the wave power generation plant and total power in a stretch of time of the period studied.

#### *4.1. Scheme of the Model Elaborated in SIMULINK-MATLAB and Its Input Parameters*

For this study, a model has been developed using MATLAB-Simulink that includes the power generation data from the wave power plant for just over a month, the storage system based on several units of a real SC cabinet and the profile of the power that is exchanged with the electrical grid to comply with the different grid codes [54]. The ESS reference power profile is the result of subtracting the power from the generation plant and the target power profile to be injected into the grid [55,56]. The ESS, in addition to the SC cabinets, also integrates the DC/DC power converter. The scheme of the Simulink model is shown in Figure 11.

**Figure 11.** Simplified scheme of the model and control implemented in MATLAB-Simulink.

In order to be able to analyze all the available generation data, the full sample is divided into 15 min sections. It is set as a reference that the energy balance of the complete

storage system (ΔEESS) at the end of the complete generation period is zero. This means that the SoC of the storage system at the end of the analysis is the same as the initial one. In addition to the wave generation power profile, the other input parameters that the model has are: the maximum percentage of the rise ramp of the wave generation profile (% ramp-up/min) that can be injected into the grid, the ESS efficiency maps discussed in the previous section and the electrical parameters of each SC cabinet (maximum power, maximum and minimum voltage, available energy, and initial state of charge). From the limit value of % ramp-up, the value of the maximum percentage of the ramp down of the generation profile that can be injected into the grid was calculated so that the ΔEESS at the end of the generation period is null. In other words, for each allowed value of % ramp-up [57] there will be a value of ramp-down (%/min) that fulfills the previous condition (ΔEESS = 0). On the other hand, the model integrates the instantaneous SoC of each cabinet (voltage/current) to calculate the efficiency and the real instantaneous power that each SCESS module is capable of supplying/storing. Table 1 summarizes the main input parameters of the simulation model:


**Table 1.** Main input parameters of the simulation model.

#### *4.2. Results Obtained in the Simulation Model*

Starting from ramp-up value (%/min) of 10, the value of % ramp-down that fulfilled that at the end of the complete generation period studied the ΔEESS = 0 was 7.22%/min. The ESS energy balance was calculated from the ESS power profile throughout the generation period. The power profile of the ESS was the result of subtracting the wave generation power profile and that same generation profile limited by the maximum ramp-up (%/min) and ramp-down (%/min) allowed (target power injected to the power grid). Figure 12 shows the generation profile throughout the entire period (in blue) and the target power profile that was injected into the grid after applying the aforementioned restrictions.

**Figure 12.** Profile of the generation of the plant (in blue) and theoretical objective profile to be delivered to the grid after applying the power ramp-rate limit.

To evaluate the actual energy required for the storage system, the efficiency maps calculated and introduced in the previous point were integrated, which incorporated the losses in the elements that exist between the SCs and the connection point with the generation plant. Figure 13a,b shows the target power and energy profiles respectively of the ESS throughout the generation period to comply with the established grid codes. The maximum power requested from the storage system at the connection point was 111 kW (11 June).

**Figure 13.** (**a**) Power profile that the ESS has to supply to meet the active power ramp-rate limit requirement and (**b**) ESS energy calculated in 15 min periods from required power.

Once the energy and power required from the ESS are known, the optimum number of SC cabinets must be calculated to reduce the oscillations of the power delivered to the grid. To do this, the joint cumulative distribution function of the power and energy required from the ESS was calculated in 15 min steps throughout the entire generation period. This function gives an idea of the percentage of time when the restrictions applied to the power delivered to the grid can be met. Figure 14a shows the values of the normalized cumulative probability of the ESS with respect to power and energy calculated in 15 min steps. Most of the values were found at power figures above 20 kW and energy figures greater than 1400 Wh. On the other hand, areas in Figure 14b represent the areas relative to the percentage of time that the power and energy needs are met as a function of the number of SC cabinets chosen. Considering that each cabinet has a maximum power of 125 kW and an energy of 500 Wh, the resulting black line is shown in black in Figure 14b. If three cabinets are chosen, the percentage of time that the generation curve would be smoothed, complying with the grid codes would be almost 80%. However, if four cabinets were selected, the objective would be met 100% of the generation time on which the study was made. The decision to install three or four cabinets will depend on a further analysis of the particular consequences of the power oscillations in terms of frequency excursions. It can be observed in any case that the ESS would be oversized in terms of required power for the present application while fulfilling the energy requirements, more restricting in this case In other words, the maximum current that each cabinet is capable of giving could be limited to a value lower than the set limit of 200 A, seeking a more optimal ESS point of efficiency complying with the established restrictions for the same percentage of the time.

Considering that 3 o 4 SC cabinets would be required, the most efficient operation would lead to switching between the SC cabinets according to the power and energy needs, the strategy known as "stepped switching". In this mode, a minimum power value is set, which takes into account the SoC, below which the corresponding SC cabinet is disconnected and another one with a higher SoC takes over and starts up. The maximum power that each cabinet is capable of giving is a function of the SoC and the operating point where it is located (in the efficiency map). What is sought with this strategy is that the efficiency of the cabinets in operation is always above a certain threshold, applying the efficiency maps and knowing the voltage and current that each cabinet is supplying. Another possibility would have been the simultaneous operation of all the chosen cabinets. That is, each cabinet would give the same power and would be working at the same load regime all the time. The total power required would be equally shared among them. However, this strategy known as "all-in, all-out" reduces the efficiency of the ESS as a

whole compared to the efficiency achieved with the previous strategy [58–60]. Figure 15 shows the real power profile delivered to the grid for a 10% ramp-up, a 7.22% ramp-down and an ESS made up of 4 modules of SCs.

**Figure 14.** (**a**) Cumulative power and energy distribution function in the ESS and (**b**) cumulated distribution function for selection of the number of cabinets necessary to cover a certain number of cases of the proposed objective.

**Figure 15.** Power profile delivered to the grid throughout the generation period.

Figure 16a shows the percentage of time with respect to the complete generation period that each cabinet would work if 4 units were selected. On the other hand, Figure 16b shows a sensitivity analysis of the mean value of the reference power to be injected into the grid based on different grid codes (% ramp-up). Values from 10% to 23% (p.u./s) were taken. These values will correspond to respective ramp-down values, always complying that at the end of the generation period the energy balance in the ESS was zero. From the box-and-whisker plot it can be extracted that the median (Q2) was very similar in all cases as expected, around 20 kW. On the other hand, the atypical values of power delivered to the grid were below 5 kW and above 40 kW.

**Figure 16.** (**a**) Percentage of use of each of the four SC cabinets during the entire period studied and (**b**) box and whisker plot showing the average reference power values that will be delivered to the grid based on different active power ramp rate limits per minute (p.u./s).

#### **5. Conclusions**

This paper presents the methodology followed in the sizing of a SCESS in order to reduce the power oscillations of a real wave power generation plant connected to the electricity grid. The criterion followed to reduce the oscillations of the power injected into the grid is to limit the ramp-up of the power delivered by 10%/min and the ramp-down by 7.22%/min with respect to the generation profile. This criterion is based on the application of a grid code, which defines the requirements that a facility connected to a public power grid has to meet to ensure a safe, secure, and economic proper functioning. In this case, among all the parameters limited by the grid code standards, the active power ramp rate limit specified by regional transmission system operator (TSO) of each country is studied. For the sizing of the ESS, the calculated efficiency maps calculated of a real SC cabinet (on which this study is based) were drawn up to analyze the real power that the SCESS has to supply based on the measured current and voltage. Unlike other ESSs, such as batteries, the voltage in the SC is more variable and must be properly considered in order to try to operate, as far as possible, at the most optimal point of efficiency when there are several storage modules (cabinets) working in parallel. For the study shown, a model was developed in MATLAB-Simulink that integrated *n* modules of one ESS (SC + power converter), the wave generation profile and the power profile to be delivered to the grid.

Additionally, to select the ESS units that were necessary in this application, the cumulative probability of the ESS power and energy values (calculated in 15 min periods) that satisfy the established criteria were studied. For the dimensioning of any ESS it is necessary to find a compromise between the percentage of cases that the ESS covers and the cost of adding an additional storage module. In this case, SC was considered an appropriate technology for the present application (fast and high number of charge/discharge cycles). It was obtained that four cabinets was the most "optimal" value with a percentage of usage in all of them greater than 33%, although with just three cabinets 80% of power compensation was achieved.

The dimensioning process was more restricting in terms of energy, obtaining, and excess of power capability. By either considering three or four SC cabinets to compensate the power oscillation, there was an excess of power. That was already identified in Figure 14b, where the fact that the line representing the storage technology was quite far from the curves knee. As a consequence, and although in this case it was initially selected SC as technology for available space and economic reasons, it would be interesting to explore other solutions such as flywheels, with a much better ratio energy/power for this application or even a hybrid storage system should not be disregarded.

Finally, it should be highlighted that this methodology can be applied to different renewable generation plants (solar, wind, etc.) connected to the grid that have to comply with grid code standards of different countries or regions.

**Author Contributions:** Conceptualization, G.N., J.N. and M.B.; methodology, J.T. and M.B.; software, M.B. and Á.S.; validation, G.N. and Á.S.; formal analysis, G.N. and J.T.; investigation, G.N.; data curation, M.B. and M.S.-H.; writing—original draft preparation, G.N. and J.N.; writing—review and editing, M.L., D.R. and G.N.; visualization, G.N. and M.S.-H.; supervision, M.L. and D.R. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** Special thanks to EVE (Ente Vasco de la Energía) and BIMEP (Biscay Marine Energy Platform) for the real data provided from the wave power generation plant that is operating in Mutriku.

**Conflicts of Interest:** The authors declare no conflict of interest.
