## 3 Results and Discussion
### Operation with Different Energy Storage Capacities
In order to have a clear overview of the system performance when batteries are present in terms of the varied energy storage capacities over the three \"solar days\", the overall average performance values are summarized in Table 1. The improvements of the production and water quality were discussed above. The SEC of the reference exhibited the highest value on the \"very cloudy day\", which is likely attributed to (i) the flux decreasing instantaneously with a significant reduction in the power input due to large fluctuations of the SI (not shown in graphs), (ii) the reduction of the flux to 0 L/h-m\({}^{2}\) due to insufficient effective pressure for producing permeate and (iii) several shutdown events occurring due to insufficient power to achieve the system pressure, which resulted from large variations of the SI, hence causing the slow recovery (resilience) of the system to be able to produce adequate permeate due to the input power discontinuity [77]. The average retention and permeate EC indicated no big differences, due to the tight membrane with high retention used being more resilient to variations in the permeate quality [77]. Once batteries were added, the influence of changing the energy capacity (varied initial SOC from 100% full down to 20% full) on the \"partly cloudy day\" became more apparent. The permeate production gradually increased from 402 to 767 L due to the pump drawing the power through the batteries and PV source, enabling the pump to run at full power during the entire period. This can be seen from the full-power duration that is shown in Table 1. On the contrary, the average SEC declined from 4.8 to 4.0 kWh/m\({}^{3}\) as the system spent more time operating on full power. The average values of the RO flux exhibited the same trends as the permeate production. When comparing the SEC with fully charged batteries and the directly coupled reference case, it was found that, for the \"sunny\" and  
Figure 6: Key performance indicators of the PV-membrane system as a function of the initial energy storage capacity of the batteries (different SOC) on the “partly cloudy day”: (**A**) water production, (**B**) permeate EC and (**C**) SEC. Note that the Ref. represents the directly coupled system performance (without batteries), as discussed in Section 3.1. \"partly cloudy\" days, the reference SEC was lower than with the batteries. However, for the \"very cloudy day\", the reference SEC was significantly higher. This underlines the role of incorporating Li-ion batteries to gain more permeate as a result of providing constant power vs. the additional power that the pump consumes in terms of the fluctuations in the SI. It highlights the design of systems with a focus on energy consumption and the enhancement of the water quality and quantity, which can be achieved at the expense of system efficiency and the potential of underutilizing the energy storage units. From the experiments conducted above, it can be seen that further improvements of the charge controller to avoid power fluctuations need to be carried out. For example, a buck-boost converter needs to be designed to control the bidirectional power from the PV and batteries to improve the system performance. Moreover, the system performance can be improved by connecting the batteries in a series to have a higher voltage output (48 V\({}_{\text{dc}}\)), eliminating the need of the DC/DC converter, as the pump indicates a wide operating voltage range (30-300 V\({}_{\text{dc}}\)). In this case, the lower limit voltage of the batteries was not constrained at 20 V, which avoided repeatable charging and discharging behaviors. Further, the power loss was reduced due to less electronics deployed in the system. The minor disadvantages are: (i) this battery configuration increases the failure rate if one battery is dysfunctional, resulting in a voltage collapse and the battery pack turning off [78], and (ii) careful cell matching is required for connections in a series, especially when drawing heavy loads [78].