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.
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):
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
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.
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
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.
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?
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.
Thanks in advance!
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.
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.
The model is good, I am just wondering how to get a lower A/h battery like 21 A/h?
Updated the description and acknowledgement
Updated description only. No file changes.
Added an updated model for R2012b and later.
Updated the description with new webinar link. Referenced alternator paper available from SAE.
Minor update to directions in Readme.txt.
updated broken webinar link in description
Updated model settings.
Create scripts with code, output, and formatted text in a single executable document.