Skip to content

Built a multi-step solar energy predictor using Spatial-Temporal Transformers, fusing deep learning with real-world sustainability.

Notifications You must be signed in to change notification settings

cosmicc0der78/SolarEnergyPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”† Solar Energy Prediction using SL Transformer and LSTM

Exploring Time-Series Forecasting with Two Powerful Deep Learning Models โ€”Spatial-Temporal Transformer (SL Transformer) and LSTM (Long Short-Term Memory)โ€”to predict solar energy generation using historical and weather data. The SL Transformer is designed to handle both short-term (next 6 hours) and long-term (next few months) predictions, while LSTM is used as a baseline model for comparison.


๐Ÿ“Œ Project Overview

This project builds a dual-scale solar energy forecasting system using cutting-edge deep learning models:

๐Ÿ”น A Spatial-Temporal Transformer (SL Transformer) that captures both local fluctuations and long-term seasonal patterns
๐Ÿ”ธ An LSTM model that serves as a traditional baseline for long-range forecasting

Whether it's predicting the next 6 hours or the next 6 months, this system translates solar trends into actionable insights โ€” ideal for smart grids, green energy systems, and future-ready infrastructure.


๐Ÿง  Models Breakdown

๐Ÿ”ฎ SL Transformer

  • Built for multi-horizon forecasting.
  • Captures spatial and temporal dependencies using attention mechanisms.
  • Predicts:
    • โœ… Next 6 hours (real-time applications)
    • โœ… Next few months (seasonal trend analysis)

โณ LSTM

  • Handles sequential dependencies over long ranges.
  • Used for long-term solar trend prediction.
  • Serves as a baseline for benchmarking the Transformer model.

๐Ÿ›ฐ๏ธ Dataset

  • ๐Ÿ“‚ Location: /data
  • โœ… Features:
    • Solar irradiance components
    • Meteorological variables (temperature, humidity, wind speed)

๐Ÿ“ˆ Performance Metrics

Model MSE (kWh) MAE (kWh)
LSTM 0.0015 0.0157
SL Transformer 0.0067 0.0469

While LSTM demonstrates stronger performance on long-term forecasting with lower error metrics, the SL Transformer stands out for its ability to generalize across both short-term (next 6 hours) and long-term (next few months) predictions within a single architecture. It captures temporal dependencies and spatial dynamics, making it more scalable and adaptive for real-world solar energy systems where conditions change rapidly. Its ability to learn complex spatial-temporal patterns makes it highly adaptable for real-time energy management, grid optimization, and scalable deployment in smart energy systems.


๐Ÿงฐ Tech Stack

  • ๐Ÿ Python 3.12
  • ๐Ÿ“ฆ TensorFlow / PyTorch
  • ๐Ÿ“Š Pandas, NumPy, Scikit-learn
  • ๐Ÿ“ˆ Matplotlib, Seaborn
  • ๐Ÿš€ Google Colab (for training + inference)

๐Ÿ“ซ Contact

Indu Sree.N
๐Ÿ“ง indusreen78@gmail.com
๐Ÿ™ GitHub

If you have ideas, suggestions, or just want to connectโ€”feel free to reach out!

About

Built a multi-step solar energy predictor using Spatial-Temporal Transformers, fusing deep learning with real-world sustainability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published