File Exchange

image thumbnail

Simscape Vehicle Templates

version (60.9 MB) by Steve Miller
Set of templates for creating custom vehicle models using Simscape for use within Simulink.


Updated 27 Oct 2020

View Version History

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:

For more details, see this page:

Here are some of the tasks you can perform:

1. Configure the powertrain architecture to model conventional, hybrid, battery electric, and even fuel cell vehicles.
2. Modify the suspension design by moving hardpoints obtained from a CAD.
3. Connect custom multi-link suspensions to passive and active hydraulic and pneumatic systems.
4. Design active chassis controls by integrating controls for anti-lock brakes, stability, and active roll control systems
5. Develop regenerative braking algorithms by incorporating electrical networks into your vehicle model.
6. Test your embedded software against a virtual vehicle by converting your Simscape model to C Code and running it on a real time computer, such as Speedgoat.

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 read the file to get started.

The download button will let you access files compatible with the latest release (R2020b).
Use these hyperlinks to access versions from earlier releases.

For R2020b: Click on "Download from GitHub" button above.
For R2020a:
For R2019b:
For R2019a:
For R2018b:

Cite As

Steve Miller (2020). Simscape Vehicle Templates (, GitHub. Retrieved .

Comments and Ratings (18)

Steve Miller

Hi Thulasi - I am working on creating a template for a 3-axle vehicle. For now, you could modify the existing template by copy-and-pasting one axle. An easier option would be to just enable the trailer and replace the spherical joint connection with a weld joint so all three axles are connected to the same chassis.

Thulasi Ram

kindly suggest me that how i can use this tool for design of 6 wheel vehicle including each motor at the wheel to drive vehicle

ismail Macit


Greeting Mr.Steve Miller,
I am appreciated that you have been creating this powerful tool.

Steve Miller

Hi Guilherme - does this track include height data or is it flat? Flat is easier, but both are possible. If you are defining a flat track, take a look at the files in "\Libraries\Event\Scene\Track_Mallory_Park". The easiest thing to do would be to modify those files and just use it directly. If you need to specify height as well, modify the files in folder "\Libraries\Event\Scene\CRG_Plateau\Data". Save a copy of the original files as a reference before you start changing them.

Hello!! Great job!! I have a question, what if I want to create my own layout? For example, I am from a Formula Student Team and I want to create the track that will be used in the competition. How do I add the track to the code? What parameters do I need to fill in excel?
Thanks for the attention!

Ronnie Debbe

Steve Miller

Hi i621148 - these models include a couple features that were first introduced in R2018b (the Simscape Bus for grouping physical connections). I cannot port this entire example back to R2017b. You may be able to work directly with the components sm_car_lib to build up your own model. We have plans to add a semi truck and trailer, so click on the "Follow" button up near the "Download from GitHub" button to be informed when we make an update.


How about a semi truck & trailer?


Please include working 2017b version?

Veer Alakshendra

Marco Furlan

Jan Van Rensburg

Please also comment on additional features you would like to see included in the Simscape Vehicle Templates

Oliver Jaehrig

Jan Van Rensburg

Toshinobu Shintai

Great! Thank you for uploading.

MATLAB Release Compatibility
Created with R2020b
Compatible with R2018b to R2020b
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!