Energy efficiency optimization in battery-based photovoltaic pumping schemes

This article deals with the analysis of energy efficiency optimization in battery-based photovoltaic pumping schemes. The study builds on previous findings derived from the comparison between a direct photovoltaic water pumping system (DPVWPS) and the equivalent system including a lithium-ion battery (LIB). The initial experimental results of the battery-based photovoltaic water pumping system (PVWPS+LIB) were obtained with the motor-pump group operating at its rated condition of 50 Hz. In the present work, an analysis of the efficiency and the performance ratio of the variable speed drive (VSD) and the motor-pump group, showed that both parameters improve when operating in the low frequency range of the VSD and far from the rated frequency where the flow rate is maximized. Several fitting models were performed with the data obtained with the monitoring system and it was concluded that an overall energy efficiency optimization can be achieved with a VSD frequency equal to 37 Hz. A comparison of the experimental results obtained with the VSD working in the direct mode and with the battery-based solution (setting different VSD frequencies – 50 Hz, 37 Hz, and a combination of the two frequencies designed as 37/50/37 Hz) was made to determine the efficiency and performance ratios in each case. The results presented in this study also establish criteria for improving efficiencies in the LIB charging and discharging processes.


I. INTRODUCTION
Off-grid photovoltaic installations are increasingly used in developing countries in locations where the conventional power network cannot reach [1]. Customer profiles and experiences, common appliances in solar home systems, and the economic opportunities were addressed in [2], in alignment with the Sustainable Development Goals set out by the United Nations 2030 Agenda [3]. Photovoltaic (PV) technology is easily integrated with battery-based storage systems, renewable energy-based generation systems such as wind turbines, or with fossil fuel-based auxiliary generators [4]. Various energy storage techniques were discussed in [5] from the point of view of their efficiencies and life cycle. It was indicated that the cost-effective use of renewable energy generation in grid-connected systems can be achieved through storage and that batteries can help to balance generation and consumption, improve the grid management of power networks (control of voltage and frequency), and increase the contribution of renewable energies in the energy mix.
The use of batteries in photovoltaic water pumping systems (PVWPS) presents some disadvantages, such as increased cost and reduction of efficiency [6] [7], and there are several studies cited in [8] [9] in which batteries are considered. A PVWPS in Oman incorporating a PV field with 840 W pk , no tank, and a 220 Ah lead-acid battery was the best solution analyzed after several simulations with HOMER [10]. A financial analysis performed on several irrigation systems in Iran showed that the use of batteries in PVWPS for energy storage was more cost effective than pumps connected to the power network through 0.25 km and 1.8 km private power distribution lines [11]. Lead-acid batteries with five years of estimated service life were included in a cost analysis conducted on various types of irrigation networks to ensure the operation of the PVWPS under unfavorable weather conditions, although the short lifetime resulted in a longer payback period than the solutions without storage [12]. A comparative cost analysis of energy storage in tanks and batteries was carried out in PVWPS used in urban water pressurized networks, and it was found that the use of batteries was the most efficient alternative with the shortest payback periods [13]. The conclusions of a recent study comparing a PVWPS with a tank versus the battery storage solution indicated that the latter ensured access to domestic water in low-income rural areas at a lower cost [7]. The main drawbacks of the batteries identified in this study (with regular replacement, local recycling facilities, sustainable and efficient operation and maintenance) are related to the technology of the lead-acid batteries.
The advantages and disadvantages of batteries in PVWPS were analyzed in [14]. The inclusion of batteries in the PVWPS guarantees the availability of water during low irradiance intervals or even at night, and so enabling additional electrical energy to be available for other uses during those times of the year with higher irradiance [15]. The significant development of LIB for stationary grid-connected applications in recent years [16] [17] and its gradual inclusion in off-grid PV systems will lead to the use of this technology in PVWPS. An initial approach to the use of LIB in PVWPS was presented in [14] and the results obtained with a DPVWPS were compared with its equivalent battery-based solution (PVWPS+LIB). The average efficiency, calculated as quotient of powers, varied from 27.82 % in the direct solution to 24.86 % in the PVWPS+LIB scheme. Performance ratios (calculated as quotients of daily energies) presented a greater variation, varying from 27.95 % in the direct solution to 21.71 % in the PVWPS+LIB scheme. The difference between the efficiencies was explained by the inclusion of new components in the PVPWS+LIB scheme: the LIB and the power converter unit. The greater variation experienced in the PR was explained as due to the improper operation of the maximum power point tracking algorithm included in the hybrid inverter, which was unable to correctly follow the maximum power point (MPP) of the PV field for all operating conditions. A solution proposed to compensate for the reduction in efficiency is to oversize the PV field and take advantage of the greater range in the PV input voltage of hybrid inverters compared with the PV input range of the VSD used in DPVWPS schemes. Given the current price of PV modules, the increase in cost due to oversizing is minimal when compared with LIB prices.
A closer review of the data obtained in the DPVWPS opens a new perspective on the optimization of the PVWPS+LIB scheme, based on the improvement of the average energy efficiency in the water pumping system (WPS) which is composed of the VSD and the motor-pump group. The efficiency gain is achieved by fixing an operating point for the WPS in which the VSD and the motor-pump group achieves maximum efficiency. This approach is compared with the operation of the WPS at its rated conditions in which flow (Q) is maximized.
Additional advantages of the proposal are that the WPS is connected for a longer time and the daily flow rate is increased by improving the efficiency of the overall system, which facilitates a continuous water supply throughout the day with the correct dimensioning of the components used in the PVWPS+LIB facility.
The remainder of the article is organized as follows. Section II analyzes efficiencies in the various parts of the DPVWPS facility. In Section III the operating conditions that maximize the overall efficiency in direct mode are determined. Section IV details the operation in the PVWPS+LIB mode for the selected optimum conditions. Section V evaluates the results obtained with the PVWPS+LIB mode (optimization approach vs nominal conditions) and compares them with the DPVWPS mode. Finally, the findings and the main contributions of this work are presented.

II. ENERGY EFFICIENCY EVALUATION IN A DIRECT PHOTOVOLTAIC PUMPING SYSTEM
DPVWPS have experienced significant growth in recent years thanks to the drastic drop in the price of photovoltaic modules. Its implementation in many developing countries allows progress to be made on many of the targets set in [3], mainly aligned with goals six (clean water and sanitation), seven (affordable and clean energy), and eleven (sustainable cities and communities). FIGURE 1 shows a block diagram of a DPVWPS and details the powers in the different parts of the system, highlighting the variables that will be plotted in the following figures: PV power (P PV ); the power delivered by the VSD to the pump-motor (P VSD_out = P mp ); and hydraulic power (P h ). A description of the components that make up the system can be found in [15] [18] [19]. Three-phase ac motors with a VSD are preferred for medium and large power DPVWPS. The main objective in these systems is to maximize the flow rate (Q) for the existing environmental conditions. To achieve this, the VSD control includes an MPP tracking (MPPT) algorithm that aims to obtain the most power and energy from the PV field. To match P PV with P VSD_out , the VSD controls the voltage (v VSD ), current (i VSD ), and frequency (f VSD ) of the threephase sine wave system generated at the output of the VSD.
The efficiency of a DPVWPS for different day profiles was presented in [6] with a peak efficiency of 15.5 % during morning sunrise hours and a 40 % decrease in the midday hours of a sunny day, showing a similar behavior to the profiles obtained in [14]. As detailed in [20] for a 1.5 kW motor pump, the flow rate increased from 1.41 m 3 /h to 3.75 m 3 /h for an f VSD that changed from 35 Hz to 57 Hz respectively. It should be highlighted that the maximum efficiency of the VSD in [20] was reached in the high f VSD range (between 48 and 57 Hz) while the maximum efficiency of the WPS was 30 % for an f VSD of 40 Hz and decreasing to 26 % for 48 Hz and 21 % for 57 Hz. These previous values motivated the extension of the DPVWPS study presented in [14] [21] by analyzing the efficiencies of the facility parts and the relationships between the different parameters that characterize these installations.
The analysis of powers and energies in DPVWPS complements the analysis of the loss factors that affect the performance of DPVWPS presented in [22]. FIGURE 2-a shows the values of P PV , P VSD_out , P h , and global irradiance in the plane of the PV array (GI in W/m 2 ) during one day of operation.  presents, for the same day of operation, Q and the efficiencies in the VSD ( VSD ), the motor-pump group ( mp ), total efficiency of the DPVWPS ( DPVWPS ), and the overall efficiency ( overall ). The PVWPS facility described in [14] [21] is equipped with a PV field with 2.44 kW pk , a three-phase VSD for PV direct pumping systems (ATERSA model ESP-2.2/230-IP20-F200), a 1.5 kW submersible pump (Bombas IDEAL model SMI-8), and two water tanks (one tank in the basement of the building where the facility was located and the other on the roof terrace). A monitoring system based on the UWP3 controller (from Carlo Gavazzi) was developed and its most relevant features were specified in [21].
The plots included in FIGURE 2 highlight that when Q is maximum (at midday) and near the rated conditions of the motor-pump group, the values for  DPVWPS are the smallest for the whole operating interval with a variation greater than 5 % during the pumping interval, and values fluctuating between 30.76 % (beginning and end of the pumping interval) and 25.77 % (at noon, approximately). Values detailed in  DPVWPS presents in  some maximum values at the end of the day, they do not correctly represent the operation of the DPVWPS because they were obtained during fast transitions in GI due to cloudiness.
The above results suggest that a higher overall performance of the installation working with a fixed and continuous power supply would be achieved if the operating point of the WPS was set in the low f VSD range.

III. ENERGY EFFICIENCY OF BATTERY-BASED PVWPS AT DIFFERENT FREQUENCIES OF OPERATION
In the PVWPS+LIB mode, the single-phase ac input of the VSD is connected to the back-up ac output of the 3.6 kVA hybrid inverter (Goodwe model GW3648D-ES), as shown in FIGURE 3. The battery-based scheme includes a lithium-ion battery of 3.3 kWh (LG model RESU3.3). A more detailed explanation of this scheme can be found in [14] [21]. It should be noted that the PV field is the same for all tests and is designed considering the voltage limits imposed by the VSD used in the facility for the DPVWPS solution (maximum of eight PV modules in series).
The main goal in battery-based PVWPS systems is to boost the efficiency in the overall system by maximizing the volume of water pumped while guaranteeing the supply of water for as long as possible. As in the DPVWPS, an MPPT algorithm included in the PCU tries to obtain the most power and energy from the PV field. FIGURE 3 shows the different power converters included in the PCU, detailing the DC/DC converters that manage the PV field and the LIB, and the inverter (DC/AC) that generates the single-phase AC voltage that is connected to the ac input of the VSD (a DC/AC with a three-phase output). Due to the fluctuating irradiance throughout the sunshine hours, the operating point of the converters is also variable, although the two inverters can operate at a fixed point if f VSD is kept constant. Among the main advantages of PVWPS with batteries discussed in [14], the most important from a technical point of view is that the WPS can operate longer at constant conditions and so preventing pump stop/start cycles due to the passage of clouds. Therefore, the performance ratio in battery-based PVWPS solutions would be improved if the constant operating conditions correspond to the values with the highest overall efficiency. With this objective, an attempt was made to determine the values of f VSD that maximize the efficiency in the WPS.
A set of 47 days with different weather conditions (different GI profiles) and with the facility operating in direct mode were selected for the study. Three four-degree polynomial fitting curves were obtained and analyzed to establish the relationship between f VSD and the following parameters concerning the pumping efficiency: the DPVWPS efficiency ( DPVWPS ) (FIGURE 4); the overall system efficiency ( overall_DPVWPS = P h /P in_sun ) (FIGURE 5); and the Q/P in sun ratio (FIGURE 6). P in sun is the incident solar power on the surface of the PV modules calculated as GI times A PV (area of the modules that integrates the photovoltaic field in m 2 ).   From these regression models it follows that the optimal operation of the WPS, defined in [23] as the solar best efficiency point, could be achieved with f VSD values between 36.94 Hz and 41.17 Hz (matching with the values presented in [20]). Accordingly, it was decided to set f VSD = 37 Hz in the PVWPS+LIB mode since it is very close to the frequency value that maximizes the pumped flow rate at a given P PV (max(Q/P in sun ) = 0.0234 (L/s)/W at f VSD = 37.55 Hz, FIGURE 6). The proposed f VSD value is also very close to the value which provides a maximum  DPVWPS ( DPVWPS_max = 30.5 % reached at f VSD = 36.94 Hz, FIGURE 4). Moreover,  overall_DPVWPS is only slightly affected when a frequency of 37 Hz is selected with  overall_DPVWPS = 4.37 % at f VSD = 37 Hz, just 0.14 % lower than the maximum value ( overall_DPVWPS = 4.51 % at f VSD = 41.17 Hz in FIGURE 5).
In addition to f VSD , PVWPS+LIB system performance is also affected by factors such as the ability of the system to charge and discharge the battery, and the general management of the facility (start/stop time, minimum/maximum SOC, etc.). It is also worth noting that the value of 37 Hz for f VSD is within the range in which better efficiencies are obtained with lower power demand. This allows energy to be available to either increase the pumping time (t pump ) with energy coming directly from the PV generator or recharge the battery. Energy storage in the battery allows the WPS to run longer during periods with low irradiance levels or during cloudy days. On these bases and with a view to optimizing the overall PVWPS+LIB system performance, an f VSD  37 Hz was selected and the results were compared with those of the system operating at rated conditions (f VSD = 50 Hz) and in DPVWPS mode.

IV. DAILY PUMPED VOLUME CORRECTIONS
The operation of PWWPS+LIB solutions should be compared with the results obtained with direct PV pumping, which includes fewer components and is therefore more economical. From a technical point of view, the daily pumped volume (V d ) is an important indicator, because for the same PV field, the required water needs must be covered regardless of the solution adopted. The two main factors that influence V d were identified after analyzing the data obtained with the facility operating in the PVWPS+LIB mode:  Daily variations in the state of charge (SOC day ): the daily variation in the SOC of the battery corresponds to the variation in the volume that could have been pumped if the SOC at the start and end of the test had remained at the same value. This extra pumped volume may be positive or negative and is represented by the term V d_LIB (in m 3 /day).  MPPT algorithm: incorrect operation of the MPP tracking means that the generated PV energy is not maximized, resulting in lower pumped volumes. The increase in pumped volume related to this surplus energy that has not been generated is denoted as V d_MPPT (in m 3 /day). Considering the previous terms, the corrected daily volume, denoted as V d* (m 3 /day), is determined as follows: * ∆ _ ∆ _ (1) SOC day , defined as the difference between final and initial daily SOC (SOC f − SOC i ), reveals that:  A significant amount of PV energy has been used to charge the battery (SOC day > 0 %) instead of pumping water. This results in a decreased V d .  The battery is in discharging mode (SOC day < 0 %) to keep WPS running, which in turn leads to a greater V d . Therefore, during the tests, an attempt was made to maintain similar levels of SOC at the beginning and end of the day to establish daily energy balances in the system so that the value of V d would correspond to the PV energy generated in the day.
It was intended to estimate the energy that the battery stores or provides throughout the day and then compare the volumes pumped under different operating conditions without considering the effect of SOC day variations. To calculate V d_LIB , the daily variation of energy in the LIB (E LIB ) was used to obtain the daily variation of the hydraulic energy (E h_LIB ). A series of 48 days with different GI profiles and the battery-based solution were studied to carry out this correction. Several full charge/discharge tests were also performed to obtain an accurate relationship between E LIB and SOC. One full discharge test is presented in Figure 15 in [21]. The total energy discharged during a 70-hour process (SOC from 100 % to 0 %) is calculated according to (2) and the result is between the values published in [24] for the total energy stored in the LIB (3.3 kWh) and the usable energy (2.9 kWh).
In the battery full charge test, energies in the process were calculated with a 15 s recording interval (t k ). The PV energy from 9:06 (beginning of the charging) to 12:42 (SOC = 100 %) was E PV = 3538.6 Wh. The battery energy was E LIB_cha = 2903.6 Wh with a charging performance ratio PR LIB_cha = 82 %, which is defined in (3) as the ratio of E LIB_cha to E PV . The energy stored in the LIB until reaching SOC = 100 % coincides with the usable energy of the LIB detailed in [24].
The relationship between ΔE LIB (data provided by the hybrid inverter) and the term (SOC f − SOC i ) is shown in  From this relationship, the hydraulic energy variation related to SOC day in the LIB, denoted as ΔE h_LIB (in kWh/day), was determined from ΔE LIB (kWh/day) and can be calculated as follows: where  PVWPS+LIB_AV is the average system efficiency of the battery-based solution obtained considering only the period in which the system is pumping.
Using the terms and definitions detailed in the appendixes, the daily V d_LIB (in m 3 /day), as a function of the hydraulic energy variation (ΔE h_LIB ), is given by: which for the facility under test yields to the following expression: where the average total dynamic head (TDH AV ) and  PVWPS+LIB_AV depend on the value of f VSD , as demonstrated below. A negative value of V d_LIB indicates that the battery delivered part of the energy stored in previous days. The improper operation of the MPPT algorithm was analyzed in [14] and it was found that the correct operation of the MPPT could result in an average increase of 28.7 % in the PV energy yield (E PV ). The hydraulic energy variation related to the improper operation of the MPPT, denoted as ΔE h_MPPT (in kWh/day), can be calculated as follows: ∆ _ ∆ • (8) that yields to a daily volume variation, denoted as V d_MPPT (in m 3 /day), given by: that for the facility under test yields to the following expression: The use of V d* permits the comparison between different days, avoiding the effect of SOC in each day and the improper operation of the MPPT algorithm of the hybrid inverter used in the test.

V. COMPARATIVE ANALYSIS OF THE PVWPS+LIB FACILITY OPERATING AT DIFFERENT VSD FREQUENCIES
Operation of the PVWPS+LIB facility was analyzed with the WPS operating at 50 Hz for some days (PVWPS+LIB 50 Hz), and at 37 Hz for others (PVWPS+LIB 37 Hz). Furthermore, for one day (on 01/12) both frequencies (50 Hz and 37 Hz) were combined during three pumping intervals (PVWPS+LIB 37/50/37 Hz). Table I depicts the results of the main parameters obtained from these experimental tests using the terms and definitions detailed in the appendixes. The results of these pumping tests were compared with each other, and in turn with those from direct pumping (DPVWPS). The number of studied days for the calculation of the averaged (AV) values in the four operating modes are indicated by the subscript included in the corresponding column. The term  *PVWPS*_AV represents the average value of the system efficiencies (excluding the photoelectric conversion) when the motorpump group is in operation (Q k > 0). FIGURE 8 shows, for two sunny days, at the top, the main powers in the PVWPS+LIB facility (P PV , P LIB , P PCU_in , P VSD_out , and P h ) as well as GI with the system pumping at 50 Hz on 10/07 (left side) and pumping at 37 Hz on 01/13 (right side). The input power to the hybrid inverter (P PCU_in ) is calculated as follows: The bottom of FIGURE 8 shows the evolution of the different efficiencies ( PV ,  PCU+VSD ,  mp ,  PVWPS+LIB ,  overall ), Q, and battery SOC for the same days and pumping frequencies. In FIGURE 9, the same parameters as in FIGURE 8 are depicted but for two cloudy days, 09/24 with the pumping at 50 Hz, and 12/21 at 37 Hz.
The following subsections describe and compare the results obtained for the different operating conditions applied in the battery-based solution. Prior to this analysis, the drawbacks found in the MPPT algorithm of the hybrid inverter are described, detailing their effects on the efficiency of the PV field and the performance of the battery-based solution.

A. Effect of the MPPT algorithm in the PVWPS+LIB operation
The results on sunny days ( As can be seen in FIGURE 8-a, during the pumping periods at 50 Hz, the evolution of P PV follows the same trend as that of GI. However, when the pumping stops, that is, when the demand for energy ceases, the oscillations in the P PV become much more pronounced and cause a loss of efficiency in the PV generator. This loss of efficiency coincides with the periods when the battery is charging (P LIB > 0 W in FIGURE 8-a). This loss is also observed to a lesser degree and over a more extended time at 37 Hz. For this reason, the average PV efficiency ( PV_AV ) for the set of days considering only the period in which there is pumping (Q > 0) is higher at 50 Hz (14.61 %) than at 37 Hz (13.05 %), while the averaged values obtained throughout the day are 11.21 % at 50 Hz and 11.95 % at 37 Hz. The oscillations in the P PV lead to a relatively low average PR PV (66.79 % at 50 Hz and 77.51% at 37%) compared to those obtained with direct pumping (PR PV = 83.59 % on a set of days).
When pumping stops and the energy obtained from the PV generator is only used to charge the battery, fluctuations in P PV are observed that do not correspond to oscillations in GI and are reflected in fluctuations in  PV and a decrease in PR PV .
The PV efficiency when pumping at 37 Hz (10:00-18:15 in FIGURE 8-b-right side) shows fewer fluctuations than when there is no pumping and all the energy is used to charge the battery, as described in [14] for pumping at 50 Hz. However, in this case, these fluctuations are not observed when pumping at 50 Hz (during the time intervals between 10:48-11:48, 13:26-15:56, and 16:29-16:35 in FIGURE 8-a left side) because under these conditions the battery is discharging and the energy that the system needs to operate comes from both the PV generator and the battery.
When analyzing the behavior of the pumping system with battery storage on cloudy days at 50 Hz (on day 09/24) and 37 Hz (on day 12/21) (FIGURE 9), it is observed that the battery is charging when there is no pumping on both days, although appreciable differences between operating frequencies were found. In general, the  PV values were lower and showed many more oscillations throughout the day when pumping at 50 Hz than at 37 Hz. It should be noted that during pumping at 50 Hz it is always necessary to take energy from the battery, while when pumping at 37 Hz the battery is charging at certain times of the day, even on cloudy days (such as on 12/21). Moreover, the energy taken from the battery during pumping periods is very high when pumping at 50 Hz, with a maximum of 2250 W when P pv = 0 W, but much less when pumping at 37 Hz (with a maximum of 1062 W). This maximum value is observed at the end of the pumping period at nightfall when the motor-pump keeps operating using only energy from the battery. In FIGURE 8 and FIGURE 9 it is observed that when the system is pumping and it is necessary to extract energy from the battery, P PV follows a pattern more similar to that of the GI curve.

B. Operation with fVSD = 50 Hz vs. fVSD = 37 Hz
As a summary of the results discussed until now and to complete the analysis in the PVWPS+LIB facility pumping with f VSD equal to 50 Hz and 37 Hz, it should be noted that:  P VSD_out and P h remain constant during all the pumping periods and, as expected, are higher on average at 50 Hz (1843 W and 574.5 W respectively) than when pumping at 37 Hz (and 854 W and 285 W).  P PCU_in remains constant when pumping at 50 Hz (like in the interval from 13:30 to 16:00 in FIGURE 8-a). However, when pumping at 37 Hz it shows oscillations caused by the improper operation of the MPPT algorithm while the pumping system is kept powered exclusively by the PV generator (the battery is charging in the interval from 10:30 to 16:30 in FIGURE 8-b). When f VSD is at 37 Hz and GI decreases, the battery starts supplying power and P VSD_in ,  PCU+VSD and  PVWPS+LIB stabilize (in the same way as after 16:30 30 in FIGURE 8-b).  Whenever the battery supplies power during pumping (LIB in discharge mode), both P PCU_in and P VSD_out , stabilize. The same is applicable to the corresponding efficiencies ( PCU+VSD ) as they do not depend on GI.  The efficiency of the motor-pump group ( mp ) remains constant throughout all pumping periods and only small differences were found between days or between the two pumping frequencies (being on average equal to 33.37 % at 50 Hz, and 33.69 % at 37 Hz, as detailed in Table I).  The average efficiency of the PCU+VSD block ( PCU+VSD_AV ) and of the PV water pumping system with battery storage ( PVWPS+LIB ) during pumping periods is higher at 37 Hz (78.07 % and 26.45 %, respectively) than at 50 Hz (74.56 % and 25.05 %, respectively).  The overall performance of the system (PR overall ) is on average 35.7 % higher at 37 Hz (3.04 %) than at 50 Hz (2.24 %). The values obtained show that the system performance is higher when the PV generator power is fully or partially consumed by the motor-pump group, which occurs most of the time when pumping at f VSD = 37 Hz.  shows the evolution of different powers (P PV , P LIB , P PCU _ in , P VSD_out , and P h ) and GI obtained with the PVWPS+LIB 37/50/37 Hz operating mode on 01/12 (a sunny day). Three pumping periods can be distinguished as f VSD was set to 50 Hz for the central hours of the day (hours of highest GI from 13:45 to 14:45), while for the rest of the day f VSD was set to 37 Hz. Evolution of efficiencies ( PV ,  PCU+VSD ,  mp ,  PVWPS+LIB ,  overall ) and SOC are also displayed in  The change in f VSD was manually set using the control panel of the VSD. This was done to avoid the loss of PV energy due to the LIB being nearly fully charged after a good sunny day and also because of the late starting of the WPS after a short recovery of the SOC with the PV energy generated during the first hours of sunshine. The effect on P h values when operating at 37 Hz or at 50 Hz and the timing of switching from one frequency to the other are shown in FIGURE 10, where higher values of P h are found when pumping at 50 Hz than when pumping at 37 Hz. The oscillations in the P PV show that even though the analyzed day is completely sunny, the system does not obtain all the PV energy that would be expected. When enough energy is available to run the pump and also store the excess in the battery, the system mismanages the energy. Oscillations of P PV are produced and these have a direct impact on the charging power of the battery and on energy losses in the overall system. This energy could have been utilized with better PCU management. By setting f VSD to 50 Hz, the system requires all the power that the PV field can produce (1903 W on average) and it is also necessary for the battery to supply an additional 517 W. In these circumstances, although  mp and  PVWPS+LIB  The linear regression between P PV and GI shown in FIGURE  11 was performed from 47 pumping days in DPVWPS, as described in [14], and shows that with an irradiance of 422 W/m 2 the PV generator produces 937 W, which is enough for the pump to operate at f VSD = 37 Hz. Between 14:50 and 16:34 on 01/12, the average irradiance and photovoltaic power values are GI = 596 W/m 2 and P PV = 1206 W (FIGURE 10), while the average P PV determined from FIGURE 11 would be 1337 W. This represents a difference of 131 W in P PV due to the improper MPPT algorithm operation (a 10 % reduction in P PV during the detailed interval). From 16:35 onwards GI is not enough to maintain the pump operating at 37 Hz, and the battery gradually begins to provide energy until it becomes the only device supplying energy for pumping between 17:46 and 18:32. FIGURE 11 also confirms that the GI threshold to start pumping (GI thre_start ) is approximately equal to 300 W/m 2 , while the pumping stop (GI thre_stop ) is around 200 W/m 2 . The points depicted in FIGURE 11 below these values correspond to variable operating conditions, such as those occurring when clouds pass overhead. FIGURE 11. Relationship between PPV and GI in DPVWPS mode analyzed in [14].

C. Flow maximization with combined pumping at 37/50/37 Hz
As a summary, by increasing f VSD at the time of day with the highest GI, and consequently increasing P PCU_out , two goals are achieved. Firstly, the battery is prevented from reaching an SOC in which the incoming energy is limited, thus avoiding a decrease in PR. Secondly, a greater part of the energy passes directly from the PV generator to the motor-pump group, thus increasing the system PR. A combination of pumping at 37 Hz at the beginning and end of the day and at 50 Hz at the time of greatest GI leads to a better management of the PV generation with PR PV of 88.01 %, which is higher than those values obtained on average at 50 Hz (66.79 %) and at 37 Hz (77.51 %) and so means a higher system performance (PR PVWPS+LIB of 25.27 % compared to 20.68 % at 50 Hz, and 24.94 % at 37 Hz on average) and an improved PR overall (3.50 % versus 2.24 % at 50 Hz, and 3.04 % at 37 Hz). In fact, the PR overall obtained by combining the pumping frequencies with the battery-based solution is close to that obtained on average with the direct pumping solution (PR overall = 3.66 %).   For the values shown in FIGURE 12 and FIGURE 13, only the P PCU_out,k was filtered out since the values provided by the hybrid inverter were incoherent (P PCU_out,k = 1199 W for f VSD = 37 Hz, instead of 970 W, and P PCU_out,k = 2289 W for f VSD = 50 Hz, instead of 2150 W). The values adopted were obtained measuring the P PCU_out,k using a Fluke 435-SII power quality analyzer and coincided approximately with the values of P PV obtained for the DPVWPS when operating with the corresponding f VSD . When comparing the different power terms obtained with the Fluke 435-SII, the values provided by the hybrid inverter for P PCU_out,k were between the apparent power (S) and the active power (P). The measurement error could be produced by the current distortion in the VSD input, which includes a single-phase rectifier in the AC input stage. FIGURE 12 and FIGURE 13 represent a snapshot in a precise instant of the evolution observed in FIGURE 10. An important differential fact observed is that in a moment of intense irradiance (802 W/m 2 ), P PV is sufficient to keep pumping at 37 Hz and also charge the battery. However, it is insufficient to keep pumping at 50 Hz, and it is necessary to extract additional power from the battery. Installation efficiency ( PVWPS+LIB ) thereafter is higher at 37 Hz than at 50 Hz (24.44 % and 23.93 % respectively at the specific moments shown in FIGURE 12 and FIGURE 13).

VI. DISCUSSION
As stated in [14], the improper operation of the MPPT algorithm when P PV is used to recharge the LIB leads to higher PR PV average values for DPVWPS (88.10 %) than for PVWPS+LIB mode at 50 Hz (72.73 %). However, the PR PV values determined and published in [14] do not exactly coincide with those determined in the present work. Although in the current study the selection of the days to analyze the pumping in the DPVWPS and PVWPS+LIB 50Hz modes was carried out by identifying days where the mean PSH values were as close as possible to those used in [14], as well as to the mean PSH of the set of days used for the analysis of the PVWPS+LIB 37 Hz, similar but different values were reached.
Nevertheless, the same trend is observed. The average PR PV values obtained in this study with the DPVWPS (83.59 %) are greater than both those obtained with the PVWPS+LIB 50 Hz (66.79 %) and with PVWPS+LIB 37Hz (77.51 %) (Table I). However, the PR PV value obtained on 01/12 when working at PVWPS+LIB 37+50 Hz is higher (88.01 %) and similar to that determined on many of the days working in DPVWPS mode, indicating that a proper PCU power management can lead to a better system performance. Compared to the PVWPS+LIB 50 Hz working mode that showed worse PR PV values the cloudier the day [14], PR PV on the days with PVWPS+LIB at 37 Hz were much higher and uniform.
The average values of the different representative pumping parameters on the days selected with each operating mode and frequency (Table I) are commented on below. The photovoltaic generator is not always capable of providing all the energy required by the WPS to operate at 50 Hz (it can do so during the central hours of the day or in summer, but not on certain winter days). Part of the energy needed to pump at 50 Hz must often be provided by the battery and this negatively affects system efficiency. Therefore, since there is no surplus energy from the PV generator during pumping, periods without pumping and with sufficient GI are necessary for energy to be stored in the battery.
When operating at 37 Hz, the WPS consumes the PV power that is being generated at that moment, and sometimes there may be a surplus that is stored in the battery for use during periods with low GI. As seen in Table I, this explains the average pumping time being greater on days at 37 Hz (400.63 min.) than on days at 50 Hz (197.25 min.). In any case, the longest pumping time was achieved when operating at 37/50/37 Hz (t pump = 494 min.). Although the pumped flow rate at 37 Hz (1.53 L/s in FIGURE 12) is less than at 50 Hz (2.58 L/s in FIGURE 13), the average corrected total pumped volume (V d* ) is greater at 37 Hz (48.81 m 3 /day) than at 50 Hz (36.86 m 3 /day) or in DPVWPS mode (43.50 m 3 /day). However, the V d* pumped on day 01/12 (with pumping combined at 37/50/37 Hz) was the highest (64.78 m 3 /day) and this is partially explained by being the day with the greatest PSH value. The same trend is logically found for the average total pumped volume (V d ). These trends are also partly explained by the differences in hydraulic energy (1.93 kWh/day at 37 Hz compared to 1.70 kWh/day at 50 Hz, and 2.70 kWh/day at 37/50/37 Hz). As the pumped flow rate decreases for f VSD = 37 Hz, friction losses along the pipeline also decrease, increasing pumping time. Therefore, the volume pumped throughout the day (V d ) is much higher, even when corrected (V d * ) by the difference in the state of charge of the battery (SOC f -SOC i ), and the MPPT tracking. This is due to the fact that the performance ratio of the installation is higher when the system pumps at 37 Hz than at 50 Hz, being verified that PR overall_50Hz =2.24 % < PR overall_37Hz =3.04 % < PR overall_37/50/37Hz =3.56 % < PR overall_DPVWPS =3.66 %.
The explanation of these results is not linked to the motorpump group, which presents similar PR mp values (33.76% at 37 Hz and 33.53% at 50 Hz), but mainly to poor energy management by the PCU. In this type of facility, the energy not consumed by the motor-pump group must be used to recharge the battery, but energy production is reduced by shifting the operating point of the PV generator from the MPP. This effect is more pronounced at 50 Hz than at 37 Hz. Therefore, the PR PVWPS+LIB of the system is 21 % higher when pumping at 37 Hz compared to pumping at 50 Hz (24.94 % vs. 20.68 %, respectively). This result is consistent with the 16 % decrease in PR PV at 50 Hz with respect to that at 37 Hz.
However, the averaged instantaneous efficiency of the PV generator ( PV_AV ) during the pumping period (Q  0 L/s) is better at 50 Hz than at 37 Hz (14.61 % vs. 13.05 %). This indicates that at times when more energy is required, the PCU manages the MPPT better and extracts as much P PV as possible to deliver to the pumping system. By adopting the opposite approach, in the moments when more power is available (hours of greater irradiance), the efficiency will improve as the power demand increases, that is, increasing by f VSD , as observed in FIGURE 10. In this figure it can be verified that when changing f VSD from 37 Hz to 50 Hz,  PCU+VSD increases,  PV improves by decreasing its fluctuations, and  overall goes from 2.3 % at 37 Hz to 4.6 % at 50 Hz. The management of the PVWPS+LIB system carried out on day 01/12 improves the operating parameters of the facility, since PR PVWPS increases in value for PVWPS+LIB 37/50/37 Hz, compared to PVWPS+LIB 37 Hz and PVWPS+LIB 50 Hz. Nevertheless, the parameter that best considers the efficiency of the PV generator, PR overall , goes from 2.24 % in PVWPS+LIB 50 Hz and 3.04 % in PVWPS+LIB 37 Hz to 3.50 % in PVWPS+LIB 37/50/37 Hz as mentioned earlier (a value very close to the 3.66 % obtained with direct pumping (DPVWPS) in a comparable set of days).
The improvement is due to a better management of the PV generator (optimal operation of the MPPT algorithm) as suggested by the PR PV values. In the same way, the PR PCU+VSD is better in PVWPS+LIB 37/50/37 Hz (80.56 %) than at 50 Hz (63.23 %) but slightly lower than at 37 Hz (81.99 %). Better energy management allows more pumping time in PVWPS+LIB 37/50/37 Hz as discussed above. All of this leads to a final volume pumped on 01/12 with PVWPS+LIB 37/50/37 Hz (V d = 50.21 m 3 /day, and V d* = 64.78 m 3 /day) that is very close to the volume it would have pumped in direct mode (52.61 m 3 /day) on a day with the same level of irradiance (value obtained by applying the linear model detailed in [14], that relates V d and PSH with this facility pumping in direct mode). It was also much higher than V d* on 10/07 (49.57 m 3 /day) with the system running at 50 Hz and higher irradiation (PSH = 5.28 on 10/07 versus PSH = 4.98 on 01/12). On 01/14 (data not shown in Table I) when the installation was working at 37 Hz and the irradiation level was similar to that of 01/12 (PSH = 4.93), V d* = 61.97 m 3 /day was obtained.

VII. CONCLUSION
Direct photovoltaic water pumping systems are one of the most common solutions to satisfy water needs in isolated regions where power networks are weak or unavailable. The hybridization with a fossil-fuel based generator guarantees a supply of water, but there are several problems related with these systems and they are also unsustainable in the long term. The combination of DPVWPS with new energy storage technologies, such as lithium-ion batteries, can enable the implementation of sustainable and renewable energy-based water supply systems.
Optimizing energy efficiency in battery-based PV pumping schemes results in a better use of PV energy and reduced system losses, which means an increase in pumped volume. Based on the previous experimental results obtained from the comparison between a DPVWPS and the corresponding battery-based solution, the present work proposes the use of an operating point that maximizes the efficiency of the overall system by maximizing pumped volume and increasing pumping time.
Results from other DPVWPS works in the bibliography clearly show that VSD and motor-pump efficiencies over the course of a day moved in opposite directions: while the VSD had good efficiencies early and late in the day (at low irradiances, with low operating frequencies in the range of approximately 35 Hz to 40 Hz), the motor-pump set was most efficient in the middle hours of the day while operating at nominal conditions of 50 Hz. The combined analysis of the efficiency in the water pumping system (VSD+motor-pump group) showed that overall efficiency is better in the low range of f VSD .
In the present work, several fitting studies were carried out with the results obtained with the DPVWPS facility and these showed that an improved energy efficiency can be achieved in the WPS if the VSD frequency is set to 37 Hz. After the corresponding adjustment of the VSD controller for setting this new value of f VSD , several days of operation were recorded with the monitoring system. The present work includes a comparison between a DPVWPS and the equivalent batterybased solution operating with f VSD of 50 Hz, 37 Hz, and combining both frequencies in the same day.
Results demonstrate that the overall performance ratio is improved when f VSD is set to 37 Hz and reaches values near to those obtained with the DPVWPS. The total pumped volume and the pumping time also increase, although problems in the MPPT algorithm implemented in the hybrid inverter mean not all the available energy from the PV field is extracted and this caused low values for the PR PV when the battery-based solution is compared with the DPVWPS. The use of a corrected pumped daily volume permits the comparison of the results obtained for the different modes of operation tested in the study. The improper operation of the MPPT algorithm and differences in the SOC between the different days of the test are considered in the calculation of the corrected pumped daily volume.
The use of an f VSD greater than 37 Hz permits the adjustment of the power demanded by the VSD. In this way, battery charging can be reduced and so avoiding high levels of SOC in the LIB and increasing Q. Several tests carried out in the LIB showed that for high levels of SOC, the performance ratio of the charging process is lower and the operation of the MPPT algorithm is distorted, producing oscillations in P PV that reduce PR PV .
The results presented in this work demonstrate that a battery-based solution for solar water pumping systems can extend the pumping time and avoid the problems caused by pump stop/start cycles due to the passage of clouds. The use of several values of f VSD depending on GI and SOC conditions has demonstrated that, for the same PV generator, greater pumped volumes can be obtained with similar values for the overall performance ratio. Although the inclusion of more devices in the facility decreases the efficiency of the systems, the extra energy harnessed by the battery-based system when GI has not yet reached the threshold value (300 W/m 2 in the case analyzed), as well as the extra power that can be added in the PV field due to the higher voltage and power range of the hybrid inverters, enables improved results with battery-based solutions.

APPENDIXES
Supplementary data including the definitions used in this paper can be found online at https://ieeexplore.ieee.org in the Media section.

ACKNOWLEDGMENT
To the Vice-Chancellor of Infrastructure at the UPV for the financial support that has enabled the electrical installation of the project to be completed. To the Goodwe company for the donation of a hybrid inverter, even though it was aware that the inverter would be used in extreme conditions for which it was not designed. The project could not have started without its contribution, and we would not have acquired the knowledge that will enable us to progress in these humanitarian applications.
To the Carlos Gavazzi company (monitoring and data acquisition system) for its involvement in the project.
To Alberto Ibáñez Llario, Global Solar Energy & Water Advisor at the United Nations Agency for Migration for introducing us to the field of humanitarian aid.