2. Literature Review
The temporal evolution of scientific production shows a growing interest in topics related to energy use in the agricultural sector, particularly in agricultural irrigation (
Figure 1). Since the early 2000s, the number of publications in this field has exhibited sustained growth, with a particularly pronounced increase from 2016 onwards [
9]. This recent rise suggests a consolidation of the research area, driven both by the maturity achieved by renewable energy technologies and by the increasing availability of large volumes of environmental and agricultural data [
10].
In this context, scientific literature has addressed the problem of agricultural irrigation from multiple complementary perspectives. On one hand, numerous studies have focused on the energy modelling of irrigation systems, analyzing the electrical demand associated with different hydraulic configurations and operating patterns. On the other hand, the integration of photovoltaic systems, both grid-connected and stand-alone, has been extensively explored, assessing their technical and economic feasibility in agricultural scenarios. In parallel, the use of storage systems such as electrical, hydraulic, or hybrid has emerged as a key element for improving operational flexibility and the reliability of energy supply. More recently, the application of mathematical optimization techniques, heuristic methods, and artificial intelligence algorithms has intensified to support decision-making in the joint optimal management of energy and water [
9].
With the aim of systematically characterizing the main research lines, a bibliometric analysis based on keyword co-occurrence has been conducted (
Figure 2). The analysis focused on the intersection of four major thematic areas:
Computational methods and optimization methodologies.
Agricultural applications.
The use of renewable energy sources.
The combination of different environmental data sources.
This analysis makes it possible to structure existing contributions around four main axes: computational and optimization methods, agricultural applications, renewable energy, and the combined use of environmental data. The results highlight the clearly interdisciplinary nature of the field, with central nodes such as irrigation, water management, solar radiation, optimization, and machine learning, as well as well-defined clusters associated with energy optimization, hydroclimatic prediction, remote sensing, and water resources management.
Overall, this landscape shows that the integration of renewable energy, advanced optimization techniques, and artificial intelligence methods applied to agricultural irrigation constitutes an active and rapidly expanding line of research, in which significant opportunities still exist to move toward more efficient, sustainable, and resilient management of the water–energy nexus.
A consolidated line of research within the state of the art focuses on modelling energy consumption associated with agricultural irrigation, where electricity demand is mainly derived from the operation of pumping systems. These models consider the hydraulic characteristics of the installation, flow rate, total dynamic head, and equipment efficiency, together with crop water requirements, allowing the estimation of hourly or daily load profiles linked to irrigation operation.
However, a large share of these studies assumes predefined or static irrigation profiles and does not incorporate a dynamic representation of energy operation or storage. Consequently, the coupling between water management and energy systems is often addressed in a simplified manner, under assumptions of constant electricity supply or fixed energy prices [
11].
Some studies, such as Abrishambaf et al. [
12], have advanced toward more integrated approaches, jointly incorporating irrigation scheduling and energy use. Nevertheless, these works present limitations in the representation of storage and, in many cases, lack validation in real systems. Complementarily, recent techno-economic analyses of photovoltaic pumping systems, such as Aripriharta et al. [
13], provide robust methodologies to translate water demand into electricity demand, although they tend to focus on specific configurations.
Another widely developed research line addresses the application of renewable energy, mainly solar photovoltaic, for supplying energy to irrigation systems. These studies analyze both off-grid and grid-connected configurations, assessing their technical and economic feasibility in agricultural holdings, particularly in rural areas with limited access to or low quality of conventional electricity supply.
Literature shows strong emphasis on the sizing of photovoltaic systems, with analyses based on average demands or fixed irrigation profiles. Recent studies, such as Biberci [
14], conduct detailed techno-economic analyses of grid-connected photovoltaic systems for powering irrigation facilities, evaluating indicators such as electricity production, self-consumption, and cost reduction. While these works provide robust methodologies for feasibility assessment, their scope is usually limited to specific cases and does not incorporate advanced strategies for joint operation or integrated water–energy optimization.
Storage constitutes a key element for decoupling renewable generation from irrigation demand in rural environments. The literature mainly distinguishes between electrochemical storage, through batteries, and physical or hydraulic storage, through tanks and reservoirs that allow energy to be stored indirectly in the pumped water.
Battery-based storage systems also face important thermal management challenges, particularly the risk of thermal runaway under dynamic operating conditions. Recent studies have highlighted the relevance of advanced cooling strategies and safety-oriented thermal management to improve battery reliability and operational safety in renewable energy applications [
15,
16].
Bibliometric analysis suggests that hydraulic storage has traditionally been addressed from a water resource management perspective, with limited connection to energy systems and operational optimization.
Some studies have begun to explore pumping as a mechanism for energy flexibility, such as Li et al. [
17], which provides a conceptual basis for the use of reservoirs as storage systems capable of absorbing surplus renewable generation. More recent research presents specific applications of photovoltaic integration with pumped hydro storage [
18], as well as integrated designs of photovoltaic plants with pumped storage systems aimed at irrigation and community supply in rural environments [
19].
Likewise, advanced proposals incorporate joint energy and water management and optimization strategies through forecasting and multilevel control, demonstrating significant reductions in electricity costs and improvements in water-use efficiency [
20].
On the other hand, a significant number of studies address improvements in irrigation operation and water management through optimization techniques and intelligent algorithms, including mathematical programming, predictive models, and approaches based on machine learning and meteorological information to support decision-making [
21].
The concept of smart agriculture emerges as a cross-cutting umbrella integrating optimization, renewable energy, and irrigation, although literature shows some semantic and methodological fragmentation.
There are proposals for integrated design combining photovoltaic generation, hydraulic storage, and irrigation [
19], as well as optimal scheduling schemes for solar-powered irrigation [
12] and predictive frameworks that coordinate water and energy use through intelligent control [
22]. Nevertheless, many of these contributions focus on specific configurations or methodological development, without comprehensively addressing interactions with electricity markets, price signals, or complex real-environment systems.
Finally, several studies assess the impact of energy solutions for irrigation from a techno-economic and sustainability perspective, analyzing indicators such as levelized cost of energy, emission reductions, or improved energy access in rural areas. These works highlight the potential of renewable energy to reduce grid dependence and enhance the resilience of agricultural holdings.
Despite these advances, most studies focus on static evaluations or simplified scenarios [
13,
18,
23], without considering the optimization of renewable generation, storage, irrigation operation, variable energy demand, and electricity prices altogether. In this context, a significant gap remains in the literature regarding real case studies that integrate all these elements within a coherent techno-economic optimization framework.
In summary, the existing literature demonstrates substantial progress in energy modelling of agricultural irrigation, the integration of renewable energy, and the use of optimization techniques to improve the efficiency of the water–energy nexus in rural environments. However, as observed in this review, these studies tend to address these elements in a partial manner or under simplified assumptions, with a predominant emphasis on static configurations, predefined demand profiles, and isolated techno-economic evaluations. There remains a lack of real case studies that jointly integrate renewable generation, multiple storage options, dynamic irrigation operation, and the temporal variability of demand and energy prices within a unified techno-economic optimization framework.
This work explicitly addresses these limitations through an integrated approach that enables the evaluation and optimization of coordinated water and energy management in real rural systems, thereby contributing to closing a relevant gap in the state of the art.
3. Materials and Methods
3.1. Description of the Baseline Case
The baseline case analyzed corresponds to a real installation on a vineyard plot in Spain, comprising a pumping-based irrigation system partially supplied by a 112 kWp photovoltaic installation with no energy storage. Generated energy is either consumed instantaneously or exported to the grid in the event of a surplus.
The irrigation hydraulic system consists of six pumps that always operate under load, with floating suction from a regulation pond. The configuration includes three types of centrifugal pumps, each duplicated, forming pairs of identical pumps. Within each pair, one pump operates with a variable frequency drive, while the other uses direct-on-line starting, enabling a comparison of different control strategies and their impact on energy consumption. Specifically, the installation includes:
Two Rovatti SN3E100-200-G-GR-TB-GG pumps (Rovatti A. & Figli Pompe S.p.A., Fabbrico, Reggio Emilia, Italy), each equipped with a 55 kW electric motor.
Two Rovatti MN75E80-200-2P-50-TB-SS pumps (Rovatti A. & Figli Pompe S.p.A., Fabbrico, Reggio Emilia, Italy), each with a 55 kW motor.
Two Rovatti MN40E40-250-2P-50-TB-SS pumps (Rovatti A. & Figli Pompe S.p.A., Fabbrico, Reggio Emilia, Italy), each with a 37 kW motor.
From the electricity contracting perspective, the agricultural holding is subject to a 6-period tariff, which follows a hybrid pricing structure: 30% of consumption is billed at a fixed multi-year price, whilst the remaining 70% is indexed to the wholesale electricity market (pool). Photovoltaic surpluses exported to the grid are managed through the simplified compensation mechanism [
24], where the electricity energy injected into the distribution network is economically valued and deducted from the cost of electricity imported from the grid during the same billing period. Under this scheme, compensation is applied only to the energy term of the electricity bill. The compensation value for exported electricity is determined by a variable price subject to prevailing market conditions. This mechanism applies to self-consumption installations below 100 kW that are connected to the grid and capable of exporting surplus electricity.
This baseline case represents the current operating state of the described system and is used as a reference to:
Analyze the interaction between irrigation electricity demand and photovoltaic generation.
Assess the level of instantaneous self-consumption and the volume of exported surplus energy.
Quantify the energy and economic impact under dynamic energy prices, without active operational optimization.
Evaluate alternative scenarios or configurations for the techno-economic optimization of the system.
3.2. Input Data and Information Sources
The analysis presented in this study draws on a heterogeneous dataset describing the energy, hydraulic, and agro-climatic behaviour of a real viticultural farm equipped with pumped irrigation and on-site photovoltaic generation. The input data are organized into four main categories: energy data, hydraulic data, economic data, and agro-climatic data.
It encompasses the rated power and hourly generation profile of the photovoltaic system, together with the electricity demand associated with the pumping system. The hourly solar radiation data used to generate the photovoltaic generation profile were obtained from PVGIS (version 5.3, European Commission, Joint Research Centre, Ispra, Italy) [
25], corresponding to the location of the installation. The PV generation profile was subsequently scaled to the installed capacity.
These data enable the characterization of self-consumption levels, the interaction between renewable generation and irrigation demand, and the volume of surplus energy exported to the grid under the baseline scenario.
Hydraulic data describes the configuration of the irrigation system, including the nominal pump characteristics, control strategies, and the hydraulic parameters required to link crop water requirements to the electrical demand for pumping, thereby allowing water demand profiles to be converted into hourly energy consumption profiles. This data was obtained directly from the technical documentation and operational records of the use case system.
Economic data comprise hourly electricity purchase prices and photovoltaic surplus compensation values sourced from the Spanish wholesale electricity market operator (OMIE). It is applied in accordance with the structure of the farm’s electricity supply contract, which is based on a tariff scheme comprising partially fixed prices and prices partially indexed to the wholesale electricity market, together with hourly time series for electricity prices and photovoltaic surplus compensation. This information forms the basis for the economic assessment of the system under real market conditions.
Agro-climatic data were retrieved using Google Earth Engine (version 1.7.4, Google LLC, Mountain View, CA, USA) [
26] and it is used to estimate hourly irrigation requirements, derived from meteorological reanalysis data and high-spatial-resolution satellite observations. These sources are integrated to compute crop evapotranspiration and effective rainfall, yielding an hourly water demand time series that serves as a key input for both the energy analysis and the techno-economic evaluation.
Table 1 summarizes the key input parameters used to configure the optimization model across the scenarios analyzed in this study. The parameters reflect the actual technical and contractual characteristics of the case study installation and remain constant across all scenarios unless otherwise stated.
The consistent integration of these datasets enables a realistic representation of the water–energy system behaviour and provides the foundation for the baseline assessment and the optimization scenarios examined in subsequent sections.
3.3. Irrigation Profile
The hourly irrigation requirements of the grapevine crop were estimated by integrating hourly meteorological reanalysis data with high-spatial-resolution satellite observations, processed on the Google Earth Engine platform [
26]. This approach is particularly suitable for vineyards in central Spain, where grapevine performance is strongly conditioned by seasonal water scarcity and high atmospheric evaporative demand under Mediterranean climatic conditions [
27]. The vineyard plot was delineated by a polygon, from whose centroid hourly time series were extracted. In addition, a 60 m buffer zone was applied to derive a spatially robust estimate of the crop coefficient and to reduce the influence of mixed pixels, minor geolocation mismatches, and local spatial artefacts, which are especially relevant in row-structured woody crops such as vineyards [
28,
29].
Meteorological data were obtained from the ERA5-Land dataset at hourly resolution [
30]. Reference evapotranspiration (
) was computed following the FAO-56 Penman-Monteith formulation [
31], using 2 m air temperature, dew point temperature, surface pressure, downward solar radiation, and wind speed, the latter adjusted from 10 m to 2 m using the standard logarithmic wind-profile correction [
31]. Net radiation and soil heat flux were estimated using a simplified hourly approach distinguishing daytime and nighttime conditions, consistent with FAO-56 recommendations [
31]. Hourly precipitation was also obtained from ERA5-Land. Effective precipitation was approximated as 80% of total hourly precipitation in order to account, in a simplified way, for runoff, deep percolation, and direct evaporation losses; this coefficient was adopted as an operational assumption for Mediterranean semi-arid conditions and should therefore be interpreted as a modelling simplification rather than as a universal constant [
31,
32].
The crop coefficient (
), which converts reference evapotranspiration into crop evapotranspiration (
), was estimated dynamically from Sentinel-2 surface reflectance imagery [
29] instead of relying exclusively on fixed tabulated values by phenological stage [
31]. This approach is appropriate for vineyards because
varies markedly throughout the season as a function of canopy development, row architecture, and effective ground cover, all of which strongly affect vineyard water use under Mediterranean conditions [
28,
33]. Sentinel-2 images were pre-processed using cloud cover thresholds and scene classification masks to exclude pixels affected by clouds, shadows, and other low-quality observations [
29]. The Normalized Difference Vegetation Index (NDVI), derived from the red and near-infrared bands, was used as a proxy for canopy vigour and fractional vegetation cover. NDVI was transformed into fractional canopy cover using a bounded linear relationship, and this variable was subsequently converted into
using an empirical cover-based formulation consistent with the Allen-Pereira framework and related vineyard applications [
33,
34].
was constrained between 0.15 and 1.20 in order to maintain physically plausible values for Mediterranean vineyard conditions [
31,
33]. For each acquisition date,
was spatially summarized as the median value within the buffer zone around the plot to minimize the influence of outlier pixels and local spatial inconsistencies. When valid imagery was unavailable because of persistent cloud cover, a default value of
= 0.6 was assigned as an intermediate fallback value within the vineyard coefficient range commonly reported in the literature [
31,
34].
Hourly meteorological records from ERA5-Land were matched to the temporally closest available
estimate within a 30-day window. This procedure combines the high temporal resolution of the meteorological forcing with the lower revisit frequency and cloud-related limitations of Sentinel-2, while preserving seasonal consistency in the estimated crop coefficient and avoiding interpolations that may not adequately represent vineyard biological dynamics [
29,
34].
Hourly irrigation requirements were calculated as the positive difference between crop evapotranspiration and effective precipitation:
where negative values were set to zero. The resulting output is an hourly time series of vineyard water demand expressed in millimetres per hour, representing a theoretical estimate of irrigation requirements under optimal crop water supply conditions, without considering operational constraints of the irrigation system such as pressure limitations, available flow rates, or irrigation scheduling restrictions.
Results were exported as four quarterly CSV files covering the case study year, using one row per hour. Each record includes the date, the hour in UTC, and the estimated irrigation requirement, enabling direct integration into water balance analyses, irrigation scheduling studies, or comparisons with field observations.
3.4. Methodology
The objective of this study is the development and application of energy management comparative optimization strategies ranging from electrical energy storage to natural storage and a combination of both for the PV-supported irrigation system described above from an energy and an economic point of view. The economic analysis is constrained to the energy supply cost. CAPEX or other OPEX costs are excluded from this study as the scope is to evaluate different energy performance models and energy storage alternatives for this type of agricultural facility.
The analysis is based on a mixed-integer linear programming (MILP) formulation that solves the optimal dispatch of energy resources over a 24 h horizon for photovoltaic-powered irrigation systems [
35]. Despite the daily optimization horizon, seasonal variability is explicitly represented through time-dependent exogenous inputs and the inter-day propagation of system states, enabling the model to capture the cumulative effects of dry and wet seasons over the annual simulation horizon.
Figure 3 provides a schematic overview of the proposed optimization framework and its internal logic. The approach is structured around a rolling-horizon scheme in which the daily MILP problem is embedded within a Model Predictive Control (MPC) architecture, enabling continuous inter-day state propagation. As shown, multiple interconnected modules are considered, including irrigation scheduling, reservoir management, battery energy storage (BESS), and robust optimization under uncertainty via CVaR. These modules are driven by time-varying inputs such as climate conditions, photovoltaic generation, market signals, and water demand, allowing the framework to consistently couple short-term operational decisions with long-term system behaviour.
The model is parameterised from an input Excel file containing demand and photovoltaic generation profiles, time-differentiated tariff components, OMIE market selling prices, and technical parameters of the energy storage system. Following data normalization and validation, continuous variables represent energy flows between the photovoltaic system, storage, load, and the grid, subject to energy balance constraints and operational limits. Binary decision variables may optionally be included to model mutually exclusive battery charging and discharging states. The objective function minimizes net operating cost, defined as the difference between electricity purchased from the grid and revenues from surplus energy sales.
An optional robust optimization framework based on conditional value at risk (CVaR) can be activated to account for uncertainty in photovoltaic generation. This approach generates stochastic production scenarios and allows a smooth transition between purely expected-value optimization and a fully robust strategy, according to a user-defined trade-off between cost minimization and protection against adverse uncertainty outcomes.
The model operates under two alternative modes. In day-ahead planning mode, the full 24 h horizon is solved at the start of each day, assuming an accurate forecast of demand and generation. In Model Predictive Control (MPC) mode, the problem is solved iteratively over a rolling 24 h horizon at each time step, enabling dynamic adaptation to observed realizations of demand and photovoltaic generation.
Once optimal dispatch schedules are obtained, key performance indicators are computed, including grid energy purchases, surplus energy compensation under net-billing regulations, net operating cost, and equivalent battery cycles projected over the system’s lifetime. An interactive interface allows full customisation of technical parameters, economic objectives, and control strategies, facilitating sensitivity analyses and systematic scenario comparisons.
3.5. Scenarios Analyzed and Comparison Criteria
3.5.1. Baseline Scenario
The baseline scenario corresponds to the current operating state of the installation described in
Section 3.1 and is used as a reference case for comparison with the alternative scenarios analyzed in the present study.
The photovoltaic capacity is 112 kWp, which constitutes the common renewable generation baseline upon which the impact of the different storage configurations evaluated in subsequent scenarios is assessed.
Regarding system operation, the photovoltaic energy generated is allocated to the instantaneous self-consumption of the pump-based irrigation system and, in the event of surplus generation, exported to the grid under the simplified net-billing compensation mechanism [
36], with no energy storage or active demand management considered. The standard operating conditions of the six centrifugal pumps are therefore maintained, along with the existing control modes and irrigation schedules, which remain unaltered. From an economic standpoint, a 6-period indexed tariff structure is applied using hourly wholesale market prices, without accounting for load shifting or any economic optimization mechanisms thus representing the passive mode of system operation, serving as the starting point from which to quantify the energy and economic benefits of the optimized scenarios presented in subsequent sections.
3.5.2. Scenario 1: Battery Energy Storage
Scenario 1 evaluates the impact of incorporating an electrochemical energy storage system into the scaled photovoltaic irrigation scheme, with the objective of increasing self-consumption and reducing electricity imports from the grid relative to the baseline case. In this scenario, the battery acts as a temporal energy-shifting mechanism: it is charged using photovoltaic surplus that cannot be instantaneously consumed and subsequently discharged to supply irrigation demand during periods of low or zero photovoltaic generation, or when electricity prices make it economically preferable to minimize grid purchases. In the reference configuration of the model, charging and discharging efficiencies of 95% are assumed [
37], consistent with typical values for commercially available technologies [
38]. No modifications are introduced to the hydraulic infrastructure or installed pumping capacity, and the technical characteristics of the irrigation system remain unchanged with respect to the baseline scenario.
From an input perspective, the scenario uses the hourly photovoltaic generation profile, to which a user-defined scaling factor is applied, together with the hourly electricity consumption of the irrigation system. The latter is calculated by the tool based on irrigation flow or applied water depth, total irrigated area, and the physical parameters of the pumping system (equivalent head and efficiency), while explicitly accounting for the actual time step between records. For the economic assessment, hourly signals of electricity purchase prices and surplus compensation prices are incorporated. Additionally, an optional hourly signal may be used to impose an operational rule that restricts battery charging from the grid to hours classified as “low-cost” according to a user-defined percentile threshold.
At the storage system level, the main parameters include the battery energy capacity (kWh), minimum and maximum state-of-charge (SoC) limits, and the initial SoC, defined in percentage terms and internally converted into available energy (kWh). These parameters are combined with charging and discharging efficiencies and maximum charging and discharging power limits. When power limits are left in automatic mode, the model adopts values proportional to the installed capacity to avoid introducing artificial constraints. The user also specifies whether surplus export is allowed and whether grid charging of the battery is enabled; these decisions directly shape the feasible solution space and the optimal allocation of energy flows.
The operational and optimization logic is formulated as an hourly dispatch problem solved through linear programming (implemented using Python (version 3.13.13, Python Software Foundation, Wilmington, DE, USA) Linear Programming/Coin-or Branch Cut (PuLP/CBC)), either over daily horizons or within a receding-horizon model predictive control (MPC) framework. Operationally, the system prioritizes direct consumption of photovoltaic generation to supply irrigation pump demand. When surplus generation is available, it is first allocated to battery charging until the maximum SoC limit is reached, with any remaining energy exported to the grid if surplus sale is enabled. In the absence of photovoltaic generation, or when the hourly energy balance requires it, the battery is discharged to partially or fully meet demand, thereby reducing grid imports. Importantly, this behaviour is not imposed through fixed heuristics but emerges endogenously from the optimizer as a consequence of enforcing energy balance constraints at each time step, SoC dynamics with efficiencies, charging and discharging power limits, and storage capacity bounds. The objective function can be configured either to minimize grid energy imports or to minimize net operating costs by incorporating hourly price signals. Additionally, in exact optimization mode, the model can account for photovoltaic generation uncertainty through stochastic scenarios and a CVaR-based risk criterion, yielding dispatch plans that are more robust to renewable variability.
In terms of outputs, Scenario 1 produces hourly time series of photovoltaic energy utilized on-site, energy purchased from the grid, energy exported as surplus, and the battery SoC evolution, enabling detailed analysis of intra-day energy shifting and curtailment reduction. At an aggregated level, the model reports self-sufficiency and self-consumption indicators, as well as the annualized net operating cost, computed using a monthly capped surplus compensation scheme to reflect the current regulatory framework. The results also include an economic comparison against a photovoltaic-only reference case with the same scaled PV capacity, quantifying avoided grid purchases and changes in net cost. A daily solver summary is provided to assess solution consistency and end-of-horizon states. Finally, a battery usage and degradation key performance indicator is estimated based on equivalent full cycles (EFC) derived from the SoC evolution, allowing the energy and economic benefits to be interpreted in relation to the intensity of storage utilization. Overall, this scenario directly quantifies the impact of battery integration in terms of increased self-consumption, reduced grid imports, and lower photovoltaic surplus exports, while keeping the hydraulic infrastructure of the irrigation system unchanged.
3.5.3. Scenario 2: Natural Energy Storage
This scenario evaluates the optimal operation of a PV-powered irrigation system with scaled photovoltaic capacity and a water reservoir acting as indirect energy storage. Surplus PV or economically convenient grid electricity is used to pump water into the reservoir, and irrigation demand is later met by reservoir withdrawals, complemented by direct pumping if required. Unlike the battery case, storage is hydraulic, and the optimization determines when to pump, export surplus, or purchase electricity to minimize cost or grid consumption, depending on the selected objective.
To implement this scenario, the same hourly Excel inputs defining demand and generation are used. Irrigation demand is computed from the irrigation flow rate and the irrigated area is converted into the required water volume per interval (m3) using the actual temporal resolution. Photovoltaic generation is scaled using the selected PV scaling factor. From an economic perspective, the hourly electricity purchase price and the surplus compensation price are applied. Regarding the physical parametreees of the hydraulic system, the user specifies the reservoir capacity (m3), the initial reservoir state of charge expressed as a filling percentage (internally converted into an initial volume), the power rating of the pump used to fill the reservoir, the power rating of the external or grid-supplied irrigation pump, the equivalent pumping head to the reservoir, and the corresponding pump efficiency. These last two parameters are used to compute the energy intensity of reservoir pumping in kWh per cubic metre, which determines the energy required to store one cubic metre of water. Additional operational options are also configured, including whether photovoltaic surplus export is allowed, whether photovoltaic generation can be used for direct irrigation when reservoir water is insufficient, and whether pumping to the reservoir from the grid is permitted. An optional operational rule can further restrict grid use to low-price hours by applying a mask based on a “low-cost energy” signal to the grid energy used for pumping.
The optimization logic is formulated as a linear programming problem solved daily. For each day, the solver determines, on an hourly basis, how to allocate the available energy among three possible uses: pumping water into the reservoir, direct irrigation, and surplus export. When grid use is enabled, the solver also decides how much electricity to purchase for reservoir pumping and how much to purchase for direct irrigation, while respecting the power limits of each pump and the time-step duration of each interval. The system state is described by the volume of water stored in the reservoir, which evolves dynamically based on the pumped volume and the volume withdrawn to meet irrigation demand. At each time step, the volumetric irrigation demand must be satisfied by the sum of water supplied from the reservoir, water delivered through direct irrigation and, if allowed, a deficit term. This deficit represents unmet irrigation demand and is managed through two alternative approaches: either a “zero-deficit” constraint is enforced, in which case the model is forced to purchase grid electricity if necessary to guarantee irrigation supply, or a deficit is allowed but penalized with a very high cost, ensuring it only appears when physical or operational constraints prevent demand satisfaction. If a zero-deficit solution is infeasible under the selected constraints, the model automatically relaxes the constraint to recover feasibility and flags this condition in the results.
This scenario provides outputs that enable the assessment of both energy performance and hydraulic reliability. Hourly time series are obtained for photovoltaic energy used for pumping or direct irrigation, electricity purchased from the grid, energy exported as surplus, and the reservoir volume evolution. Along with these series, the total irrigation deficit in m3 and the number of hours with deficit are reported, directly quantifying the level of irrigation service when full coverage is not enforced. In addition, aggregated indicators of self-sufficiency and self-consumption are computed over the modelled system energy boundary, together with the annualized net operating cost incorporating a monthly capped surplus compensation scheme. Finally, an economic comparison is presented against the baseline case, detailing avoided grid purchases and net cost savings. A daily solver summary is also provided, including total grid energy use, utilized photovoltaic energy, surplus exports, and end-of-day reservoir volume. This information allows assessment of whether the reservoir is appropriately sized, whether the pumping strategy effectively shifts energy consumption toward periods of higher photovoltaic availability or lower electricity prices, and whether any constraints are causing irrigation deficits or forcing grid purchases at undesired times.
3.5.4. Scenario 3: Combined Electrical and Natural Storage
This scenario represents the most comprehensive configuration of the tool, combining scaled PV generation with two flexibility assets: an electrical battery and a water storage reservoir. The objective is to coordinate both storage systems to maximize solar utilization, minimize grid electricity purchases, and, if required, ensure deficit-free irrigation. The battery provides short-term intra-day energy shifting, while the reservoir converts energy surpluses into stored water for later irrigation. The optimization determines the optimal hourly allocation among battery operation, reservoir pumping, direct irrigation, and surplus export.
The execution of this scenario relies on the same hourly Excel inputs used throughout the application. Irrigation demand is computed as the required water volume per time interval based on the irrigation flow rate, the total irrigated area, and the actual time step, and is converted into energy demand for direct pumping using the specific irrigation energy, determined by the equivalent head and pump efficiency. Photovoltaic generation is scaled using the user-defined PV factor. From an economic standpoint, the hourly grid electricity purchase price and the hourly surplus value, expressed in €/kWh, are used and subsequently integrated into the economic assessment under a monthly capped surplus compensation scheme. In addition, an operational rule may be applied to restrict grid usage to “low-price” hours based on the purchase energy price signal, using a percentile-based threshold to generate an hourly mask.
Scenario-specific inputs include, on one hand, battery parameters: energy capacity (kWh), minimum and maximum SoC limits, initial SoC, charging and discharging efficiencies, and maximum charging and discharging power. When power limits are set to zero, the tool automatically assigns capacity-dependent values to avoid overly restrictive constraints. On the other hand, reservoir parameters are specified, including storage capacity (m3), initial state of charge expressed as a filling percentage, pumping power to the reservoir, pumping power for direct irrigation from the grid or external source, equivalent pumping head to the reservoir, and pumping efficiency. These parameters are used to compute the energy intensity of reservoir pumping in kWh per cubic metre, directly linking energy consumption to stored water volume. At the operational level, the user defines whether surplus export is allowed, whether battery charging from the grid is permitted, whether reservoir pumping from the grid is enabled, and whether photovoltaic generation may be used for direct pumping when reservoir water is insufficient. The “zero-deficit” condition may also be enforced to ensure that volumetric irrigation demand is always fully met; if not enforced, irrigation deficit is explicitly modelled as a penalized variable that only appears when no feasible alternative exists under the imposed constraints.
The optimization logic is formulated as a daily linear programming problem in which hourly decisions are made regarding the allocation of photovoltaic energy among reservoir pumping, direct irrigation, battery charging, and surplus export. Similarly, when permitted, grid electricity is optimally allocated among direct irrigation, reservoir pumping, and battery charging. In parallel, the model determines battery discharge toward two possible sinks: supporting reservoir pumping and/or supplying direct irrigation. The system state is described by two dynamic equations: battery SoC evolution, accounting for charging and discharging efficiencies, and reservoir volume evolution, which increases with pumped inflows and decreases with withdrawals used to meet irrigation demand. At each time interval, the irrigation demand expressed in cubic metres must be satisfied by the combination of water supplied from the reservoir and water delivered through direct pumping, optionally allowing for a deficit. All physical constraints on pump power and storage capacity for both the battery and the reservoir are enforced, together with operational constraints related to grid usage during hours allowed by the variable energy cost (70%) when this rule is activated.
This scenario provides integrated results that enable simultaneous evaluation of energy performance, economic outcomes, and service reliability. Hourly time series are generated for photovoltaic energy utilization, grid electricity purchases, surplus exports, battery SoC evolution, and reservoir volume evolution, along with hourly irrigation deficits (m3) when enabled. At an aggregated level, key performance indicators for self-sufficiency and self-consumption are reported over the modelled system energy boundary, together with the annualized net operating cost incorporating monthly capped surplus compensation. An economic comparison is also presented against the baseline case without storage but with the same scaled photovoltaic capacity, detailing avoided grid purchases and net cost savings. A daily solver summary is provided, including the main energy and water balances and the end-of-day states of both the battery and the reservoir. From a visualization perspective, the scenario presents hourly energy balances and the weekly evolution of maximum reservoir volume, facilitating the identification of reservoir under-sizing, assessing the effective flexibility contribution of the battery, and detection of constraints that may be causing grid purchases during undesired hours or irrigation deficits.
5. Discussion
The results of the analyzed scenarios clearly show that system performance is strongly conditioned by the selected objective function. When the optimizer operates in grid energy minimization mode (kWh), the decision logic prioritizes reducing dependence on the electrical grid to the greatest possible extent, even if this entails sacrificing part of the profitability associated with energy surplus compensation. In practice, this results in an operational strategy that favours direct consumption of photovoltaic generation and intensive use of storage elements (battery and/or reservoir) to absorb surplus energy and supply demand during periods without generation, leading to a clear reduction in net exchanges with the grid.
By contrast, under the net cost minimization mode (€), the system adopts a more “economically driven” strategy that exploits both hourly price signals and the surplus compensation scheme. In this case, it may be optimal to maintain a certain level of surplus export (when it is compensable) and to accept occasional grid imports if the overall economic balance is improved. This behaviour explains why cost-oriented configurations do not necessarily minimize energy purchases but do tend to improve annual net cost, particularly when surplus compensation plays a significant role in the economic outcome.
At the solution level, Scenario 1 (scaled PV + battery) provides intraday flexibility and energy-shifting capability, delivering consistent improvements in self-consumption and surplus reduction under the energy-oriented objective. However, its economic attractiveness depends on the trade-off between savings from reduced grid purchases and the loss (partial or total) of compensation revenues. Consequently, its value is maximized when the primary objective is to reduce imported energy (kWh) or when the price structure favours battery discharge during high-price periods without excessively penalizing surplus compensation.
Scenario 2 (scaled PV + reservoir) introduces a form of indirect storage in the form of pumped water, thereby increasing the ability to reschedule electrical pumping demand. This enables operation to be shifted toward more favourable time windows, either due to photovoltaic availability or electricity prices, resulting in strong performance under the economic objective and, more generally, a robust strategy for managing surplus energy without requiring changes to the installed irrigation power.
Finally, Scenario 3 (scaled PV + battery + reservoir) combines both sources of flexibility and provides the highest degree of operational freedom. Qualitatively, it is the scenario that best allows the strategy to be adapted to the chosen objective: in energy-oriented mode, it facilitates maximizing internal use of photovoltaic generation and reducing grid imports; in economic mode, it expands the opportunities for arbitration between purchase and sale and for flexible scheduling of pumping operations. Moreover, in the evaluated cases, system operation remains compatible with irrigation service requirements (no irrigation deficit), reinforcing its practical applicability.
Overall, the results indicate that the choice of alternative should not be based on a single key performance indicator, but rather on the primary decision criterion. If the priority is to maximize self-sufficiency and reduce grid dependence (kWh), the best performance is achieved with Scenario 3 (scaled PV + battery + reservoir), as it combines electrical and hydraulic flexibility and enables more effective load shifting and surplus utilization than either storage option alone. Conversely, if the priority is to minimize net cost (€), the results in this case favour Scenario 2 (scaled PV + reservoir), which achieves a more competitive economic balance by exploiting pumping flexibility and maintaining an economically advantageous surplus export and compensation strategy. This outcome can be attributed to three converging mechanisms: the hydraulic reservoir stores energy directly in the physical domain of the primary load, requiring only a single electro-hydraulic conversion, whereas the battery pathway introduces an additional electrochemical stage whose round-trip efficiency (charge efficiency × discharge efficiency ≈ 0.81) imposes a thermodynamic penalty on every unit of energy routed through it; the temporal flexibility of the reservoir is already sufficient to fully decouple PV generation from irrigation scheduling for this load profile, rendering the additional electrical buffering of the battery operationally redundant; and since Scenario 2 already achieves near-zero grid dependence, the battery cannot generate value through price arbitrage, instead diverting PV surplus that could otherwise be sold at spot price into deferred internal use with no net cost benefit. These results are configuration-specific: higher non-irrigation electrical loads, greater price volatility, or larger battery-to-reservoir capacity ratios could shift the performance ordering in favour of hybrid storage. While Scenario 3 continues to offer very robust operation, it does not necessarily improve the economic optimum relative to the reservoir-only configuration when surplus compensation and the price structure already render that strategy profitable.
It should be noted that the economic results presented here depend on the regulatory framework in force at the time of the study, specifically a compensation scheme under which surplus photovoltaic energy exported to the grid generates economic benefits. Changes in surplus compensation rates, tariff design, or grid access conditions could significantly alter the relative economic attractiveness of the scenarios analyzed. Under a regulatory framework where surplus compensation is reduced or unavailable, the battery storage scenario would become considerably more competitive, as retaining excess generation for subsequent self-consumption would generate greater savings than exporting it to the grid. Exploring the sensitivity of the results to alternative regulatory assumptions represents a relevant avenue for future research.
The following figures (
Figure 18,
Figure 19 and
Figure 20) present a comparative overview of the system performance indicators under the different operating strategies considered in this study. Specifically, the figures summarize the results for the percentage of self-sufficiency, the percentage of self-consumption and the net cost across the baseline and the optimized scenarios.
When CAPEX is included for the two storage alternatives, the low net cost saving of the battery option turns it economically unattractive, despite the reduction in energy net imports. However, natural storage provides promising results with payback periods around 8 years for the accumulation tank. The combination of both solutions in Scenario 3 doubles the payback period due to the minimum impact of the batteries on the net cost savings.
The volatility of current electricity prices is heavily affected by the large availability of low-cost PV renewable energy at mid-day in opposition to high-cost, gas-driven energy generation hours. The average wholesale market energy price captured by PV from March 2024 to May 2026 in Spain is close to 42 €/MWh and can vary between −12.8 and 96.8 €/MWh in the monthly average. Three scenarios of electricity price levels (high, medium or default and low) have been simulated for the grid energy minimization mode (avoiding energy surplus to the grid and storing this surplus). In this optimization mode and with the variability of prices considered, the revenues vary around ±20% in the high- and low-price scenarios. In terms of CAPEX payback, the high-price scenario yields paybacks 16% shorter for the natural storage option (6.3 years) whereas the low-price scenario is 25% higher (9.4 years).
6. Conclusions
In conclusion, the comparative analysis confirms that the optimal strategy depends on the operational objective considered. When the criterion is the reduction in energy imported from the grid, the combined integration of a battery and a water reservoir provides the highest adaptive capacity and the most effective utilization of photovoltaic generation, by jointly enabling temporal energy shifting and hydraulic flexibility to meet irrigation demand with reduced external dependence. By contrast, when the objective is net cost minimization, system operation tends to preserve the economic value of surplus generation and to select energy-shifting actions that are most profitable under the prevailing price signals and surplus compensation scheme. Under these conditions, solutions based on hydraulic storage alone, even without a battery, may deliver more favourable economic performance.
From a practical standpoint, the results demonstrate that the incorporation of storage significantly improves the controllability of photovoltaic-powered irrigation systems and allows the grid interaction profile to be adapted to both operational and economic constraints. The analysis also highlights that designs focused exclusively on minimizing grid energy imports may increase net operating costs by replacing compensation revenues with higher levels of self-consumption, whereas economically oriented optimization prioritizes the interplay between hourly electricity prices, pumping capacity, and surplus export opportunities. Consequently, the final system configuration should be explicitly aligned with the project’s primary objective, energy autonomy or cost minimization, and with the prevailing regulatory framework for surplus compensation, as these conditions ultimately determine the relative value of exporting energy surplus versus capturing it through storage.
Finally, the adopted optimization framework based on a mixed integer linear programming formulation, reinforced through a conditional value at risk criterion and implemented through model predictive control, provides a rigorous and operationally implementable basis for decision-making in this application. The mixed integer formulation is consistent with the hybrid nature of the system, where continuous dynamics such as state of charge and reservoir volume coexist with discrete operational decisions and mutually exclusive actions, while also enforcing physical and service constraints such as power limits and irrigation feasibility. This structure yields solutions that are feasible by construction and optimal within the modelled assumptions, avoiding the need for ad hoc rules and reducing the risk of constraint violations that may arise with purely heuristic scheduling. The inclusion of conditional value at risk explicitly addresses photovoltaic uncertainty by penalizing adverse operations beyond average performance, thereby improving the robustness of the operating strategy when forecasts are imperfect. The model predictive control implementation further strengthens practical applicability by enabling repeated re-optimization with updated measurements and predictions, reducing dependence on highly accurate forecasting and ensuring that the strategy remains consistent as real conditions evolve. Taken together, these elements support the suitability of the proposed approach for constrained tariff-driven operation, where non-intuitive trade-offs between self-consumption, grid imports, and surplus compensation require an optimization method that is both transparent and reliable.
The optimal investment decision is the natural storage option with a simple payback period of 8.2 years, whereas the battery investment is not economically feasible due to low net cost savings.