Introduction

During the last decade, different uses of new energies have been made. One of the important applications of new energy sources in hybrid power generation systems is to supply remote loads from the power grid (Powell et al. 2014; Poompavai and Kowsalya 2019; Davoodkhani et al. 2020). In addition, in some studies, hybrid energy production systems have been dynamically evaluated (Urtasun et al. 2014) and also how to manage energy and coordination between different energy sources in hybrid energy production systems (Li et al. 2012; Diab et al. 2020). In recent years, the use of new energy in electric vehicles has been very popular (Sajjad et al. 2020; Zhao et al. 2020). Reliability studies in hybrid systems have also been performed to increase the level of system reliability (Rajabi-Ghahnavieh and Nowdeh 2014). Furthermore, renewable energy sources have been used to supply electricity used by electric pumps to extract water from the ground to supply water to customers (Bakelli et al. 2011; Jahannoosh et al. 2021; Hilarydoss 2021; Nasri et al. 2021).

The optimal design of a solar water pumping system with a water storage tank to supply water to customers to minimize system costs and water supply to customers is presented. In Ma et al. (2015), the authors used solar and wind energy to feed the water pumping system and power the electric pump.

The purpose of the design is to determine the optimal capacity of system equipment by minimizing system costs and the probability of not-supply of the load (Kaldellis et al. 2013; Saboori et al. 2017). Photovoltaic array and battery storage are used to supply power to the electric pump system (Al-Waeli et al. 2017; Al-Waeli et al. 2016). In this study, the water supply of customers is considered continuously and with high probability. In Ma et al. (2014b), a solar-wind-electric-pump system is optimized at a point far from the power grid. In this study, the factors affecting water storage and water supply reliability of customers is investigated. In Ma et al. (2014a), economic analysis of the electric pumping system equipped with a battery bank has been done. In this study, different battery capacities are evaluated on system design. In Muhsen et al. (2018), the designing of the solar water pumping system is developed with the aim of life cycle cost minimization and satisfying the loss of load probability using a multi-criteria decision-making method.

In Peng et al. (2018), several optimization algorithms are applied to design the solar water pumping system to supply the load continuously with life cycle cost minimization. In Arfaoui et al. (2019), designing an electric pumping system based on solar resources is presented under partial shading condition using salp swarm optimization. In Bakelli and Kaabeche (2019), the design of a solar water pumping system is developed using some well-known meta-heuristic methods with minimizing the total net present cost and considering the loss of power supply probability. The optimization of a solar water pumping system is presented using fuzzy logic control in Errouha et al. (2019).

As can be seen in the studies, the battery storage system has been used to support the required power of the pump motor in the absence of radiation or the non-operation of photovoltaic panels. On the other hand, the battery costs are very high for the continuous supply of power required by the pump motor. This paper proposes a method that eliminates the need for a battery storage system to continuously supply pump motor power and improve water reliability required by customers. In this paper, the technical-economic framework for designing of water pumping system based on photovoltaic clean energy with water tank storage is presented to supply drinking water of customers for remote areas using an intelligent water drops algorithm (IWDA). Also, the superiority of IWDA is compared with the PSO method to solve the problem.

Modeling of PV water pump system

Power pumps for irrigation and water management in rural areas are a major component of self-sufficient PV systems; these systems usually involve a PV generator, a water source, a water storage tank, and a DC pump (Bakelli et al. 2011) (Figure 1). In this study, to reduce the cost of charging and discharging the battery, as well as the cost of purchasing it, the water tank is used as a storage system instead of battery storage system. Due to the high cost of battery storage, using a water storage tank is a reasonable and cost-effective solution to reduce system costs. On the other hand, technically, the excess water is stored in the tank and is available as a water source. If in systems based on battery storage, water production is online, and the electrical energy in the batteries must be discharged, and after delivery to the motor pump, the required amount of water must be extracted. Therefore, the use of water tank in addition to the availability of water source reduces system cost as well as storage cost. In addition, technically, the system without the water tank cannot provide a continuous supply of water required by network customers. Due to fluctuations in irradiance and also the generation of photovoltaic source power and also taking into account the water level required by the customers per hour, the water tank capacity is determined by the optimization program to ensure a certain reliability of customers in addition to minimizing the system costs.

Fig. 1
figure 1

Block diagram of a PV water pump system (Bakelli et al. 2011)

The water storage tank plays the position of batteries in this scenario, and the need for electric power has been substituted by the need for water.

Photovoltaic generator model

The hourly output power of a PV generator with an area of APV (square meters) in a PV radiation on the module of inclined plane (watts per square meter) can be expressed as (Bakelli et al. 2011; Jafar-Nowdeh et al. 2020):

$$ {P}_{PV}={N}_{PV}{\eta}_{PV}{A}_{PV}{G}_t $$
(1)

where ηPV shows the efficiency of N PV, the PV generator, and the number of PV arrays. The efficiency of a PV generator is expressed by the following relation (Bakelli et al. 2011):

$$ {\eta}_{PV}={\eta}_r{\eta}_{pc}+\left[1-\beta \left({T}_c-{T}_{cref}\right)\right] $$
(2)

The performance of the reference module is ηr, and the power stabilizer efficiency is ηpc, which is 1 if the maximum power point tracker (MPPT) is used. Is the generator efficiency's temperature coefficient. Tcref is the cell’s reference temperature (25 °C), while Tc is the cell’s temperature (°C).

Model of pump subsystems

In this study, a mathematical model is used that correlates the flow rate of the output water Q against the electrical input power Pa and the height h. The relation of the pump used is as follows (Muhsen et al. 2018):

$$ {P}_a\left(Q,h\right)=a(h){Q}^3+b(h){Q}^2+c(h)Q+d(h) $$
(3)

In the above relation, a (h), b (h), c (h), and d (h) depend on the total height of the water (Bakelli et al. 2011). The calculation of the instantaneous water flow Q corresponding to the power Pa is obtained using the Newton-Raphson method with the condition d - Pa (Q)> 0. In the repetition of k, Q moment can be expressed as (Bakelli et al. 2011):

$$ {Q}_k={Q}_{k-1}-\frac{F\left({Q}_{k-1}\right)}{F^{\prime}\left({Q}_{k-1}\right)} $$
(4)

That,

$$ F\left({Q}_{k-1}\right)={aQ}_{k-1}^3+b{Q}_{k-1}^2+c{Q}_{k-1}+d-{P}_a\left({Q}_{k-1}\right) $$
(5)

where F(Qk − 1) is the derivation of F(Qk − 1).

Models of water storage tanks

The water storage tank is sized to satisfy the load demand during a time when no renewable energy supply is available; this is referred to as facility adequacy. The charge status of the water storage tank can be measured using the following calculations based on the PV array’s output and the overall load requirement (Hadidian-Moghaddam et al. 2016):

Charging water storage tank

$$ SOC(t)= SOC\left(t-1\right)+\left[{E}_{PV}(t)-{E}_L(t)\right]\ast {\eta}_{\mathrm{Tan}k} $$
(6)

Discharging the water storage tank

$$ SOC(t)= SOC\left(t-1\right)-\left[{E}_L(t)-{E}_{PV}(t)\right] $$
(7)

SOC (t) and SOC (t-1) are the charge states of the water storage tank (watt-hours) in time t and t-1, respectively; EPV (t) is the total energy provided by the PV array after controller energy losses (watts), and EL (t) is the hydraulic energy demand at time t in the above equations (watts); ηTank.

The charge efficiency of the water storage tank is considered to be equal to 1. It should be noted that the equation SOC(t) = NTankVTank is established for the amount of water storage required in the system, which NTank is the number of water tanks, and VTank indicates the volume of the tank in cubic meters. In this study, the capacity of each tank is such that it can deliver 1 m3 of water to customers per hour. At each moment t, the charge level of the water storage tank is subject to the following condition (Hadidian-Moghaddam et al. 2016).

$$ 0\le SO C(t)\le SO{C}_{\mathrm{max}} $$
(8)

Problem formulation

The method is optimized and analyzed based on technological and economic metrics in order to choose the best combination to satisfy the everyday water requirement.

Economic index based on NPC concept (objective function)

According to the studied system, the present value cost (NPC) is expressed as the initial investment cost \( \left({}^{IC_{cap}}\right), \) replacement cost \( \left({}^{IC_{rep}}\right) \), and maintenance cost \( \left({}^{IC_{main}}\right) \). Therefore, NPC is defined as follows (Bakelli et al. 2011; Moghaddam et al. 2019):

$$ NPC\left(\$\right)=I{C}_{cap}+I{C}_{rep}+I{C}_{main} $$
(9)

CWSP-based reliability technical index (constraint)

In this study, system reliability is expressed in terms of the customer’s water not supplied probability (CWNSP). If the stored water in the tank is not capable to supply the load fully, the water not supplied by the system at time t is calculated as follows (Bakelli et al. 2011; Moghaddam et al. 2019):

$$ CWNS(t)={E}_L(t)-\left[{P}_{PV}(t)+ SOC\left(t-1\right)\right] $$
(10)

The CWNSP for the study period T (1 year) can be described as the ratio of all CWNSP values (t) for that year to total water demand (WL(t)) times as follows (Bakelli et al. 2011; Moghaddam et al. 2019):

$$ CWNSP=\frac{\sum \limits_{t=1}^T LWNS(t)}{\sum \limits_{t=1}^T{W}_L(t)} $$
(11)

A CWNSP of 1 means that the load is never supplied, and a CWNSP of zero means that the load is fully supplied.

Proposed optimization method

The mazes of the rivers with special beauty attract the attention of every viewer. The first question that comes to mind is whether there is any logic behind the formation of these mazes and can this natural mechanism be employed to create an intelligent algorithm and develop it. The IWD algorithm (IWDA) is a step towards multi-stage modeling in which natural events observed in the river are implemented in the form of an algorithm. This algorithm is structured with two properties, namely, velocity and soil, that may vary throughout the lifespan of an IWDA. The IWDA route is from the departure point to the destination and starts with zero initial velocity. In the continuation of this route, some soil may be separated from it, and this will increase the velocity of the water.

Thus, the route with less soil allows the IWDA to move faster than the route with more soil. An IWDA collects soil during its journey. This soil is stripped from the path that connects the two locations. The inverse time taken for the IWDA to travel from its current position to the next location is nonlinearly proportional to the amount of soil applied to it. Easy mechanics rules for linear motion are used to measure this period. As a result, the amount of time it takes is proportional to the IWDA velocity and inversely proportional to the distance between the two points. Furthermore, parts of the environment that are most exposed to IWDA have less soil. Yet, the main sources of soil data are environment and water droplets. The IWDA follows a mechanism to continue the route and select the next step, where it prefers low soil routes to high soil routes. Thus, for route selection, the imposition of uniform random distribution on the soil is carried out, where routes with less soil are more likely to be selected by the IWDA (Shah-Hosseini 2008; Sun et al. 2019).

The IWDA is given a graph (N, E) with a set of nodes N and a set of edges E as a representation of the problem. Then, by pushing on the nodes of the graph, each IWDA steadily constructs its solution. The graph’s edges continue to iterate until the IWDA finishes its approach and enters the final stage of evolution. The best TIB iteration approach is then sought and used to update the best TTB solution for each iteration. The algorithm then begins a new iteration with a different IWDA but the same soils in the graph routes. Finally, when the algorithm exceeds the full number of iterations, Enermax, the strongest TTB answer, or the expected consistency, the algorithm ends. Static and dynamic parameters are available in the IWDA. “Static parameters” are parameters that remain unchanged during the algorithm’s lifetime. The dynamic form, on the other hand, is restarted after each iteration of the algorithm. IWDA’s first steps are as follows:

  • Step#1) Initialization of static parameters.

Input the graph (N, E) to the algorithm. The quality of the best TB solution q(TTB) =  − ∞ set to the worst value. The maximum number of iterations itermax is specified by the user, and the number of iterations is set to zero. The number of water droplets NIWD is set to a correct positive value, which is usually set equal to the number of nodes of the graph Nc.

Parameters to be updated are as follows: velocity av=1 and bv=0.01 for soil and cv=1 for local soil ρn, which is a positive value and is smaller than one (0.9). For global soil ρIWD, the value of which is usually equal to the amount of the local soil (Jafar-Nowdeh et al. 2020).

Moreover, the initial soil in each route is represented by the constant InitSoil and is equal to the soil on the route between both nodes i and j, which is set by soil i j: soil(i, j) = InitSoil.

The initial velocity of each IWD is set to InitVel. Both InitSoil and InitVel parameters are set experimentally for the program. Here, all the settings are extracted from Shah-Hosseini (2008) and Sun et al. (2019).

  • Step#2) Initial values of dynamic parameters.

Each IWD has a visit to the node list that is empty (Vc(IDW)={}).The velocity of each IWD is set to InitVel and has zero soil content.

  • Step#3) The IWD should be randomly distributed on the nodes of the graph as the first visited nodes.

  • Step#4) The list of visited nodes from each IWD is updated to include the recently visited nodes.

  • Step#5) Repeat the following steps for minor IWDs (Shah-Hosseini 2008; Sun et al. 2019).

  • Using the following probability formula for the IWD located at node i, select the next node j and then add recently visited node j to the list Vc(IDW)

$$ P{i}^{IWD}(j)=\frac{f\left( soil\left(i,j\right)\right)}{\sum \limits_{k\notin vc(IWD)}f\left( soil\left(i,k\right)\right)} $$

Such that

$$ f\left( soil\left(i,j\right)\right)=\frac{1}{\in_s+ gf\left( soil\left(i,j\right)\right)} $$
(12)

and

$$ f\left( soil\left(i,j\right)\right)=\left\{\begin{array}{c}\left( soil\left(i,j\right)\right)\kern1.25em \mathrm{if}\kern1.25em \min\ \left( soil\left(i,l\right)\right)\ge 0\\ {}\left( soil\left(i,j\right)\right)-\kern0.5em \min\ \left( soil\left(i,l\right)\right) else\end{array}\right\} $$
  • The velocity of each IWD that is transferred from node i to node j can be updated using the following equation:

$$ ve{l}^{IWD}\left(t+1\right)= ve{l}^{IWD}(t)+\frac{a_v}{b_c+{c}_v. soi{l}^2\left(i,j\right)} $$
(13)
  • For IWD moving on the route between node i to j, its soil loading is found as:

$$ \varDelta soil\left(i,j\right)=\frac{a_s}{b_s+{c}_s. tim{e}^2\left(i,j; ve{l}^{IWD}\left(t+1\right)\right)} $$

such that

$$ tim{e}^2\left(i,j; ve{l}^{IWD}\left(t+1\right)\right)=\frac{HUD(j)}{ve{l}^{IWD}\left(t+1\right)} $$
(14)
  • Update the soil that passes from node i to node j, as well as the soil carried by the IWD.

$$ {\displaystyle \begin{array}{c} soi l\left(i,j\right)\Big)=\left(1-{\rho}_n\right). soil\left(i,j\right)-{\rho}_n.\varDelta soil\left(i+j\right)\\ {} soi{l}^{IWD}= soi{l}^{IWD}+\varDelta soil\left(i,j\right)\end{array}} $$
(15)
  • Step#6) Find the best iteration solution of TIB based on TIWD solutions by:

$$ {T}^{IB}=\mathrm{argmax}q\left({T}^{IWD}\right) $$
(16)
  • Step#7) Update the soils on the route of the best iteration solution.

$$ {\displaystyle \begin{array}{c}{T}^{IB}=\mathrm{argmax}q\left({T}^{IWD}\right)\\ {} soil\left(i,j\right)\Big)=\left(1-{\rho}_{IWD}\right). soi l\left(i,j\right)-{\rho}_{IWD}.\frac{1}{\left({N}_{IB}-1\right)}. soi{l}_{IB}^{IWD}\end{array}} $$
(17)
  • Step#8) Update the best general solution by iterating the best solution.

$$ {T}^{TB}=\left\{\begin{array}{c}{T}^{TB}\\ {}{T}^{IB}\end{array}\right\} ifq\left({T}^{TB}\right)\ge q\left({T}^{IB}\right) $$
(18)
  • Step#9) Increase the number of iterations.

$$ {\displaystyle \begin{array}{c} Ite{r}_{count}= Ite{r}_{count}+1. Thenj, go\ \mathrm{to}\ \mathrm{step}\ 2\ \mathrm{if}\\ {} Ite{r}_{count}< Ite{r}_{\mathrm{max}}\end{array}} $$
  • Step#10) The algorithm with the best complete solution of TIB is terminated at this step.

IWDA has a convergence property in terms of value (Shah-Hosseini 2008; Sun et al. 2019). This means that if the number of iterations is large enough, the IWDA can find the optimal solution.

Implementation of IWDA in problem-solving

In this study, the number of iterations of the algorithm is equal to 100, and the number of population of the IWDA is considered equal to 40. The general process of system optimization based on the studied IWDA is as follows. First, the data related to the intensity of PV radiation and ambient temperature is applied to the mathematical model of the studied system, which is described in this chapter. Then Steps 1–7 is as follows:

  • Step 1) Generate the initial population from the set of decision variables in the IWDA. First, the vector of variables is defined as the number of PV arrays and the number of water storage tanks, respectively.

  • Step 2) After determining the search space for each population of the IWDA, the set of variables are determined randomly.

  • Step 3) The value of the objective function is calculated for each set of variables, and the best set in terms of the value of the objective function is selected as the population-representative.

  • Step 4) The position of each population of the IWDA is updated, and then the objective function is calculated for a set of new variables.

  • Step 5) The best set of variables is determined with the best objective function, and if they have better results, they replace the previous set.

  • Step 6) If the convergence condition is not met, we go to Step 2; otherwise, we go to Step 6.

  • Step 7) Stop the algorithm.

Simulation results

The proposed approach is used to analyze and design the PV water pump system separate from the network to provide drinking water to customers. Tables 1 and 2 show the technical features of the PV array and pump motor used in this analysis, respectively. Table 3 also shows the expenses and service life of the machine equipment.

Table 1 Technical characteristics of PV array (Bakelli et al. 2011)
Table 2 Technical characteristics of motor pump (Bakelli et al. 2011)
Table 3 Costs and life time of system equipments (Bakelli et al. 2011)

The load profile is assumed to be constant and equal to 10 m3 of total daily consumption. In other words, there are cubic meters per hour. The capacity of each tank is such that it can deliver 1 m3 of water per hour. Also, the maximum storage capacity (SOCmax) is equal to the sum of all the tanks we place. The initial capacity of the tank in the first hour of the day (SOC (1)) is 20% of the total capacity. In other words, in the early morning, it has 20% of the volume of the water tank. Water height (h) can also change. The curve of PV radiation intensity and ambient temperature during 24 h is presented according to Figures 2 and 3. The investment cost of the PV array is $ 249.91 per kilowatt, and the maintenance cost is 1% of the investment cost per hour. The investment cost of the tank is estimated at $ 42,000, and its maintenance cost is assumed to be 1% of its investment cost per hour.

Fig. 2
figure 2

Curve of PV radiation intensity during the day (Bakelli et al. 2011)

Fig. 3
figure 3

Ambient temperature curve during the day (Bakelli et al. 2011)

Simulation results of the first scenario (6-m height)

In this scenario, the simulation results of the PV water pump system for a water height of 6 m with the objective function of minimizing system costs and the CWNSP constraint equal to zero are presented. In the first scenario, the PV water pump system is optimized for a water height of 6 m with the objective function of minimizing system costs. The convergence curves of the IWDA and PSO methods are presented in Figure 4. Figure 4 shows that the IWDA results in a better objective function value, in other words, a lower cost.

Fig. 4
figure 4

Convergence curve of optimization methods in the first scenario

The results of the first scenario are presented in Table 4. In the first scenario, the optimal number of PV arrays is set to 5 and the number of tanks to be set to 6. The total cost of the system is also equal. In IWDA, system costs have been reduced compared with the PSO method. Also, the CWNSP reliability index of the IWDA (3.17 %) is better than the PSO (3.49 %).

Table 4 System optimization results in the first scenario

Table 5 shows the sensitivity of CWNSP to the number of PV arrays. In this case, it is observed that with increasing the number of PV arrays and increasing the production capacity in the system to meet the electric demand of the motor pump, the amount of water extracted by it and also the amount of water storage in tanks increases Find. In other words, as the number of PV arrays increases, the amount of CWNSP decreases.

Table 5 The CWNSP sensitivity to the number of PV in the first scenario using IWDA

Figure 5 shows the changes in CWNSP relative to the number of PVs. As can be seen, the amount of CWNSP decreases with an increasing number of PV arrays. This means that by increasing the number of PV arrays and the production capacity of the system, more water is pumped, and the water supply capacity of the customers is increased by the system so that the total load demand is met.

Fig. 5
figure 5

Changes in CWNSP relative to the number of PV in the first scenario

Simulation results of the second scenario (10-m height)

In this scenario, the simulation results of the PV water pump system for a water height of 10 m with the objective function of minimizing system costs and the CWNSP constraint of zero are presented. The results of the second scenario obtained from a height of 10 m are presented in Table 6. The following figure shows the convergence curve of the methods. Figure 6 shows that the IWDA achieves the optimal equipment capacity at a lower cost.

Table 6 System optimization results in the second scenario
Fig. 6
figure 6

Convergence curve of optimization methods in the second scenario

In the second scenario, the optimal number of PV arrays and reservoirs by IWDA is 7 and 6, respectively. The total system cost is also equal to the dollar. In the PSO method, the number of PV arrays and water storage tanks is equal to 7. In this method, the cost of the dollar system is obtained. Therefore, according to the results, it can be said that the IWDA has performed system optimization at a lower cost and better reliability than the PSO.

The results for the CWNSP sensitivity to the number of PV arrays are shown in Table 7. It is observed that as the number of PV arrays increases, the value of CWNSP decreases. Figure 7 shows the changes in CWNSP relative to the number of PV arrays, which show a decrease in CWNSP as the number of arrays increases.

Table 7 Sensitivity of CWNSP to the number of PV in the second scenario using IWDA
Fig. 7
figure 7

Changes in CWNSP relative to the number of PV in the second scenario

Comparison of the results

In this section, a comparison of the results of the first and second scenarios with the water extraction height of 6 and 10 m based on the IWDA is presented according to Table 8. As can be seen, with increasing the height, the power required by the pump motor to extract water increases, and as a result, the cost of the system increases, and on the other hand, the reliability of water supply to customers remains almost the same.

Table 8 Comparison of the results in different heights using IWDA

In the following, the design of solar water pump systems based on battery reserves and water tanks (in this study) is compared. In battery-based solar pump systems, customers’ water is supplied online. Photovoltaic panels provide the power needed to operate the motor pump by receiving solar radiation. In other words, the electrical power corresponding to the water required by the customers is delivered to the motor pump to extract the water, and the excess power of the photovoltaic panels is stored in the batteries so that during the hours without solar radiations without photovoltaic power, the battery is in discharge state and the motor pump is supplied to extract the water for delivering it to the customers. In other words, the storage is an electrical type. While in photovoltaic water pump based on the tank storage, the battery is removed, and the water storage is replaced.

Comparison of the cost of water extraction per liter-hour (COWS ($/Lh)) is presented in Table 9. As presented in Table 9, the IWDA based on the water tank storage is achieved lower COWS in designing the photovoltaic water pumping system in comparison with the previous studies in Bhayo et al. (2019) and Lorenzo et al. (2018) with different configurations. In the proposed PV/Pump/Tank system, capacity of the photovoltaic panels and the water tank has been optimized according to the water needs of the customers during 24 h. The photovoltaic panels are operated at maximum production capacity. In this case, all the generated water enters into the tank, and the needs of the customers are supplied online. But the excess water remains in the tank and is delivered to the customers during the hours without irradiance (photovoltaic power). So, the simpler structure, lower complexity, simpler mathematical formulation, longer water tank life time, and lower cost of the proposed system over the battery-based system are advantages of the proposed system.

Table 9 Comparison of the cost of per liter water supply (COWS ($/Lh))

Conclusion

In this paper, a PV water pumping system was optimized to supply water to customers to minimize system costs. System costs included initial investment costs (equipment purchase costs), replacement and maintenance costs, and maintenance costs. The system studied included an electric pump, a PV array, and a water storage tank. The purpose of the design was to optimize the capacity of the system equipment, the optimal number of PV arrays, and the water storage tank to supply water to customers. In this study, problem optimization was performed using IWDA as a proposed method. The simulation results showed that the studied system fully meets the water demand of customers. Using water storage tanks, continuous and complete supply of customers’ demand has been done. The results showed that with increasing the extraction height of the water, the cost of the system increases, and the reliability of water supply to customers remains similar, approximately. The net present cost of the photovoltaic water pump system is obtained 2.400×105 $ and 2.448×105 $, and also the customer’s water not supplied probability is achieved 3.17 % and 3.19 % for 6 and 10 m extraction high, respectively. Moreover, the capability of IWDA has been confirmed compared with the PSO method with lower cost.