## Materials and Methods  
### PV Membrane System Description  
The filtration experiments were conducted with a PV-membrane system--comprised of both ultrafiltration (UF) pretreatment and NF/RO membranes--that was equipped with either a Li-ion battery bank or SCs as energy storage components. A system schematic is shown in Figure 1, while the majority of the present system components have already been described in a previous paper [40]. Briefly, a solar array simulator (SAS; Chroma 62000H; Taiwan) was used to simulate the output of the PV panels (detailed below) to ensure the reproducibility of the experiments--using real-world measured solar irradiance (SI)--being conducted in an indoor laboratory. A helical rotor pump (Grundfos SQFlex 0.6-2 N; Denmark) was employed to achieve the desired pressure and flowrate. The pump can be operated over a very wide voltage range (30-300 Vdc). It should be noted that the pump has a built-in maximum power point tracker (MPPT) that is designed to extract the maximum power available from the PV panels. For electrical energy storage, two lithium iron-phosphate (LiFePO4) battery packs (Power Brick 24 Vdc and 50 Ah, PowerTech Systems, France) were connected in parallel to provide a maximum battery capacity of 100 Ah for the PV-membrane system. A charge controller (Victron MPPT 100/20, the Netherlands) was used to regulate the charging and discharging behaviors of the batteries with a maximum current up to 20 A (claimed--this was actually 15 A in practice). A DC/DC converter (MeanWell SD-500L-48, Taiwan) was used to convert the battery voltage from 24 Vdc up to 48 Vdc in order to supply a suitable voltage to drive the pump. Pairs of current (DRF-IDC, Omega, Bridgeport, N.J., USA) and voltage (DRF-VDC, Omega, Bridgeport, N.J., USA) sensors were installed to measure the electrical characteristics of both batteries and pump. These sensors were monitored to determine the status of the pump and batteries (charging or discharging). The other energy storage option was twelve SCs (Maxwell Boostcap BPAK0058-E015-B01; San Diego, California, USA) connected in a series to achieve a maximum output voltage of 180 V and a capacitance of 4.8 F. A charge controller was designed based on preset voltage thresholds to control the state of the pump (on/off) and the charging/discharging behaviors of the SCs, as described previously [40]. It should be noted that the switching of the energy storage options (Li-ion vs. SC vs. reference) is carried out manually. Inline sensors for measuring the pressure, flowrate and EC were installed in feed, permeate and concentrate streams of the PV-membrane system to monitor instantaneous performances during transient periods (details found in [40]). All the sensors exhibited a response time of 1 s or less, and their outputs were recorded using a data acquisition card (DAQ, National Instruments 6229; Austin, Texas, USA) and displayed instantaneously on a computer running LabVIEW for data logging and control. A needle valve in the concentrate stream (see 3 in Figure 1) was used to regulate the desired back pressure  
Figure 1: Schematic of the photovoltaic (PV)-membrane system equipped with a lithium-ion (Li-ion) battery pack or supercapacitors (SCs) for energy storage. Note the directly coupled system is configured by connecting the solar array simulator (SAS) to the pump, and the change between the battery and SC configurations is manually switched. All sensors for measuring flow, pressure, conductivity, voltage (V) and current (I) are connected to a data acquisition card (DAQ) and computer. The solid lines represent the hydraulic connections, while dashed lines represent the electrical connections. Note: The numbers indicate the valves within the system: 1�� safety valve, 2� check valve and 3� needle valve for creating back pressure. NF/RO: nanofiltration/reverse osmosis, UF: ultrafiltration and DC: direct current. for the system. Throughout all the experiments, the permeate and concentrate streams flew back into the feed tank to maintain a constant feed concentration.