Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EV Powertrain R-D Simulator

A modular Python-based Electric Vehicle (EV) simulation framework designed for evaluate vehicle longitudinal dynamics, powertrain efficiency, and battery thermal behavior across various drive cycles.

Features

  • Longitudinal Dynamics: Models rolling resistance, aerodynamic drag (with headwind), grade resistance (elevation), and acceleration forces.
  • Motor Model: Efficient torque-speed mapping with custom efficiency curves.
  • Battery System:
    • Equivalent circuit model for voltage and SOC estimation.
    • Thermal model tracking battery temperature changes.
    • State of Health (SOH): Cycle-life degradation estimation based on throughput and thermal stress.
    • Chemistry Support: Presets for NMC, LFP, and Solid-State chemistries.
  • Auxiliary Loads: HVAC and baseline electronics power demand modeling.
  • Analysis Suite:
    • Sensitivity Analysis: 2D parametric sweeps with contour and surface plot generation.
    • Interactive Dashboard: Streamlit interface for real-time parameter tuning and benchmarking.
  • Industry Benchmarking: Compare custom designs against production platforms like the Tesla Model 3 and Chevrolet Bolt.

Installation

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt

Usage

1. Interactive Dashboard (Recommended)

Launch the Streamlit interface for a visual R-D experience:

streamlit run app.py

2. Batch Simulation (CLI)

Run a specific drive cycle or a directory of cycles:

python main.py --drivecycle Data/HWFET.xlsx --outdir outputs

3. Sensitivity Sweep (CLI)

Perform a parameter sweep (e.g., Mass vs. Drag) on a drive cycle:

python run_sweep.py --drivecycle Data/US06.xlsx --outdir outputs/sweep

Project Structure

  • modules/: Core physics and simulation modules (Battery, Motor, Vehicle, etc.)
  • drivecycles/: Data loading and processing utilities.
  • config/: YAML configurations for vehicle parameters.
  • app.py: Streamlit dashboard entry point.
  • main.py: Batch simulation CLI.
  • run_sweep.py: Parametric optimization tool.

Requirements

  • Python 3.8+
  • pandas
  • numpy
  • scipy
  • matplotlib
  • plotly
  • pyyaml
  • streamlit

About

A modular Python-based Electric Vehicle (EV) powertrain R&D simulator. High-fidelity modeling of longitudinal dynamics, battery behavior (SOC, SOH, and Thermal), and motor efficiency maps. Includes an interactive Streamlit dashboard and a sensitivity analysis suite for parametric optimization and benchmarking against industry-standard drive cycles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages