Discharge time for a lead-acid battery using Peukert's Law.
Aim: To write a MATLAB script to find the discharge time for a lead-acid battery using Peukert's law.
Objectives: To write a MATLAB script to find the discharge time for a lead-acid battery with a capacity of 100Ah at the 20hour rate when discharged at different C rates.
Theory:
Lead Acid Battery:
Construction:
The negative plates of the battery have sponge lead as their active material and the positive have lead peroxide. The plates are immersed in an electrolyte of dilute sulphuric acid(1 part sulphuric acid in 3 parts of water.).
The plates are connected using plate straps to form a cell having a nominal voltage of 2.1Volts. To avoid the plates from touching each other and creating a short circuit, each positive plate is placed in an envelope separator. The envelope separator is a porous material that allows only ions to flow through it and avoid the plates from coming into direct contact with each other.
The cells are then connected in series to form a battery having a voltage of the desired amount, eg. a car uses a 12V lead-acid battery for cranking the engine and to power the lighting, audio, and other electronic equipment.
During discharge:

At the anode, the pure lead reacts with the sulphate ions present in sulphuric acid to form lead suplhate and the lead peroxide reacts with the free hydrogen ions to form lead oxide and water. This lead oxide again reacts with sulphuric acid to form lead sulphate and water. Due to the imbalance in electrons between the plates, the excess electrons flow through the external circuit, hence generating electric current. The sulphuric acid gets further diluted and the rate of reaction taking place reduces hence decreasing the release of electrons.

When the battery is connected to an external DC supply, electrons are supplied to the anode and releases the sulphate ions into the solution. The suplhate ions react with hydron, releasing the oxygen to react with the lead present on the cathode to create lead peroxide.
The lead-acid battery is a commonly used rechargeable battery because its constituents are cheap and provide reliable performance. They are widely used in supplying energy for the starting, lighting, and ignition of automobiles and were up until recent times used for EVs.
The most notable feature of a lead-acid battery is its low internal resistance.
The capacity of its cell is approximately proportional to the area of the plate and the internal resistance is approximately inversely proportional to the plate area.
The internal resistance(R) of a lead-acid battery can be estimated using,
`R `= no. of cells`*(0.22/underset(10)(C))Omega`, where `underset(" "10)(C)` stands for the amp-hr capacity at the 10-hour rate.
For a sealed Lead Acid Battery, the open-circuit voltage E is
E = n x [2.15-DoD x (2.15-2)], where n is the number of cells and DoD is the depth of discharge.
Peukerts Law: Peukerts law states that if the battery is discharged at a higher C rate, the available capacity of the battery decreases.
`t = H(C/(IH))^k`, where
t = Actual time to discharge battery, hours
H = Rated discharge time, hours
C = Capacity, Ah
I = Actual discharge current, A
k = Peukert constant
For lead-acid battery, the Peukert constant varies between 1.0 to 1.6
1.05 -1.15 for sealed type
1.1-1.25 for gel-based
1.2-1.6 for flooded type
Cell voltage - It is the electrical potential difference between the two electrodes of an electrochemical cell.
Unit Volts
Cell charge capacity - the quantity of charge the cell is rated to hold.
Unit - Ah
Ex. If a cell is rated as 12mAh, then it is capable of supplying 12mA for 1 hour.
12mA - 1 Hour - 1C rate
If it is discharging at 6mA then it will last for 2 hours.
6mA - 2 Hours - 0.5C rate
It can also discharge at a value higher than the rated capacity
20mA - 0.6 Hour - 1.6C rate
A lead-acid battery rated for 100Ah at the 20hour rate is considered here. The C rate is 5 Amps.
MATLAB Code:
clear all
close all
clc
% Program to plot discharge of Lead Acid Battery
T = 0:50:50000; %Simulation will run from 0 to 50000s with a time step of 50s
No_of_cells = 5;
V = zeros(1,1001); %Battery voltage
DoD = zeros(1,1001); %Depth of Discharge
CR = zeros(1,1001); %Charge removed from electrodes
CS = zeros(1,1001); %Charge supplied by battery in Ah
I = [10,60,100];
Capacity = 100; %Amp capacity at 20 Hour rate
k = 1.05; %Peukerts coefficient
Rin = (0.022/Capacity)*No_of_cells; %Internal resistance
PeuCap = ((Capacity/20)^k)*20;
dT = 50; %seconds
for i = 1:length(I)
V(1) = open_circuit_voltage(0,No_of_cells) -I(i)*Rin; %Intial Voltage with depth of discharge = 0
for n=2:1001
CR(n) = CR(n-1)+ ((dT*(I(i)^k))/3600); %In Amp-hour
DoD(n) = CR(n)/PeuCap; %PeuCap = Peukert capacity
if DoD(n)>1
DoD(n)=1;
end
V(n)=open_circuit_voltage(DoD(n),No_of_cells)-I(i)*Rin;
if DoD(n)>0.99
V(n)=0; %If Depth of Discharge > 0.99 battery is fully discharged
end
if V(n)>0
CS(n) = CS(n-1)+(dT*I(i)/3600);
else
CS(n)= CS(n-1);
end
end
figure(1)
plot(CS,V);
hold on
xlabel('Charge supplied Amphours');
ylabel('Battery voltage Volts');
title('Constant current discharge of a 100Ah Lead-Acid battery');
figure(2)
plot(T/3600,V);
hold on
xlabel('Time Hours');
ylabel('Battery voltage Volts');
title('Voltage vs Time');
end
figure(1)
lgd = legend("10 A","60 A","100 A");
title(lgd,'Constant current discharge');
figure(2)
lgd = legend("10 A","60 A","100 A");
title(lgd,'Constant current discharge');
function E_oc = open_circuit_voltage(x,N)
%N is no. of cells and x is DoD
E_oc = (2.15-((2.15-2)*x))*N; %Open Circuit Voltage Formula
end
Code Explanation:

Clear all: Clears all the variables from the workspace
Close all: Closes all figures
clc: Clears the command window

% is used to write a comment in the script
Parameters needed for the code are initialized.
T = 0:50:50000, T is the time variable and an array of values from 0 to 50,000 with steps of 50 is stored in it.
V, DoD, CR, and CS are initialized as zeros(1,1001) to which values will later be stored into.
The discharge time and capacity are found for a lead-acid battery having a capacity 100Ah and a Peukert coefficient of 1.05 discharged at current I = 20, 60, and 100 Amps.

The internal resistance is calculated using the formula
R = (0.022/Capacity)*number of cells
Peukert capacity = `(I^k)*T`
Since I =Capacity (Ah)/T(h)
`(I^k)` is rewritten as (Capacity/20)^k
Hence, Peukert capacity = (Capacity/20)^k*20 Ah
dT = 50s is the time step for each calculation

for i = 1:length(I) loop runs for how many ever elements are present in the array I. Since three current values are mentioned, the loop will run 3 times.
V(1) is the voltage at time = 0. It is the open-circuit voltage, i.e. the voltage with no discharge current.
It is found by calling the function open_circuit_voltage(x, N), where x stands for depth of discharge and N for the number of cells.

The cell voltage = (2.15 - ((2.15-2)*depth of discharge))*number of cells.
2.15 is the nominal voltage of each cell.

for n = 2:1001, runs the loop 1000 times and calculates the voltage, charge removed from the electrodes, charge supplied by the electrodes to the load, and the depth of discharge.
Charge removed accounts for the charge removed by the battery plus its self-discharge.
CR = CR(n-1) + ((dT*(I(i)^k))/3600)
CR(n-1) is the charge removed at the previous time step.
(dT*I^k)/3600 is the current removed by the battery considering its self-discharge in Ah.
Depth of discharge is found by dividing the charge removed by the Peukert capacity.

Since the depth of discharge cannot be greater than 1, It is equal to 1 if it exceeds 1 for any iteration.

V(n) is the terminal voltage which is calculated using the depth of discharge value at that time.
if the depth of discharge is greater than 99% then the battery is said to be completely discharged and its terminal voltage is zero.
When the battery voltage is greater than 0, the charge supplied from the battery is calculated. The charge supplied is the current being sent to the load and is calculated without considering the Peukert coefficient, i.e. neglecting the self-discharge of the battery.
Output Plot:


Conclusion:
It is observed that as the discharge current increases the battery capacity decreases and so does its discharge time. For 10A discharge current, the battery discharge for 9.6 hours and gave 95.5Ah capacity whereas at 100A it discharged in 0.86 hours and gave 84Ah capacity.
References:
https://www.youtube.com/watch?v=VnPRX5zQWLw
https://www.electrical4u.com/working-of-lead-acid-battery-lead-acid-secondary-storage-battery/