Next Article in Journal
Blind Dynamic Quantization-Based DWT-QIM Image Steganography Using Block Complexity Analysis
Previous Article in Journal
Machine Learning Inversion of Runway Base-Course Parameters Using Multi-Domain Vibration Features Under Moving Aircraft Loads
Previous Article in Special Issue
Adaptive Fractional Gradient Descent for Robust Deep Learning Optimization in Agricultural Pest Classification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Artificial Intelligence-Based Optimal Energy and Water Management System in Agrivoltaics

1
Department of Computer Engineering, Faculty of Engineering, Trakya University, 22030 Edirne, Türkiye
2
Department of Electrical and Electronics Engineering, Faculty of Engineering, Trakya University, 22030 Edirne, Türkiye
3
Department of Electrical and Electronics Engineering, Graduate School of Natural and Applied Sciences, Trakya University, 22030 Edirne, Türkiye
4
Edirne Vocational College of Technical Sciences, Trakya University, 22030 Edirne, Türkiye
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(18), 8982; https://doi.org/10.3390/app16188982
Submission received: 9 August 2026 / Revised: 4 September 2026 / Accepted: 7 September 2026 / Published: 10 September 2026
(This article belongs to the Special Issue Sustainable and Smart Agriculture)

Abstract

Agrivoltaic systems can improve renewable energy generation, water management, and agricultural productivity. This study proposes an artificial intelligence-assisted energy and water management framework integrating photovoltaic (PV) generation, battery energy storage systems, groundwater-fed irrigation, water storage, bidirectional grid interaction, and electric vehicle charging. The framework consists of two stages: day-ahead PV forecasting using a Bayesian optimization-based long short-term memory model, followed by mixed-integer linear programming for daily operating cost minimization under electrical, hydraulic, battery, soil-moisture, water-storage, and grid constraints. Agrivoltaic microclimate-related influences on evapotranspiration and precipitation transmission are represented in the soil moisture dynamics through literature-based coefficients. Six forecasting model families are evaluated in 21 configurations over 316 daily forecast origins. The selected model achieves a mean absolute error of 0.268 MW, equal to 4.37% of plant capacity, a weighted mean absolute percentage error of 14.5%, and R2 = 0.915, reducing persistence baseline error by 42.0%. Applied to a five-decare tomato-based system in Antalya, Türkiye, under eight operating scenarios, the framework achieves a minimum daily operating cost of EUR −31.321. It also maintains soil-water and storage tank levels within prescribed limits and provides up to 300 kW continuous grid support under emergency conditions while satisfying local agricultural and electrical demands.

1. Introduction

1.1. Motivation

The increasing demand for renewable energy and agricultural production has intensified competition for land resources, making the efficient utilization of available land a critical challenge [1]. Agrivoltaic systems, which combine photovoltaic (PV) electricity generation with agricultural activities on the same land, have emerged as an effective solution for simultaneously addressing food and energy production [2]. In addition to improving land-use efficiency, the partial shading provided by PV modules can reduce evapotranspiration, improve soil moisture retention, and lower irrigation requirements under suitable climatic conditions [3]. However, realizing these benefits requires the coordinated operation of multiple interconnected subsystems, including PV generation, battery energy storage systems (BESSs), irrigation systems, groundwater pumping, water-storage tanks, utility grid interaction, and increasingly, electric vehicle (EV) charging infrastructure.
The operation of agrivoltaic systems is inherently challenging because PV generation is highly intermittent and irrigation demand varies according to crop-water requirements [4]. Energy generated by the PV system must be optimally allocated among battery charging, irrigation pumping, EV charging, local loads, and electricity trading while maintaining adequate soil moisture for sustainable crop growth. Furthermore, the temporal mismatch between peak solar generation and electricity or irrigation demand necessitates intelligent scheduling strategies capable of simultaneously considering technical, agricultural, and economic constraints.
Accurate short-term PV power forecasting plays an important role in improving operational scheduling. Recent advances in deep learning have demonstrated that long short-term memory (LSTM) networks can effectively model the nonlinear and temporal characteristics of PV generation [5]. Nevertheless, the forecasting performance of LSTM models strongly depends on the selection of hyperparameters, motivating the use of Bayesian optimization to automatically identify high-performing model configurations [6].
Existing agrivoltaic studies have primarily focused on system design, techno-economic assessment, crop performance, and component sizing. However, the coordinated short-term operational scheduling of agrivoltaic systems considering PV generation, BESS operation, groundwater pumping, irrigation scheduling, soil-moisture dynamics, bidirectional grid interaction, and EV charging within a unified optimization framework has received limited attention. Furthermore, the integration of artificial intelligence-based PV forecasting with optimization-based energy and water management remains an underexplored research area. Motivated by these research gaps, this paper proposes an artificial intelligence-assisted framework for optimal energy and water management in agrivoltaic systems.

1.2. Literature Survey

A substantial part of the agrivoltaic literature has focused on system geometry, crop–light interactions, design optimization, and isolated predictive methods, rather than forecast-driven short-term operation. Mazzeo et al. [7] showed that ground coverage ratio, clearance height, and tracking strongly affect irradiance distribution, crop yield, and PV output, while Apriani et al. [8] demonstrated that semi-transparent PV layouts can improve light uniformity without materially reducing bok choy growth. At the planning level, Kumdokrub and You [9] optimized land allocation by balancing irrigation-related revenue, PV generation, and emissions, whereas Giri et al. [10] used an ANN-GA framework to optimize the dual energy-food performance of a turmeric-based agrivoltaic system. Related forecasting studies also demonstrate the value of advanced data-driven methods: Zhao et al. [11] improved precipitation nowcasting through attention-based spatial refinement and temporal-consistency regularization, and Chen et al. [12] combined adaptive decomposition, probabilistic reasoning, and graph learning for complex time-varying industrial prediction. These studies establish the value of design optimization and advanced prediction; however, the forecasting component is generally not directly coupled with agrivoltaic energy–water scheduling decisions.
A second group of studies has broadened agrivoltaic assessment toward hybrid energy systems, techno-economic performance, and microclimate effects. Kouravand et al. [13] combined mobile agrivoltaics with hydrogen production, storage, and batteries for strawberry cultivation, while Özdemir et al. [14] experimentally validated a bifacial PV-integrated greenhouse and quantified the trade-off between energy yield and crop performance. Zainali et al. [4] reviewed agrivoltaic modeling approaches and emphasized the need for integrated modeling platforms and standardized benchmarks, whereas Guarino et al. [15] developed a tailored PVlib-based model for complex bifacial tracking geometries. Sadeghi Chamazkoti et al. [16] linked agrivoltaics with electrolysis and water-use assessment, and Tomasi et al. [17] highlighted social and justice-related dimensions of agrivoltaic deployment. Lu et al. [18] integrated PV generation, vertical greening, and passive cooling at the building scale, while Senturk et al. [19] experimentally quantified the influence of PV coverage on radiation, soil moisture, temperature, and crop response. Although these works extend agrivoltaics beyond electricity production, most emphasize design, long-term feasibility, or experimental characterization rather than coordinated day-ahead control of electrical and water resources.
Sarr et al. [20] optimized panel geometry by jointly considering radiation, evapotranspiration, and maize yield, while Ji et al. [21] developed an optimal investment decision framework for agrivoltaic systems coupled with energy storage using a hybrid multi-criteria decision-making approach based on distributed linguistic trust. Asa’a et al. [22] compared nine agrivoltaic topologies using coupled irradiance and crop-growth modeling, and Gadhiya et al. [23] experimentally evaluated an elevated PV insect-net house from energy, food, and economic perspectives. Al-Amin et al. [24] demonstrated the techno-economic feasibility of a full-scale elevated agrivoltaic system, whereas Garrod et al. [25] combined PVsyst and DSSAT to evaluate regional technical and economic performance. At larger system scales, Gonocruz et al. [26] used linear programming to assess agrivoltaic deployment with transmission and battery constraints, Coşgun et al. [27] examined regional agrivoltaic potential in Türkiye, and Baker et al. [28] evaluated a large off-grid agrivoltaic–hydrogen system for FCEV refueling. These studies demonstrate increasingly integrated energy–crop assessments, but they predominantly address system design, sizing, deployment, or long-term planning, rather than short-term forecast-to-operation coordination among PV, storage, irrigation, grid exchange, and flexible loads.
Recent experimental and application-oriented studies further underline the importance of explicitly representing crop, microclimate, and operational effects. Aziznezhad et al. [29] experimentally evaluated a spectral-splitting concentrator agrivoltaic system and reported improvements in soil-moisture retention and crop quality. Jamil et al. [30] assessed vertical bifacial PV layouts across Canadian agricultural regions, while Zhang et al. [31] quantified the effect of panel height on light availability, photosynthesis, and fig yield. Zeddies et al. [32] examined public acceptance and willingness to pay for agrivoltaics, and Randle-Boggis et al. [33] demonstrated simultaneous energy, food, and water benefits in multi-site East African trials. Magadley et al. [34] quantified tracking and irradiance-loss effects in a greenhouse agrivoltaic system, Vélez et al. [35] identified GNSS limitations under overhead PV structures, and Thum et al. [36] documented long-term microclimatic and yield responses of rice under agrivoltaic shading. Hussain et al. [37] coupled agrivoltaics with battery-supported hydrogen production across contrasting climates, while Victoria et al. [38] compared vertical and south-oriented bifacial systems in terms of energy, microclimate, crop response, and public acceptance. Together, these studies provide strong evidence that agrivoltaic operation is inherently multi-domain, yet the corresponding electrical, hydraulic, agronomic, forecasting, and mobility decisions are still rarely represented within a single short-term operational framework.
Taken together, four key limitations remain in the existing literature. First, most agrivoltaic studies focus on physical design, crop response, techno-economic assessment, or long-term planning rather than forecast-driven day-ahead operation. Second, advanced forecasting methods are typically evaluated as stand-alone prediction tools and are not directly linked to downstream energy–water scheduling. Third, irrigation, root-zone soil-water dynamics, agrivoltaic microclimate effects, BESS operation, bidirectional grid exchange, and mobility-related loads are rarely co-optimized within one operational model. Fourth, the influence of production-data quality and day-ahead weather information is seldom quantified through controlled forecasting comparisons before the resulting forecast is transferred to the optimization stage. The proposed framework addresses these gaps by directly coupling systematically evaluated day-ahead PV forecasting with MILP-based scheduling of PV generation, BESS operation, grid interaction, groundwater pumping, water-storage, irrigation, crop-specific soil-water constraints with literature-based microclimate adjustments, and agricultural and personal EV charging. This enables electrical, hydraulic, agronomic, and mobility-related decisions to be jointly represented within a unified day-ahead agrivoltaic operating framework.

1.3. Contributions

The main contributions of this study are summarized as follows:
  • An integrated artificial intelligence-assisted day-ahead framework is developed in which Bayesian optimization-based PV forecasting is directly coupled with MILP-based agrivoltaic operation. The framework jointly coordinates PV generation, BESS operation, bidirectional grid-interaction, groundwater pumping, water-storage, irrigation scheduling, and crop-specific soil-water constraints with literature-based microclimate adjustments, and agricultural and personal EV charging, thereby integrating electrical, hydraulic, agronomic, and mobility-related decisions within a single operational model;
  • The forecasting stage is established through a rigorous and controlled evaluation pipeline rather than the selection of a single model a priori. Six forecasting model families are assessed in twenty-one configurations over 316 daily forecast origins, with and without archived day-ahead NWP inputs and Bayesian hyperparameter optimization, using moving-block bootstrap confidence intervals. In addition, an astronomy-based screening procedure corrects mixed time bases and identifies outages, snow-cover days, and provider-side copy fills, strengthening the credibility of the PV profile transferred to the optimization model;
  • A unified MILP energy–water management model is formulated to co-optimize electrical and irrigation decisions while enforcing BESS, grid, pump, water-tank, and physically consistent root-zone soil-water constraints. Potential agrivoltaic influences on evapotranspiration and precipitation transmission are incorporated through literature-based coefficients, providing an explicit operational linkage between crop-water conditions and energy scheduling rather than treating irrigation as an independent demand;
  • The integrated framework is evaluated for a five-decare tomato-based agrivoltaic system in Antalya, Türkiye, under eight representative operating scenarios, including high EV charging demand, grid import restrictions, limited grid-connection capacity, and emergency grid support. This scenario-based assessment demonstrates the operational implications of jointly coordinating renewable generation, storage, irrigation, mobility, and grid interaction under practically distinct conditions.
To provide a structured comparison of the reviewed studies, a taxonomy of the existing literature is presented in Table 1, considering key system components, forecasting approaches, water-related modeling features, and optimization methods.

1.4. Paper Organization

The rest of this paper is organized as follows. Section 2 presents the proposed methodology. Section 3 describes the test system and presents the simulation results and comparative analyses. Finally, Section 4 concludes the paper.

2. Proposed Structure and Mathematical Modeling

The overall architecture of the proposed artificial intelligence-assisted optimal energy and water management framework is illustrated in Figure 1. The agrivoltaic system consists of a PV array, BESS, utility grid, groundwater-fed submersible pump, water-storage tank, and drip irrigation network integrated with tomato cultivation. Day-ahead PV power forecasts are generated using a Bayesian optimization-based LSTM model and subsequently utilized by the MILP-based energy and irrigation management system to determine the optimal operating schedule. The optimization framework simultaneously coordinates power exchange with the utility grid, battery charging/discharging, groundwater pumping, water-storage management, irrigation scheduling, and EV charging while satisfying electrical, hydraulic, battery, and soil-moisture constraints. Through the coordinated management of energy and water resources, the proposed framework aims to maximize renewable energy utilization, reduce operating costs, and ensure sustainable agrivoltaic operation.

2.1. Day-Ahead PV Power Forecasting

The first stage of the framework produces the day-ahead PV generation profile that the optimization model of Section 2.2 takes as input. Because the scheduling decision is made once per day, the forecasting task is defined in the same operational terms: at 23:59 of day D, the twenty-four hourly production values of day D + 1 are predicted from the information available at that instant. Since the available historical PV generation data are recorded at an hourly resolution, the forecasting model produces 24 hourly PV power values for the following day. Each hourly forecasted value is applied to the corresponding 60 one-minute intervals of the MILP model. This approach is also consistent with the Turkish Day-Ahead Electricity Market, in which electricity trading, prices, and energy quantities are determined for hourly periods. The incorporation of higher-resolution PV measurements and minute-level forecasting will be considered in future work.

2.1.1. Forecasting Task, Data, and Quality Screening

The production record consists of measured hourly generation obtained from the Transparency Platform of Energy Exchange Istanbul (EPİAŞ) [39]. It covers 1 July 2024 to 1 July 2026 and originates from an operational grid-connected, ground-mounted plant of 6.12 MW installed capacity at approximately 37.05° N, 31.79° E and 1060 m above sea-level in the Antalya province of Türkiye. Because Türkiye observes permanent UTC + 3, the local hourly grid is uninterrupted. The export contains 15,343 rows against a complete grid of 17,544 h, with no duplicated timestamps, negative values or unparseable entries; its maximum equals the installed capacity and is used to normalize all relative error metrics.
The export mixes three time bases from day to day, a defect that conventional completeness checks cannot detect. Each day’s time base was, therefore, estimated by weighted least-squares matching of its production profile against the clear-sky irradiance curve of the site [40] over candidate shifts of ±1.5 h, with production recorded while the sun is below the horizon overriding the fit, and misaligned days were re-stamped. After correction, clear-day production correlates best with the clear-sky curve at zero lag in all 25 months of the record, against seven months previously preferring −1 h, and none of the 122 physically impossible hours survives. The days for which the time base could not be resolved are retained as model inputs but excluded from training targets and evaluation.
The remaining screening completes the hourly grid and classifies whole days. Trailing evening hours dropped by the export once production had fallen to zero were filled with zero where a fourteen-day same-hour median confirmed night, isolated one- to two-hour gaps were linearly interpolated, and 29 fully missing days were left empty. Cross-checking against the ERA5 reanalysis [41] identified seventeen unrecorded outages, days of zero production against up to 8.7 kWh/m2 of daily irradiance and no snow, and one exact copy of the preceding day; seven winter days with at least one centimeter of reanalysis snow depth were retained, because snow is weather that a forecasting system should, in principle, anticipate. Of the 731 days, 581 are classed normal, 7 as snow-cover days, and 96 as time-uncertain; the remaining 47 are the missing, outage, and duplicate days described above. Anomalous days remain visible to the models as inputs but are never used as training targets and never scored; all metrics reported in this paper are computed on the resulting evaluation mask. This matters because copied days and back-to-back outage zeros would award persistence an error of exactly zero and distort the reference against which all forecast skill is measured.

2.1.2. Input Features and Day-Ahead Weather Forecasts

All weather-informed configurations use the previous-runs archive of the Open-Meteo service [42], which stores, for every hour, the value that the operational weather model predicted for that hour approximately one day earlier. This reproduces the information available at the 23:59 origin and trains the models on inputs having the same error characteristics as those they meet in operation. Nine hourly variables are used: global horizontal, direct normal and diffuse irradiance, total cloud cover, air temperature at two meters, wind speed at ten meters, relative humidity, precipitation, and snowfall. Verified against realized ERA5 irradiance over the evaluation year, this source achieves a daylight mean absolute error of 42 W/m2 with a correlation of 0.97; its grid cell lies about two kilometers from the site at nearly identical elevation. ERA5 data are used only for the day-level screening above, never as a model input.
Solar geometry is treated separately from weather because it is deterministic. The solar elevation angle, the cosine of the solar zenith angle, the clear-sky irradiance and sine–cosine encodings of hour and day of year, all evaluated at mid-hour, are supplied to every model, including the configurations without weather input. The with/without-weather comparison, therefore, isolates the value of the nine NWP variables alone.

2.1.3. Bayesian Hyperparameter Optimization-Based Sequence-to-Sequence LSTM

The forecasting model is a sequence-to-sequence network built from long short-term memory cells [43]. An encoder LSTM reads the most recent H hours of history, each hour described by the normalized production, seven deterministic solar-geometry channels and, in the weather-informed variant, the nine standardized NWP variables, giving seventeen input channels or eight without weather. Its final hidden and cell states initialize a decoder LSTM, driven by the sixteen known covariate channels of each of the twenty-four target hours and mapped to a production value by a per-step linear layer. The decoder is never fed its own predictions; thus, the full day is produced in a single structured pass, and no error accumulates along the horizon.
Training minimizes a masked regression loss in which hours without a valid target (missing, anomalous or time-uncertain are excluded so that the screening of Section 2.1.1 propagates directly into the objective). Optimization uses AdamW with gradient-norm clipping at 1.0 and early stopping on the last sixty days of the training slice. Because a single year yields only about 360 daily examples, training windows are additionally sampled at sub-daily strides, while operational forecasts are always issued from the 23:00 position. Production is normalized by plant capacity and the NWP variables standardized using training-slice statistics only; the network is refitted quarterly on an expanding window under fixed random seeds.
The hyperparameters were selected by Bayesian optimization using the tree-structured Parzen estimator implemented in Optuna [44], with forty trials per network variant and fifty for the gradient-boosted baseline, each run to completion without pruning. Model selection used a deliberately seasonal validation design, because with only a single year preceding the evaluation year, any single window is seasonally incomplete, and the settings selected on it risk encoding that season’s peculiarities. Each candidate was, therefore, scored on two disjoint windows: 15 October to 30 November 2024—whose target hours were removed from all training—and 1 May to 29 June 2025, and ranked by the mean of the two window mean absolute errors. The selected settings were frozen before the evaluation year began and never revisited. Table 2 lists the search spaces and the selected values.

2.1.4. Benchmark Models, Evaluation Protocol, and Metrics

Five further model families were implemented as benchmarks, all sharing the same information set, post-processing, and evaluation mask, so that the comparison isolates the learning algorithm. Persistence predicts that tomorrow repeats today and defines the skill score. A seasonal autoregressive integrated moving-average model with period twenty-four is refitted at every origin on a sliding twenty-eight-day window; its SARIMAX variant adds global irradiance, cloud cover, and temperature from the day-ahead forecasts as exogenous regressors [45]. A gradient-boosted regressor [46] predicts each target hour from features known at the origin (production at the same hour one, two, and seven days earlier, the same-hour weekly mean, aggregate descriptors of day D, clear-sky indices, and the solar geometry of the target hour) refitted monthly on an expanding window. A convolutional–recurrent network places two one-dimensional convolutional layers with pooling ahead of the recurrent summarizer [47,48]; a temporal convolutional network replaces recurrence by dilated causal convolutions with residual connections [49]. Every model is post-processed identically: forecasts are clipped to between zero and 110% of capacity and set to zero when the clear-sky model places the sun below the horizon.
Forecast origins run from 30 June 2025 to 29 June 2026, so that the targets cover a complete year, 1 July 2025 to 30 June 2026; origins adjacent to fully missing days are skipped, leaving 316 evaluated origins and 5204 scored hours. Every forecast is produced by a model trained on at least twelve months of corrected history; all data access is mediated by a single backtesting engine that reconstructs, for each origin, exactly the information set defined above. The absence of information leakage was verified mechanically: replacing all production and weather values after the origin with arbitrary data leaves every forecast unchanged.
The primary metric is the mean absolute error (MAE) in megawatts, accompanied by the root-mean-square error (RMSE); both are also reported as a percentage of the 6.12 MW capacity (nMAE, nRMSE). The mean absolute percentage error (MAPE) is reported only over hours with production above five percent of capacity, because percentage errors are undefined at zero production, whereas the weighted MAPE (WMAPE) uses all masked hours. The coefficient of determination (R2) and the forecast skill, one minus the ratio of a model’s MAE to that of persistence, complete the set. Uncertainty is quantified with a moving-block bootstrap resampling whole days in blocks of seven, one thousand times, which yields 95% confidence intervals for each MAE and for paired differences on identical days; a difference is significant when its interval excludes zero. The pipeline is implemented in Python 3.12 using PyTorch 2.8.0.

2.2. Energy and Water Management Model

The objective function presented in Equation (1) represents the total operational cost of the system throughout the planning horizon. Here, p r i c e t b u y   denotes the unit electricity price purchased from the power grid at time t , while P t g r i d i m p o r t is the imported grid power. Similarly, p r i c e t s e l l and P t g r i d e x p o r t indicate the selling price and exported power to the grid at time t , respectively. The term Δ T represents the time resolution. This cost function aims to minimize the cost incurred by energy purchase while maximally utilizing revenue from power selling:
T o t a l   c o s t = t ( p r i c e t b u y P t g r i d i m p o r t Δ T p r i c e t s e l l P t g r i d e x p o r t Δ T )
The system power balance is enforced in Equation (2), ensuring that, at each time step t , the sum of PV generation P t P V , discharged battery power P t d i s c h b a t , and imported grid power equals the total power consumption, which includes battery charging power P t c h a r g e b a t , pump power P t p u m p , electric vehicle demand P t E V , and exported grid power. This guarantees energy conservation within the system:
P t P V + P t d i s c h b a t + P t g r i d i m p o r t = P t c h a r g e b a t + P t p u m p + P t E V + P t g r i d e x p o r t + P t c u r t a i l m e n t ,     t
P t c u r t a i l m e n t denotes the curtailed PV power due to the grid connection capacity limit, representing the portion of available PV generation that cannot be utilized or exported because of the maximum allowable grid transfer capacity. Electricity import and export cannot occur simultaneously; therefore, Equations (3) and (4) introduce the binary grid status variable u t g r i d , where u t g r i d = 1 permits grid import and u t g r i d = 0 allows only grid export. Here, N denotes a sufficiently large constant to enforce the big-M constraint structure:
P t g r i d i m p o r t u t g r i d N ,     t
P t g r i d e x p o r t ( 1 u t g r i d ) N ,     t
Hydraulic power generation of the submersible pump is expressed in Equation (5). The groundwater flow rate Q t g is expressed in m3/min and is, therefore, converted to m3/s by dividing by 60, while the resulting hydraulic power is converted from W to kW by dividing by 1000. Accordingly, no scheduling time-step term is required in the hydraulic power equation. The water pumping power is then calculated in Equation (6) by incorporating pump efficiency ϕ p u m p , linking hydraulic power to electrical power consumption. Operational boundaries are defined by P p u m p m i n (minimum power limit) and P p u m p m a x (maximum power limit) in Equation (7), ensuring that the pump operates within allowable limits. The extracted flow rate Q t g is also equated to the tank inflow Q t t a n k in Equation (8), reflecting that all pumped water is directed to the water tank. The binary variable u t p u m p indicates the operating status of the pump, taking a value of 1 when the pump is operating and 0 otherwise:
P t h y d r o = ρ ω g g a v H t d h 1000 Q t g 60 ,     t
P t p u m p = P t h y d r o / φ p u m p ,     t
P p u m p m i n u t p u m p P t p u m p P p u m p m a x u t p u m p ,     t
Q t g = Q t t a n k ,     t
The soil-water balance formulation was adapted from the irrigation water-balance approach reported by Elnozahy et al. [50] and revised to provide a physically consistent representation of root-zone soil-water storage. The root-zone soil-water balance at each scheduling interval is expressed as:
M t s o i l = M t 1 s o i l + Q t t a n k i r r i g a t i o n Δ T + α r a i n P t p r e A 1000 α E T E T c , t A 1000 I n f t Δ T
where M t s o i l is the root-zone soil-water storage at time t (m3); Q t t a n k i r r i g a t i o n is the irrigation flow rate supplied from the water-storage tank (m3/min); ΔT is the scheduling interval (min); αrain is the dimensionless precipitation transmission coefficient representing the fraction of rainfall reaching the cultivated soil beneath the agrivoltaic array; P t p r e is the precipitation depth accumulated during interval t (mm); α E T is the dimensionless evapotranspiration adjustment factor representing the potential influence of agrivoltaic shading; E T c , t is the crop evapotranspiration depth during interval t (mm); A is the cultivated area (m2); and I n f t is the infiltration/deep-percolation loss rate (m3/min). The irrigation and infiltration flow-rate terms are converted to interval water volumes by multiplication with ΔT, whereas precipitation and evapotranspiration depths are converted to water volumes using A/1000. Therefore, all terms in Equation (9) are consistently expressed in m3. I n f t is assumed to be zero.
The root-zone soil-water storage is constrained between the water-storage volumes corresponding to the permanent wilting point and field capacity:
W w p M t s o i l W f c
Field capacity and permanent wilting point are defined using soil-specific volumetric water contents together with the effective root-zone depth and cultivated area. The root-zone water-storage volume at field capacity is calculated as:
W f c = θ f c Z r A
and the corresponding root-zone water-storage volume at the permanent wilting point is:
W w p = θ w p Z r A
where Wfc and Wwp are the root-zone soil-water storage volumes at field capacity and permanent wilting point (m3), respectively; θfc and θwp are the soil-specific volumetric water contents at field capacity and permanent wilting point (m3/m3), respectively; Zr is the effective root-zone depth (m); and A is the cultivated area (m2). In the absence of site-specific soil-water retention measurements for the considered field, a representative silty-clay–loam soil is adopted based on an experimental tomato study conducted in Antalya, Türkiye. Accordingly, the volumetric water contents at field capacity and permanent wilting point are taken as θfc = 0.31 m3/m3 and θwp = 0.14 m3/m3, respectively. For tomato cultivation, an effective root-zone depth of Zr = 0.70 m is adopted based on the rooting-depth range reported in FAO-56 [51]. For the cultivated area of A = 5000 m2, these parameters result in W f c = 1085 m3 and W w p = 490 m3. Since volumetric water content is dimensionless, Equations (11) and (12) directly provide corresponding root-zone water-storage limits in m3.
The water-storage dynamics of the water tank are modeled in Equation (13), where the tank volume V o l t t a n k evolves based on inflow Q t t a n k and irrigation outflow Q t t a n k i r r i g a t i o n . The tank volume is constrained within minimum V o l t a n k m i n and maximum capacity V o l t a n k m a x limits in Equation (14), and the irrigation discharge rate is restricted by the upper limit Q t a n k i r r i g a t i o n m a x in Equation (15):
V o l t t a n k = V o l t 1 t a n k + Q t t a n k Δ T Q t t a n k i r r i g a t i o n Δ T ,     t
V o l t a n k m i n V o l t t a n k V o l t a n k m a x ,     t
Q t t a n k i r r i g a t i o n Q t a n k i r r i g a t i o n m a x ,     t
Battery behavior is described in Equation (16), where the state of energy S o E t b a t updates based on the charging and discharging power. During charging, the effective charging power is multiplied by the battery charge efficiency ϕ b a t c h a r g e , whereas during discharging, the delivered power is divided by the discharge efficiency ϕ b a t d i s c h to account for conversion losses. The operating limits of the battery are ensured by Equation (17) through minimum S o E b a t m i n and maximum state of energy S o E b a t m a x boundaries. Finally, Equations (18) and (19) apply a binary control u t b a t to prevent simultaneous charging and discharging, using the big-M constant N to linearize the operational condition:
S o E t b a t = S o E t 1 b a t + P t c h a r g e b a t Δ T φ b a t c h a r g e P t d i s c h b a t Δ T φ b a t d i s c h ,     t
S o E b a t m i n S o E t b a t S o E b a t m a x ,     t
P t c h a r g e b a t u t b a t N ,     t
P t d i s c h b a t ( 1 u t b a t ) N ,     t

3. Test and Results

3.1. The System and Simulation Setup

The proposed optimization framework was evaluated for an agrivoltaic system assumed to be located in Antalya, Türkiye. To evaluate the proposed energy management strategy under realistic operating conditions, a representative one-day operating horizon corresponding to 20 April 2026, was selected for the case study. The optimization was performed over a 24 h scheduling horizon with a 1 min temporal resolution, resulting in 1440 optimization intervals. The MILP consists of 31,676 constraints and 23,041 decision variables, including 4320 discrete variables. The model was solved using CPLEX on a computer equipped with an Intel(R) Core(TM) i7-1065G7 processor and 32 GB RAM, using eight threads. Despite the 1 min temporal resolution, the nominal case was solved in only 1.56 s. CPLEX terminated with a proven optimal solution and reported a final optimality gap of 0.00%, demonstrating that exact optimality could be achieved within a very short computational time for the proposed model. The agricultural field covers an area of five decares (5000 m2) and integrates PV energy generation with agricultural production to improve both renewable energy utilization and irrigation efficiency. The agrivoltaic system consists of a PV system, a groundwater-fed irrigation system, a water-storage tank, a BESS, bidirectional grid connection, and EV charging infrastructure for agricultural vehicles and personal transportation. The proposed optimization simultaneously coordinates the operation of these components to minimize the daily operating cost while satisfying irrigation requirements, battery constraints, water-storage limitations, and electrical power balance.
The irrigation infrastructure employs a 5 kW submersible groundwater pump. The pump operates within a power range of 1.5–5 kW. The hydraulic model assumes a groundwater pumping head of 90 m, a pump efficiency of 65%, a water density of 1000 kg/m3, and a gravitational acceleration of 9.81 m/s2. Pumped groundwater is directly transferred into a 200 m3 water-storage tank. The initial water-storage level is set to 100 m3, while the final water-storage level is constrained to be no lower than 100 m3. Furthermore, the maximum irrigation flow supplied from the storage tank is limited to 0.25 m3 min−1. The BESS has a nominal capacity of 250 kWh, with minimum and maximum state-of-energy limits of 50 kWh and 250 kWh, respectively. To ensure an adequate terminal energy reserve, the initial SOE is fixed at 150 kWh, while the final SOE is constrained to be at least 150 kWh. The charging and discharging efficiencies of the battery are assumed to be 95%, while simultaneous charging and discharging are prohibited through the binary decision variable.
The electricity market prices, obtained from the Turkish Energy Exchange (EPİAŞ) Day-Ahead Electricity Market [39], correspond to the representative operating day (20 April 2026), as presented in Figure 2. Since the scheduling is performed after the clearing of the day-ahead market, the day-ahead electricity prices are assumed to be known and are directly incorporated into the optimization model, whereas PV generation is forecasted. Additionally, no rainfall occurred on the representative operating day. In this study, the electricity purchase and selling prices are assumed to be equal to the corresponding hourly day-ahead market price.
The PV power generation profile for the selected representative operating day is presented in Figure 3. The PV generation data were obtained by applying the proposed forecasting approach to historical power generation records from the Serra Solar Power Plant, which were acquired from EPİAŞ [39]. The production record and the archived day-ahead weather forecasts originate from the Antalya site of the reference plant; the scaled profile is transferred to the Antalya case study without a site-to-site irradiance correction. The resulting forecasted PV generation profile was subsequently used as the input to the proposed energy management optimization model. To represent potential agrivoltaic microclimate-related effects in a simplified manner, literature-based coefficients are adopted in the soil-water balance. Specifically, the precipitation transmission coefficient is set to 0.50 [52], while the evapotranspiration adjustment factor is set to 0.70 [53]. These coefficients are treated as literature-based scenario assumptions rather than site-specific functions of PV coverage ratio, array geometry, crop type, or local climatic conditions.
The crop-water requirement was estimated based on crop evapotranspiration, using a crop coefficient of 1.52 for the considered tomato cultivation period. The calculated minute-resolution crop actual evapotranspiration values are presented in Figure 4. A five-decare agrivoltaic tomato field comprising approximately 55,600 plants, with an effective cultivation area of 0.09 m2 per plant, is considered. Based on the calculated Ec values presented in Figure 4, the irrigation-water requirement was determined throughout the optimization horizon. Furthermore, the soil-moisture content was constrained to remain between the wilting point and the field capacity to ensure adequate water availability and sustainable irrigation management under varying environmental conditions.
It is assumed that the agrivoltaic system includes two EVs: a personal EV owned by the farm owner and an EV used for agricultural operations. The charging demand profiles of these vehicles throughout the day are presented in Figure 5. The personal EV is charged using an 11 kW AC charger, whereas the agricultural utility vehicle is charged using an 80 kW DC fast charger.

3.2. PV Forecasting Results

Table 3 reports the evaluation-year metrics of all twenty-one configurations, ordered by mean absolute error. Among the evaluated configurations, the Bayesian optimization-based sequence-to-sequence LSTM with day-ahead weather input yields the lowest point-estimate MAE of 0.268 MW (95% confidence interval 0.215–0.315), equal to 4.37% of plant capacity, with an R2 of 0.915 and a skill of 42.0% relative to persistence. The tuned gradient-boosted trees with weather input follow at 0.289 MW. The difference between the tuned LSTM and tuned LightGBM was not statistically significant according to the paired moving-block bootstrap analysis. Therefore, the sequence-to-sequence LSTM was adopted not on the basis of statistically significant superiority, but because it produces the complete twenty-four-hour profile in a single structured pass, matching the scheduling horizon of the optimization model. More importantly, every weather-informed configuration, except the mistuned SARIMAX, surpasses the persistence baseline (0.462 MW), whereas the best configuration without weather input reduces the persistence error by no more than 13%.
Adding the archived day-ahead forecast variables produces a statistically significant improvement in eight of the ten paired comparisons, covering every model family; the two exceptions both involve configurations that hyperparameter tuning itself degraded. Among the statistically significant comparisons, the paired weather-minus-no-weather differences range from −0.082 MW for the default statistical model to −0.160 MW for the default gradient-boosted trees, with the corresponding confidence intervals lying entirely below zero. These improvements are of the same order as, or larger than, the spread between model families at equal input. Production lags and clear-sky geometry describe the recent cloud regime, which persistence exploits equally well, whereas anticipating a change in the weather requires a weather forecast. For a system operator, this ordering is directly actionable: securing a reliable day-ahead NWP feed matters more than the choice of learning algorithm.
Bayesian hyperparameter optimization produced statistically significant gains in five of the ten tunable comparisons. The largest improvement is observed for the selected weather-informed LSTM configuration: tuning reduced its MAE by 0.072 MW (interval −0.101 to −0.047), from 0.340 MW to 0.268 MW. The weather-informed gradient-boosted trees and convolutional–recurrent network improved significantly, as well (−0.028 and −0.030 MW), as did two weather-free configurations, the gradient-boosted trees and the temporal convolutional network (−0.037 and −0.064 MW), while the weather-free recurrent architectures changed insignificantly. Even the best-tuned weather-free configuration has an MAE that is 0.136 MW higher than that of the selected weather-informed LSTM configuration, indicating that tuning narrows, but does not close, the performance gap associated with the absence of day-ahead weather information. Two configurations degraded. The selected SARIMAX orders worsen the model by 0.118 MW, indicating that orders winning on two validation windows can still be numerically fragile when refitted at 316 successive origins, which argues for conservative default orders under per-origin refitting. The tuned temporal convolutional network lost 0.018 MW, not significantly, because the search selected a four-level architecture whose 61 h receptive field covers barely a third of its 168 h input window; such structural requirements are better imposed as hard constraints of the search space than left for the validation to discover.
Table 4 and Figure 6 break the evaluation year into meteorological seasons. The weather-informed learning models outperform persistence in every season; only the SARIMAX and TCN defaults fall marginally behind it in summer, by 9% and 4%. Persistence is most competitive in summer, where consecutive clear days resemble one another (0.268 MW), but even there, the tuned LSTM is one third more accurate (0.180 MW). Absolute errors peak in winter, yet the relative gains are largest exactly there: the tuned LSTM halves the persistence error in winter (0.354 against 0.697 MW) and reduces it by 47% in autumn. The forecast, therefore, adds the most value in the seasons for which the operating schedule is hardest to determine.
Figure 7 shows the mean absolute error by hour of day. All models err most around midday, where absolute production is largest and the midday hours decide the annual ranking: averaged over 10:00–14:00, persistence errs by 1.10 MW against 0.63 MW for the tuned gradient-boosted trees and 0.56 MW for the tuned LSTM, whereas on the morning ramp between 07:00 and 09:00, the learned models lie close together at 0.33–0.40 MW. For the optimization model, this profile is directly actionable: reserves held against forecast error should vary by hour and peak around midday rather than being sized uniformly over the scheduling horizon.
Finally, Figure 8 verifies the forecast actually used by the optimization model. On 20 April 2026—the representative operating day—the day-ahead forecast of the tuned LSTM tracks the measured production almost exactly, with a mean absolute error of 0.062 MW, that is 1.0% of plant capacity, an RMSE of 0.099 MW, and an R2 of 0.998. The forecast daily energy of 49.13 MWh differs from the measured 49.69 MWh by 1.1%. The remaining weather-informed models follow between 0.176 and 0.601 MW, whereas persistence errs by 1.238 MW: the operating day was a clear day preceded by two overcast ones, which produced 21.0 and 27.1 MWh against 49.7 MWh. Thus, copying the previous day misses the transition entirely and the day-ahead forecast attains a skill of 95.0% on this day. The preceding day is also one of those in which the time base could not be resolved; therefore, part of the persistence error here reflects that residual uncertainty rather than the weather alone. The scheduling results below are, therefore, obtained with a PV input in which the deviation from the realized generation is small relative to the operating margins of the battery and the irrigation system; a formal treatment of forecast uncertainty inside the optimization model is left to future work.

3.3. Energy and Water Management Results

To comprehensively evaluate the proposed framework, eight case studies were conducted under different system configurations and operating conditions, as summarized below:
  • Case 1 (Proposed System): The proposed agrivoltaic system operates under the nominal configuration with all system components enabled;
  • Case 2 (Without PV): The PV generation system is excluded to evaluate the contribution of RES integration;
  • Case 3 (Without BESS): The BESS is removed to investigate its impact on system operation;
  • Case 4 (Without PV and BESS): Both the photovoltaic (PV) system and the BESS are removed to evaluate the system performance under complete dependence on the utility grid;
  • Case 5 (High EV Charging Demand): The number of electric farm vehicles is increased from one to two to represent intensive agricultural operations. Each electric farm vehicle is equipped with an 80 kW DC fast charger and is charged during the designated charging windows from 11:00 to 13:00 and from 18:00 to 20:00. The personal electric vehicle is charged using an 11 kW AC charger, and its charging demand remains unchanged;
  • Case 6 (Without Grid Import): Grid power import is prohibited, while electricity export to the utility grid remains permitted. Consequently, all local electricity demand must be supplied by the PV generation and BESS, whereas surplus PV generation can still be exported to the utility grid;
  • Case 7 (Limited Grid Connection Capacity): The maximum power exchange with the utility grid is limited to 150 kW for both electricity import and export, representing practical grid connection capacity constraints;
  • Case 8 (Emergency Grid Support): Following a utility grid outage, the proposed agrivoltaic system provides up to 300 kW of emergency grid support to supply critical loads between 12:00 and 18:00. During this period, the required support power is jointly provided by the PV generation and BESS while respecting the 300 kW emergency support limit. This case demonstrates the capability of the proposed system to maintain reliable power support for critical loads and enhance grid resilience during grid outage conditions.
Table 5 summarizes the total operating cost obtained under the eight considered case studies. As expected, the proposed system (Case 1) achieves the lowest operating cost (EUR −31.321), demonstrating the effectiveness of the coordinated energy and water management framework integrating PV generation, BESS, grid interaction, and irrigation scheduling. It should be noted that negative operating costs indicate net economic profit, where revenues from electricity export exceed the total operating expenses, whereas positive values represent net operating costs. The comparison with Case 2 reveals that removing the PV system increases the operating cost by approximately EUR 24.527, from EUR−31.321 to EUR−6.794, highlighting that PV generation provides a major contribution to cost reduction by decreasing electricity purchased from the utility grid and enabling surplus electricity export. Similarly, eliminating the BESS (Case 3) increases the operating cost by EUR 14.428 to EUR−16.893, indicating that energy storage enhances operational flexibility by shifting energy among periods of different PV generation, electricity prices, and local demand. The highest operating cost is observed in Case 4 (EUR 7.678), where both the PV system and BESS are unavailable. Under this condition, the system becomes fully dependent on electricity supplied by the utility grid, demonstrating the substantial economic benefit provided by the combined integration of renewable generation and energy storage. The remaining case studies further demonstrate the operational performance of the proposed framework under different practical constraints. In Case 5, the increased EV charging demand raises the operating cost to EUR −14.316, corresponding to an increase of EUR 17.005 compared with Case 1. Although the additional charging load considerably reduces the economic benefit, the operating cost remains negative, indicating that the system can accommodate the higher EV charging demand while still maintaining a net economic profit. In Case 6, where electricity import from the utility grid is prohibited while electricity export remains permitted, the operating cost increases to EUR −26.385, representing an increase of EUR 4.936 relative to Case 1. This result demonstrates that the coordinated PV-BESS configuration can satisfy the local electricity demand without grid imports while maintaining favorable economic performance through locally generated PV energy and surplus electricity export. In Case 7, restricting the grid connection capacity to 150 kW increases the operating cost to EUR −14.936, corresponding to an increase of EUR 16.385 compared with Case 1. This deterioration is primarily associated with the reduced grid-exchange flexibility and the substantial restriction imposed on surplus PV export, which results in increased PV curtailment. Finally, Case 8 results in an operating cost of EUR −25.134, which is EUR 6.187 higher than that of Case 1. Despite the emergency grid-support requirement, the operating cost remains negative, demonstrating that the integrated PV-BESS architecture can provide emergency power support while preserving net economic profitability. Overall, the proposed artificial intelligence-assisted energy and water management framework achieves the lowest operating cost under normal operating conditions while maintaining net economic profit across all considered constrained and emergency scenarios except Case 4, in which both PV generation and BESS are unavailable.
The grid power import profiles under Case 1, Case 4, and Case 7 are presented in Figure 9. Under the proposed operating strategy (Case 1), grid electricity is imported not only to meet the local demand when PV generation and BESS discharge are insufficient, but also when grid-based battery charging is economically advantageous. Accordingly, grid imports are concentrated mainly during the early-morning period around 02:00–03:00, during several short intervals around 19:30–20:00, and again during the late-evening period after 23:00. The import power reaches the 250 kW grid-exchange limit during several early-morning and late-evening intervals, while intermittent imports of approximately 80 kW occur during the evening period around 19:30–20:00. The total daily grid import in Case 1 is 325.12 kWh. These grid purchases reflect the coordinated scheduling of grid interaction and BESS operation, particularly when grid-based battery charging is economically advantageous. In Case 4, where both the PV system and BESS are unavailable, grid electricity directly follows the instantaneous local electrical demand because no renewable generation or storage flexibility is available. Grid import begins at approximately 08:30, remains generally between 11 and 16 kW during much of the daytime period, increases to 96 kW between 11:00 and 12:00, and subsequently decreases to approximately 16 kW between 12:00 and 16:00, and 11 kW between 16:00 and 17:00. A further demand of 80 kW occurs between 19:00 and 20:00. The resulting total daily grid import is 280.01 kWh. Although this value is lower than that of Case 1, Case 4 is entirely dependent on grid-supplied electricity because both PV generation and BESS flexibility are unavailable. Therefore, the lower imported energy does not indicate superior system performance; rather, it reflects the absence of grid-to-BESS charging and electricity-arbitrage opportunities. A markedly different behavior is observed in Case 7. Although the grid-connection capacity is limited to 150 kW for both import and export, the optimization framework does not purchase any electricity from the utility grid throughout the entire scheduling horizon, resulting in a total grid import of 0 kWh. Accordingly, the Case 7 import profile remains at zero throughout the day in Figure 9. Instead, the local electrical demand is coordinated using PV generation and the BESS, while surplus electricity can still be exported to the utility grid subject to the 150 kW export limit. In fact, Case 7 exports 1746.35 kWh of electricity despite having no grid imports. This operating pattern demonstrates that the grid-capacity constraint does not necessarily require electricity purchases; rather, the optimization framework can coordinate PV generation, BESS operation, local demand, and electricity export so that the system operates without importing electricity from the utility grid while still participating in electricity sales.
The power balance of the proposed agrivoltaic system under the nominal operating condition (Case 1) is illustrated in Figure 10. During nighttime and early-morning periods, when PV generation is unavailable, the optimization framework coordinates BESS operation and grid interaction according to both local demand and electricity market conditions. The BESS is discharged during selected intervals, while grid electricity is also imported during economically favorable periods to recharge the battery. As solar generation becomes available after 06:00, PV increasingly supplies the system and reaches a maximum power of approximately 455.71 kW around midday. During the daylight period, PV generation is coordinated with local electrical consumption, BESS charging and discharging, and electricity export to the utility grid. Consequently, grid electricity purchases are largely avoided during the main solar-generation period, while substantial surplus energy is exported to the grid. The BESS plays an active role throughout the scheduling horizon by shifting energy among periods with different renewable-generation levels, electricity prices, and load conditions. In particular, it is charged not only from surplus PV generation but also from the utility grid when economically advantageous and subsequently discharged to support local demand and electricity-trading decisions. Over the entire scheduling horizon, the system imports 325.12 kWh from the utility grid and exports 4025.91 kWh. The PV system generates a total of 4028.32 kWh, while the BESS absorbs 530.21 kWh during charging and supplies 482.68 kWh through discharging. In addition, 253.50 kWh is supplied to EV charging and 26.51 kWh is consumed by the submerged irrigation pump. These results demonstrate that the proposed optimization framework effectively coordinates PV generation, BESS operation, grid transactions, and controllable electrical loads, enabling both efficient utilization of renewable energy and economically favorable energy trading while maintaining the instantaneous power balance throughout the scheduling horizon.
The power balance of the proposed agrivoltaic system under the limited grid connection scenario (Case 7) is presented in Figure 11. In this case, the maximum power exchange with the utility grid is restricted to 150 kW for both electricity import and export. Although the available PV generation reaches a maximum of approximately 455.71 kW around 11:00, the restricted export capacity substantially limits the amount of surplus renewable power that can be transferred to the utility grid. Consequently, PV curtailment occurs continuously during the main solar-generation period, approximately between 08:00 and 18:00, and reaches a maximum of approximately 291.57 kW at 12:00. Over the scheduling horizon, a total of 1983.94 kWh of available PV energy is curtailed. The optimization framework coordinates the remaining PV generation with EV charging, irrigation pumping, BESS operation, and grid export while maintaining the prescribed grid-exchange constraint. The grid restriction also noticeably modifies the operation of the BESS. During the day, the BESS absorbs part of the available energy when sufficient charging capacity is available, with charging supplied entirely from available PV generation because no grid electricity is imported in Case 7, whereas it discharges during selected periods to support the power balance and facilitate economically favorable energy exchange. The total BESS charging and discharging energies are 210.53 kWh and 192.50 kWh, respectively. During periods without PV generation, the BESS supports system demand without requiring electricity imports from the utility grid. Similarly, electricity export is capped at 150 kW during periods of surplus generation. Over the complete scheduling horizon, the system imports 0 kWh and exports 1746.35 kWh of electricity. In comparison, Case 1 exports 4025.91 kWh, meaning that the 150 kW grid-connection constraint reduces the daily exported energy by approximately 2279.56 kWh, or 56.6%. At the same time, the restricted export capability results in 1983.94 kWh of PV curtailment, clearly demonstrating the impact of grid-connection capacity on the utilization of the available renewable generation. Nevertheless, all local electrical requirements, including 253.50 kWh of EV charging and 26.51 kWh of submersible-pump consumption, are satisfied while the grid-exchange limit is maintained. These results demonstrate that the proposed optimization framework effectively coordinates PV generation, BESS operation, grid interaction, and controllable loads under a constrained grid connection, while preserving the system power balance throughout the scheduling horizon.
The daily energy flow distribution of the proposed agrivoltaic system under the nominal operating condition (Case 1) is illustrated in Figure 12. The Sankey diagram visualizes the coordinated allocation of energy among the PV system, BESS, utility grid, and local electrical loads. Over the scheduling horizon, the PV system generates a total of 4028.32 kWh, representing the dominant energy source of the agrivoltaic system. In addition, the BESS supplies 482.68 kWh through controlled discharging, while 325.12 kWh is imported from the utility grid. Consequently, the total energy supplied to the agrivoltaic system amounts to approximately 4836.13 kWh. On the demand side, 530.21 kWh is allocated to BESS charging, 253.50 kWh is consumed by EV charging, and 26.51 kWh is supplied to the submersible irrigation pump. The remaining 4025.91 kWh is exported to the utility grid. The close agreement between the total incoming and outgoing energy flows confirms the overall energy balance of the system over the scheduling horizon. The Sankey diagram also highlights the dominant contribution of PV generation and the role of the BESS in temporally shifting energy through charging and discharging, while grid import and export provide additional operational and economic flexibility. These results demonstrate that the proposed optimization framework effectively coordinates PV generation, BESS operation, grid transactions, and controllable electrical loads while maintaining the system energy balance and enabling economically favorable electricity trading.
The comparison of the BESS state-of-energy profiles under Case 1, Case 2, Case 6, and Case 8 is presented in Figure 13. In all investigated cases, the BESS state of energy remains within the prescribed operating range of 50–250 kWh and returns to the initial value of 150 kWh at the end of the scheduling horizon. Under the proposed operating strategy (Case 1), the BESS exhibits pronounced charge–discharge cycling in response to the prevailing system and market conditions. Starting from 150 kWh, the stored energy decreases to the minimum level of 50 kWh at approximately 00:55 and remains at this level until 02:00. The BESS is then rapidly charged, reaching its maximum energy level of 250 kWh at approximately 03:00 and remaining close to this limit until the morning. After a relatively small variation between approximately 06:00 and 08:00, it is discharged to 50 kWh by approximately 08:45 and remains at the minimum level until 12:00. The battery is subsequently recharged to 250 kWh by approximately 13:00 and remains fully charged until 19:00. During the evening, it is progressively discharged to 50 kWh by approximately 20:55, remains at this level until shortly after 23:00, and is finally recharged to the required terminal value of 150 kWh by the end of the day. Case 2 follows a generally similar pattern, although the BESS remains at 250 kWh for a longer period during the morning. After decreasing from 150 kWh to 50 kWh by approximately 01:00, it is recharged to 250 kWh by approximately 03:00 and remains fully charged until about 08:00. It then discharges to 50 kWh by approximately 09:00, remains at this level until noon, and is again charged to 250 kWh by approximately 13:00. The battery remains at the upper limit until 19:00, is subsequently discharged to 50 kWh by approximately 21:00, and is finally recharged to 150 kWh during the last hour of the scheduling horizon. A distinctly different operating pattern is observed in Case 6. The BESS is maintained at approximately 150 kWh throughout the nighttime period until 06:00, after which its state of energy gradually increases to approximately 230.59 kWh by 08:00. It is then discharged to the minimum level of 50 kWh by approximately 09:00 and remains at this level until 12:00. From noon onward, the battery is rapidly recharged, reaching 250 kWh by approximately 13:00 and remaining fully charged until 19:00. It is subsequently discharged only to 150 kWh by approximately 20:00 and maintained at this level for the remainder of the day. Case 8 exhibits the same nighttime behavior as Case 6, with the BESS remaining at 150 kWh until 06:00 and increasing to approximately 230.59 kWh by 08:00 before being discharged to 50 kWh by approximately 09:00. However, a clear difference emerges during the afternoon charging period. While Case 6 reaches 250 kWh by approximately 13:00, the BESS in Case 8 is charged more gradually and in a stepwise manner, increasing from 50 kWh at noon to approximately 117.77 kWh at 12:30, 150.54 kWh at 13:00, 187.36 kWh at 14:00, and approximately 245.53 kWh at 15:00, before reaching the maximum level of 250 kWh at approximately 15:48. It then remains fully charged until 19:00, after which it is discharged to 150 kWh by approximately 20:00 and maintained at this level until the end of the scheduling horizon. Overall, the comparison demonstrates that the optimization framework substantially modifies the timing and depth of BESS charging and discharging according to the operating conditions of each case, while consistently satisfying the prescribed minimum and maximum energy limits and the terminal energy requirement.
The variations in the stored soil-water volume under the proposed operating strategy (Case 1) are presented in Figure 14. The root-zone soil-water storage initially amounts to 900 m3 and gradually decreases during the nighttime and early-morning periods due to crop evapotranspiration, reaching a minimum of approximately 883.3 m3 at around 04:18. Irrigation is then activated, initially during a short period between approximately 04:19 and 04:40, and, subsequently, more intensively from approximately 06:37 to 10:05, with additional intermittent irrigation events continuing until approximately 12:47. As a result, the stored soil-water volume progressively increases and reaches a maximum of approximately 925.8 m3 at around 12:47. After the irrigation period ends, the soil-water storage gradually decreases again due to continued crop evapotranspiration, reaching approximately 900 m3 at the end of the scheduling horizon. Throughout the entire operating period, the stored soil-water volume remains well within the prescribed limits corresponding to the permanent wilting point and field capacity. These results demonstrate that the optimization framework dynamically coordinates irrigation with crop-water losses while preserving adequate root-zone water availability and satisfying the required end-of-horizon soil-water condition.
Variations in the water-storage tank volume, water inflow, and irrigation water applied under the proposed operating strategy (Case 1) are presented in Figure 15. At the beginning of the scheduling horizon, the tank contains 100 m3 of water. During the early part of the day, irrigation demand is initially supplied from the stored water reserve without groundwater pumping. Accordingly, the tank volume gradually decreases as irrigation withdrawals occur, with a more pronounced decline beginning in the morning. The first pumping event occurs at approximately 10:05, after which several intermittent water-inflow events are scheduled while irrigation withdrawals continue. The tank volume reaches its minimum value of approximately 39.22 m3 at around 10:41. From approximately 11:00 onward, the submersible pump operates continuously at a water inflow rate of about 0.221 m3/min, progressively replenishing the storage tank. Irrigation continues intermittently until approximately 12:47, while the simultaneous pumping operation gradually increases the stored water volume. After the irrigation requirement has been fully satisfied, pumping continues to restore the depleted water reserve, and the tank volume reaches 100 m3 at approximately 15:59. No further pumping or irrigation is required thereafter, and the tank remains at 100 m3 until the end of the scheduling horizon. Over the entire day, approximately 70.26 m3 of water is supplied to the tank and an approximately equal amount is withdrawn for irrigation, thereby restoring the tank to its initial volume. These results demonstrate that the optimization framework coordinates groundwater pumping, water storage, and irrigation scheduling while maintaining the prescribed tank-volume constraints and ensuring that the end-of-horizon water reserve is equal to the initial stored volume.

4. Conclusions

This paper presents an artificial intelligence-assisted optimal energy and water management framework for agrivoltaic systems by integrating Bayesian optimization-based LSTM PV power forecasting with a MILP optimization model. The forecasting stage was established by controlled comparison rather than assumed: across twenty-one configurations of six model families evaluated over a rolling year of 316 daily forecast origins, the selected sequence-to-sequence LSTM with day-ahead weather input attained a mean absolute error of 0.268 MW, equal to 4.37% of plant capacity, with an R2 of 0.915 and a 42.0% error reduction relative to a 24 h persistence baseline. That comparison further showed that day-ahead weather input and the integrity of the historical production record each matter more than the choice of learning algorithm. The proposed framework simultaneously coordinated PV generation, BESS, groundwater pumping, irrigation scheduling, water-storage management, bidirectional grid interaction, and agricultural and personal electric vehicle charging, while representing potential agrivoltaic microclimate influences on soil-water dynamics through literature-based coefficients. By jointly optimizing both energy and water resources, the proposed methodology provides a comprehensive operational strategy for next-generation agrivoltaic systems. The proposed framework was evaluated using a representative five-decare tomato-based agrivoltaic system located in Antalya, Türkiye, under eight different operating scenarios. The obtained results demonstrated that the coordinated operation of the PV system, BESS, and intelligent scheduling significantly reduced the daily operating cost while improving renewable energy utilization and operational flexibility. The proposed system achieved the lowest daily operating cost of EUR −31.321, whereas removing both the PV system and BESS increased the operating cost to EUR 7.678, highlighting the substantial economic benefits of integrating renewable generation with BESS. The optimization framework also maintained the soil-water volume and water-storage tank within their prescribed operating limits while scheduling irrigation according to crop-water requirements, coordinating agricultural and personal EV charging demands, and coordinating groundwater pumping according to irrigation and water-storage requirements. The comparative case studies further verified the robustness of the proposed methodology under practical operating conditions. The framework successfully accommodated increased EV charging demand, autonomous operation without grid electricity import, limited grid connection capacity, and emergency grid support while maintaining satisfactory economic performance. In particular, the emergency support scenario demonstrated that the integrated PV-BESS architecture can provide up to 300 kW of grid support during critical operating periods while simultaneously satisfying local agricultural and electrical demands. Furthermore, the coordinated battery scheduling effectively enhanced renewable energy utilization, energy-shifting capability, and grid-interaction flexibility under different operating constraints. The presented methodology offers an effective decision-support framework for coordinated energy and water management in agrivoltaic systems. By combining artificial intelligence-based PV forecasting with optimization-based operational scheduling, the proposed approach improves economic performance, renewable energy utilization, irrigation efficiency, electric vehicle integration, farm electrification, and system resilience. The proposed framework can, therefore, contribute to the sustainable operation of future smart agricultural energy systems while supporting the increasing integration of renewable energy resources into modern power systems. Future work will investigate uncertainty-aware optimization, the coordinated operation of multiple agrivoltaic systems, carbon-aware energy management, and the integration of hydrogen production and storage technologies to further improve the flexibility, sustainability, and resilience of agrivoltaic energy management systems.

Author Contributions

Conceptualization, O.K., B.Ş., A.Z., A.Ç. and M.T.; methodology, O.K., B.Ş., A.Z., A.Ç. and M.T.; software, O.K., B.Ş., A.Z., A.Ç. and M.T.; formal analysis, O.K., B.Ş., A.Z., A.Ç. and M.T.; investigation, O.K., B.Ş., A.Z., A.Ç. and M.T.; data curation, O.K., B.Ş., A.Z., A.Ç. and M.T.; writing—original draft preparation, O.K., B.Ş., A.Z., A.Ç. and M.T.; writing—review and editing, O.K., B.Ş., A.Z., A.Ç. and M.T.; visualization, O.K., B.Ş., A.Z., A.Ç. and M.T.; supervision, A.Ç. and M.T. All authors have read and agreed to the published version of the manuscript.

Funding

This study is supported by the Trakya University Scientific Research Projects Coordination Office (Project Number: 2025/86).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Publicly available datasets were analyzed in this study. Access requires free registration. The data can be found here: https://seffaflik.epias.com.tr/electricity/electricitymarkets/day-ahead-market-dam/market-clearing-price-mcp (accessed on 28 July 2026).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Wu, Y.; Xiang, L.; Fu, C. Assessment of the water-energy-food system and its coordination level in China’s major grain production areas. Sci. Rep. 2026. [Google Scholar] [CrossRef] [Scilit]
  2. Widmer, J.; Christ, B.; Grenz, J.; Norgrove, L. Agrivoltaics, a promising new tool for electricity and food production: A systematic review. Renew. Sustain. Energy Rev. 2024, 192, 114277. [Google Scholar] [CrossRef] [Scilit]
  3. Wagner, M.; Stanbury, P.; Dietrich, T.; Döring, J.; Ewert, J.; Foerster, C.; Freund, M.; Friedel, M.; Kammann, C.; Koch, M.; et al. Developing a Sustainability Vision for the Global Wine Industry. Sustainability 2023, 15, 10487. [Google Scholar] [CrossRef] [Scilit]
  4. Zainali, S.; Ma Lu, S.; Fernandez-Solas, Á.; Cruz-Escabias, A.; Fernandez, E.F.; Zidane, T.E.K.; Honningdalsnes, E.H.; Nygård, M.M.; Leloux, J.; Berwind, M.; et al. Modelling, Simulation, and Optimisation of Agrivoltaic Systems: A Comprehensive Review. Appl. Energy 2025, 386, 125558. [Google Scholar] [CrossRef] [Scilit]
  5. Asghar, R.; Fulginei, F.R.; Quercio, M.; Mahrouch, A. Artificial Neural Networks for Photovoltaic Power Forecasting: A Review of Five Promising Models. IEEE Access 2024, 12, 90461–90485. [Google Scholar] [CrossRef] [Scilit]
  6. Herrera Casanova, R.; Conde, A. Enhancement of LSTM models based on data pre-processing and optimization of Bayesian hyperparameters for day-ahead photovoltaic generation prediction. Comput. Electr. Eng. 2024, 116, 109162. [Google Scholar] [CrossRef] [Scilit]
  7. Mazzeo, D.; Di Zio, A.; Pesenti, C.; Leva, S. Optimizing Agrivoltaic Systems: A Comprehensive Analysis of Design, Crop Productivity and Energy Performance in Open-Field Configurations. Appl. Energy 2025, 390, 125750. [Google Scholar] [CrossRef] [Scilit]
  8. Apriani, S.; Mangkuto, R.A.; Saputro, A.G.; Chow, E.C. Performance Prediction and Optimisation of Even-Lighting Agrivoltaic Systems with Semi-Transparent PV Module in the Tropical Region. Sol. Energy 2024, 283, 113013. [Google Scholar] [CrossRef] [Scilit]
  9. Kumdokrub, T.; You, F. Techno-Economic and Environmental Optimization of Agrivoltaics: A Case Study of Cornell University. Appl. Energy 2025, 384, 125436. [Google Scholar] [CrossRef] [Scilit]
  10. Giri, N.C.; Mohanty, R.C.; Pradhan, R.C.; Abdullah, S.; Ghosh, U.; Mukherjee, A. Agrivoltaic System for Energy-Food Production: A Symbiotic Approach on Strategy, Modelling, and Optimization. Sustain. Comput. Inform. Syst. 2023, 40, 100915. [Google Scholar] [CrossRef] [Scilit]
  11. Zhao, P.; Wang, R.; Zhang, Y.; Yang, X.; Li, C. ConCast: A CBAM-enhanced SimVP with temporal consistency regularization for precipitation nowcasting. Intell. Robot. 2026, 6, 427–443. [Google Scholar] [CrossRef] [Scilit]
  12. Chen, Y.; Zhu, X.; Wang, P.; Hao, K.; Sheng, K. Adaptive variational empirical mode decomposition aware intelligent data-driven modeling for complex industrial processes. Intell. Robot. 2025, 5, 50–69. [Google Scholar] [CrossRef] [Scilit]
  13. Kouravand, A.; Farajijalal, M.; Maharlooei, M.; Vaziri Rad, M.A.; Ehsani, R. Techno-Economic Analysis of Mobile Agrivoltaic Systems Leveraging Excess Power to Hydrogen (Case Study: Strawberry Field in California USA). Energy Rep. 2025, 13, 5579–5598. [Google Scholar] [CrossRef] [Scilit]
  14. Özdemir, O.E.; Bretzel, T.; Gfüllner, L.; Gorjian, S.; Katircioğlu, Y.; Dur, B.; Trommsdorff, M. Design, Simulation, and Experimental Evaluation of an Agrivoltaic Greenhouse in Turkey. Results Eng. 2025, 26, 105278. [Google Scholar] [CrossRef] [Scilit]
  15. Guarino, S.; Buscemi, A.; Chiaruzzi, C.; Lo Brano, V. Modelling and Analysis of V-Shaped Bifacial PV Systems for Agrivoltaic Applications: A Python-Based Approach for Energy Optimization. Appl. Energy 2025, 389, 125785. [Google Scholar] [CrossRef] [Scilit]
  16. Sadeghi Chamazkoti, S.; Hajinezhad, A.; Moosavian, S.F. Techno-Economic Analysis and Optimization of Agrivoltaic Systems for Green Hydrogen Production in Diverse Climates. Int. J. Hydrogen Energy 2025, 123, 247–264. [Google Scholar] [CrossRef] [Scilit]
  17. Tomasi, S.; Pellegrini, C.; Gaspari, F.; Vitale, S.; Macarulla Martí, M.; Gras, A.; Gantioler, S. Agrivoltaics as a Win-Win for Rural Regions? Energy and Environmental Justice Perspectives Across Italy, Spain, Belgium, and the Netherlands. Energy Res. Soc. Sci. 2025, 129, 104369. [Google Scholar] [CrossRef] [Scilit]
  18. Lu, Y.; Tan, C.L.; He, Y.; Biljecki, F.; Tay, S.E.R.; Lau, S.-K. Multi-Objective Optimization of Food, Energy, and Carbon for Vertical Agrivoltaic System on Building Façades. Energy Build. 2025, 345, 116061. [Google Scholar] [CrossRef] [Scilit]
  19. Senturk, B.; Oylek, Y.; Sevim Kanar, Z.; Celik, R.; Kurtulus, G.; Ozden, T. The Impact of Photovoltaic Panels on the Environment and Yield Parameters in an Open-Field Agrivoltaic System: A Case Study in Ayaş, Ankara. Renew. Energy 2025, 253, 123553. [Google Scholar] [CrossRef] [Scilit]
  20. Sarr, A.; Soro, Y.M.; Tossa, A.K.; Diop, L. A New Approach for Modelling Photovoltaic Panel Configuration Maximizing Crop Yield and Photovoltaic Array Outputs in Agrivoltaics Systems. Energy Convers. Manag. 2024, 309, 118436. [Google Scholar] [CrossRef] [Scilit]
  21. Ji, Z.; Li, W.; Niu, D. Optimal investment decision of agrivoltaic coupling energy storage Project based on distributed linguistic trust and hybrid evaluation method. Appl. Energy 2024, 353, 122139. [Google Scholar] [CrossRef] [Scilit]
  22. Asa’a, S.-N.; Ma Lu, S.; Kaaya, I.; Dupon, O.; de Jong, R.; van der Heide, A.; Bouguerra, S.; Radhakrishnan, H.S.; Poortmans, J.; Campana, P.E.; et al. Evaluating the Influence of Different Agrivoltaic Topologies on PV Energy, Crop Yields and Land Productivity in a Temperate Climate. Renew. Energy 2025, 252, 123528. [Google Scholar] [CrossRef] [Scilit]
  23. Gadhiya, G.; Patel, U.; Chauhan, P.; Giri, N.C.; Yin, G.-Z.; Khargotra, R. Development of Agrivoltaic Insect Net House to Enhance Sustainable Energy–Food Production: A Techno-Economic Assessment. Results Eng. 2024, 24, 103228. [Google Scholar] [CrossRef] [Scilit]
  24. Al-Amin, M.; Shafiullah, G.M.; Ferdous, S.M.; Shoeb, M.; Reza, S.M.S.; Elavarasan, R.M.; Rahman, M.M. Agrivoltaics System for Sustainable Agriculture and Green Energy in Bangladesh. Appl. Energy 2024, 371, 123709. [Google Scholar] [CrossRef] [Scilit]
  25. Garrod, A.; Hussain, S.N.; Ghosh, A. The Technical and Economic Potential for Crop-Based Agrivoltaics in the United Kingdom. Sol. Energy 2024, 277, 112744. [Google Scholar] [CrossRef] [Scilit]
  26. Gonocruz, R.A.T.; Yoshida, Y.; Ozawa, A.; Aguirre, R.A., Jr.; Maguindayao, E.J.H. Impacts of Agrivoltaics in Rural Electrification and Decarbonization in the Philippines. Appl. Energy 2023, 350, 121832. [Google Scholar] [CrossRef] [Scilit]
  27. Coşgun, A.E.; Endiz, M.S.; Demir, H.; Ozcan, M. Agrivoltaic Systems for Sustainable Energy and Agriculture Integration in Turkey. Heliyon 2024, 10, e32300. [Google Scholar] [CrossRef] [Scilit]
  28. Baker, J.; Guler, M.; Medonna, A.; Li, Z.; Ghosh, A. Analysis of Large-Scale (1 GW) Off-Grid Agrivoltaic Solar Farm for Hydrogen-Powered Fuel Cell Electric Vehicle Charging Station. Energy Convers. Manag. 2025, 323, 119184. [Google Scholar] [CrossRef] [Scilit]
  29. Aziznezhad, A.H.; Gorjian, S.; Mokhtarzadeh, H. Design, Development and Experimental Evaluation of a Concentrator Agrivoltaic System with Integrated Spectrally Splitting Fresnel Lens. Results Eng. 2024, 24, 103119. [Google Scholar] [CrossRef] [Scilit]
  30. Jamil, U.; Hickey, T.; Pearce, J.M. Solar Energy Modelling and Proposed Crops for Different Types of Agrivoltaics Systems. Energy 2024, 304, 132074. [Google Scholar] [CrossRef] [Scilit]
  31. Zhang, L.; Gong, J.; Yang, Z.; Wu, X.; Wang, W.; Yang, C.; Xu, G.; Wu, C.; Bao, E. Evaluating the Contribution of Decreasing Heights of Photovoltaic Panels on Light Environment and Agricultural Production in Agrivoltaic Systems. J. Clean. Prod. 2025, 495, 145091. [Google Scholar] [CrossRef] [Scilit]
  32. Zeddies, H.H.; Parlasca, M.; Qaim, M. Agrivoltaics Increases Public Acceptance of Solar Energy Production on Agricultural Land. Land Use Policy 2025, 156, 107604. [Google Scholar] [CrossRef] [Scilit]
  33. Randle-Boggis, R.J.; Barron-Gafford, G.A.; Kimaro, A.A.; Lamanna, C.; Macharia, C.; Maro, J.; Mbele, A.; Hartley, S.E. Harvesting The Sun Twice: Energy, Food and Water Benefits from Agrivoltaics in East Africa. Renew. Sustain. Energy Rev. 2025, 208, 115066. [Google Scholar] [CrossRef] [Scilit]
  34. Magadley, E.; Matar, M.; Kabha, R.; Korabi, R.; Hajyahya, A.; Abasi, A.; Barhum, H.; Attrash, M.; Saabne, R.; Asaly, S.; et al. The Electrical Performance of a Single-Axis Sun Tracking Agrivoltaic System inside a Polytunnel Greenhouse. Energy Convers. Manag. X 2025, 26, 100940. [Google Scholar] [CrossRef] [Scilit]
  35. Vélez, S.; Valente, J.; Bretzel, T.; Trommsdorff, M. Assessing the Impact of Overhead Agrivoltaic Systems on GNSS Signal Performance for Precision Agriculture. Smart Agric. Technol. 2024, 9, 100664. [Google Scholar] [CrossRef] [Scilit]
  36. Thum, C.H.; Okada, K.; Yamasaki, Y.; Kato, Y. Impacts of Agrivoltaic Systems on Microclimate, Grain Yield, and Quality of Lowland Rice under a Temperate Climate. Field Crops Res. 2025, 326, 109877. [Google Scholar] [CrossRef] [Scilit]
  37. Hussain, S.N.; Mangela, D.B.; Ghosh, A. Technical Implications of Large-Scale Agrivoltaics Farms as an Autonomous Energy Source for Hydrogen-Powered Electric Vehicle Charging Infrastructure. Sol. Compass 2025, 16, 100145. [Google Scholar] [CrossRef] [Scilit]
  38. Victoria, M.; Pullens, J.W.M.; Torma, G.; Lindhardt, M.K.K.; Niazi, K.A.K.; Rahimi Jahangirlou, M.; El Khoury, Y.V.; Aschemann-Witzel, J.; Ottosen, C.-O.; Jørgensen, U. Vertical Agrivoltaics in a Temperate Climate: Exploring Technical, Agricultural, Meteorological, and Social Dimensions. Energy Nexus 2025, 19, 100526. [Google Scholar] [CrossRef] [Scilit]
  39. Energy Exchange Istanbul (EPİAŞ). Transparency Platform. Available online: https://seffaflik.epias.com.tr/ (accessed on 28 July 2026).
  40. Haurwitz, B. Insolation in relation to cloudiness and cloud density. J. Meteorol. 1945, 2, 154–166. [Google Scholar] [CrossRef] [Scilit]
  41. Hersbach, H.; Bell, B.; Berrisford, P.; Hirahara, S.; Horányi, A.; Muñoz-Sabater, J.; Nicolas, J.; Peubey, C.; Radu, R.; Schepers, D.; et al. The ERA5 global reanalysis. Q. J. R. Meteorol. Soc. 2020, 146, 1999–2049. [Google Scholar] [CrossRef] [Scilit]
  42. Open-Meteo. Previous Model Runs API and Historical Weather API. Available online: https://open-meteo.com/ (accessed on 18 July 2026).
  43. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit]
  44. Akiba, T.; Sano, T.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 2623–2631. [Google Scholar] [CrossRef] [Scilit]
  45. Box, G.E.P.; Jenkins, G.M. Time Series Analysis: Forecasting and Control; Holden-Day: San Francisco, CA, USA, 1970. [Google Scholar]
  46. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. LightGBM: A highly efficient gradient boosting decision tree. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
  47. Hussain, A.; Khan, Z.A.; Hussain, T.; Ullah, F.U.; Rho, S.; Baik, S.W. A hybrid deep learning-based network for photovoltaic power forecasting. Complexity 2022, 2022, 7040601. [Google Scholar] [CrossRef] [Scilit]
  48. Ma, J.; Huo, M.; Han, J.; Liu, Y.; Lu, S.; Yu, X. Integrated CNN-LSTM for photovoltaic power prediction based on spatio-temporal feature fusion. Eng. Rep. 2025, 7, e13088. [Google Scholar] [CrossRef] [Scilit]
  49. Bai, S.; Kolter, J.Z.; Koltun, V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar]
  50. Elnozahy, A.; Abdel-Salam, M.; Abo-Elyousr, F.K. Optimal techno-economic energy coordination of solar PV water pumping irrigation systems. Energy 2024, 288, 129817. [Google Scholar] [CrossRef] [Scilit]
  51. FAO. Crop Evapotranspiration—Guidelines for Computing Crop Water Requirements; Irrigation and Drainage Paper No. 56; FAO: Rome, Italy, 1998; pp. 1–26. [Google Scholar]
  52. Paschalis, A.; Bonetti, S.; Fatichi, S. Controls of Ecohydrological Grassland Dynamics in Agrivoltaic Systems. Earth’s Future 2025, 13, e2024EF005183. [Google Scholar] [CrossRef] [Scilit]
  53. Marrou, H.; Dufour, L.; Wery, J. How Does a Shelter of Solar Panels Influence Water Flows in a Soil–Crop System? Eur. J. Agron. 2013, 50, 38–51. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Schematic architecture of the proposed artificial intelligence-assisted optimal energy and water management framework for the agrivoltaic system.
Figure 1. Schematic architecture of the proposed artificial intelligence-assisted optimal energy and water management framework for the agrivoltaic system.
Applsci 16 08982 g001
Figure 2. Hourly day-ahead electricity market prices for the selected representative operating day.
Figure 2. Hourly day-ahead electricity market prices for the selected representative operating day.
Applsci 16 08982 g002
Figure 3. Forecasted PV power generation profile for the representative operating day.
Figure 3. Forecasted PV power generation profile for the representative operating day.
Applsci 16 08982 g003
Figure 4. Minute-resolution crop evapotranspiration values for the representative operating day.
Figure 4. Minute-resolution crop evapotranspiration values for the representative operating day.
Applsci 16 08982 g004
Figure 5. Charging demand profiles of the personal electric vehicle and agricultural utility vehicle.
Figure 5. Charging demand profiles of the personal electric vehicle and agricultural utility vehicle.
Applsci 16 08982 g005
Figure 6. Seasonal mean absolute error of the best variant of each model family over the evaluation year (July 2025–June 2026).
Figure 6. Seasonal mean absolute error of the best variant of each model family over the evaluation year (July 2025–June 2026).
Applsci 16 08982 g006
Figure 7. Mean absolute error by hour of day over the evaluation year, best variant of each model family.
Figure 7. Mean absolute error by hour of day over the evaluation year, best variant of each model family.
Applsci 16 08982 g007
Figure 8. Measured production and day-ahead forecasts of the best variant of each model family on the representative operating day, 20 April 2026, at the scale of the reference plant.
Figure 8. Measured production and day-ahead forecasts of the best variant of each model family on the representative operating day, 20 April 2026, at the scale of the reference plant.
Applsci 16 08982 g008
Figure 9. Grid power import profiles under Case 1, Case 4, and Case 7.
Figure 9. Grid power import profiles under Case 1, Case 4, and Case 7.
Applsci 16 08982 g009
Figure 10. Power balance of the proposed agrivoltaic system for Case 1.
Figure 10. Power balance of the proposed agrivoltaic system for Case 1.
Applsci 16 08982 g010
Figure 11. Power balance of the proposed agrivoltaic system for Case 7.
Figure 11. Power balance of the proposed agrivoltaic system for Case 7.
Applsci 16 08982 g011
Figure 12. Sankey diagram illustrating the daily energy flow distribution (kWh) of the proposed agrivoltaic system under Case 1.
Figure 12. Sankey diagram illustrating the daily energy flow distribution (kWh) of the proposed agrivoltaic system under Case 1.
Applsci 16 08982 g012
Figure 13. Comparison of the BESS state of energy profiles under Case 1, Case 2, Case 6, and Case 8.
Figure 13. Comparison of the BESS state of energy profiles under Case 1, Case 2, Case 6, and Case 8.
Applsci 16 08982 g013
Figure 14. Variations in the stored soil-water volume in the agricultural field under Case 1.
Figure 14. Variations in the stored soil-water volume in the agricultural field under Case 1.
Applsci 16 08982 g014
Figure 15. Variations in the water-storage tank volume, water inflow, and irrigation water applied under Case 1.
Figure 15. Variations in the water-storage tank volume, water inflow, and irrigation water applied under Case 1.
Applsci 16 08982 g015
Table 1. Taxonomy of the reviewed literature.
Table 1. Taxonomy of the reviewed literature.
Ref.PVPV
Forecasting
BESSGrid
Interaction
EV
Charging
Water
Management
Crop/Soil
Water Model
Operational Energy–Water
Co-Optimization
AV Microclimate
Effects
Method
[4]Comprehensive modeling/simulation review
[7]Simulation framework/APV design optimization
[8]Rhinoceros simulation + Monte Carlo optimization
[9]MINLP + fractional programming
[10]Experimental modeling + ANN-GA
[11]SimVP + CBAM + temporal consistency regularization
[12]AVEMDG-GCN + variational/Bayesian inference
[13]HOMER + Shannon entropy-TOPSIS
[14]Ray tracing (bifacial_radiance) + field validation
[15]Python/PVlib simulation + dynamic tilt optimization
[16]PVsyst + AquaCrop + AgriPV + HOMER Pro + MCDM
[17]Expert interviews + energy/environmental justice framework
[18]Genetic algorithm + field/building performance analysis
[19]Field monitoring and experimental analysis
[20]MATLAB R2021a modeling + genetic algorithm
[21]Hybrid MCDM (linguistic trust/cloud/IDOCRIW/TODIM)
[22]Irradiance-energy model + crop model
[23]Experimental system + techno-economic assessment
[24]RETScreen/field implementation + techno-economic analysis
[25]PVsyst + DSSAT + techno-economic analysis
[26]8760 h linear programming power-system model
[27]PVsyst regional potential simulation
[28]DSSAT + PV simulation + H2 storage/refueling techno-economics
[29]Experimental concentrator AV + techno-economic analysis
[30]Ladybug/Honeybee irradiance modeling + SAM
[31]Field measurements + Ecotect light simulation
[32]Contingent-valuation survey
[33]Multi-site agrivoltaic field trials
[34]Experimental PV performance monitoring
[35]Multi-constellation GNSS field experiment
[36]Six-year agronomic/microclimate field experiment
[37]DSSAT + PVsyst + Li-ion battery + PEM electrolysis
[38]One-year field monitoring + crop analysis + VR survey
This StudyBayesian-optimized Seq2Seq LSTM + MILP
Table 2. Hyperparameter search spaces and selected values for the day-ahead forecasting models. The selection objective is the mean of the mean absolute errors of the two validation windows. lr: learning rate; wd: weight decay; H: history length in hours; stride: training-window augmentation stride.
Table 2. Hyperparameter search spaces and selected values for the day-ahead forecasting models. The selection objective is the mean of the mean absolute errors of the two validation windows. lr: learning rate; wd: weight decay; H: history length in hours; stride: training-window augmentation stride.
FamilySearch SpaceSelected (No Weather)Selected (Weather)
SARIMA/SARIMAX orders8 combinations of (p,0/1,q)(P,1,Q)24 with p,q ≤ 2 and P,Q ≤ 1(2,0,1)(1,1,0)24(2,0,1)(1,1,0)24
LightGBMobjective ∈ {L2, L1}; trees 100–1500; lr 0.01–0.3; leaves 15–255; min. child samples 5–100; feature and bagging fraction 0.5–1; L1/L2 penalties 10−8–10L1 objective, 587 trees, lr 0.075, 105 leavesL1 objective, 949 trees, lr 0.082, 228 leaves
LSTMhidden ∈ {64, 128, 256}; layers 1–3; dropout 0–0.4; lr 10−4–3 × 10−3; batch ∈ {32, 64, 128}; H ∈ {96, 168, 336}; wd 10−6–10−2; loss ∈ {Huber, L1}; stride ∈ {3, 6, 12} h64 units, 2 layers, dropout 0.36, lr 5.7 × 10−4, batch 32, H 96, L1, stride 3 h64 units, 3 layers, dropout 0.08, lr 6.6 × 10−4, batch 32, H 96, L1, stride 12 h
CNN–LSTMas for the LSTM64 units, 2 layers, dropout 0.10, lr 1.5 × 10−3, batch 64, H 96, L1, stride 3 h64 units, 3 layers, dropout 0.07, lr 4.3 × 10−4, batch 64, H 96, L1, stride 6 h
TCNas for the LSTM, plus channels ∈ {32, 64, 128}; levels 4–7; kernel ∈ {2, 3, 5}128 channels, 5 levels, kernel 2, dropout 0.16, H 96, L1, stride 6 h64 channels, 4 levels, kernel 3, dropout 0.17, H 168, L1, stride 3 h
Table 3. Evaluation-year metrics of all forecasting configurations (targets 1 July 2025–30 June 2026; 5204 h on the evaluation mask). CI95: bootstrap confidence interval of the MAE. nMAE and nRMSE are errors as a percentage of the 6.12 MW capacity; MAPE is computed over hours with production above 5% of capacity; WMAPE is the total absolute error divided by total production; skill is the MAE reduction relative to persistence.
Table 3. Evaluation-year metrics of all forecasting configurations (targets 1 July 2025–30 June 2026; 5204 h on the evaluation mask). CI95: bootstrap confidence interval of the MAE. nMAE and nRMSE are errors as a percentage of the 6.12 MW capacity; MAPE is computed over hours with production above 5% of capacity; WMAPE is the total absolute error divided by total production; skill is the MAE reduction relative to persistence.
ConfigurationMAE [MW]CI95 [MW]RMSE [MW]nMAE [%]MAPE [%]WMAPE [%]R2Skill [%]
LSTM, weather, tuned0.2680.215–0.3150.6404.3724.514.50.915+42.0
LightGBM, weather, tuned0.2890.242–0.3340.6414.7223.615.60.915+37.4
LightGBM, weather, default0.3160.272–0.3560.6535.1724.617.10.911+31.5
CNN–LSTM, weather, tuned0.3170.265–0.3760.7515.1925.917.20.883+31.2
LSTM, weather, default0.3400.284–0.3930.7355.5527.018.40.888+26.4
TCN, weather, default0.3440.299–0.3920.7145.6227.618.60.894+25.4
CNN–LSTM, weather, default0.3480.289–0.4050.7365.6827.418.80.888+24.7
TCN, weather, tuned0.3620.292–0.4350.8455.9128.519.60.852+21.6
SARIMAX, weather, default0.3840.331–0.4250.7196.2731.420.70.893+16.9
TCN, no weather, tuned0.4040.320–0.4970.9186.6037.921.80.825+12.6
LSTM, no weather, tuned0.4060.303–0.5040.9836.6341.521.90.799+12.1
LightGBM, no weather, tuned0.4390.363–0.5270.9227.1739.123.70.824+4.9
LSTM, no weather, default0.4400.363–0.5170.8417.1838.723.80.853+4.8
CNN–LSTM, no weather, tuned0.4530.364–0.5551.0057.4139.524.50.790+1.8
CNN–LSTM, no weather, default0.4580.381–0.5400.8747.4838.124.80.841+0.8
Persistence (24 h)0.4620.371–0.5491.0947.5437.724.90.752+0.0
SARIMA, default0.4660.391–0.5370.8757.6138.125.20.841−0.9
TCN, no weather, default0.4680.389–0.5520.8807.6538.125.30.839−1.4
SARIMA, tuned0.4740.388–0.5631.0287.7438.925.60.781−2.6
LightGBM, no weather, default0.4760.414–0.5520.9397.7840.425.70.817−3.2
SARIMAX, weather, tuned0.5010.393–0.6281.1118.1939.927.10.744−8.6
Table 4. Seasonal mean absolute error in megawatts, with the skill relative to persistence in parentheses, for the best variant of each model family. The number of scored hours per season is given in the header.
Table 4. Seasonal mean absolute error in megawatts, with the skill relative to persistence in parentheses, for the best variant of each model family. The number of scored hours per season is given in the header.
ConfigurationSummer (1639 h)Autumn (1378 h)Winter (1127 h)Spring (1060 h)
Persistence (24 h)0.268 (—)0.472 (—)0.697 (—)0.498 (—)
SARIMAX, weather, default0.291 (−9%)0.418 (+11%)0.483 (+31%)0.376 (+24%)
LightGBM, weather, tuned0.210 (+21%)0.314 (+33%)0.367 (+47%)0.294 (+41%)
LSTM, weather, tuned0.180 (+33%)0.251 (+47%)0.354 (+49%)0.333 (+33%)
CNN–LSTM, weather, tuned0.224 (+17%)0.258 (+45%)0.510 (+27%)0.335 (+33%)
TCN, weather, default0.277 (−4%)0.304 (+36%)0.463 (+34%)0.373 (+25%)
Table 5. Total operating cost obtained for each case study.
Table 5. Total operating cost obtained for each case study.
CasesTotal Operating Cost [EUR]CasesTotal Operating Cost [EUR]
Case 1−31.321Case 5−14.316
Case 2−6.794Case 6−26.385
Case 3−16.893Case 7−14.936
Case 47.678Case 8−25.134
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kırat, O.; Şafak, B.; Zaimoğlu, A.; Çiçek, A.; Tan, M. Artificial Intelligence-Based Optimal Energy and Water Management System in Agrivoltaics. Appl. Sci. 2026, 16, 8982. https://doi.org/10.3390/app16188982

AMA Style

Kırat O, Şafak B, Zaimoğlu A, Çiçek A, Tan M. Artificial Intelligence-Based Optimal Energy and Water Management System in Agrivoltaics. Applied Sciences. 2026; 16(18):8982. https://doi.org/10.3390/app16188982

Chicago/Turabian Style

Kırat, Oğuz, Burak Şafak, Aslı Zaimoğlu, Alper Çiçek, and Mustafa Tan. 2026. "Artificial Intelligence-Based Optimal Energy and Water Management System in Agrivoltaics" Applied Sciences 16, no. 18: 8982. https://doi.org/10.3390/app16188982

APA Style

Kırat, O., Şafak, B., Zaimoğlu, A., Çiçek, A., & Tan, M. (2026). Artificial Intelligence-Based Optimal Energy and Water Management System in Agrivoltaics. Applied Sciences, 16(18), 8982. https://doi.org/10.3390/app16188982

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop