File Exchange

image thumbnail

Driving Cycle (Simulink Block)

version 2.1.5 (674 KB) by Daniel J. Auger
Produces NEDC, Artemis, WLTP Class 3 and selected EPA driving cycles easily


Updated 24 Jul 2020

View License

This submission contains a Simulink block that can produce several different standard driving cycles used for automotive emissions, range and energy consumption testing. Using this block might save time and effort - I am sharing it to speed up student simulation classes and projects.

At present, the block represents the following cycles: NEDC, Artemis, WLTP Class 3, UDDS, FTP and HWFET. It could easily be extended to provide more.

If you download this as a zip archive, you will need to unzip this and save the files on your computer. After that, you will need to use the 'install.m' script to make sure all the toolbox directories are on your MATLAB search path. You can then find the block demos in the folder 'drivingcycledemos'.

Cite As

Daniel J. Auger (2020). Driving Cycle (Simulink Block) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (53)

Please, where can I find the block model?

Excuse me, I would like to know if this block contains the WMTC Driving Cycle before downloading it.

Thank you.

Ali Molavi

Can anyone answer my question?
I want to find a relation between speed and required current in electrical vehicle ?

Hi, excuse me, I need to add a constructed driving cycle specified to my city to the standard drive cycle provided in the ADVISOR Simulation. May anyone help me?

Anyone is using it with the Powertrain Blockset? I am and I am using the NEDC cycle. And with this cycle my simulation results are not good, the rpm is not stable in constants speeds. The RPM and also the Engine Torque looks like a sin wave, oscilating very quickly. I am trying for several days with Parameter Estimation one number for the PI controller but I can't get a good result. Anyone knows wich number should I put for this cycle?

Besides of that, thank you very much. It is a very usefull!

Ammar Taha

Very useful plugin. Thanks!

That´s very cool :)


nice! thanks!!

Ishu J

plz help me..i am downloaded but i dont know how to use install.m file and how to get the drive cycle block in simulink?

Jin Kusaka


Jin Kusaka

can someone help me here, i used the NEDC drive cycle from the library and connected it with the scope and tried running it but my output is only a flat curve. how do i fix this? Thanks in advance.

Shlok Goel

Is there any way that I can get the data for these drive cycles in a tabular format?

Hao H

Nice work. Thanks

its doesn't work!!

Vidhya sd

not able to run

Great to see so many people using Simulink for their vehicle studies!
Note that since R2016b MathWorks ships a Drive Cycle Source block in the Powertrain Blockset (includes support for units, more cycles, plotting and import capability).



for more details.
Best regards,


Super! Thanks

Can Dikmen

Thank you!

Thanks mate! It saved me some time!

Hey! I am unable to run this block. When I just simulate it and attach a scope then no output appears. Please help urgently.

@RENJITH R SHENOI I have getted the same error,have you solve the problem and how? please help. - and I...


@RENJITH R SHENOI I have getted the same error,have you solve the problem and how? please help.

i am doing project related to the driving cycle studies and i am looking for the apply force that can be applied on to the brake and throttle pedals to achieve the NEDC your help is highly appreciated.
Thank you !

Ivan Bagley

Where is SIMULINK files? I can't find it(

Good day, do anyone how to connect dc motor from simscape simulink with NEDC? or anyone can help me to understand the connection of this block? i am new to matlab, please help. thank you.

Daniel Wan

thank you

Dhanush M

Kari Tammi

Really practical, the nature of the different outputs could be clearer and I needed a dmux to work with them. Saved me a lot of time overall, if you want to limit to the city cycle reduce the simulation time to 780s

While running it getting error " Error in 'sldemo_drivecycle/Drive Cycle': Initialization commands cannot be evaluated.
Caused by:
Undefined function 'selectCycle' for input arguments of type 'char'."

Please help

Pierre Pi

I think there is a bug in the ECE-R15 and therefore also in the NEDC data.

As far as I'm informed the ECE-R15 part lasts 195 and not 196 seconds.


very nice work,thank you



Very good! Thank you!

This submission is very much a quick packaging of ad hoc work. Please let me know if you find any bugs! DJA



Added a missing image for the documentation.


Further tweaks to documentation.


Documentation update only.


Out of date plot replaced.


Updated image.


Fixed some display bugs - saving in R2012b format had accidentally removed ports from the blocks and units from scope axes; these have been reinstated.


Documentation update only,


Substantial tidy up, designed to make installation and use easier. Rudimentary documentation added to block masks.

Minor fix to previous upload

Small change to hierarchy of zip folders; readme.txt added; short paragraph on installation instructions added.

Removed unused legacy files.

Deleted some slprj files from zip archive.

I have attempted to fix some minor bugs with timing - in particular, a few cycles had an extra second or two at zero velocity. This code is saved for R2016a - the oldest I have on my machine - but if you re-save in earlier formats, it might work!

Important bugfix: there was an error in the NEDC, EUDC and ECE R15 cycles - some "intermediate" velocity waypoints had been missed. This has now been corrected.

Added experimental versions of EPA cycles: UDDS, FTP and HWFET. Please let me know of any problems.

Removed Subversion files from upload.

More informative title.

MATLAB Release Compatibility
Created with R2020a
Compatible with R2012b to any release
Platform Compatibility
Windows macOS Linux