All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Week-3: Mathematical Model of a Battery …
Bhaswar Manna
updated on 14 Jun 2021
Week-3: Mathematical Model of a Battery
Problem Statement: Run a MATLAB script for the mathematical model of lead-acid battery and comment on it.
Answer:
Lead-acid battery technology is commonly used in automotive SLI (Starting, Lighting, and Ignition) applications because they are robust, tolerant to abuse, tried and tested, and because of their low cost. For higher power applications with intermittent loads, however, Lead-acid batteries are generally too big and heavy and they suffer from a shorter cycle life and typical usable power down to only 50% Depth of Discharge (DOD).
Lead-acid batteries use lead as anode material and lead dioxide as a cathode material. The electrolyte used is Sulfuric acid. AGM (Absorbed glass mat) is used as a separator.
Amaron Lead-Acid type battery
Visual Representation Udergoing Process Demo
Before diving into the chemical properties, let us have a look into some merits of this type of battery to understand its utmost importance especially in IC engine automotive:
➨It is available in all shapes and sizes.
➨It does not require any maintenance.
➨It is best in terms of reliability and working capabilities.
➨It withstands slow, fast, and overcharging.
➨It is capable to withstand long-term inactivity with or without solvent.
➨It offers the best value for power and energy per KWH.
➨It offers the longest life cycle.
➨About 97% of lead can be recycled and reused in new batteries.
➨It is inexpensive and simple to manufacture; low cost per watt-hour
➨It offers low self-discharge, which is the lowest among rechargeable batteries.
➨It offers good performance at low and high temperatures.
The chemical reaction for a lead-acid battery is as follows,
Anode: Pb+SO2−4⇔PbSO4+2e−
Cathode: PbO2+4H++2e−+SO2−4⇔2H2O+PbSO4
Overall: PbO2+Pb+2H2SO4⇔2PbSO4+2H2O
Here, Figure (a) demonstrates that electrons flow from the anode to the cathode during discharge, and when a load is connected, those electrons will power it.
Figure (b) demonstrates that when the voltage of the cell has depleted to a point that it needs recharging, electrons flow from the cathode into the anode as an external charger provides that power to force those electrons the other way in order to charge the cell.
Figure (c) shows us the cross-sectional view of a lead-acid-based battery.
Important Literature with Terminologies required for developing the script of the lead-acid battery model:
C-rates: In describing batteries, discharge current is often expressed as a C-rate in order to normalize against battery capacity, which is often very different between batteries. A C-rate is a measure of the rate at which a battery is discharged relative to its maximum capacity. A 1C rate means that the discharge current will discharge the entire battery in 1 hour. For a battery with a capacity of 100 Amp-hrs, this equates to a discharge
current of 100 Amps. A 5C rate for this battery would be 500 Amps, and a C/2 rate would be 50 Amps. Similarly, an E-rate describes the discharge power. A 1E rate is the discharge power to discharge the entire battery in 1 hour.
State of Charge (SOC): An expression of the present battery capacity as a percentage of maximum capacity. SOC is generally calculated using current integration to determine the change in battery capacity over time.
Depth of Discharge (DOD): The percentage of battery capacity that has been discharged expressed as a percentage of maximum capacity. A discharge to at least 80 % DOD is referred to as a deep discharge.
Terminal Voltage (V): The voltage between the battery terminals with a load applied. The terminal voltage varies with SOC and discharge/charge current.
Open-circuit voltage (V): The voltage between the battery terminals with no load applied. The open-circuit voltage depends on the battery state of charge, increasing with the state of charge.
Internal Resistance: The resistance within the battery, generally different for charging and discharging, also dependent on the battery state of charge. As internal resistance increases, the battery efficiency decreases, and thermal stability is reduced as more of the charging energy is converted into heat.
Nominal Voltage (V): The reported or reference voltage of the battery, also sometimes thought of as the “normal” voltage of the battery.
Cut-off Voltage: The minimum allowable voltage. It is this voltage that generally defines the “empty” state of the battery.
Capacity or Nominal Capacity (Ah for a specific C-rate): The coulometric capacity, the total Amp-hours available when the battery is discharged at a certain discharge current (specified as a C-rate) from 100 per cent state-of-charge to the cut-off voltage. Capacity is calculated by multiplying the discharge current (in Amps) by the discharge time (in hours) and decreases with increasing C-rate.
Energy or Nominal Energy (Wh for a specific C-rate): The “energy capacity” of the battery, the total Watt-hours available when the battery is discharged at a certain discharge current (specified as a C-rate) from 100 per cent state-of-charge to the cut-off voltage. Energy is calculated by multiplying the discharge power (in Watts) by the discharge time (in hours). Like capacity, energy decreases with increasing C-rate.
Cycle Life (a number for a specific DOD): The number of discharge-charge cycles the battery can experience before it fails to meet specific performance criteria. Cycle life is estimated for specific charge and discharge conditions. The actual operating life of the battery is affected by the rate and depth of cycles and by other conditions such as temperature and humidity. The higher the DOD, the lower the cycle life.
Specific Energy (Wh/kg): The nominal battery energy per unit mass, sometimes referred to as the gravimetric energy density. Specific energy is a characteristic of the battery chemistry and packaging. Along with the energy consumption of the vehicle, it determines the battery weight required to achieve a given electric range.
Specific Power (W/kg): The maximum available power per unit mass. Specific power is a characteristic of the battery chemistry and packaging. It determines the battery weight required to achieve a given performance target.
Energy Density (Wh/L): The nominal battery energy per unit volume, sometimes referred to as the volumetric energy density. Specific energy is a characteristic of the battery chemistry and packaging. Along with the energy consumption of the vehicle, it determines the battery size required to achieve a given electric range.
Power Density (W/L): The maximum available power per unit volume. Specific power is a characteristic of the battery chemistry and packaging. It determines the battery size required to achieve a given performance target.
Maximum Continuous Discharge Current: The maximum current at which the battery can be discharged continuously. This limit is usually defined by the battery manufacturer in order to prevent excessive discharge rates that would damage the battery or reduce its capacity. Along with the maximum continuous power of the motor, this defines the top sustainable speed and acceleration of the vehicle.
Maximum 30-sec Discharge Pulse Current: The maximum current at which the battery can be discharged for pulses of up to 30 seconds. This limit is usually defined by the battery manufacturer in order to prevent excessive discharge rates that would damage the battery or reduce its capacity. Along with the peak power of the electric motor, this defines the acceleration performance (0-60 mph time) of the vehicle.
Charge Voltage: The voltage that the battery is charged to when charged to full capacity. Charging schemes generally consist of a constant current charging until the battery voltage reaches the charge voltage, then constant voltage charging, allowing the charge current to taper until it is very small.
Float Voltage: The voltage at which the battery is maintained after being charge to 100 per cent SOC to maintain that capacity by compensating for self-discharge of the battery.
Charge Current: The ideal current at which the battery is initially charged (to roughly 70 per cent SOC) under a constant charging scheme before transitioning into constant voltage charging.
Internal Resistance (Max): The resistance within the battery, generally different for charging and discharging.
Discharging and Charging Of Battery:
During discharge, the lead dioxide (positive plate) and lead (negative plate) react with the electrolyte of sulfuric acid to create lead sulfate, water, and energy. When fully discharged, you will find two identical lead sulfate plates and diluted sulfuric acid solution.
During charging, the cycle is reversed: the lead sulfate and water are electro-chemically converted to lead, lead oxide, and sulfuric acid by an external electrical charging source. When fully recharged, the Lead dioxide positive plate, Lead negative plate, and concentrated aqueous sulfuric acid solution
Operating the lithium batteries and lead-acid batteries in parallel is possible because lithium batteries have a much flatter charge and discharge voltage curve.
While discharging, the lithium batteries stay above 13.0 Volt until they are almost empty. The lithium voltage is higher than the voltage of a lead-acid battery under load, so the lead-acid battery will hardly deliver any current if anything at all.
After the lithium battery has only about 20% of charge left the voltage becomes low enough to allow the lead-acid batteries to gradually start taking over the load. Only when the lithium battery becomes fully discharged and is taken offline by the BMS, the lead-acid batteries will fully take over. With a correctly dimensioned lithium battery, this will only happen in rare situations. Most of the time, the lead-acid batteries will remain fully charged, which is exactly what keeps them healthy.
As evident, the relationship between the battery voltage (V) and the depth of discharge (DOD) of a lead-acid cell/battery is somewhat a straight line with a negative gradient. Although it is not exactly a straight line the non-linearities are very much negligible, it will be considered a 'y = mx + c' relation for simpler modeling purposes.
While charging, the voltage quickly rises to about 13.4 Volt, a voltage where the lithium batteries absorb all the available current but a too low voltage for lead-acid batteries to meaningfully charge. So the lithium batteries take up all the current until the BMS takes them offline, and only then the voltage rises enough to charge the lead-acid batteries.
When charging the lithium battery, the chargers "see" a voltage that is similar to the voltage of a lead-acid battery which is in its early bulk phase, so the chargers are providing charge current to the lithium battery while "thinking" they are charging a normal lead-acid battery, patiently waiting for the voltage to increase.
When the lithium battery is fully charged it is taken offline by the BMS, the charging continues with the lead-acid batteries only, following a charge trajectory that the chargers fully recognize, allowing them to do their "end-point-voltage-limiting" thing. If the lead-acid battery has not been used, the voltage will rise quickly to the end-voltage and the charging process will be terminated and revert to a "float" voltage.
As long as there is a charge current available the fully charged lithium battery will remain "parked" aside and the onboard equipment will be fed by the charge sources with the lead-acid battery as a buffer. Only when the lead-acid voltage starts dropping below the float voltage, indicating the absence of a charge source, the BMS will put the lithium battery online again.
Another vital aspect that needs to be considered during the discharge of batteries is the effect of discharge current on total capacity. The figure below demonstrates how the capacity of the battery significantly lowers at a higher discharge rate. This figure is not of a pure lead acid battery but the idea remains the same for all batteries.
The discharge curves for a Lithium-Ion cell below show that the effective capacity of the cell is reduced if the cell is discharged at very high rates (or conversely increased with low discharge rates). This is called the capacity offset and the effect is common to most cell chemistries.
To understand the facts behind this kind of behaviors, one thing that needs to be understood is that the internal resistance of a battery is not fixed like the resistance of an externally connected resistor would be. The greater the current demand by the load, the more the battery resists that flow of energy. This means more voltage would need to be used to "push" that demanded current out of the battery, which automatically leaves less voltage for the load. If the demanded current is 100A, with every cycle, there will a massive voltage drop within the battery itself, which it would be wasted as heat, hence leaving much lesser voltage over time for the load to use.
Temperature Characteristics:
Cell performance can change dramatically with temperature. At the lower extreme, in batteries with aqueous electrolytes, the electrolyte itself may freeze setting a lower limit on the operating temperature.
At low temperatures, Lithium batteries suffer from Lithium plating of the anode causing a permanent reduction in capacity.
At the upper extreme the active chemicals may break down destroying the battery. In between these limits the cell performance generally improves with temperature.
The above graph shows how the performance of Lithium-Ion batteries deteriorates as the operating temperature decreases. Probably more important is that, for both high and low temperatures, the further the operating temperature is from room temperature the more the cycle life is degraded.
Terminologies used in the code:
The open circuit voltage (v)--> changes with state of charge (SOC). In case of lead acid battery, open circuit voltage is directly proportional to the state of charge of the battery. The battery capacity used in electric vehicles is usually quoted for some hours discharge. The electric cells have nominal voltages E, which gives approximate voltage when cell delivers electrical power. The internal resistance i.e. R, the current I is flowing out of the battery. The open circuit voltage V can be written
V= E -I*R -------->(1)
While Modeling and Simulation of Battery Performance Parameters R is consider
as Rt= R1+R2
This equation gives a proper prediction of the battery voltage during the electrical load.
The voltage E is not constant and is also affected by the state of charge (SOC) and other parameters such as temperature. Mathematically. From various datasheets, you can verify that the voltage for lead-acid cell varies between 2.2 and 1.8 between completely charged and completely discharged(cut-off) state and can be expressed using the below equation,
E=n⋅2.2−DOD⋅(2.2−1.8) -------->(2)
Where E= Open-Circuit voltage and DOD= Depth Of Discharge
Where n is considered as a number of the cell consist of the battery.
charge. An important reminder is that its internal resistance is not constant so, so E also will not be a constant.
For Nickel type of battery,
The internal resistance of most of the batteries is very low and the empirical formula for internal resistance in terms of the number of cells is
R = No. of cells ×(0.022 /𝐶3) Ω -------->(3) for Lead-acid battery
The battery capacity is denoted by C and measured in Amp-Hours (AH). If the battery capacity is C3 then suffix 3 indicates the three hours of discharge.
State of Charge (SOC): U State of charge of the battery is defined as the ratio of its current capacity(Qt) to its nominal capacity(Qn). The state of charge shows how much energy will be available in the battery for a given time. State of charge ranges from 0 to 100%
SOC= (Qt/Qn)*100 -------->(4)
Depth of Discharge(DOD): The amount of energy removed from the battery is described by the battery
DOD= Charge removed/Peukerts capacity
or DOD= 1-SOC -------->(5)
Charge Supplied ≠ Charged Removed, and this phenomenon is explained by Peukert's law:
Peukert’s law expresses mathematically that as the rate of discharge increases, the available capacity of that battery decreases. It is intuitive to think that the easiest way to rate and understand how long a lead-acid battery would last would be to use the Ah (Amp Hour) rating that is so often designated to them. If a battery was rated at 100Ah, then that was more or less indicative that it would last either 100 hours under a 1 amp load, or 1 hour under a 100 amp load. However, due to the Peukert effect, this is false. If a 100A current was drawn out of a 100Ah battery, it would last for minutes, or even seconds, if the battery is aged or under extreme temperatures. Peukert's law does not account for the temperature or age of the battery, so increasing the Peukert coefficient by a small value would be a better approximation of reality.
The actual battery capacity can be derived from Peukerts capacity (𝐶𝑃) and proved for high current
𝐶𝑃 = 𝐼𝑘 × 𝑇 -------->(6)
Where k is a constant, typically about 1.2 for lead-acid battery called as Peukerts Coefficient. This equation assumes that the battery will discharge until it is flat at a constant current I and will last T hours. Let us assume battery capacity 40C5 then discharge current (I) will be 8A and Peukerts capacity will be 81.2 ×5 = 60.6𝐴h
The discharge time of any battery can be written in terms of capacity rating and initial current drawn from the battery.
Discharge time = Capacity rating/initially drawn current
CHARGE REMOVED: Charge removed describes the amount of energy removed from total energy stored in the battery. The charge removed is higher than the amount of energy supplied to the system. Charge removed also depends upon the behavior of battery earlier time step
The total charge removed from the battery for the nth step of the simulation is 𝐶𝑅 𝑛 and δt is
in seconds, the time step between calculations.
𝐶𝑅 𝑛+1 = 𝐶𝑅 𝑛 + 𝛿𝑡 /3600×𝐼𝑘 Ah -------->(7)
CHARGE SUPPLIED: Charge supplied is the amount of energy supplied from battery to system. Charge supplied is always less than charge removed from the battery depends upon the behavior of battery at an earlier time step
𝐶𝑆 𝑛+1 = 𝐶𝑆 𝑛 + 𝛿𝑡 /3600×𝐼 Ah --------> (8)
Code for Mathematical Modelling of Lead-acid battery using scripts:
To develop the same, reference no. 5 is used which is provided by Skill-Lync, and by going through all the script files the specific code for the same is written--->
clear all
close all
clc
%defining time steps in variable T
% total 10,001 time steps with each time step of 50 seconds
T = (0:50:500000);
CR = zeros(1, length(T));
DOD = zeros(1, length(T));
V = zeros(1, length(T));
CS = zeros(1, length(T));
Cp = zeros(1, length(T));
E = zeros(1, length(T));
I = [10,50,100,150,200]; % CURRENT IN AMPERES
nc = 1; % number of cells
C = 50; % 50 Ah
k = 1.045; % .045 represents loss of capacity due to discharge
dT = (T(2) - T (1))* ones(1, length(T)); % timestep
R_internal = (0.06/C)*nc;
E(1) = 2.15; %open circuit voltage
%V(1) = nc * (2.15 - I(i) * R_internal);
for i = 1:length(I)
V(1) = nc * (2.15 - I(i) * R_internal);
%Define voltage equation for OCV
for n = 2:length(T)
dT(n) = T(n)-T(1);
Cp = (I(i)^k)*dT(n); %Peukert_capacity
CR(n) = (CR(n-1) + (dT(n) * (I(i)^k))/3600);
DOD(n) = (CR(n)) / Cp;
E(n) = 2.15 - DOD(n) * ( 2.15 - 1.75);
V(n) = E(n) - I(i)*R_internal;
if DOD(n) > 0.99
E(n) = 0;
V(n) = 0;
end
if DOD(n) > 1
DOD(n) = 1;
end
if E(n)>0
CS(n) = CS(n-1) + ((I(i)*dT(n))/3600);
else
CS(n)= CS(n-1);
end
end
figure(4);hold on
plot (DOD,V,'LineWidth',3)
ylabel('Voltage (V)','FontSize',18)
xlabel('DOD','FontSize',18)
set(gca,'FontSize',12)
end
plot (DOD, E,'LineWidth',3)
legend('I = 10 A C/5','I = 50 A 1C','I = 100 A 2C','I = 150 A 3C','I = 200 A 4C','Open Circuit Voltage (E)','FontSize',18)
figure(1)
plot( DOD, E,'LineWidth',3 )
hold on
plot( DOD , V,'LineWidth',3 )
legend('E (OCV)', 'V(Voltage)')
ylabel('Voltage')
xlabel('DOD')
set(gca,'FontSize',12)
figure(2)
plot( CR , E ,'LineWidth',3)
hold on
plot( CR , V ,'LineWidth',3)
legend('E (OCV)', 'V(Voltage)')
ylabel('Voltage')
xlabel('CR')
set(gca,'FontSize',12)
figure(3)
plot( CS , E,'LineWidth',3 )
hold on
plot( CS , V ,'LineWidth',3)
legend('E (OCV)', 'V(Voltage)')
ylabel('Voltage')
xlabel('CS')
set(gca,'FontSize',12)
The code logic is as follows:
Results & Observations:
Voltage variations w.r.t. Depth of discharge
Here, the variations of OCV and Nominal Voltage of the battery are given with respect to the depth of discharge. The difference which is seen here is because of the internal resistance and other losses (due to temperature, chemistry, etc)
Voltage variations w.r.t. Charge reduced
From the plot of voltage vs Charge removed (CR) and Voltage vs Charge supplied (CS), it can be seen that the charge removed is higher than the charge supplied to the system.
Voltage variations w.r.t. Charge supplied
This plot shows the variation of OCV and battery voltage with respect to the charge supplied for the same.
Voltage variations at different discharge rating w.r.t. Charge supplied
From the above plot, it can be easily observed that as the discharge rate increases the discharge capacity of the battery decrease. The topmost line is the Open circuit voltage and is the maximum possible voltage that a battery can attain ideally. But in real life this is impossible and by decreasing the discharge rate a close value to OCV can be obtained.
Conclusion: A lead-acid battery mathematical model is successfully done by performing it in the Matlab script coding platform.
References:
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2-Highway Assistant-Lane Changing Assistant
Highway Assistant-Lane Changing Assistant …
17 Sep 2021 09:42 PM IST
Project 1- Traffic Jam Assistant Feature
Problem Statement: To develop one specific requirement of Traffic Jam Assistant algorithm which would predominantly feature in the IPC algorithm. Please note that the whole Traffic Jam Assistant is a very huge algorithm & only one small part of the logic is implemented here. Idea is to familiarize me with concepts…
16 Sep 2021 09:33 PM IST
Project 1 (Mini Project on Vehicle Direction Detection
Aim Of The Project: Identifying the direction of the vehicle based on the camera input. Objective of the Project: Development of MATLAB Simulink model as per requirement. Tag the requirements to the simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine. MBD compliant changes,…
11 Sep 2021 09:23 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.