Design and performance simulation comparison of a wave energy-powered and wind-powered modular desalination system

A new method is presented for the design and operation of wind and wave-energy-powered modular seawater reverse osmosis (SWRO) desalination plants. The SWRO modules are designed to achieve discrete adaptation of their power consumption to the estimated power output of the renewable energy technologies. The mean, mode and median power output values are proposed as statistical parameters to select the size of the single-stage SWRO modules. The aim is to select the system configurations which provide the minimum specific product water cost, the highest annual freshwater production, and the most efficient exploitation of the energy resource. A statistical inference analysis determined the existence of significant differences between their results. A discussion is conducted on the optimal systems obtained with both renewable technologies, and an economic sensitivity analysis of the variables employed is performed. The method is applied to a case study in Gran Canaria island (Spain), using local climate data measurements to assess the energy resource. Results show that the median was the best statistical parameter for the design of the wind-powered desalination system and the mode for the wavebased system. In the case study, the wind-powered system obtained better results despite a lower installed power than the wave-powered system.


Introduction
The degree of maturity that has been attained by the desalination industry has made it technologically and economically viable to tackle some of the challenges associated with the problem of water scarcity [1]. There are several benefits to the development of desalination projects in zones affected by water stress. For example, desalination can produce high quality potable water to meet the water needs of a large population and can act as a driving force behind new economic sectors such as tourism in regions without natural hydric resources [2,3]. It is also an excellent way to increase climate change resilience [2], and it reduces exogenous risks such as dependency [2]. However, the intensive use of energy required to produce freshwater elevates the energy stress in the zone, increases the cost of water and, generally, limits the use of the technology to those countries that can afford it [4]. Additionally, the traditional nexus between desalination and fossil fuels [5] means that desalination technology is associated with greenhouse gas emissions and other environmental impacts [6]. These drawbacks have led to the search for new renewable energy (RE) solutions to power new and more efficient desalination systems [1]. Wave energy is an interesting and emerging RE alternative when considering the location of wave energy converters (WECs) close to the coast and, potentially, to seawater desalination plants. This technology seems to be one of the most promising among marine renewable resources [7]. However, WEC technology is still poorly positioned in terms of its technological readiness level (TRL) [8]. The pre-commercial state of WECs, together with the traditional idea of designing desalination plants to operate constantly at rated flow rate capacity, has meant that the possibility of combining these two technologies has remained virtually unexplored. The most recent study was developed in the Kilifi region of Kenya [9], where the authors investigated the freshwater production of a very small-scale wave energy-powered reverse osmosis desalination plant. They concluded that further research was required into what could potentially be an interesting system. A similar conclusion was reached in another study carried out in the northern region of the island of Gran Canaria (Spain) [10]. In this case, the authors analysed the potential wave energy availability for the powering of desalination plants in the zone, as well as regulatory obstacles and the existence of possible interactions with other activities developed in this coastal area.
Like other RE options, wave energy depends on favourable climate conditions for the generation of power. This fundamental characteristic requires the development of specific methods supported by case studies to determine how best to manage the alternating availability of the energy resource. Despite the greater technological maturity of windbased systems, a similar issue arises when used to power desalination plants in stand-alone mode, and more specifically when the aim is to discretely power a seawater reverse osmosis (SWRO) desalination plant in order to adapt its power consumption to that supplied by one or more wind turbines (WTs). In other words, when the aim is to achieve a discrete adaptation of the power consumption for the SWRO desalination modules to the estimated available power for the RE system. To date, just one pilot study has been undertaken to test this operating mode for SWRO desalination plants using wind energy [11,12]. Although its performance has been discussed in detail [13], no methodologies have yet been published on the optimal design of such a system. With the above in mind, the aim of the present research study is to make an initial approach to cover a gap found in the literature through the presentation of a new method for the design and operation of wave and wind energy-powered modular desalination plants. As mentioned, no such methods have been found by the authors of the present study in the literature search that was undertaken. The proposed method considers a modular desalination plant design for the discrete adaptation of its power consumption to the varying power availability of both a windpowered system and a WEC system. The mean, mode and median power outputs of the renewable systems are proposed as statistical parameters to select the optimal size and number of the single-stage modules of the desalination plants. This selection in turn allows an optimized plant design based on the aggregation of multiple modules, and a smart operation strategy through their individual connection and disconnection.
As both wave and wind resource data are available in sufficient quality from several previous studies in the north of Gran Canaria, this area was chosen for the case study [7,10,[14][15][16].

Location of the study area
Gran Canaria island is located in the Atlantic Ocean about 150 km off the northwest coast of Africa and about 1350 km from Europe [17] ( Fig. 1 , the population density of Gran Canaria is high and constitutes an important stress factor for the limited water and energy resources on the island [17]. Due to these circumstances, more than half of the total water demand on the island (51%) is supplied through seawater desalination [17,20]. For this reason, a considerable percentage of Gran Canaria's electricity requirements is for water desalination (10% of total electricity demand [17,20]). On the other hand, Gran Canaria has excellent RE potential [17]. The abundant solar and wind resources on the island [17,[21][22][23] and the recently studied wave energy potential in the study area  [7,10,[14][15][16] comprise an excellent opportunity for the development of new local RE systems [17]. Moreover, the reverse osmosis process which it is proposed to use in the desalination plant has a high potential for flexibility [24,25], allowing the implementation of smart strategies to adapt electricity demand to the intermittent nature of RE generation [17]. The renewable potential in the region remains relatively unexploited given the current very limited contribution of renewable sources to the energy balance of the island [17,26]. According to Sagaseta et al. [16], the latitude of the Canary Islands situates them on a weather strip equivalent to 24 kW/m, giving the island and its 236 km of coastline an approximate 5.6 GW of potential wave energy power. Given that the highest wave energy potential is situated in the north of the island [10,14,16], with wave power values ranging from 15 to 29 kW/m [14,16], this zone was selected for the case study. Additionally, wind data and WT installations are available for this area, serving as reference points for future comparisons of this work.

Method
The general approach developed in this work is outlined in Fig. 2 for the case of a wind-powered modular desalination system. It should be noted that the procedure is similar in the case of a wave energy-powered modular desalination system, with the only difference being in relation to the particular input data and the calculations required to estimate the power output generated by this RE technology, as can be seen in Fig. 3. A total of 8 task blocks are shown in Figs. 2 and 3, indicated by an encircled number.

Task block 1
In the first task block, for the site where it is planned to install the energy technology, the algorithm reads the data series of wind speeds (W (h) ) in the case of a WT (Fig. 2), and of significant wave heights (H s ) Fig. 2. Algorithm of the general method used in the research. Case of a wind-powered modular desalination system. Source: Own elaboration. P. Cabrera et al. Desalination 514 (2021) 115173 and energy periods (T e ) [7] in the case of a WEC (Fig. 3), which cover the number of years (Y) which are to be considered in the study. The technical and economic data of each system (WT-SWRO: Fig. 2 and WEC-SWRO: Fig. 3) are also introduced into the algorithm in this task block.
In the case of the WT-SWRO system (Fig. 2), the algorithm reads the power curve and power coefficient (c p ) technical data of the WT, as well as its rotor swept area (A) and hub height (z). Likewise, the algorithm reads the specific energy consumption (SEC) of the SWRO plant and the economic data (the specific investment costs, c WT and c SWRO , referring to installation and set-up costs as well as annual operating and maintenance costs, C WT O&M and C SWRO O&M , the useful life, L, and the discount rate, i) of both the WT and the SWRO desalination plant.
In the case of the WEC-SWRO system (Fig. 3), the algorithm reads the power matrix of the WEC device in the different sea states [7]. As for the WT-SWRO system, the algorithm also reads the SEC of the SWRO and the economic data (the specific investment costs, c WEC and c SWRO , C WEC O&M and C SWRO O&M , the useful life, L, and the discount rate, i) of both the WEC and the SWRO desalination plant.

Task block 2
In this task block, in the case of the WT-SWRO system, the mean hourly power output, WTPO t , generated by the WT over the course of the Y years under consideration are determined. For this purpose, the wind speeds recorded at a measuring height (h) are first extrapolated to the hub height, z, of the WT. To carry out this extrapolation the use of a power law is proposed, Eq. (1) [27]: where α is a nondimensional wind shear exponent.
To estimate the mean hourly power output of the WT, Eq. (2) is used Fig. 3. Algorithm of the general method used in the research. Case of a wave energy-powered modular desalination system. Source: Own elaboration. [28]: where c p is the electrical power coefficient of the WT, which is a function of the wind speed, A is the area swept by the rotor of the WT and ρ is the air density at the WT site.
In the case of the WEC-SWRO system, the wave power per unit of crest length, J (kW/m), is determined through Eq. (3) [7]: where H s (m) represents the significant wave height, T e (seconds) the energy period, ρ sw the density of seawater (assumed to be 1025 kg/m 3 ) and g the gravitational acceleration (9.81 m/s 2 ). Likewise, the mean hourly power output, WECPO t , of the WEC during Y years is also determined using the power matrix of the WEC. This matrix consists of a two-way layout table in which the columns represent H s (m) and the rows T e (seconds). The elements of the matrix express the power output of the WEC [7,29].

Task block 3
In the case of the WT-SWRO system, the mean hourly power output of the Y years under consideration is determined (WTPO), as well as the mode (ŴTPO) and the median (WTPO). In the case of the WEC-SWRO system, the equivalent statistical parameters are the WECPO, Ŵ ECPO and W ECPO, respectively (Fig. 3). These three statistical parameters will subsequently be used to estimate the mean hourly capacity (Q m , Q m , Q m ) of the modules of the SWRO desalination plant.

Task block 4
Given that the distributions of wind speeds and wave heights and periods do not usually follow a normal law [30], the mean, mode and median of the power generated by each of the renewable technologies tend not to coincide. Therefore, the capacities (Q m , Q m , Q m ) of the SWRO desalination plant modules estimated on the basis of the aforementioned statistical parameters in task block 4 will also generally differ. In this study, the SWRO desalination process is determined on the basis of its power consumption. For this reason, these capacities (Q m , Q m , Q m ) are obtained by dividing the corresponding mean, mode and median values calculated for the WT or WEC powers by the SEC used in the analysis. As commented in Section 4.3.3, a conservative SEC value of 4 kWh/m 3 was assumed in this work.

Task block 5
In this task block, a simulation is undertaken of the hourly behaviour of the system during its Y years of operation. The number of SWRO modules (N t , N t , Ñ t ) that are in operation in each time step t is determined on the basis of the statistical parameter of the power output data used to determine the hourly capacity of an SWRO module. The Trunc(x) function returns the integer formed by truncating the values in x toward 0. Likewise, the power consumed hourly by the SWRO plant (P Ct , P Ct , P Ct ) and the power generated hourly but unused (P pt , P pt , P pt ) are determined. The flow rates produced in the Y years of operation (Q y , Q y , Q y ) are determined on the basis of the power output statistical parameter used to determine the hourly capacity of an SWRO module, as the sum of the hourly flow rates generated during the Y years under consideration.

Task block 6
In task block 6 (Figs. 2, 3), the specific cost per m 3 of product water, otherwise known as the unit product cost (UPC) of the freshwater produced [31] (€/m 3 ) is determined on the basis of the statistical parameter used (mean, mode or median). To select the optimal configuration from an economic perspective, the extensively used simplified cost of water (SCOW) method [32] is used, Eq. (4): where TPV is the total present value of the actual cost of all the subsystems of a given configuration.
The TPV, which takes into account the costs associated with the investments that need to be made in the electrical energy generation subsystem (C WT or C WEC ) and the water desalination subsystem (C SWRO ), is determined through Eq. (5): The annual O&M costs cover the costs associated with the operation and maintenance of the system and are determined through Eq. (6): In Eqs. (5) and (6), λ = 0 in the case of the WEC-SWRO system and λ = 1 in the case of the WT-SWRO system.
The capital recovery factor, CRF, which is dependent on the useful life, L, of the system and the discount rate, i, is determined through Eq. (7):

Task block 7
In task block 7, a comparative analysis is performed of the technical and economic results obtained on the basis of the statistical parameter (mean, mode or median) used to determine the hourly capacity of the SWRO modules.
The degree of agreement between the power output of the renewable system and the product water output of the SWRO desalination plant is then analysed using the coefficient of determination (R 2 ) as the statistical measure of accuracy.
The R 2 indicates the proportionate amount of variation in the response variable, Q, explained by the independent variable, (WTPO, WECPO) [33]. Although some studies in the literature have warned against using R 2 in a non-linear context [34][35][36], it was nevertheless decided to include it and analyse it with caution as it is a very common and intuitive metric [33]. The R 2 is defined through Eq. (8): where SSE is the sum of squared errors, SSR is the sum of squared regression, and SST is the sum of squared total.
With the aim of establishing the existence or otherwise of statistically significant differences (5% significance level), a comparison is also undertaken of the flow rates generated by the systems obtained using the three statistical parameters (mean, mode and median) and of the power outputs of the renewable technologies that remained unused by the SWRO desalination plant.

Task block 8
In this task block, a comparison is undertaken of the optimal systems obtained with the two renewable technologies under consideration. Statistical inference (contrast hypotheses) is used to test for statistically significant differences between the variables of both systems. A sensitivity analysis of the most significant economic parameters is also performed.

Materials
A description is offered in this section of the renewable resources, including their technical and economic characteristics, and of the SWRO desalination plant.

Description of the climate wind data used
The wind data used in the case study were the mean hourly wind speeds recorded at heights of 10 m and 20 m above ground level (a.g.l.) during the years 1997,1998,1999,2002,2003 Fig. S1 shows the frequency histograms at 10 and 20 m a.g.l. and the probability density functions (pdf) fitted to them. In this case, the pdfs are a mixture of two Weibull distributions [30].

Description of the climate wave data used
The wave climate data was obtained from the ERA40 database generated by the European Centre for Medium-range Weather Forecasting (ECMWF) [37]. The ERA40 database provides 40 years of hindcast data on a global grid resolution of 1.5 degrees. This wave climate data provides a time series containing the significant wave height, H s (in m), and the energy period, T e (in seconds), for the wave resource. This dataset was used to estimate the WEC power time series using a 2-D linear interpolation of the power matrix of a Pelamis WEC system which is presented in Section 4.3.2 (Table 1 and Fig. S2). The wave power matrix of a WEC device is usually presented in sea states classified into energy bins of small intervals of significant wave heights and energy periods (∆H s × ∆T e ) (∆H s × ∆T e ) [7]. Since the wave data are sampled every 6 h, after these previous steps, the resulting six-hourly sampled 1-D power time series was linearly interpolated to obtain a total hourly distribution of the WEC power in the analysed period.
The same 6-year period (1997, 1998, 1999, 2002, 2003 and 2007) was used to compare the results obtained with this WEC system and those obtained with a similar wind-powered system installed in a location close to the wave collection data site. This data was collected at 28.5 • N 15.5 • W. For this location, the mean H s value obtained was 1.76 m and the mean T e value was 8.53 s (Fig. 1). According to Gonçalves et al. [7], a location close to this site offers good operating conditions to implement a WEC test site under low-mid power conditions. This is consistent with the mean interannual wave powers per unit of crest length, J (kW/m), shown in Fig. 5-(a) and calculated through Eq. (3). Fig. 5-(b) shows the 24-h pattern of the wave power per unit of crest length. Additionally, as Supplementary material of this paper, Fig. S3 presents a scatter table with the probability of occurrence of the different sea states for the site under study. In this figure, the yellow cells represent the most probable sea states of the site under study (which occur around 10% of the time at this site). However, as also described in [7,38], it is noted that the most powerful sea states contribute little to the total annual resource because they are associated with large wave heights and low energy periods.

Specific technical characteristics and cost assumptions used for the case study
In this section, the main technical characteristics and costs assumptions considered are described.

The MADE AE-46/I wind turbine as power system
The WT selected for this case study and for comparison with the WEC system was the MADE AE-46/I ( where W 20 and W 10 are the mean wind speeds at 20 and 10 m a.g.l, respectively. The estimated wind speeds at hub height z = 43.5 m a.g.l are used to estimate the WTPO through Eq. (2). In the case study, in Eq. (2), A =  Some studies take into account the variability over time of the air density [41,42]. However, given the lack of historical data series for temperature, pressure and humidity, it was decided in this study to use the mean value of this parameter. Estimation of ρ was done through Eq.

The Pelamis WEC as wave power system
As a consequence of the low TRL of WEC technology, costs are higher and power capacity lower compared with other RE generation sources such as wind or solar photovoltaic [8]. However, this allows an evaluation of the current status of the technology in a very conservative scenario, and if the results are positive at the current low TRL the scenario for the future can be considered optimistic.
The Pelamis WEC was selected for this study as it is one of the most analysed and documented converters in wave power technology [43] and because of its preferred use by other authors over alternative WEC options for studies in the Canary Islands [7,16]. The Pelamis WEC is an articulated snake-like device comprising a series of cylindrical sections linked by hinged joints (Fig. S5) [43,44]. In this case study, the Pelamis version is 120 m long and 3.5 m in diameter, has a rated power of 750 kW and weighs 700 ton [43]. A more detailed technical description of the Pelamis system and its performance can be found in [45]. Table 1 and Fig. S2 present the power matrix of this device in sea states classified into energy bins of 0.5 m × 0.5 s (∆H s × ∆T e )(∆H s × ∆T e ) [7]. Each element of Table 1 indicates the power supplied by the Pelamis WEC when it is operating under the wave conditions indicated by the respective bin [29].
The fixed and variable costs of the Pelamis WEC system were estimated after undertaking an analysis of previous studies and operating installations found in the literature [43,[46][47][48]. After this analysis, it was concluded that the capital costs of a 750 kW rated power demonstrative unit, C WEC , were in a range of 4.6-7.5 million €. In this work, a mid-value (C WEC = 5.5 million €) was adopted for the selected 750 kW Pelamis on the basis that this technology is in development and it is possible than in the future capital costs will be reduced. The C WEC comprises the total costs generated by the WEC structure itself (around 44% of capital costs), power take-off (19% of capital costs), transmission (1% of capital costs), moorings (5% of capital costs), installation (7% of capital costs) and project management (24% of capital costs) [46,49]. The annual operating and maintenance costs, C WEC O&M , were taken as 5% of the total cost of the WEC system [46].

The SWRO desalination system
The SWRO desalination plant is made up of a number (N) of singlestage SWRO modules fitted with energy recovery devices (ERDs). Each module operates with a recovery rate of Y (%), has a freshwater production capacity of Qm (m 3 /h) with a product water concentration of C p (ppm) and a SEC (kWh per m 3 of product water) in which the energy consumption of the feed and freshwater pumps is included. With the method proposed in this study, the SWRO plant is defined on the basis of the SEC of the process and, therefore, of the power that each of its singlestage modules consumes.
With its first desalination plant installed in 1964, the Canary Islands have a very long and distinguished trajectory in the development of new innovations and scientific studies related to the desalination industry [3,50]. According to Arenas-Urrea et al. [50], the SEC range of the 137 desalination plants installed in Gran Canaria is 3.76-6.45 kWh/m 3 . However, the same authors argue that the SEC could be reduced to 2.2 kWh/m 3 if modern ERDs were to be used.
A conservative mean SEC value of 4 kWh/m 3 was assumed in this work, on the basis that a medium-small desalination plant will be required. In this manner, the resulting desalination plant can work with a recovery rate, Y, of around 45% [50] and a product water concentration, C p , below 500 ppm.
The specific costs, c SWRO (Q d ), in €/m 3 , associated to the different desalination capacities, are shown in Fig. 7, which was constructed using data published in [31] and whose representative equation is expressed in Eq. (12): Estimation of the total investment cost of a given configuration of an SWRO plant comprising N modules was made through Eq. (13): where ψ reflects the percentage of specific investment costs attributable to the installation of the SWRO modules (cost of mechanical equipment, membranes, electrical and instrumentation systems, ERDs), which in this work was estimated at 75% [51]. The remaining 25% of the investment costs corresponds to intake pump station and brine and product flow piping construction costs and indirect capital costs [51].
The annual operating and maintenance costs are divided in this work into variable costs, which depend on the annual product water flow, and fixed costs, Eq. (14). The variable costs attributable to the use of chemicals are estimated in this work at 0.044€/m 3 of product water (mean value of the range indicated in [52]), while those attributable to membrane and cartridge filter replacement, taking into consideration the fact that the plants operate under variable conditions with more start-ups and shut-downs than those of a conventional plant, are estimated in this work at 0.062€/m 3 (upper limit of the range indicated in [52]). The fixed operating and maintenance costs, which include labour and indirect costs, are estimated in this work, after considering the information given in [52], as a percentage β = 4% of the investment costs.

Results and discussion
The results obtained in the different stages of the method, indicated in Figs. 2 and 3 and described in Section 3, are presented and analysed in this section.

Analysis of the results obtained with the three WT-SWRO system configurations
A summary is shown in Fig. 8 of the most important results obtained with the three different configurations of the wind-powered modular desalination system according to the use of the three statistical parameters (mean, median and mode), as presented in the method described in Fig. 2. It can be seen that different results are obtained with the three statistical parameters. This is because the WT power output data do not fit a normal distribution. This was expected when considering that the wind speeds are fitted, in this case, to a mixture of two Weibull distributions (Fig. S1). Shown in the lower right-hand part of Fig. 8 is the hourly flow capacity (m 3 /h) of the WT-SWRO system plotted against the hourly WT power output (kW) on the basis of each the three statistical parameters. It can be seen that the same number of modules is obtained in the design of the plant (two single-stage modules) irrespective of the statistical parameter employed. However, differences are generated in the product water flow capacities. The flow capacity of each single-stage module is 58.25 m 3 /h if the median is used, 68.67 m 3 /h in the case of the mean and 76.17 m 3 /h for the mode. However, although the mode gives the highest flow capacity it is also the slowest in starting up the first module as this higher flow capacity also requires a higher supply of wind power. To be more specific, the plant designed on the basis of the mode value requires a cut-in wind speed of 8.9 m/s (equivalent to a power of 304.5 kW) against the 8.7 m/s (274.6 kW) for the mean and the 8.2 m/s (232.9 kW) for the median. As a result, the system with the mode-based design operates with a single module in a higher WT power output range. The connection of the second module, in this case, requires high wind speeds that tend to occur especially in the summer months (Fig. 4). However, the system sized with the median takes advantage of wind speeds of lower intensity and, as can be seen from the representations of the linear regressions for the three configurations, also obtains the highest R 2 between the WT power output and the SWRO plant flow capacity (91.76%), followed by the mean (88.53%) and the mode (83.92%). In other words, the proportion of the variation in the results that can be explained with the median-based WT-SWRO model is 91.76%.
Shown in the bar chart in the upper-left-hand part of Fig. 8 are the specific cost of the product water (UPC), the annual amount of product water and the annual energy that is generated but not consumed by the three SWRO desalination plant configurations. It can be seen that the lowest UPC is obtained with the median-based WT-SWRO system configuration (1.5 €/m 3 ). This value is slightly above the range reported for modern medium-scale SWRO desalination plants, currently between 0.63 and 1.26 €/m 3 [31,53,54], even though a conservative SEC of 4 kWh/m 3 was considered in the analysis. In the same bar chart, it can be seen that the same median-based design provides the highest product water flow (3.96⋅10 5 m 3 /year) and the lowest amount of unconsumed energy (8.17⋅10 5 kWh/year).
A non-parametric permutation test for paired data was used [55,56] to test for statistically significant differences between the variables generated by the three WT-SWRO systems configured on the basis of the mean, median and mode. The null working hypothesis (Ho) was that the value (μ a ) of system "a" is less than or equal to the value (μ b ) of system "b" when estimating the annual product water flow, with a significance level of 0.05. This hypothesis was contrasted with a unilateral alternative hypothesis (Ha). In Ha, it is accepted that μ a is significantly higher than μ b . As can be seen in Fig. 8, three pairs of comparisons were made and significant differences were observed as the p-values were lower than the criterion of significance (0.05). Consequently, the Ho hypothesis is rejected and the Ha hypothesis accepted.
When estimating the annual energy not consumed by the SWRO plant, the null working hypothesis (Ho) is that the value (μ a ) of system "a" is greater than or equal to the value (μ b ) of system "b". In Ha, it is accepted that μ a is significantly less than μ b . As can be seen in Fig. 8, three pairs of comparisons were made and the p-values again confirmed the existence of statistically significant differences.
On the basis of the annual product water flow of the median-based configuration system design, it is possible to cover the average annual residential water consumption of 3596 inhabitants, considering typical water consumption in the major Spanish cities (110.14 m 3 /per capita) [57], or the average annual water consumption of almost 99 ha of agricultural land, considering the typical agricultural water consumption per hectare in Spanish agriculture in 2017 (4017 m 3 /ha) [58].

Analysis of the results obtained with the three WEC-SWRO system configurations
Analogously to the previous section, a summary is shown in Fig. 9 of the most important results for the three configurations of the wavepowered modular desalination system designed through the use of the three statistical parameters (mean, median and mode), as seen in the method described in Fig. 3. In this case, the results also differ for the three parameters as the WEC power data similarly do not follow a normal distribution. Shown in the lower right-hand part of Fig. 9 is the hourly flow capacity (m 3 /h) of the WEC-SWRO system plotted against the hourly WEC power output (kW) on the basis of the three statistical parameters. It can be seen that a total of 5 modules are obtained with the mean-based and median-based configuration design, but that 7 modules are obtained with the mode-based system. The mean hourly flow capacity of each single-stage module is 16.79 m 3 /h when using the mode, 21.92 m 3 /h with the median and 25.5 m 3 /h with the mean. In this case, the mode-based system is the first to start up as it requires a lower wave power. To be more specific, the mode-based system requires a wave power of 67 kW to start up against 87.6 kW and 102 kW for the meanbased and median-based systems, respectively. It can be seen that the mode-based system provides the highest operating range in terms of power since, as previously commented, its first module starts up with a lower wave power and connects its last module at the highest recorded WEC power output. Although the mean-and median-based configurations also attain high power ranges when connecting their five modules, both start operating later. It is also noteworthy that the operating range of the fifth module of the mean-based configuration is quite limited and that, when operating with five modules, the flow capacity of the medianbased configuration is lower than that obtained with the mode-based configuration operating with 7 modules.
It can be seen from the linear regressions for the three configurations that the highest R 2 between hourly WEC power output and SWRO plant flow capacity is obtained with the mode-based configuration (91.6%), followed by the median (88.58%) and the mean (85.57%). In other words, the proportion of the variation in the results that can be explained with the mode-based WEC-SWRO model is 91.6%.
From the bar chart shown in the upper right-hand part of Fig. 9, it can be concluded that the lowest UPC is obtained for the mode-based WEC-SWRO configuration (8.3 €/m 3 ). This UPC is a relatively high value given the current state of SWRO technology [53,54,59] and the current tariffs for residential use of water in the principal cities of Spain, which are between 1.18 €/m3 and 2.14 €/m 3 [57]. However, this relatively high value can be better understood if some important aspects of this case study are taken into account. Firstly, the WEC energy system chosen is a prototype with higher costs than other more mature technologies with higher TRLs. Secondly, this WEC was designed to operate in seas with higher overall wave energy potentials (~50 kW/m) than those Fig. 9. Results obtained on the basis of the three statistical parameters used to estimate the freshwater production capacity of the single-stage modules of the WEC-SWRO desalination plant. Source: Own elaboration. recorded in the region chosen for the case study (15-29 kW/m) [14,16].
In the same bar chart of Fig. 9 it can be seen that the mode-based design provides the highest annual amount of product water (1.51⋅10 5 m 3 /year) and the lowest amount of energy not consumed by the SWRO plant (2.86⋅10 5 kWh/year).
As before, a non-parametric permutation test for paired data was used [55,56] to test for statistically significant differences between the variables generated by the three WEC-SWRO systems configured using the mean, median and mode parameters.
As can be seen in Fig. 9, three pairs of comparisons were made to compare the annual product water obtained with the three different configurations, and significant differences were observed as the p-values were lower than the criterion of significance (0.05). Consequently, the Ho hypothesis is rejected and the Ha hypothesis accepted. Three pairs of comparisons were also made to compare the energy not consumed by SWRO and the p-values again confirmed the existence of statistically significant differences.
With the mode-based configuration, the water production of 1.51⋅10 5 m 3 /year could cover the residential water demand of 1370 city inhabitants or the agricultural water demand of almost 37 ha.

Comparative analysis between the WT-SWRO and WEC-SWRO technologies
After determining the most suitable statistical parameter for the design of each of the two systems under consideration (as described in Sections 5.1 and 5.2), it was decided to compare the configurations which gave the best results. In this regard, it is interesting to note that the design of the best configuration for the two systems did not involve use of the mean as statistical parameter. The best WT-SWRO system configuration was obtained using the median, and for the WEC-SWRO system the best statistical parameter was the mode. Importantly, in the design of renewable systems the mean is commonly used as the design statistical parameter and, in this respect, we would recommend that this criterion be revised and carefully considered in future works. Fig. 10-a presents the hourly freshwater production for each month of the year obtained with the WT-SWRO configuration sized with the median statistical parameter and the WEC-SWRO configuration sized with the mode parameter. It can be seem that, for all months of the year, the WT-SWRO generates a higher hourly amount of product water than the wave-based system. However, the difference between the two systems increases during the summer months, coinciding with a higher wind resource (Fig. 4) and a lower wave energy resource (Fig. 5). In contrast, during the winter months, similar amounts of product water are obtained with the two systems. This behaviour is of interest because it shows that the two energy resources could be used to complement each other and their synergies exploited, as proposed in different smart energy planning approaches [17,60,61]. It is particularly noteworthy that despite the installed power of the WEC being greater than that of the WT, the freshwater production capacity of the latter is considerably higher. This is due to the much higher wind than wave potential in the Canary archipelago.
If a non-parametric test is applied in this case, the null working hypothesis (Ho) is that the value (μ WT− SWRO = 45.3 m 3 /hμ WT− SWRO = 45.3 m 3 /h) of the median-based WT-SWRO system is greater than the value (μ WEC− SWRO = 17.3 m 3 /h) of the mode-based WEC-SWRO system when estimating annual freshwater production, with a significance level of 0.05. The p-value is 1, and so Ho is accepted. Fig. 10-b shows the 24-h freshwater production profile of the two systems. It can be seen that they both follow the same trend as their respective renewable resources (Figs. 4 and 5). The product water generated with the WEC-SWRO system remains relatively constant throughout the day, while the WT-SWRO system produces higher amounts of product water during the daytime hours when the wind resource is at its highest. Fig. S6, included as supplementary material,  shows a sample of the hourly performance simulation of the SWRO desalination plant powered by the Pelamis WEC and by the WT using data of February 2007.
As can be seen in Fig. 11, the WEC-SWRO system has seven modules and eight operational states, whereas the WT-SWRO has just three operational states and two single-stage SWRO modules. These two modules of the WT-SWRO system operated in a balanced way during 21.3% and 28.24% of the hours analysed, respectively.
However, the operating frequencies of the modules sized for the WEC-SWRO system are more disparate. It can be deduced from Fig. 11 that the probability of the WEC-SWRO system operating with 3 or more modules (8.08%) is considerably lower than its operating with one or two modules (58.24%). In other words, to achieve the flow rate that the system provides, a large number of modules are required that operate with a low frequency. These modules could be removed from the system, although this would also reduce freshwater production and increase the amount of energy generated but not consumed by the SWRO plant. Fig. 11 also reveals an important detail of the analysed systems that merits particular attention. The SWRO desalination plant is shut down (0 modules in operation) for 50.47% of the time for the WT-SWRO system and for 33.68% of the time for the WEC-SWRO system. This is one of the main reasons why the costs of these systems are higher than those of a conventional plant which operates 100% of the time. However, although the SWRO plants of renewable systems may not be operating for a significant percentage of the time, and therefore producing no freshwater, the fact remains that a renewable freshwater production is being obtained without the emission of polluting gases throughout the lifetime of the system. Fig. 12 shows the results of the sensitivity analysis of the specific cost of the product water in the median-based WT-SWRO system and the mode-based WEC-SWRO system to changes in various economic parameters. It can be seen that, in both systems, the investment costs in the SWRO plant have a considerable influence on the specific product water cost (Fig. 12-a and -c). According to the analysis undertaken, specific product water costs below 1 €/m 3 can be obtained in WT-SWRO systems if the investment costs in the SWRO desalination plant can be reduced by at least 40%. In the WEC-SWRO system, in contrast, there is an additional important influence on the specific product water cost in the form of the investment costs in the WEC (Fig. 12-c).
In this study, the initial capital costs assigned to the WEC were a midrange value (5.5 million €) of the range estimated in the literature (4.6-7.5 million €) [43,[46][47][48]. If the highest value is considered instead, a specific product water cost of 11.4 €/m3 (around 20% more) will be obtained. However, considering this technology is still under development and the data costs that are currently available are taken from pre-commercial pilot systems, it is not unreasonable to assume that the cost considered in this analysis will be lower in the future. According to the sensitivity analysis carried out, a specific product water cost of 6 €/m3 can be obtained in WEC-SWRO systems if the investment costs in the WEC can be reduced by 50%, (which would correspond to a capital cost of 2.75 million €). Additionally, if the investment costs of both the SWRO desalination system and the WEC system could be reduced by 50%, a specific product water cost of 4.8 €/m3 would be obtained.
In view of the results obtained, it is noted that the WEC-SWRO system has a high specific cost for the desalination sector. Nonetheless, various aspects need to be taken into account which could substantially reduce this value. Firstly, the current state of the technology is limited to a few pilot projects and so the system costs are still high. Secondly, a single Pelamis WEC unit has been used in the pilot trials and, as pointed out in [43], final costs will be lower due to proportionally lower capital costs (in some instances) if more than one WEC unit is installed and due to the likely future availability of more models to drive down their cost.
Another aspect to consider is the SEC used for the desalination plants. In this study, a conservative SEC was used of 4 kWh/m 3 . In this regard, if a more adjusted SEC is considered (as suggested in [50] if modern ERDs are used), more competitive results can be attained in terms of the specific cost of water, the annual amount of freshwater produced and the amount of energy generated but not consumed in the two analysed systems.

Conclusions
After applying the proposed model in the design and operation of two renewable (wind and wave) powered modular SWRO desalination plants situated in the north of Gran Canaria (Canary Islands, Spain), it is concluded that there are statistically significant differences in the annual amount of freshwater production and the annual amount of energy available but not consumed by both the WEC-SWRO and WT-SWRO systems. More specifically, significant differences in these variables were obtained when using the mean, median or mode as the statistical parameter for the configuration of the single-stage modules of the SWRO desalination plants. The specific cost of the freshwater obtained for each system also differs depending on the statistical parameter that is used in the design. In the case study, the best results for the aforementioned variables were obtained when using the median for the WT-SWRO system. However, for the WEC-SWRO system the best results were obtained when the system configuration was based on the mode. It is therefore recommended that all three statistical parameters be taken into account when designing these systems as the distributions of renewable powers tend not to follow a normal law.
It was observed in this study that, despite having a lower installed power, the wind-powered system gave better results in terms of cost and freshwater production than the wave-powered system, due primarily to the behaviour of these two renewable resources in the study area. In general terms, the Canary archipelago has a much higher wind than wave potential, although in winter wave potential increases and wind potential decreases.
With the design method used, the configuration of the WT-SWRO system had a lower number of single-stage modules than the WEC-SWRO system. Whereas the operating frequency of the WT-SWRO modules was similar, the modules of the WEC-SWRO system operated with disparate frequencies and various of them had a very low operating frequency. According to the sensitivity analysis that was undertaken, the most sensitive parameters are related, in the case of the WT-SWRO system, to the capital costs of the SWRO and, in the case of the WEC-SWRO system, to the capital costs of the WEC. This research makes a first approach to cover the gap of knowledge found with respect to proposals for new methods to design and operate wind and wave energy-powered modular desalination plants. Despite the relatively low wave energy potential at the site, the results that were obtained are interesting in terms of water supply. A wave energypowered desalination plant can be developed capable of producing an average 1.51⋅10 5 m 3 /year of freshwater which can meet the water needs of almost 1370 residential inhabitants or the agricultural water demand of 37 ha. However, the resulting specific cost of water (8.3 €/m 3 ) is high, which is mainly due to the low level of maturity of WEC technology. For the wind-powered desalination plant, the results were much more promising, with the average freshwater production of 3.96⋅10 5 m 3 /year able to cover the residential water demand of 3596 inhabitants or the agricultural water demand of 99 ha. The specific cost of the freshwater produced by the wind-powered desalination system designed and simulated with the proposed method was 1.5 €/m 3 , a competitive value in the SWRO desalination industry.
Taking all the above into account, more research in this field is required, and more specifically into whether the method could be modified to allow a reduction of the mismatches between the electrical generation produced by the RE source and the electrical power consumed by the desalination plant. In this respect, the authors propose to initiate a research study exploring variable adaptation of the desalination plant instead of the discrete operation considered in this work.
Finally, given the greater intensity of the wind power during the summer months and of wave power during the winter months, further consideration should be given in future studies in this field to combining the two renewable technologies that were considered in this research.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.