Code covered by the BSD License

### Highlights from Automotive Electrical System Simulation and Control

4.66667
4.7 | 6 ratings Rate this file 55 Downloads (last 30 days) File Size: 306 KB File ID: #25674 Version: 1.9

# Automotive Electrical System Simulation and Control

### Robyn Jackey (view profile)

28 Oct 2009 (Updated )

A conventional vehicle electrical system model with alternator, battery, loads, and idle control.

File Information
Description

This model shows an example of a conventional vehicle electrical system model, which was shown in the webinar "Optimizing Vehicle Electrical Design through System-Level Simulation". The model is intended to study component sizing, selection, and control.
http://www.mathworks.com/videos/optimizing-vehicle-electrical-design-through-system-level-simulation-81919.html

The electrical system model contains a Simscape lead-acid battery model as described in SAE Paper 2007-01-0778. There are two choices for battery size.

The model also contains data-driven alternator model options using either look-up tables or Model-Based Calibration Toolbox blocks. The alternator model is described in SAE Paper 2007-01-3471.

Control may be added to monitor the system condition, and increase idle speed to compensate for bad conditions in the vehicle charging system.

Vehicle loads are modeled as variable resistive elements.

----------------------------------------------------------------------------

Simulink Design Optimization can be used to estimate battery parameters from experimental battery data. To see how, please watch this video (5 min):
http://www.mathworks.com/videos/estimating-parameters-of-a-battery-68957.html

Parameter estimation for these models from measured data sets at different temperature and current data is a complex task. To learn how MathWorks Consulting can teach you this technique, please contact us or see:

MathWorks Consulting: Battery Simulation and Controls
http://www.mathworks.com/services/consulting/proven-solutions/battery-simulation-and-controls.html

----------------------------------------------------------------------------

Acknowledgements
Required Products Simscape
MATLAB release MATLAB 7.9 (R2009b)
Other requirements Optional requirements: Stateflow Model-Based Calibration Toolbox
13 Oct 2015 Robyn Jackey

### Robyn Jackey (view profile)

Hi Raghuveer,

The battery block re-runs the initialization file ssc_lead_acid_battery_XXAh_ini.m when the simulation starts. You should modify the file directly to change theta_init. You will also need to set Qe_init differently at the end of the file because the spline didn't work right. I just set it to zero and it worked.

Note the under hood temperature in the Vehicle Inputs block will cause the battery temp to rise over time.

Comment only
01 Oct 2015 Raghuveer Sivakumar

### Raghuveer Sivakumar (view profile)

Hi Robyn

I have been using your model and find it very useful. I was wondering if its possible to change the simulation condition to represent a cold setting i.e. temperatures of -10 degrees. I did try and change Theta_init, but when I ran the simulation it changed back to 25. Can you please tell me how to achieve cold simulation

Regards
Sivakumar

25 Sep 2014 Robyn Jackey

### Robyn Jackey (view profile)

Christopher,

You will need to remove the 3D lookup as you mention. If you want to control power output, you will also need to modify the control loop that is adjusting alternator current to meet the voltage setpoint that was coming out of that lookup before.

If you want to discuss more or want some consulting assistance with this, please go to the "contact author" link to email me directly.

Comment only
24 Sep 2014 Christopher

### Christopher (view profile)

Hia Robyn,

Unsure if this is the right place to try and contact you, but I really enjoy the model and think it's a fantastic approach to solving the problem of no alternator/battery plant model.

I hate to ask a question, however, I'm trying to figure out how to modify it a bit so that I can give it a setpoint to try and regulate to based on a given vehicle load and engine speed speed; I'm looking to see the generator duty cycle modulate based on trying to maintain a power output given a battery voltage of my choosing.

Hopefully that makes sense!

This is instead of the 3d lookup based voltage setpoint that's based on temperature/current/engine rpm... do you have any suggestions as an easy way to do that?

12 Sep 2014 Vinicius

### Vinicius (view profile)

29 Jul 2014 Nidhikutty

### Nidhikutty (view profile)

07 Mar 2014 Bella

### Bella (view profile)

Hi Robyn,

I have read your SAE paper on battery modelling and I would like to know if it would eb possible for you to provide a Simulink-only version of the battery model.

Comment only
09 Dec 2013 Nyeinsu

### Nyeinsu (view profile)

Hi, the model is great.
I am very new to simulink and I need to implement lead acid battery model.
May I know how to do the lead acid model with blocks.
Thanks
Bettina

Comment only
03 Apr 2013 Robyn Jackey

### Robyn Jackey (view profile)

Hi David,

Roughly speaking, change the Costar parameter (capacity at 0°C – I think units are either Amp-seconds or Amp-hours) to match the capacity you want. Other resistance parameters may be inversely proportional to the change in capacity, so if you cut the capacity by half you would double the resistances.

If you need a detailed match to a specific model of battery, it gets a bit more complicated. I offer consulting service to help teach techniques to match the model to measured data.

-Robyn

Comment only
02 Apr 2013 David

### David (view profile)

The model is good, I am just wondering how to get a lower A/h battery like 21 A/h?

Comment only
02 Jul 2012 Arpita

### Arpita (view profile)

30 Jun 2010 Charlene (Fatima) Leung-Wai

### Charlene (Fatima) Leung-Wai (view profile)

02 Dec 2009 1.2

Updated model settings.

07 Dec 2009 1.3

updated broken webinar link in description

07 Dec 2009 1.5

Minor update to directions in Readme.txt.
Changed solver setting to "nonadaptive" to avoid warnings.

05 Nov 2012 1.6

Updated the description with new webinar link. Referenced alternator paper available from SAE.

05 Jun 2013 1.7

Added an updated model for R2012b and later.

28 Jan 2014 1.8

Updated description only. No file changes.

18 Apr 2014 1.9

Updated the description and acknowledgement