Explainable AI for Solar PV Power Forecasting: From Model Selection to Trustworthy, Reproducible Deployment
Organizations: Faculty of Electrical Engineering, Universiti Teknologi Malaysia, Malaysia · School of Computing, National College of Ireland, Ireland · School of Business, Maynooth University, Ireland · School of Electrical and Electronic Engineering, University College Dublin, Ireland ·
Abstract
Machine learning (ML) is now a standard tool for forecasting the output of solar photovoltaic (PV) plants, yet published accuracy figures are often hard to compare and harder to trust. Many studies validate with random splits, report no reference forecast, and present feature attributions without saying what they can and cannot show. This paper reviews the main families of ML methods for PV power forecasting and resource assessment, from tree ensembles to deep and foundation models, and sets out a reproducible workflow that combines automated model search with explainable AI. The workflow is then tested on an openly available dataset: a 16.32 kWp plant in Porto, Portugal, forecast one day ahead from a 4 km numerical weather prediction grid. Over a full test year, the best models reach a normalised root mean square error (nRMSE) of 11.6% of installed capacity, about half the error of smart persistence. The choice of input features changed accuracy far more than the choice among strong algorithms, and shuffled cross-validation was mildly optimistic. After conformal calibration, the nominal 80% prediction intervals covered 81.7% of observations, against 64.5% before. SHAP rankings stayed stable when the model was retrained on different periods but shifted when correlated inputs were removed, so attributions should be read as properties of a model rather than of the plant. The paper closes with practical lessons and open problems, including deployment on edge hardware and the effect of a changing climate.
Figures & tables
| Horizon | Resolution | Main inputs | Main uses |
|---|---|---|---|
| Intra-hour (s to 1 h) | 1 s–15 min | Sky cameras, on-site sensors, recent output | Ramp control, storage dispatch, inverter set-points |
| Intra-day (1–6 h) | 15 min–1 h | Satellite cloud motion, recent output, NWP | Intra-day trading, reserve scheduling |
| Day-ahead (24–48 h) | 15 min–1 h | NWP | Day-ahead market bids, unit commitment, community energy planning |
| Medium term (days–weeks) | 1 h–1 day | NWP ensembles, climatology | Maintenance planning, hydro and fuel scheduling |
| Long term (months–years) | 1 day–1 year | Satellite and reanalysis archives, climate data | Resource assessment, plant design, project finance |
| Method family | Data needs | Best suited horizons | Interpretability | Compute cost | Main limitations |
|---|---|---|---|---|---|
| Reference forecasts (persistence, climatology, physical chain) | Very low | All, as baselines | Full | Negligible | Weak beyond a few hours; physical chain needs plant data |
| SVR, -NN, shallow ANN | Low to moderate | Intra-day to day-ahead | Low (post hoc only) | Low to moderate | Sensitive to scaling and tuning; SVR slow on large data |
| Tree ensembles (RF, Extra Trees, XGBoost, LightGBM) | Moderate | Intra-day to day-ahead | Good with TreeSHAP | Low | No extrapolation; large model files ( Section 6.7 ) |
| Deep learning (LSTM, CNN, Transformer, GNN) | High | Intra-hour (images) to day-ahead; multi-site | Low to moderate | High | Need large datasets; small gains for single-site data |
| Hybrid and physics-informed | Moderate, plus domain knowledge | All | Moderate to good | Moderate | Need plant metadata and expert set-up |
| AutoML | As for the chosen model | As for the chosen model | As for the chosen model | Set by the search budget | Random splits leak in time series; budget-dependent |
| Item | Value |
|---|---|
| Target | Measured hourly PV power, 28 April 2013 – 28 June 2016 ( hours) |
| NWP variables | Shortwave flux; 2 m air temperature; total, low, mid and high cloud fraction |
| Forecast task | Day-ahead: the 00 UTC run on day forecasts every hour of day (lead times 25–48 h) |
| Training period | May 2013 – June 2015 ( daytime hours) |
| Test period | July 2015 – June 2016, one full year ( daytime hours) |
| Evaluation | Daytime hours only (solar elevation above 0 ° ); Eqs. 7 , 8 and 9 , and skill against smart persistence ( Eqs. 1 and 3 ) |
| Model | nRMSE (%) | nMAE (%) | Skill | |
|---|---|---|---|---|
| MLP (two hidden layers, 128 and 64 units) | ||||
| Extra Trees | ||||
| XGBoost | ||||
| Random Forest | ||||
| LightGBM | ||||
| SVR (RBF kernel) |
| Feature | Mean , full model (kW) | , full model (kW) | Mean , reduced model (kW) |
|---|---|---|---|
| NWP irradiance (hour mean) | 2.10 | 1.80 | 2.03 |
| Clear-sky irradiance | 0.55 | 0.25 | removed |
| Low cloud fraction | 0.34 | 0.15 | 0.36 |
| Day of year (cosine) | 0.28 | 0.06 | 0.31 |
| Solar elevation | 0.12 | 0.02 | 0.76 |
| Power at the same hour on day | 0.11 | 0.02 | 0.21 |
| Model | Size (MB) | Prediction time (ms) | nRMSE (%) |
|---|---|---|---|
| Linear regression | |||
| Decision tree | |||
| MLP | |||
| LightGBM | |||
| XGBoost | |||
| SVR |
Solar Power Forecasting
Solar power forecasting predicts photovoltaic generation and irradiance from weather, imagery, plant data, and recent output to support reliable grid and energy decisions.
See all 50 papers