Important
Implementation Note: This repository contains the core architecture and settings as described in the associated research paper. However, some code structures and experimental configurations have been slightly adjusted to facilitate educational study, modification, and independent testing. The codebase will be fully synchronized with the exact methodology presented in the manuscript upon the paper's final formal publication.
Contemporary solar forecasting models fail in two catastrophic ways:
| Failure Mode | Impact | TLMN Solution |
|---|---|---|
| ☁️ Temporal Phase Lag | Delayed cloud response | Dilated 1D-CNN (zero lag) |
| 🌙 Phantom Nocturnal Generation | Impossible predictions | Thermodynamic Alpha-Gate |
| Metric | Value |
|---|---|
| 📉 RMSE | 18.31 Wh/m² |
| 📊 Pearson Correlation | 0.988 |
| 🌙 Nocturnal Error | Zero (all 1,826 days) |
| ⚡ Phase Response | < 30 min during rapid transients |
| 🧮 Parameters | 63,458 (ultra-lightweight) |
┌─────────────────────────────────────────────────────┐
│ │
│ ☀️ NASA POWER Input (22 Variables, 24h Window) │
│ Meteorological + Geometric + Derived │
│ │ │
│ ┌─────────▼──────────┐ │
│ │ Hankel Embedding │ Koopman │
│ │ + Tanh Projection │ linearization │
│ │ + Positional Enc. │ │
│ └─────────┬──────────┘ │
│ │ │
│ ┌────────────────▼────────────────┐ │
│ │ 🔥 Dilated 1D-CNN Encoder │ │
│ │ 3 layers × dilation [1,2,4] │ Zero-lag │
│ │ Receptive field = 13 steps │ temporal │
│ │ (replaces LiquidNeuralODE) │ encoding │
│ └────────────────┬────────────────┘ │
│ │ │
│ ┌────────────────▼────────────────┐ │
│ │ 🎯 Symplectic Cross-Attention │ Physics │
│ │ Q = meteorological features │ guided │
│ │ K/V = ClearSky + SZA │ (after │
│ │ γ-weighted residual │ encoder) │
│ └────────────────┬────────────────┘ │
│ │ │
│ ┌───────────────────▼───────────────────┐ │
│ │ 🌡️ Thermodynamic Alpha-Gate │ │
│ │ pred = σ(KAN(h)) × ClearSky_norm │ Night │
│ │ Structural zero guarantee │ = 0 │
│ └───────────────────┬───────────────────┘ │
│ │ │
│ 📊 GHI Prediction (Wh/m²) │
│ Physically bounded, always │
│ │
└─────────────────────────────────────────────────────┘
| Component | v2 | v3 (Current) |
|---|---|---|
| Temporal Encoder | LiquidNeuralODE (slow) | Dilated 1D-CNN (fast, no lag) |
| Loss Function | MSE + penalty terms | Log-Cosh (peak-aggressive) |
| Physics Enforcement | Loss penalties | Structural gate (100% guarantee) |
| Sliding Window | Fixed | 3-step stride |
| Input Features | 15 | 22 variables |
📦 TLMN-Thermodynamic-Solar-Microgrids/
│
├── 📁 training_code/
│ └── 🧠 TLMN_Model.py # Full TLMN v3 architecture
│
├── 📁 evaluation_code/
│ └── 📊 TLMN_Test.py # Test evaluation pipeline
│
├── 📁 training_data/
│ ├── 📊 Hourly_2010_2015.csv # NASA POWER hourly data
│ └── 📊 Hourly_2020_2025.csv
│
├── 📄 TLMN_Paper.pdf # Published paper
├── 📄 TLMN_Paper.docx
├── 📋 requirements.txt
└── 📖 README.md
# Clone & setup
git clone https://github.com/Marco9249/TLMN-Thermodynamic-Solar-Microgrids.git
cd TLMN-Thermodynamic-Solar-Microgrids
pip install -r requirements.txt
# Train TLMN v3
python training_code/TLMN_Model.py
# Evaluate
python evaluation_code/TLMN_Test.py@misc{abdullah2026tlmn,
title = {Thermodynamic Liquid Manifold Networks: Physics-Bounded
Deep Learning for Solar Forecasting in Autonomous
Off-Grid Microgrids},
author = {Mohammed Ezzeldin Babiker Abdullah},
year = {2026},
eprint = {2604.11909},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2604.11909}
}APA 7th Edition: Abdullah, M. E. B. (2026). Thermodynamic Liquid Manifold Networks: Physics-Bounded Deep Learning for Solar Forecasting in Autonomous Off-Grid Microgrids. arXiv. https://arxiv.org/abs/2604.11909