1 Introduction

Water resource analysis with a simulation–optimization framework to determine the water and energy relationship and its limitations is a major component of the decision-making process (Buenoa and Carta 2006; Celik and Kolhe 2013; Guo et al. 2021; Hou et al. 2021). Many optimization problems have been developed and applied in agricultural water management, such as reservoir operation (Wang et al. 2021), cropping pattern (Lalehzari and Kerachian 2020, 2021), irrigation scheduling (Lalehzari et al. 2016; Li et al. 2021), water distribution networks (Wang et al. 2022), and climate consideration (Huang et al. 2021). Water exploitation for agricultural activities requires electrical energy. A pumping system uses about 0.6 MWh to lift 1000 m3 of water a distance of 50 m. The amount of energy required to extract 1000 m3 of groundwater for irrigation was recorded in the range of 0.43 to 1.78 MWh (Brahmi and Chaabene 2012). Guerrero et al. (2020) provided a range of estimates of 0.5 to 2 MWh for similarly extracted groundwater. The applied electrical energy values are often the largest component of irrigation cost in a water supply system, which are expended to lift water from an aquifer to the ground surface, overcome friction in pipes and pumps, and pressurize the water for introduction into irrigation systems (Fallah-Mehdipour et al. 2012; Sun et al. 2021).

The application of wind energy for water resource management can provide a major component for achieving sustainable strategies. Wind energy was commonly used to provide mechanical power for pumping water and grinding grain until the early twentieth century. The emergence of fossil fuels was synchronous with the decline in wind as a power source for the remainder of the twentieth century (Ma et al. 2021). Increasing concerns with the adverse impacts of fossil fuels on the environment has encouraged the development of clean, renewable energy sources, wind among them, over the last decade. Although wind energy was used for elementary applications in the past, it is currently a clean resource for electricity production or energy supply in agriculture and other activities in rural areas and has not been given due consideration in previous water resource investigations (Fallah-Mehdipour et al. 2013; Bolouri-Yazdeli et al. 2014; Ashofteh et al. 2015).

Parikh and Bhattacharya (2003) discussed the possibility of using windmills for lifting irrigation water. For the wind velocity pattern considered in their study, it was found that 1.214 ha of wheat and mustard could be irrigated during winter if the daytime pumped volume of water was used for irrigation. If nighttime discharge was also utilized, a minimum cropping area of 1.94 ha was possible. Panda et al. (1998) determined the investment per unit of water supplied and the levels of daily irrigation demand satisfied by the most economic windmill irrigation system at various levels of risk. Kumar and Kandpal (2007) estimated and compared the utilization potential of different renewable energy-based pumps for irrigation water pumping in India. Results showed that solar photovoltaic (SPV) pumps have the greatest utilization potential in India, followed by windmill pumps.

Carta et al. (2008) developed a flexible joint probability function for use in wind energy analysis. A normal–Weibull mixture distribution and a finite mixture of von Mises function were used to predict wind speed and direction. The proposed model was applied to wind speed and direction data recorded at several weather stations located in the Canary Islands (Spain). The proposed method showed the correlation between wind speed and direction. Wang and Liu (2021) proposed an assessment method for wind energy using finite mixture statistical distributions based on wind speed, direction and power data, and model parameters of null or low wind speed and multimodal wind speed data were estimated based on an expectation–maximization algorithm. A two-component three-parameter Weibull mixture distribution was chosen for modeling the distribution of wind power density. Moreover, a von Mises mixture distribution with nine and six parameters was considered as the wind direction model. The proposed method was judged by the coefficient of determination, histogram plot, root-mean-square error, and wind rose diagram. Wang and Wu (2022) developed a statistical analysis framework to jointly evaluate wind duration, direction, and speed. The wind data were used to analyze the probabilistic duration from a refined hurricane track model. In the proposed model, the wind duration is measured with the over-threshold method based on numerically generated wind data.

A review of previous studies suggests the need for a sustainable decision-making system to determine the role of energy in the food production cycle. Rising greenhouse gas concentrations and global warming have led researchers to seek ways to replace fossil fuels with renewable energy sources. Therefore, wind energy as a source of renewable energy can be considered in extracting water needed by the agricultural sector. Integrated management of this interconnected structure requires the development of a comprehensive simulation model of the food-water-energy nexus based on economic risk and uncertainty analysis. Therefore, in this paper, the planning of a multivariate probabilistic model based on long-term wind speed and duration data is considered to provide the required input for a comprehensive simulation–optimization framework for maximizing water productivity. The priorities and constraints governing water extraction and distribution in agriculture are formulated, with emphasis on the allocation of water and energy, the role of periodic drought stresses, economic parameters and rainfall in planning.

2 Material and Methods

2.1 Main Structure

The development of the proposed model of sustainable water and energy management requires detailed analysis of various components of the complex framework and search for relationships between them, and finally determining the algorithm governing the problem. This system will simulate the desired results by receiving various input parameters and optimizing them in the form of several predefined constraints. The general state of the problem has eight steps in which the planning process and its solution method will be performed according to the flowchart shown in Fig. 1.

Fig. 1
figure 1

The main components of an agroeconomic management model

The proposed process can be summarized as follows: (i) simulating the water allocation system in the agricultural lands (with sub-programs for calculating production functions, transmission and distribution system); (ii) generating the wind energy model based on the probabilistic estimation of wind speed and duration for use in the energy generation simulation system (using bivariate joint functions); (iii) mathematical model planning in the form of multi-objective optimization (confrontation of water and energy consumption goals within the feasible domain of economic constraints, cropping pattern, etc.); and (iv) introducing and evaluating the developed model in Miandoab Plain as a case study. Daily time steps were used for the simulation process, which is defined as real-time modelling (Lalehzari and Kerachian 2020).

2.2 Cropping Pattern

Agroecosystem management will be planned based on the five components of water, land, climate, economy and production. As shown in Fig. 1, land-use change policies with the aim of yield production is one of the main constraints. Economic factors seem to have been a determining factor in land allocation for food security. Moreover, the impact of climate change on agricultural development policies and cropping pattern formulation is considered. Obviously, water is the decision-making factor for agroeconomic management. Therefore, the following formulations are considered for developing the simulation model as the first objective function (OF1).

One of the main issues in water allocation for food security is the simulation of yield production, which has so far often been based on the guidelines of the Food and Agriculture Organization of the United Nations No. 33. Various studies have been performed using this relationship, which is based on the ratio of actual/potential evapotranspiration and a sensitivity coefficient. In this research, production functions based on the role of water stress and water quality will be generated using the functions developed in the new FAO guidelines for the study area. Therefore, the second objective will be the relative efficiency of water consumption to maximize yield production as follows.

$${\text{OF}}1 \to max{\text{YP}} = \sum\limits_{{n = 1}}^{N} {\left( {1 - Ky_{n} \left( {{{1 - \left( {I_{n} + P_{n} } \right)} \mathord{\left/ {\vphantom {{1 - \left( {I_{n} + P_{n} } \right)} {\sum\limits_{t}^{T} {C_{{tn}} } {\text{ET}}_{{tn}} }}} \right. \kern-\nulldelimiterspace} {\sum\limits_{t}^{T} {C_{{tn}} } {\text{ET}}_{{tn}} }}} \right)} \right)} \times {\text{RY}}$$
(1)

where YP = Non-dimensional yield productivity; Pt = precipitation in growth stage n (mm); I = allocated water as the decision variable (mm); ET is the maximum evapotranspiration (mm), Ct = the crop coefficient in each stress period t and N = the number of simulation periods. The constraints considered on this planning system are summarized as follows.

$${\text{RY}} = \sum\limits_{{t = 1}}^{T} {{{C_{t} {\text{ET}}_{t} } \mathord{\left/ {\vphantom {{C_{t} {\text{ET}}_{t} } {\sum\limits_{{t = 1}}^{T} {I_{t} + P_{t} } }}} \right. \kern-\nulldelimiterspace} {\sum\limits_{{t = 1}}^{T} {I_{t} + P_{t} } }}}$$
(2)
$$\sum_{p=1}^{P}{A}_{\mathrm{p}}=A$$
(3)
$${B}_{\mathrm{p}}={\mathrm{WP}}_{\mathrm{p}}^{*}\sum_{d=1}^{D}{\mathrm{Tr}}_{d}{/\mathrm{ET}a}_{d}$$
(4)
$${I}_{\mathrm{p}}=\sum_{n=1}^{N}{\mathrm{ET}a}_{pn}$$
(5)
$$I_{{pn}} = \sum\limits_{{d = 1}}^{D} {{\text{ET}}a_{d} } \;\;\forall n = 1,2, \ldots ,N$$
(6)
$$P = \left( {{\text{FR}} - 0.2C_{R} {\text{Ra}}} \right){\text{Ra}}/{\text{FR}}\;\;\forall {\text{Ra}} \le 2{\text{FR}}/C_{R}$$
(7)
$$P = \left( {{\text{FR}}/C_{R} } \right) + 0.1{\text{Ra}}\;\;\forall {\text{ Ra}} > 2{\text{FR}}/C_{R}$$
(8)

where RY = a relationship for evaluating the evapotranspiration and irrigation ratio, A = cultivated area (h); p = crop number, B = biomass (kg), WP* = normalized water productivity, Tr = transpiration (mm/day), CR = the time period coefficient; FR = 125; Ra = rainfall (mm).

Furthermore, the transpiration of plants and evaporation from the soil surface depend on the moisture content of different soil layers. Runoff, deep percolation and evaporation are components of water balance that determine the amount of losses in each planning scenario and play a role in choosing the best cropping pattern strategy. Irrigation time can be estimated according to the time interval between rainfall and irrigation and reaching soil moisture at the permanent wilting point.

2.3 Wind Energy

Considering the concern regarding the effects of fossil fuels on the environment and their non-renewability, the development of clean energy production knowledge over the past decade has been increased. Therefore, wind power has been used as a way to generate energy to supply mechanical power to pump water. These systems are simple turbines that supply mechanical energy for water exploitation. In this research, a simulation model of wind energy generation will be developed based on the following method. Power generated by a wind turbine will be estimated from the following equation.

$${F}_{\mathrm{t}}=\frac{1}{2}{\rho }_{\mathrm{a}}\left(\pi {\left(T/2\right)}^{2}\right){u}_{\mathrm{t}}^{3}$$
(9)

where Ft = wind energy (W) at time t; ρa = air density (1.2 kg/m3); T = turbine wheel diameter (m) and ut = the wind speed (m/s) at time t. The wind energy with a wind turbine (J) is obtained by multiplying the force and the time of power generation.

$${\mathrm{OF}2 \to \mathrm{min} E}_{\mathrm{t}}={F}_{\mathrm{t}}\times \mu \times t={\gamma }_{w}\times {Q}_{\mathrm{t}}\times {H}_{d}$$
(10)

where t = the time interval (s); μ = wind turbine efficiency at time t; γw = the unit of water weight (9.81N/m3), Q = pumping flow rate (m3/s), and H = the height of water pumping from the well into the tank (m). For economic evaluation, it is necessary to estimate the amount of investment in the study year compared to the base year as a constraint. Thus:

$$\mathrm{CRF}=\frac{i\times {\left(1+i\right)}^{n}}{{\left(1+i\right)}^{n}-1}$$
(11)
$$\mathrm{AC}=\left(\mathrm{CRF}\times \left(\mathrm{CR}+\mathrm{CW}+\mathrm{CF}\right)+\mathrm{CC}+\mathrm{CR}+\mathrm{CW}\right)$$
(12)

where CRF = the return on investment, i = the interest rate, n = the number of years since the base year, AC = the total cost, and CR, CW and CC are the cost of reservoir construction, wind turbine and cropping pattern, respectively.

According to the conceptual structure, two variables—wind speed and wind duration—are needed to calculate the second objective function. Therefore, wind characteristics were estimated using hourly data (Carta et al. 2008) recorded at Miandoab whether station from 2002 to 2022. The probabilistic modeling was carried out according to the copula joint functions. For more details, please refer to Chen and Guo 2019.

The other constraints of a comprehensive decision-making system addressed in this study will be divided into five general categories: water availability, irrigation scheduling, and energy, technical, and economic constraints. The developed model will be optimized using the water cycle algorithm based on the theory of non-dominated sorting and crowding distance.

2.4 Non-dominated Sorting Water Cycle Algorithm

The non-dominated sorting test was inspired by an economics theory to evaluate solutions based on the domination ability (Deb et al. 2002). A genetic algorithm was the initial technique used to optimize the process. In this study, a water cycle algorithm is incorporated into this framework for increasing convergence.

The water cycle algorithm (WCA) starts by generating an initial population known as raindrops. The best member (the best drop of water) is selected as the sea. After that, some of the raindrops with superior position are considered as rivers and the rest of the raindrops are considered as streams that flow towards the rivers and the sea. In a multidimensional optimization problem, a raindrop is an array in the form of Nvar × 1. This array is defined by Eq. (13).

$$\mathrm{Raindrop }= [{X}_{1}, {X}_{2}, {X}_{3}, . . . , {X}_{\mathrm{Nvar}}]$$
(13)

where X1 to XNvar represent the decision variables. To begin with, a sample of the raindrop matrix of Npop × Nvar is randomly generated.

$$\mathrm{Population\,of\,raindrops}=\left[\begin{array}{c}{\mathrm{Raindrop}}_{1}\\ {\mathrm{Raindrop}}_{2}\\ \vdots \\ {\mathrm{Raindrop}}_{{N}_\text{pop}}\end{array}\right]= \left[\begin{array}{ccc}{X}_{1}^{1}{X}_{2}^{1}{X}_{3}^{1}& \cdots & {X}_{{N}_\text{var}}^{1}\\ \vdots & \ddots & \vdots \\ {X}_{1}^{{N}_\text{pop}}{X}_{2}^{{N}_\text{pop}}{X}_{3}^{{N}_\text{pop}}& \cdots & {X}_{{N}_\text{var}}^{{N}_\text{pop}}\end{array}\right]$$
(14)

where Npop and Nvar are the number of raindrops (initial population) and the number of variables, respectively. The values of the cost function (C) are obtained from Eq. (15).

$${C}_{i}=\text{Cost}_{i}=f\left({X}_{1}^{i}, {X}_{2}^{i}, {X}_{3}^{i},\dots , {X}_{{N}_\text{var}}^{i}\right) , i=1, 2, 3,\dots , {N}_\text{pop}$$
(15)

where Ci is the objective value of each drop. In the first step, Npop number of raindrops are generated and then NSR number of the best drops (minimum value) are selected as sea and river. A raindrop with the smallest amount is considered as a sea drop. NSR is the sum of the number of rivers (which is a practical parameter) and a sea (Eq. 16). The rest of the population (streams that may flow into rivers or directly into the sea) is calculated using Eq. (17).

$$N_{{{\text{SR}}}} = {\text{Number}}\;{\text{of}}\;{\text{Rivers}} + \overbrace {1}^{{sea}}$$
(16)
$${N}_{\mathrm{Raindrops}}={N}_{\mathrm{pop}}-{N}_{\mathrm{SR}}$$
(17)

In order to determine or allocate raindrops to rivers and the sea, depending on the intensity of the flow, Eq. (18) is used.

$${\mathrm{NS}}_{n}=\mathrm{round}\left\{\left|\frac{{\mathrm{Cost}}_{n}}{{\sum }_{i=1}^{{N}_{SR}}{\mathrm{Cost}}_{i}}\right|\times {N}_{\mathrm{Raindrops}}\right\} , n=1, 2,\dots , {N}_{\mathrm{SR}}$$
(18)

where NSn is the number of streams that flow into certain rivers or the sea. A stream flows until it reaches the river along the connecting line between them using a randomly selected distance, which is determined according to Eq. (19).

$$X\in \left(0, C\times d\right),\, C>1$$
(19)

where C is a value between 1 and 2 (close to 2), and the best value for C is considered as equal to 2; d is the distance between the stream and the river, and X is a random number distributed uniformly between zero and (C × d). The new position of streams and rivers can be calculated with the following equations.

$${X}_{\mathrm{Stream}}^{i+1}={X}_{\mathrm{Stream}}^{i}+\mathrm{rand}\times C\times ({X}_{\mathrm{River}}^{i}-{X}_{\mathrm{Stream}}^{i})$$
(20)
$${X}_{\mathrm{River}}^{i+1}={X}_{\mathrm{River}}^{i}+\mathrm{rand}\times C\times ({X}_{\mathrm{Sea}}^{i}-{X}_{\mathrm{River}}^{i})$$
(21)

where rand is a random number uniformly distributed between zero and 1. If the solution provided by a stream is better than the river connected to it, the position of the river and the stream will change. This exchange can happen in the same way for rivers and sea. One of the most important factors preventing the algorithm from quickly converging and becoming trapped in local optima is evaporation. The process of evaporation causes the sea water to circulate again in the form of rivers or streams. Equation (22) shows how to determine whether the river flows into the sea or not.

$$if \left|{X}_{\mathrm{Sea}}^{i}-{X}_{\mathrm{River}}^{i}\right|<{d}_{\mathrm{max}} ,\, i=\mathrm{1,2},3\dots ,{N}_{\mathrm{SR}}-1$$
(22)

where dmax is a small number (close to zero). Therefore, if the distance between the river and the sea is less than dmax, it means that the river has reached the sea. In this situation, the evaporation process takes effect, and after sufficient evaporation, precipitation will begin. The value of dmax decreases in each iteration according to the following equation.

$${d}_{\mathrm{max}}^{i+1}={d}_{\mathrm{max}}^{i}-\frac{{d}_{\mathrm{max}}^{i}}{\mathrm{max\,iteration}}$$
(23)

After evaporation is estimated, a precipitation term is applied. In the precipitation process, new raindrops form streams at different locations. Equation (24) shows the new location of newly formed streams.

$${X}_{\mathrm{Stream}}^{\text{new}}=\mathrm{LB}+\mathrm{rand}\times \left(\mathrm{UB}-\mathrm{LB}\right)$$
(24)

where LB and UB are the lower and upper bounds defined by the problem, respectively. The best newly formed raindrops are considered as rivers and the remaining raindrops are considered as new streams flowing into rivers. In the next step, Eq. (25) is used to increase the speed of convergence and computational performance of the algorithm.

$${X}_{\mathrm{Stream}}^{\text{new}}={X}_{\mathrm{Sea}}+\sqrt{\mu }\times \mathrm{rand}n(1,{N}_{\mathrm{var}})$$
(25)

where µ is a coefficient that shows the feasible domain near the sea, and randn is a random number of normal distribution. Large values of µ increase the possibility of leaving the feasible region, and small values of µ lead to the search of the algorithm in a smaller region near the sea. The appropriate value of µ was determined as 0.1. The criterion of convergence in this research is to reach a maximum number of repetitions equal to 5000.

3 Study Area

The Miandoab Plain with an area of approximately 1200 Km2 is located in the south of Urmia Lake. The geographical coordinates of the study area are between 36° 50′ and 37° 15′ east longitude and 45° 52′ and 46° 11′ north latitude. The location of this plain is shown in Fig. 1. Its potential evapotranspiration rate is estimated at 742 mm. The Zarrineh irrigation and drainage network is located in a plain with an area equal to 586 km2. The average annual rainfall during the period 1992–2022 is about 285 mm/year according to the recorded data at Miandoab synoptic station. This region has a cold and semi-arid climate based on meteorology data analysis and the empirical Emberger method (Norouzi Ghoshbelag et al. 2019). According to the hydrological, agricultural and environmental conditions of the region, the area is suitable for evaluating the developed models (Fig. 2).

Fig. 2
figure 2

Location of study area in Urmia Lake watershed

To develop the decision-making system and evaluate the role of wind energy in agricultural water allocation, the cropping pattern of the Miandoab Plain in 2022 is summarized in Table 1. The average yield production (YP) and irrigation (I) were collected based on field measurements, face-to-face interviews and questionnaires. The crop water requirement (CWR) was estimated based on the method reported by Allen et al. (1998).

Table 1 Cropping pattern of Miandoab Plain in 2022

4 Results and Discussion

4.1 Probabilistic Analysis

The univariate frequency functions applied to the joint framework of wind speed and duration are summarized in Table 2. The error analysis using Kolmogorov–Smirnov, Anderson–Darling and chi-square tests showed that the log-Pearson (LP) and log-normal (LN) estimators are suitable functions for predicting the wind speed and duration, respectively.

Table 2 Evaluation of marginal distribution functions

In the next step, correlation coefficients should be determined for evaluating the proportion of the wind variables. Figure 3 indicates the correlation coefficients considered in this study including τ Kendall, ρ Spearman and Pearson. Furthermore, the superior joint function was selected based on the maximum likelihood estimator as shown in Fig. 3. According to the figure, the Archimedean Frank copula fits acceptably for wind speed and duration. Considering the estimated correlation values and the effect between wind speed and duration, the probabilistic modeling approach is adopted to construct the joint probability density function of wind speed and duration.

Fig. 3
figure 3

Evaluating the correlation coefficients between wind variables and estimating the maximum likelihood estimator to select the best joint function

Furthermore, Akaike information criterion (AIC), Bayesian information criterion (BIC), and the coefficient of determination (R2) were incorporated into the goodness-of-fit evaluation for selecting the suitable joint function as shown in Table 3 (Wang et al. 2021).

Table 3 Goodness-of-fit evaluation for selecting the suitable joint function

Estimating the return periods is an essential component in calculating the wind energy for agricultural water supplementation. In this study, return periods were obtained using the Frank function (Table 4). The results showed that the application of the bivariate joint method reduced the expected amount for each event calculated by the univariate method and can be effective in designing and evaluating the water allocation system (Sun and Khayatnezhad 2021). The design and optimization carried out in this research is based on a 25-year return period, which is known as a sustainable decision model.

Table 4 Wind speed and duration based on the univariate and bivariate analysis

4.2 Optimal Water Allocation

One of the optimization results in this study is the evaluation of the change in yield production (kg/ha) against the amount of water consumed. Figure 4 shows the role of optimization in improving production and reducing water consumption. As expected, the largest decrease in irrigation is addressed to the second objective function (OF2: energy optimization). On the other hand, the yield decreased between 5 and 38% for this strategy. The maximum yield reduction is shown in sugar beet (10,900 kh/ha) and canola (650 kg/ha). An improved irrigation schedule helped to increase sesame, millet and lentil production more than 20% at the 5% confidence level. Changing irrigation planning for increasing yield in the cropping pattern was proven effective by Lalehzari et al. (2020) and Ren and Khayatnezhad (2021).

Fig. 4
figure 4

Yield production and irrigation in existing plan (EP) and optimal strategies (OF1 and OF2)

5 Conclusion

The defined objective functions for the multi-objective problem were (1) maximization of water productivity and (2) minimization of the wind energy used for extracting water. The non-dominated sorting concept and water cycle algorithm were used as modeling tools based on the technical, economic, and water allocation constraints. The simulation and optimization processes under simplified assumptions suggest that the developed model could be useful for practical application to minimize energy consumption for pumping in agricultural activities. The optimal allocation of water could increase the average water productivity for the Miandoab cropping pattern, especially for the second objective function. The results of this research suggest that the development of an irrigation strategy for reduced energy consumption is an effective approach, despite the fact that it will reduce production. A limitation for future studies is that the proposed method is effective, but the study area is not suitable for widespread application of wind turbines, and the estimated wind energy potential would be inaccurate without considering the influence of wind direction.