Forecasting Global Horizontal Irradiance Using Deep Learning
Research

Forecasting Global Horizontal Irradiance Using Deep Learning

A comprehensive benchmark of 10 deep learning architectures for short-term solar forecasting in Ho Chi Minh City, prioritizing both accuracy and computational efficiency.

Project Details

  • Role

    Researcher

  • Team Size

    Individual

  • Duration

    Feb 2025 - May 2025

Overview

Developed a comprehensive deep learning framework for forecasting Global Horizontal Irradiance (GHI) in Ho Chi Minh City, Vietnam. This research serves as a benchmark study comparing 10 neural network architectures—ranging from traditional baselines (LSTM, TCN, 1D-CNN, CNN-LSTM, MLP) to cutting-edge models (Mamba, Transformer, iTransformer, TSMixer, Informer)—using a decade of satellite-derived data.

The project explicitly balances predictive accuracy with computational sustainability, aiming to deploy high-performance models on resource-constrained edge devices in line with UN Sustainable Development Goals (SDGs 7 and 13).

Problem Context

Accurate solar irradiance forecasting is critical for:

  • Grid Stability: Mitigating the intermittency of solar power for reliable integration.
  • Energy Trading: Enabling precise day-ahead and intra-day market bidding.
  • Sustainability: Reducing the carbon footprint of AI by optimizing model efficiency.

Ho Chi Minh City's tropical climate poses unique challenges, with rapid cloud formation and intense monsoon seasons creating high volatility in solar irradiance (GHI).

Data Pipeline

Problem Formulation

The project models GHI forecasting as a supervised time-series regression task. Given a historical sequence of input vectors with a lookback window , the objective is to learn a mapping function that predicts the irradiance for horizon :

where represents the learnable parameters of the neural network optimized for grid stability management.

Data Source & Processing

  • Source: National Solar Radiation Database (NSRDB) Himawari-7 satellite data (PSM v3).
  • Period: 10 years of hourly measurements (2011–2020).
  • Scale: 87,600 timesteps × 105 grid cells (approx. 4km resolution).
  • Split: Chronological split to prevent look-ahead bias: Training (2011–2018), Validation (2019), Test (2020).

Feature Engineering

  • Target: Global Horizontal Irradiance (GHI).
  • Inputs: 24-hour lookback window (L=24) to predict 1-hour ahead (H=1).
  • Physics-Informed Features:
    • Clearsky GHI: Theoretical maximum irradiance calculated via solar zenith angle.
    • Nighttime Mask: Binary mask () to filter trivial zero-value predictions.
    • Cyclical Encoding: Sin/Cos transformations for hour, day, and month to preserve temporal continuity.

Key Results

Evaluation Metrics

To rigorously assess performance, we employed standard statistical metrics. The Mean Squared Error (MSE) was used as the primary loss function to penalize large errors, while the Coefficient of Determination () measured variance explanation:

where is the ground truth, is the prediction, and is the mean of observed data.

Comprehensive Model Comparison

ModelMSE ↓RMSE ↓MAE (W/m²) ↓R² ↑Speed (samples/sec) ↑
Transformer2816.7753.0724.260.9696239,871
Informer2846.8653.3624.900.9692117,882
TSMixer2848.6153.3725.660.969288,357
TCN2856.4853.4525.320.9691644,131
LSTM2859.2253.4726.870.9691215,547
iTransformer2869.8153.5725.620.9690272,867
Mamba3006.0554.8325.840.9675193,084
MLP3165.8956.2727.840.96585,642,588
CNN-LSTM3274.1257.2229.810.9646310,191
1D-CNN3549.0359.5732.440.9617996,542

Key Findings:

  • Transformer Dominance: Outperformed all models (approx. 1.4% MSE reduction vs. TCN), excelling at capturing short-term volatility via self-attention.
  • TCN Efficiency: The best "basic" model, offering a robust trade-off with 2.7× higher throughput than Transformer.
  • Mamba's Limitation: Despite theoretical linearity, Mamba struggled with peak daytime fluctuations, lagging behind attention-based models in accuracy.

Daytime vs. Nighttime Analysis

The study evaluated performance separately for day and night to ensure robust benchmarking:

  • Daytime: Transformer achieved the lowest error (MSE: 5653.55) and highest R² (0.9313), proving its ability to model complex cloud dynamics.
  • Nighttime: Transformer and TCN correctly suppressed noise (R² > 0.64). In contrast, Mamba performed poorly at night, exhibiting a negative R² (-2.43), indicating it failed to consistently suppress zero-value predictions.

Model Compression & Efficiency

To enable deployment on edge devices (e.g., solar farm controllers), three compression strategies were applied to the Transformer.

Compression MethodModel Size (MB)ReductionLatency (ms)MAE (W/m²)Note
Baseline (FP32)1.073792.13 (CPU)24.26Reference performance
Int8 Quantization0.4464.0%519.8825.24Best CPU Trade-off
Int4 Quantization0.1191.0%589.6925.60High latency due to overhead
FP16 (GPU)0.6546.0%22.0224.25Best for High-Perf Edge
Pruning (10% Sparsity)1.070.0%3808.8040.66Accuracy degraded
Pruning (50% Sparsity)1.070.0%3857.31176.21Method Failed
Distilled Student0.8223.5%3081.4623.78Outperformed Teacher

Key Technical Insights:

  1. Distillation Works: The Distilled Student (MAE: 23.78) outperformed not only the Teacher (MAE: 24.26) but also an identical Student trained from scratch (MAE: 25.35). This confirms distillation acts as a powerful regularizer.
  2. Pruning Failed: Structured pruning (10–50%) was ineffective. Physical model size remained unchanged (1.07 MB) due to PyTorch storage mechanics, and error spiked dramatically (MAE: 176.21 at 50% sparsity).
  3. Quantization Overhead: While Int4 quantization achieved massive size reduction (91%), it actually increased latency compared to Int8, likely due to the computational cost of unpacking 4-bit integers.

Explainability (SHAP)

SHAP analysis revealed fundamental differences in how architectures "reason" about time:

  1. Transformer (Recency Bias):
    • Focuses almost exclusively on (current timestep).
    • Heavily relies on immediate predictors: hour_cos, cloud_type, and hour_sin.
  2. Mamba (U-Shaped Periodicity):
    • Exhibits a distinct U-shaped attention pattern, valuing both the immediate past () and the distant history ().
    • Explicitly leverages the 24-hour periodic nature of solar cycles, heavily weighting clearsky_ghi from the previous day.

Key Predictor: clearsky_ghi was identified as the single strongest feature, providing the physical baseline for all models.

Future Directions

  • Extend to multi-horizon forecasting: Move beyond 1-hour ahead prediction to longer horizons (e.g., 24–48 hours) and re-evaluate architectures like Mamba under longer-context settings where linear-time sequence modeling may become more advantageous.
  • Richer atmospheric & satellite inputs: Incorporate real-time Aerosol Optical Depth (AOD) and raw satellite-imagery channels to better capture the effects of urban haze and fine-grained cloud structure that can drive short-term irradiance variability.

Conclusion

This research successfully establishes a benchmark for solar forecasting in tropical climates, demonstrating that while Transformers offer superior accuracy for short-term prediction, TCNs provide a highly efficient alternative for high-throughput systems. Crucially, the study proves that high-performance deep learning models can be effectively compressed via Knowledge Distillation to run on edge hardware without accuracy loss. By combining rigorous benchmarking with explainability and model compression, this framework offers a practical blueprint for sustainable, AI-driven energy management in developing smart cities.

Note

Read the full paper on arXiv: https://arxiv.org/abs/2512.23898

Key Achievements

  • Achieved state-of-the-art accuracy with Transformer model (MSE: 2816.77, R²: 0.9696)
  • Proven Knowledge Distillation success: Distilled Student outperformed both the Teacher and a Student trained from scratch
  • Benchmarked 10 architectures using 10 years of NSRDB satellite data (87,600 timesteps)
  • Identified critical deployment constraints: Int4 quantization reduced size by 91% but increased latency

Technologies Used

PyTorchTransformerTCNMambaInformeriTransformerTSMixerLSTM1D-CNNCNN-LSTMMLPSHAPONNX

Skills Applied

Time Series ForecastingExplainable AIModel CompressionKnowledge Distillation