Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artificial Intelligence Predicts Real-World EV DC Charging Profiles and Durations

Contents


Overview

Accurate prediction of electric vehicle charging profiles and durations is critical for adoption and optimising infrastructure. Direct current fast charging presents complex behaviours shaped by many factors. This work introduces a deep learning framework trained on close to one million real-world sessions, capable of predicting charging profiles and durations from minimal input with uncertainty estimates. The model initiates predictions from a single point on the power and state-of-charge profile and incrementally refines them as new observations arrive, enabling real-time updates. The model generalises across vehicle types and charging scenarios. It achieves 90% accuracy in predicting charging duration from a single point, and 95% accuracy with an absolute error under one minute using six points within five minutes. This work shows that using readily available input data at charge time enables accurate prediction of charging behaviour and offers a practical, scalable solution for deployment, energy planning, and infrastructure reliability.


System Requirements

  • Tested on: Ubuntu 22.04
  • Recommended GPU: NVIDIA A100 or equivalent

Installation Guide

Setup Environment

Using Conda/Mamba:

conda env create -f ./env/environment.yaml

Demo

A Jupyter Notebook Demo.ipynb is provided to demonstrate model usage. This notebook:

  • Loads a pre-trained charging profile prediction model.
  • Randomly selects an unseen charging session.
  • Generates an animated GIF visualising how predictions evolve as more input data becomes available.

To run the demo, open and execute the Demo.ipynb notebook.


Model Training

The framework supports training multiple deep learning architectures for charging profile prediction:

Available Models:

  • RNN
  • GRU
  • LSTM
  • VSN-LSTM
  • Transformer
  • TFT (Temporal Fusion Transformer)

Training Scripts:

Cluster Training (SLURM):

# Train different model architectures on HPC cluster
bash scripts/train_profile_regression_hivemind.sh     # TFT with seed 42
bash scripts/train_lstm_hivemind.sh                  
bash scripts/train_gru_hivemind.sh                   
bash scripts/train_rnn_hivemind.sh                   
bash scripts/train_transformer_hivemind.sh           
bash scripts/train_vsnlstm_hivemind.sh              
bash scripts/train_profile_regression_hivemind_123.sh  # TFT with seed 123
bash scripts/train_profile_regression_hivemind_816.sh  # TFT with seed 816

# Train with categorical capacity features
bash scripts/train_profile_regression_discretise_capacity_hivemind.sh

Configuration Files:

Training configurations are stored in configs/ directory:

  • tft_5_lstm_3_attn_256_state.yaml: Standard TFT configuration
  • tft_split_123, tft_split_816: TFT with different train/val splits and random seeds
  • lstm.yaml, gru.yaml, rnn.yaml: RNN-based models
  • transformer.yaml: Pure transformer architecture
  • vsn_lstm.yaml: Variable State Network with LSTM
  • cvae_revin.yaml: VAE for anomaly detection

Model Evaluation

Single Model Evaluation:

# Evaluate specific model architectures
bash scripts/evaluate_tft_123.sh        # TFT model (seed 123)
bash scripts/evaluate_tft_816.sh        # TFT model (seed 816)
bash scripts/evaluate_lstm.sh           # LSTM model
bash scripts/evaluate_gru.sh            # GRU model
bash scripts/evaluate_rnn.sh            # RNN model
bash scripts/evaluate_transformer.sh    # Transformer model
bash scripts/evaluate_vsnlstm.sh        # VSN-LSTM model

Ensemble Evaluation:

# Evaluate ensemble of multiple models
bash scripts/evaluate_ensemble_hivemind.sh

# Python script for ensemble evaluation
python scripts/evaluate_ensemble.py

Ablation Study Evaluation:

# Evaluate models with different feature combinations
bash scripts/evaluate_woc.sh           # Without capacity
bash scripts/evaluate_wot.sh           # Without temperature
bash scripts/evaluate_woc_wot.sh       # Without capacity and temperature

Specialised Evaluation:

# Evaluate best single model
bash scripts/evaluate_best_single.sh

# Evaluate with binned capacity features
bash scripts/evaluate_bin_capacity.sh

# Inference time
bash scripts/evaluate_time.sh
python scripts/evaluate_time.py

Custom Evaluation:

# Direct evaluation with Python scripts
python scripts/evaluate_profile_regression.py --ckpt_dir <model_checkpoint>
python scripts/evaluate_profile_regression_loss.py --ckpt_dir <model_checkpoint>

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages