Skip to content

simscape/Electric-Vehicle-Simscape

Repository files navigation

Electric Vehicle Design with Simscape

View Electric Vehicle Design with Simscape on File Exchange

Open in MATLAB Online

The key components of an electrified platform include HV battery pack, an e-drive system, HVAC, and other electromechanical components. Design of an electric drivetrain is often a collaborative effort between diverse groups and model sharing and reuse becomes important. In this project, a battery electric vehicle is modelled with components available in different fidelity, for you to select and run based on application need. The vehicle model is a coupled electrical, mechanical, and thermal model built using Simscape™, Battery™, Simscape Driveline™, Simscape Electrical™, and Simscape Fluids™ Libraries. Main text

Getting Started

BEV Design Workflow

The project supports two ways to configure and load the vehicle model. Choose the one that fits your workflow.

Preferred way (Preset) — Use the Preset Picker to browse and apply a shipped vehicle configuration. Three defaults are available: VehicleElectric, VehicleElecAux, and VehicleElectroThermal. Each preset configures the model references, loads the correct parameters, and opens the model ready to simulate. No manual configuration needed.

Custom configuration — Launch the BEV Setup App (BEVapp) to select a template, choose component fidelities, link parameter files, and configure environment, HVAC, and driver settings.
BEV Setup App

Engineering Workflows

In this project, you will learn about the following seven engineering workflows:

1. Estimate Driving Range of Electric Vehicle

BEV system model canvas Estimate the on-road range of the vehicle. Run drive cycles with different ambient conditions to determine the range of the vehicle with a given capacity. See Workflow/Vehicle/RangeEstimation.

2. Size Battery for Electric Vehicle

Battery Sizing Size your high-voltage (HV) battery pack to achieve your desired range. You will learn how to simulate battery packs with different capacities and weights, and compare them based on how these factors affect the range of the vehicle. See Workflow/Battery/BatterySizing.

3. Create Battery Virtual Sensors (Neural Networks)

Battery NN Build a neural network model to predict battery temperature. This Neural network model takes in battery voltage and current measurements to predict battery temperature. This, when deployed, can help in eliminating some thermal sensors in the battery pack and reduce cost of development. See Workflow/Battery/VirtualSensorNeuralNetModel.

4. Estimate Efficient Gear Ratio for Electric Drive

Gear Ratio Drive units with fixed gear ratio are usually the most cost effective option for battery electric vehicle. To determine an appropriate fixed gear ratio, run a design of experiment (DoE) which covers a range of gear ratios and test cycle parameters. See Workflow/MotorDrive/GearRatioSelect.

5. Setup Electric Motor Test Bench for System Integration

Learn how to generate a permanent magnet synchronous motor (PMSM) for a system level (electro-thermal) simulation by creating a motor loss map and integrating it into the system level blocks. See Workflow/MotorDrive/GenerateMotInvLoss. Motor Loss Map

6. Verify Electric Drive Durability and Life

Durability Estimate the inverter power module semiconductor device junction temperature variation due to switching and predict the lifetime of the inverter. See Workflow/MotorDrive/InverterLife and Workflow/MotorDrive/ThermalDurability.

Repository Architecture

For the full project architecture — folder responsibilities, source-of-truth, config schema, app layers, export flow, component inventory, workflow catalog, drift risks, and extension guides — see Overview/README.md.

Release Notes

R2022b (Feb 2023)

  • Initial release — BEV system model with range estimation and battery sizing workflows

R2023a (Oct 2023)

  • GitHub Actions CI introduced
  • Battery component update

R2023b (Jul 2024)

  • Fast running model variant
  • Document updates

R2024b (Dec 2025)

  • Componentization — models restructured into self-contained packages with shared port interfaces
  • Range estimation workflow updated
  • PMSM model block and motor drive workflow updates

R2024b Update 2 (Apr 2026) — Latest release

  • BEV Setup App — GUI-based vehicle configuration and script export
  • JSON config-driven template/fidelity system with presets
  • 3 new dummy fidelities for simplified simulations
  • Standardized documentation across all 12 components and 7 workflows
  • Architecture reference doc with extension guides

Related Solutions

Setup

  • Clone the project repository.
  • Open ElectricVehicleSimscape.prj to get started with the project.
  • Requires MATLAB® release R2024b or newer.

Copyright 2022 - 2026 The MathWorks, Inc.

About

This repository show you how to model an automotive battery electric vehicle (BEV) for range estimation and battery sizing.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors