Code covered by the BSD License  

4.85714

4.9 | 16 ratings Rate this file 347 Downloads (last 30 days) File Size: 9.29 MB File ID: #28441
image thumbnail

Hybrid-Electric Vehicle Model in Simulink

by

 

10 Aug 2010 (Updated )

Model of a hybrid-electric vehicle with system-level and detailed variants of electrical system.

| Watch this File

File Information
Description

This file contains a hybrid-electric vehicle model built using Simscape, SimElectronics, SimDriveline, and SimPowerSystems that can be configured for system-level tests or power quality analyses. Model variants for the electrical, battery, and vehicle dynamics systems can be selected using configurable subsystems. A battery model created with the Simscape language is incorporated into the model. Supervisory logic is implemented with Stateflow. This model can be configured for hardware-in-the-loop testing.
Please read the README.txt file to get started.

To see the different variants included in this model, please watch the webinar, “Hybrid Electric Vehicle Modeling and Simulation“
http://www.mathworks.com/videos/hybrid-electric-vehicle-modeling-and-simulation-81751.html

To find other physical modeling examples, search for posts with the keyword "physical modeling"
http://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22

To learn more about MathWorks Physical Modeling Products, go to: http://www.mathworks.com/physical-modeling/

Required Products SimDriveline
SimElectronics
SimPowerSystems
Simscape
Simulink
Stateflow
MATLAB release MATLAB 8.3 (R2014a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (42)
19 Dec 2014 nadia belhouchette

Hi, I am a student at the university, I thank you for the development of this model is realized well. I need the transfer function for this engine model, can there anybody give me the transfer function?, I will be very grateful. thanks

18 Aug 2014 Hemanth kumar Varada Reddy

Hi,
Can you please tell me how to use Model Predictive control for this model.
This model uses PID controller, I want to use MPC instead. Please guide me how to do it.
Thanks

19 May 2014 Ramoz  
16 Apr 2014 Qifei Hang

Why there is no R13b version? Can you post one?

10 Apr 2014 Qifei Hang

Thank you!

08 Apr 2014 Qifei Hang  
21 Feb 2014 Julian

Hi Steve!

I have a Problem with the Model, i tried to use a port of it and now it says:

Initial conditions solve failed to converge.
...Equations of one or more components may be dependent or inconsistent. This can cause problems in transient initialization. Here is the set of components involved:
'SystemSimulation/Subsystem1/Ideal Rotational Motion Sensor'
Equation location is:
'C:/Program Files/MATLAB/R2013b/toolbox/physmod/simscape/library/m/+foundation/+mechanical/+sensors/angular_velocity.ssc' (line 45)

'SystemSimulation/Subsystem1/Ideal Torque Source'
Equation location is:
'C:/Program Files/MATLAB/R2013b/toolbox/physmod/simscape/library/m/+foundation/+mechanical/+sources/torque.ssc' (line 35)

Any hints?

Thanks!

27 Jan 2014 shailesh

Hi Steve ,
Great Job !
When I run startup_HEV_Model.m it is showing an error
"
Undefined function or variable 'HEV_Model_PARAM'.

Error in startup_HEV_Model (line 14)
HEV_Model_PARAM

"

Pls help me ASAP.

22 Jan 2014 girish s

How to connect BLDC motor controller(AC7) to tires(magic formula) in simulink,It seems parameters are not matching.please help.....

15 Jan 2014 Roopesh Mishra

Nice Steve Sir, I want to connect PHEV car with PV array for charging purpose...Can u help me in this regarding..and which version is suitable for that

13 Jan 2014 Yu Junquan  
28 Dec 2013 abdussalam omar

electric vehicles

28 Dec 2013 abdussalam omar

i could not get the file

11 Dec 2013 Ahmet Unsal

I would like to modify this model for public transportation which means that I need to change the vehicle dynamics. When I do that (meaning that I increase the vehicle mass and change CG) the programs crashes. Do you have a possible solution for this problem? Best regards...

11 Dec 2013 Ahmet Unsal

I would like create model for public transportation which means that I need to change the vehicle dynamics. When I do that (meaning that I increase the vehicle mass and CG) the programs crashes. Do you have a possible solution for this problem? Best regards...

28 Aug 2013 nypradjna

I can't open the file :(

28 Feb 2013 Zhila

Dear Steve, Thank you very much for the great model.
I wonder if the files and codes for connecting the model to the optimization algorithm would also be available?
I have a model of PHEV power-train which I want to integrate with an optimization algorithm, and I would like to examine what requirements I should care about in making such connections.
I will be grateful if such part is available and possible to be exchanged.

Thanks again.

13 Feb 2013 Hakeem Akorede Shittu

Hello Steve,
I have been able to run this simulation but I have little experience with MATLAB, therefore I did not understand some of the information. What I will like to do though is connect a Solar Panel Model to this Model and see what the level in the state of charge (SOC) of the battery will be after couple of hours. Thanks in advance

13 Feb 2013 Steve Miller

@MD Rashidul -- did you run the startup_HEV_Model.m? It is looking for a library file that needs to be on your path.

22 Jan 2013 MD Rashidul

Hi,

while running 'HEV_ParallelSeries_10b / HEV_SeriesParallel', I got the following error. Would you please suggest something?

Thanks.

Error:

Failed to load library 'HEV_Electrical_Lib' referenced by 'HEV_SeriesParallel/Electrical'

Caused by:
Unable to load block diagram 'HEV_Electrical_Lib'

15 Dec 2012 Loukia  
01 Jul 2012 lll

I think the value of Motor_en in cruise mode(in the control stateflow, on the innermost level)should be '0', right?

27 May 2012 indra setiawan

Dear Steve, i'm using R2011b.
And i found many errors. How i can open the model?
Thanks

05 May 2012 Deepak AGARWAL  
02 May 2012 sajad anbaran

would you please tell me that how i can obtain C code, if i succeed to run simulation.
regards.

30 Apr 2012 sajad anbaran

Hello Steve,
i'm trying to run your system in parallel mode with different stateflow method.since i can't make change in electric subsystem, i put zero for generator required torque. by doing so i disabled Gen.however, when i want to run the simulation, vehicle is always in electric alone mode and doesn't switch to other modes.in other word, motor is the only working power source and engine speed becomes negative. but when i return Gen to the system, everything works nice. another issue is that do i need to change sun ring arrangement of the planetary gear to be operated in parallel HEV. please help me in these issues.

28 Mar 2012 KARTHIKEYAN

steve i am using R2009b.can i run this file in that??? i'm facing lots of error in that.. please make me clear.

09 Jan 2012 Steve Miller

Thanks for your comments, Abhishek.

The Vehicle Dynamics Full subsystem has aerodynamic drag included in it. The "Vehicle Body" block includes aerodynamic drag. The parameters for Drag Coefficient and Frontal Area are included in that calculation. See the documentation for that block: http://www.mathworks.com/help/toolbox/physmod/sdl/ref/vehiclebody.html. --Steve

06 Jan 2012 Abhishek Rai

Hi Steve,
First of all I should congratulate you for your wonderful work.
While I was browsing through the "vehicle dnamics full" subsystem I found that you have not included the aerodynamic drag that you included in "Vehicle Dynamic Simple" subsystem.
I am curious to know tha answer.
Anticipating a soon reply.

28 Dec 2011 Andres RM

Hello Steve, I must conglaturate you because of the model. I'd like to ask you, where did you find documentation to create vectorial controller?

Thanks.

09 Dec 2011 Max

Good time. Can you send me the model code in C language?

02 Nov 2011 Wencong  
13 Aug 2011 lee

Dear Steve,when I use this model to simulate a HEV system in matlab 2010b,it suggests that :Unable to load block diagram 'sdl_lib'.Can you tell me the reasons please?

13 Aug 2011 lee

Dear Steve,when I use this model to simulate a pure EV system in matlab 2010b,it suggests that :Unable to load block diagram 'sdl_lib'.Can you tell me the reasons please?

29 Jul 2011 Steve Miller

Basil -- try the R2010b version that is included in the submission. It may work with R2010a with some warnings.

BearCat -- you can delete the gauges blocks. Road height can be added, but the model currently assumes flat roads.

Lucas -- I haven't parameterized the other battery types. I suggest pulling the battery model directly from the Simulink browser and entering the values there.

29 Jun 2011 Basil Aljorani

can i run this model with 2010a.

04 Feb 2011 Lucas Fuentes

Hi,
I am also interested in what BearCat asks. I need to be able to compare EVs to HEVs to conventional cars (internal combustion only).
Any tips on how to configure these types of vehicle?
Also, when I change the battery type from Ni-Hydride to anything but Li-Ion the simulation fails. I would be interested in comparing the different battery chemistries.
Thanks

14 Nov 2010 BearCat

It cannot find gaugeslibv2.mdl when I start the simulation!

Does the simulation by any chance also consider fuel consumption depending on road topography?

These might be noob questions. But I hope you will answer anyway :-)

06 Sep 2010 curryxt ??

Dear Steve, if I want to use this model to simulate a pure EV system, how should I configure the model? I will highly apprecialte your help.

24 Aug 2010 curryxt ??

Thanks a lot. The above trouble has been removed. While, if I want to use this model to simulate a pure EV system, how should I configure the model?

21 Aug 2010 Steve Miller

curryxt -- are you running release 2010a? Do you have all required products? The missing files you mention are part of the Simscape and SimElectronics installation.

20 Aug 2010 curryxt ??

Sorry, when running, three models -elec_lib.mdl, fl_lib.mdl and 'nesl_utility.mdl cannot be founded ,also some blocks cannot get right parameter values.

Updates
13 Dec 2010

Fix typo in description.

15 Mar 2011

Update to fix simulation issue in R2010b.
Update for R2011a coming soon...

22 Mar 2011

Updated release (R2010b) and required products (Simulink)

15 Apr 2011

Updated for R2011a.
1. Uses new Simscape-based SimDriveline library (includes gear loss models).
2. Added calculation of fuel economy using Curve Fitting Toolbox.
Zip file includes both R2010b and R2011a versions.

21 Apr 2011

Updated for R2011a release. Uses new Simscape-based SimDriveline library, and includes fuel economy calculation via imported data fitted to a surface using Curve Fitting Toolbox. R2010b version using original SimDriveline library still included.

29 Jul 2011

Updated HEV_Model_PCT.mdl, removing link to old content.

18 Mar 2013

Zip now contains R2013a version. Also includes versions for R2011b, R2011a, and R2010b.

09 Apr 2014

Minor update to R2014a image.

17 Apr 2014

Fixed link to webinar.

Contact us