Simscape Vehicle Templates

Set of templates for creating custom vehicle models using Simscape for use within Simulink.

4.7K Downloads

Updated 19 Mar 2023

From GitHub

View License on GitHub

This library contains library blocks and a configurable vehicle model that you can use for a wide range vehicle design tasks. This video shows you some of the capabilities: https://youtu.be/kWfv_zZrO-4
For more details, see this page:
Here are some of the tasks you can perform:
  1. Explore powertrain architectures for conventional, hybrid, battery electric, and fuel cell vehicles.
  2. Modify the suspension design by moving hardpoints obtained from CAD.
  3. Connect custom multilink suspensions to hydraulic and pneumatic systems.
  4. Design active chassis controls for anti-lock brakes, stability control, and active roll control.
  5. Develop regenerative braking algorithms connected to electric powertrains.
  6. Test your designs against realistic road profiles by converting GPS data into 3D road definitions.
  7. Optimize vehicle-level performance by tuning design parameters in any system.
  8. Validate ADAS algorithms in scenarios involving stoplights, vehicles, and pedestrians.
  9. Find stability limits for vehicle-trailer combinations.
  10. Test your embedded software against a virtual vehicle using HIL simulation.
The templates are designed to be extendable. Create your own variant for any portion of the vehicle model (such as the brakes, suspension, or drivetrain) and you can adjust the libraries so that variant can be selected. It includes the tire modeling software MFeval, another submission on the File Exchange, which inspired this submission.
Please open sm_car_proj.prj to get started.
Use these hyperlinks to access these materials.

Cite As

Steve Miller (2023). Simscape Vehicle Templates (https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/23.1.2.14), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with R2018b to R2023a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Libraries

Libraries/Event

Libraries/Event/Scene/CRG_Custom

Libraries/Event/Scene/CRG_Custom/Data

Libraries/Event/Scene/CRG_Hockenheim

Libraries/Event/Scene/CRG_Hockenheim/Data

Libraries/Event/Scene/CRG_Kyalami

Libraries/Event/Scene/CRG_Kyalami/Data

Libraries/Event/Scene/CRG_Mallory_Park

Libraries/Event/Scene/CRG_Mallory_Park/Data

Libraries/Event/Scene/CRG_Nurburgring_N

Libraries/Event/Scene/CRG_Nurburgring_N/Data

Libraries/Event/Scene/CRG_Pikes_Peak

Libraries/Event/Scene/CRG_Pikes_Peak/Data

Libraries/Event/Scene/CRG_Plateau

Libraries/Event/Scene/CRG_Plateau/Data

Libraries/Event/Scene/CRG_Rough_Road

Libraries/Event/Scene/CRG_Rough_Road/Data

Libraries/Event/Scene/CRG_Suzuka

Libraries/Event/Scene/CRG_Suzuka/Data

Libraries/Event/Scene/Constant_Radius_CL

Libraries/Event/Scene/Double_Lane_Change

Libraries/Event/Scene/Double_Lane_Change_ISO3888

Libraries/Event/Scene/Ice_Patch

Libraries/Event/Scene/MCity

Libraries/Event/Scene/Plane_Grid

Libraries/Event/Scene/RDF

Libraries/Event/Scene/Road_Two_Lane

Libraries/Event/Scene/Skidpad

Libraries/Event/Scene/Track_Mallory_Park

Libraries/Event/Scene/Track_Mallory_Park_Obstacle

Libraries/Event/Tools

Libraries/Event/Tools/CRG_Tools

Libraries/Event/Tools/OpenCRG_v1p1p2/matlab

Libraries/Event/Tools/OpenCRG_v1p1p2/matlab/demo

Libraries/Event/Tools/OpenCRG_v1p1p2/matlab/lib

Libraries/Event/Tools/OpenCRG_v1p1p2/matlab/test

Libraries/Vehicle/Displays/Battery_Temperature

Libraries/Vehicle/Harness/Busses

Libraries/Vehicle/Harness/Linkage

Libraries/Vehicle/Linkage/Scripts

Libraries/Vehicle/Power

Libraries/Vehicle/Power/FuelCell

Libraries/Vehicle/Power/FuelCell/Components/+GasN

Libraries/Vehicle/Power/Shaft2

Libraries/Vehicle/Power/Shaft4

Libraries/Vehicle/Tire/CFL_Libs/Libraries

Libraries/Vehicle/Tire/CFL_Libs/Scripts_Data

Libraries/Vehicle/Tire/CFL_Libs/Scripts_Data/Extrusions

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/MFeval

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/MFeval/+mfeval

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/MFeval/Simulink

Libraries/Vehicle/Tire/MFSwift

Libraries/Vehicle/Tire/Testrig_4Post

Libraries/Vehicle/Utilities/Camera

Libraries/Vehicle/Utilities/SPL_Libs/Extrusion_Scripts

Libraries/Vehicle/Utilities/SPL_Libs/Libraries

Libraries/Vehicle/Utilities/SPL_Libs/Scripts_Data

Libraries/sm_car_doc

Scripts_Data

Scripts_Data/Compare_Struct

Scripts_Data/Configure_Event

Scripts_Data/Data_Vehicle

Scripts_Data/Data_Vehicle/Assemble_Vehicle

Scripts_Data/Data_Vehicle/Presets

Scripts_Data/Data_Vehicle/UI

Scripts_Data/Extrusions

Scripts_Data/Plots

Scripts_Data/Solver_Settings

SimResults

SimResults/Configs

Slides_Videos/Videos

Testrigs/Quarter_Car

Testrigs/Quarter_Car/Results

Workflows/Compare

Workflows/Exercises/Ex_01_Damping_WOT

Workflows/Exercises/Ex_02_Step_Steer

Workflows/Exercises/Ex_03_DLC_config_ARB

Workflows/Exercises/Ex_05_Sweep_ARB

Workflows/Exercises/Ex_06_Regen_Brake

Workflows/Exercises/Ex_07_Tanker_Slosh

Workflows/Exercises/Overview

Workflows/GGV_Diagram

Workflows/Optimize/Traj_vx

Workflows/Optimize/Traj_vx/Overview

Workflows/Optimize/Traj_vx_regen

Workflows/Optimize/Traj_vx_regen/Overview

Workflows/Protected_Mode

Workflows/Testing

Libraries

Libraries/Event/Driver/Drive_Cycle

Libraries/Event/Driver/Gamepad

Libraries/Event/Driver/Long_Lat_Stanley

Libraries/Event/Driver/Open_Loop

Libraries/Event/Maneuver

Libraries/Event/Maneuver/Testrig_4Post

Libraries/Event/Scene/CRG_Custom

Libraries/Event/Scene/CRG_Hockenheim

Libraries/Event/Scene/CRG_Kyalami

Libraries/Event/Scene/CRG_Mallory_Park

Libraries/Event/Scene/CRG_Nurburgring_N

Libraries/Event/Scene/CRG_Pikes_Peak

Libraries/Event/Scene/CRG_Plateau

Libraries/Event/Scene/CRG_Rough_Road

Libraries/Event/Scene/CRG_Suzuka

Libraries/Event/Scene/Constant_Radius_CL

Libraries/Event/Scene/Double_Lane_Change

Libraries/Event/Scene/Double_Lane_Change_ISO3888

Libraries/Event/Scene/Ice_Patch

Libraries/Event/Scene/MCity

Libraries/Event/Scene/Objects/Traffic_Light

Libraries/Event/Scene/Plane_Grid

Libraries/Event/Scene/RDF

Libraries/Event/Scene/Road_Two_Lane

Libraries/Event/Scene/Skidpad

Libraries/Event/Scene/Track_Mallory_Park

Libraries/Event/Scene/Track_Mallory_Park_Obstacle

Libraries/Vehicle/Aero

Libraries/Vehicle/AntiRollBar

Libraries/Vehicle/Body

Libraries/Vehicle/Body/CAD

Libraries/Vehicle/Body/CAD/Bus_Makhulu

Libraries/Vehicle/Body/CAD/Sedan_Hamba

Libraries/Vehicle/Body/CAD/Sedan_Hamba/STL/Body

Libraries/Vehicle/Body/CAD/Trailer_Kumanzi

Libraries/Vehicle/Body/CAD/Trailer_Thwala

Libraries/Vehicle/Body/CAD/Truck_Amandla

Libraries/Vehicle/Body/Human

Libraries/Vehicle/Body/Load_Slosh

Libraries/Vehicle/Body/Sedan

Libraries/Vehicle/Body/Semi_Truck

Libraries/Vehicle/Body/Trailer

Libraries/Vehicle/Brakes

Libraries/Vehicle/Brakes/Axle1

Libraries/Vehicle/Brakes/Axle2

Libraries/Vehicle/Brakes/Axle3

Libraries/Vehicle/Chassis

Libraries/Vehicle/Dampers

Libraries/Vehicle/Dampers/Axle1

Libraries/Vehicle/Dampers/Axle2

Libraries/Vehicle/Dampers/Axle3

Libraries/Vehicle/Dampers/Damper

Libraries/Vehicle/Differential

Libraries/Vehicle/Differential/Gear1DShafts1D

Libraries/Vehicle/Differential/Gear1DShafts3D

Libraries/Vehicle/Differential/Gear1DShafts3Dfix

Libraries/Vehicle/Displays/Battery_Temperature

Libraries/Vehicle/Driveline

Libraries/Vehicle/Driveline/Axle1

Libraries/Vehicle/Driveline/Axle2

Libraries/Vehicle/Driveline/Axle3

Libraries/Vehicle/Driveshaft

Libraries/Vehicle/Harness/Body

Libraries/Vehicle/Harness/Busses

Libraries/Vehicle/Harness/Linkage

Libraries/Vehicle/Harness/Linkage/DW_A

Libraries/Vehicle/Harness/Linkage/DW_B

Libraries/Vehicle/Harness/Linkage/Link5_ShockR

Libraries/Vehicle/Harness/Linkage/SplitLA_ShockF

Libraries/Vehicle/Harness/Sensor

Libraries/Vehicle/Harness/Utilities

Libraries/Vehicle/Linkage

Libraries/Vehicle/Linkage/DW_A

Libraries/Vehicle/Linkage/DW_B

Libraries/Vehicle/Linkage/DW_Decoupled

Libraries/Vehicle/Linkage/DW_PushUA

Libraries/Vehicle/Linkage/Link5C_S2LAF

Libraries/Vehicle/Linkage/Link5_Decoupled

Libraries/Vehicle/Linkage/Link5_S2LAF

Libraries/Vehicle/Linkage/Link5_S2LAR

Libraries/Vehicle/Linkage/RollHeave_Decoupled

Libraries/Vehicle/Linkage/Shock

Libraries/Vehicle/Linkage/SpLA_S2LAF

Libraries/Vehicle/Linkage/SpLA_S2LAR

Libraries/Vehicle/Power

Libraries/Vehicle/Power/Cooling

Libraries/Vehicle/Power/Cooling/Motor2

Libraries/Vehicle/Power/Cooling/Motor3

Libraries/Vehicle/Power/Cooling/Motor4

Libraries/Vehicle/Power/FuelCell

Libraries/Vehicle/Power/Shaft1

Libraries/Vehicle/Power/Shaft2

Libraries/Vehicle/Power/Shaft3

Libraries/Vehicle/Power/Shaft4

Libraries/Vehicle/Springs

Libraries/Vehicle/Springs/Axle1

Libraries/Vehicle/Springs/Axle2

Libraries/Vehicle/Springs/Axle3

Libraries/Vehicle/Springs/Spring

Libraries/Vehicle/Steer/Ackermann

Libraries/Vehicle/Steer/Rack

Libraries/Vehicle/Steer/Wheel

Libraries/Vehicle/Suspension

Libraries/Vehicle/Suspension/DOF15

Libraries/Vehicle/Suspension/LiveAxle

Libraries/Vehicle/Tire

Libraries/Vehicle/Tire/CFL

Libraries/Vehicle/Tire/CFL_Libs/Libraries

Libraries/Vehicle/Tire/Delft/Delft_6p2

Libraries/Vehicle/Tire/Delft/Delft_None

Libraries/Vehicle/Tire/MFEval

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/MFeval/Simulink

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/doc/examples

Libraries/Vehicle/Tire/MFMbody/MFMbody

Libraries/Vehicle/Tire/MFMbody/MFMbody_None

Libraries/Vehicle/Tire/MFSwift/MFSwift_2020p1

Libraries/Vehicle/Tire/MFSwift/MFSwift_2020p2

Libraries/Vehicle/Tire/MFSwift/MFSwift_2021p1

Libraries/Vehicle/Tire/MFSwift/MFSwift_2022p1

Libraries/Vehicle/Tire/MFSwift/MFSwift_2212

Libraries/Vehicle/Tire/MFSwift/MFSwift_None

Libraries/Vehicle/Tire/Testrig_4Post

Libraries/Vehicle/Tire/TireBody

Libraries/Vehicle/Utilities

Libraries/Vehicle/Utilities/Camera

Libraries/Vehicle/Utilities/SPL_Libs/Libraries

Libraries/Vehicle/Vehicle

Libraries/Visualization

Testrigs/Half_Car

Testrigs/Quarter_Car

Libraries/Vehicle/Power/FuelCell/Overview

Libraries/Vehicle/Tire/CFL_Libs/Libraries/Help

Libraries/Vehicle/Tire/MFEval/MFeval_4p0/doc/examples

Libraries/sm_car_doc/brakes

Libraries/sm_car_doc/car

Libraries/sm_car_doc/chassis

Libraries/sm_car_doc/driveline

Libraries/sm_car_doc/power

Libraries/sm_car_doc/suspensions

Overview

Workflows/Compare/Overview

Workflows/Exercises/Ex_01_Damping_WOT

Workflows/Exercises/Ex_02_Step_Steer

Workflows/Exercises/Ex_03_DLC_config_ARB

Workflows/Exercises/Ex_04_Metrics

Workflows/Exercises/Ex_05_Sweep_ARB

Workflows/Exercises/Ex_06_Regen_Brake

Workflows/Exercises/Ex_07_Tanker_Slosh

Workflows/GGV_Diagram/Overview

Workflows/Optimize/Traj_vx/Overview

Workflows/Optimize/Traj_vx_regen/Overview

Version Published Release Notes
23.1.2.14

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/23.1.2.14

22.2.2.13

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.2.2.13

22.2.2.12

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.2.2.12

22.2.2.11

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.2.2.11

22.1.2.10

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.1.2.10

22.1.2.9

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.1.2.9

22.1.2.8

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.1.2.8

22.1.2.7

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.1.2.7

22.1.2.6

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/22.1.2.6

21.2.2.6

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.2.2.6

21.2.2.5

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.2.2.5

21.2.2.4

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.2.2.4

21.1.2.3

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.1.2.3

21.1.2.2

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.1.2.2

21.1.2.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/21.1.2.1

20.2.2.0

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Vehicle-Templates/releases/tag/20.2.2.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.