File Exchange

image thumbnail

Dual Clutch Transmission Model in Simulink

version 20.1.3.1 (5.16 MB) by Steve Miller
Dual-clutch transmission with MATLAB scripts for optimizing the shift schedule.

16 Downloads

Updated 22 Jun 2020

GitHub view license on GitHub

This file contains a dual-clutch transmission model built using Simscape and Simscape Driveline that can be configured for control algorithm development or optimization tests. The clutch states and pre-selection of the gears via dog clutches is controlled by a state machine modeled in Stateflow. Model variants for the transmission and vehicle dynamics can be selected using configurable subsystems. MATLAB scripts demonstrate how to optimize a shift schedule for maximum fuel economy, and how to speed that process using parallel computing. This model can be configured for hardware-in-the-loop testing.

Please read the README.txt file to get started.

Use the Download button to get files compatible with the current release of MATLAB.
Use the links below to get files compatible with earlier releases of MATLAB.

For R2019b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/19.2.3.0.zip
For R2019a: https://github.com/mathworks/Simscape-Dual-Clutch/archive/19.1.2.6.zip
For R2018b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/18.2.2.5.zip
For R2018a: https://github.com/mathworks/Simscape-Dual-Clutch/archive/18.1.2.4.zip
For R2017b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/17.2.2.3.zip
For R2017a: https://github.com/mathworks/Simscape-Dual-Clutch/archive/17.1.2.2.zip
For R2016b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/16.2.2.1.zip
For R2016a: https://github.com/mathworks/Simscape-Dual-Clutch/archive/16.1.2.0.zip
For R2015b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/15.2.1.14.zip
For R2013b: https://github.com/mathworks/Simscape-Dual-Clutch/archive/13.2.1.9.zip
For R2013a: https://github.com/mathworks/Simscape-Dual-Clutch/archive/13.1.1.8.zip

See the optimization examples in this video (5 min):
https://www.mathworks.com/videos/optimizing-shift-schedule-to-maximize-fuel-economy-68820.html

Learn about model tuning, parameter sweeps, and optimization tasks in this webinar:
https://www.mathworks.com/videos/shift-schedule-optimization-of-a-dual-clutch-transmission-81828.html

Find other Simscape examples by searching posts for the keyword "physical modeling"
https://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22

Learn more about MathWorks Simscape Products:
https://www.mathworks.com/physical-modeling/

Cite As

Steve Miller (2020). Dual Clutch Transmission Model in Simulink (https://github.com/mathworks/Simscape-Dual-Clutch/releases/tag/20.1.3.1), GitHub. Retrieved .

Comments and Ratings (32)

abd abd

mihai stuparu

Hello Steve, i want to analyze the version for 2016a, please i would like to receive this version - mihai.stuparu@yahoo.com
thanks

Elie Kassis

Hello Steve, can you send me a version for 2019b? My email is elie-kassis@hotmail.com. Thanks for your time.

xi

kensilly zhou

Hello Steve - can you send me a version saved in MATLAB R2014b ? My email is- kensilly@2014.cqut.edu.cn. Thank you very much for your time!

kensilly zhou

Hello Steve - can you send me a version saved in MATLAB R2014b ? My email is- kensilly@cqut.edu.cn. Thank you very much for your time!

Dang Quoc Vinh Lai

Hello Steve - Can you explain clearly all the mathematical models used in the engine model ?

Steve Miller

@Catalin - if you provide me your email address, I can send you a version saved in R2015b.

Catalin Murar

Hello Steve - 1.Open Matlab
2. Run startup_DCT_Model.m
3."DCT Model Demo Scirpt" is opened.
4.Click on "a. Shift Map Parameterization: Shift Map Parameterization GUI" link

As result I get the following errors: "Error using +
Matrix dimensions must agree.

Error in Calc_Shift_Map_RO (line 16)
newpts(:,i) = newpts(:,1)+(i-1)*mingeardiff+rampconst*(i-1)*pedalpos;

Error in ShiftMapParamGUI>ShiftMapParamGUI_OpeningFcn (line 69)
[Upshift_Speeds Downshift_Speeds Pedal_Positions] = Calc_Shift_Map_RO(values{1},values{2});

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ShiftMapParamGUI (line 44)
gui_mainfcn(gui_State, varargin{:});"

Should the problem be that I use a 2015b Matlab? I opened the 2017b version on another laptop and save it as 2015b because I don't have a 2017b license.

Thank you very much for your time!
Have a good day -- Catalin

Steve Miller

Hi Catalin - I just tested the files (running >>ShiftMapParamGUI) and did not get this error. If you search the files for "FU_SET", you will find it is defined in ./Optim/setup_optim2D_plots.m, and not in the files your diagnostic cites. Please make sure you ran the startup_DCT_Model.m file. If you can tell me the steps you ran that generated this error, I can try them myself. --Steve

Catalin Murar

Catalin Murar

Hello. I have a lot of errors on the scripts. Can someone help me please? For example when I try to run "Shift Map Parameterization GUI" from DTC Model Demo Script I get the following erros: Undefined function or variable 'FU_SET'.

Error using +
Matrix dimensions must agree.

Error in Calc_Shift_Map_RO (line 16)
newpts(:,i) = newpts(:,1)+(i-1)*mingeardiff+rampconst*(i-1)*pedalpos;

Error in ShiftMapParamGUI>ShiftMapParamGUI_OpeningFcn (line 69)
[Upshift_Speeds Downshift_Speeds Pedal_Positions] = Calc_Shift_Map_RO(values{1},values{2});

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ShiftMapParamGUI (line 44)
gui_mainfcn(gui_State, varargin{:});

Thank you!

LiAM

So good. THX

tupac1971ful

https://imgur.com/a/zoy65

That's the error when i'm trying to run the model simulation in addition to the error when trying to run the gear simulation that i mentioned above.

Steve Miller

Hi tupac1971ful - the drive cycle data is loaded into the workspace by the PreLoadFcn of the model Dual_Clutch_Trans.slx. If you run startup_DCT_Model, everything should work fine. The data itself is saved in subfolder Scripts_Data. --Steve

tupac1971ful

Hello, I'm trying to run the Gear selection animation on Matlab R17a but i get the following error, can you help me?

Invalid setting in 'Dual_Clutch_Trans/Speed Demand/ECE 15 Cycle (Europe)' for parameter 'VariableName'.
Caused by:
Error evaluating parameter 'VariableName' in 'Dual_Clutch_Trans/Speed Demand/ECE 15 Cycle (Europe)'
Undefined variable "UrbanCycle1" or class "UrbanCycle1.time".

kevin Tosh

kevin Tosh

Mr. Zhu

Great, works well.

league yan

very helpful

baby_23

amazing

luis Armando Solis

Bagus Mahartana

xiang ge

It is perfect!

Shiwei Xu

This demo is so good!!!

Mohamed Awadallah

Steve Miller

Hi Chris -- do you have a license for the MathWorks product Model-Based Calibration Toolbox? That product is required for the data-driven model we have used. If you ">>which xregmaskinitialization -all" and get "xregmaskinitialization not found" then you don't have it. You could probably get a trial license of it from your sales rep.

--Steve

Chris

This is a great model but whenever I change the Block choice of the Engine to 'Data Driven' I get the following error.

"Error in 'Dual_Clutch_Trans/Engine/Data Driven/MBC Engine Model From Dynamometer Data/MBC Brake Torque/xregtwostage/Local Model': Initialization commands cannot be evaluated.

Caused by:
Undefined function or variable 'xregmaskinitialization'."

Its a pity as I am building a diesel engine model and this would have been a great model to learn from.

olivier

Sorry, I've realized that we don't have xPCtarget ...

olivier

I've tried to run the simulation, but I get the following error:

Making simulation target "Dual_Clutch_Trans_sfun", ...

'Dual_Clutch_Trans_sfun.bat' is not recognized as an internal or external command,
operable program or batch file.

I'm running Matlab 64bits on Windows 7 with all the necessary toolboxes and compilers.

Venche

Shusen

Updates

20.1.3.1

See release notes for this release on GitHub: https://github.com/mathworks/Simscape-Dual-Clutch/releases/tag/20.1.3.1

2.6.0.2

Connected to GitHub repository.

2.6.0.1

Added links to download files compatible with earlier MATLAB releases.

2.6.0.0

Added R2019a version.

2.5.0.0

Added R2018b version.

2.4.0.0

Updated for R2018a

2.3.0.0

Added R2017b version

2.2.0.0

Added R2017a version and text for citing submission in other works. Made startup file compatible with Mac

2.1.0.0

Added R2016b version.

2.0.0.1

Updated license

2.0.0.0

Fixed broken hyperlink in submission description.

2.0.0.0

Fixed webinar link only.

2.0.0.0

Updated for R2016a. Added hyperlinks to model canvas to change subsystem variants.

1.10.0.0

Fixed webinar link.

1.9.0.0

Updated link to optimization tasks video in "Description". No change to submission files.

1.8.0.0

Updated MATLAB Release information to R2013a

1.6.0.0

Zip contains R2013a version, as well as R2012b and R2011b versions.

1.5.0.0

Corrected release (zip file contains R2011b version)

1.2.0.0

Added 3D animation. The gearbox VRML model is based on Bachelor Thesis of Mr. Jaroslav Prochazka, Department of Computer Graphics and Interaction, Czech Technical University in Prague, Czech Republic.

1.1.0.0

Added link to video.

MATLAB Release Compatibility
Created with R2020a
Compatible with R2013a to R2020a
Platform Compatibility
Windows macOS Linux