Study of various characteristics of lead acid battery in matlab.
Aim: Study of various characteristics of lead acid battery in matlab.
Objective:
To run a MATLAB script for the mathematical model of lead acid battery and study the results.
Introduction:
What is Depth of discharge (DoD)?
Depth of discharge (DoD) is the fraction or percentage of the capacity which has been removed from the fully charged battery. It is an alternative method to indicate a battery's State of Charge (SoC). The depth of discharge is the complement of state of charge: as one increases, the other decreases.
What is Open circuit voltage (OCV)?
Open-circuit voltage (abbreviated as OCV or VOC) is the difference of electric potential between two terminals of a device when disconnected from any circuit. There is no external load connected. No external electric current flows between the terminals. Alternatively, the open-circuit voltage may be thought of as the voltage that must be applied to a solar cell or a battery to stop the current. It is sometimes given the symbol Voc.
What is internal resistance of the battery?

Fig01: Circuit diagram for the internal resistance of the battery.
All batteries have some internal resistance to some degree.
Batteries have internal resistance because the elements that make it up aren't perfect conductors. The electrodes and electrolytes aren't 100% conductive. So they will have some resistance (internal resistance) in them.
Ideally, a battery should have 0Ω internal resistance. So during battery operation, all the voltage will be dropped across the element that the battery is powering instead of the battery dropping voltage across itself. According to voltage division, voltage drops across the element with the higher impedance. Ohm's law tells you this in V=IR, showing the higher the resistance, the greater the voltage drop. So if a battery has 0Ω of resistance and it will power a device that has at least some impedance, this ensures, according to ohm's law, that the device will get the voltage and not the battery. This is the ideal case but it doesn't occur in real life.
Batteries will always have some resistance. Though the internal resistance may be or appear low, around 0.1Ω for an AA alkaline battery, and about 1Ω to 2Ω for a 9-volt alkaline battery, it can cause a noticeable drop in output voltage if a low-resistance load is attached to it.
What is Peukert's law?
Peukert's law states that, the change in capacity of rechargeable lead–acid batteries at different rates of discharge. As the rate of discharge increases, the battery's available capacity decreases, approximately according to Peukert's law.
For a one-ampere discharge rate, Peukert's law is often stated as
where:
is the capacity at a one-ampere discharge rate, which must be expressed in ampere hours.
is the actual discharge current (i.e. current drawn from a load) in amperes.
is the actual time to discharge the battery, which must be expressed in hours.
is the Peukert constant (dimensionless).
Problem Statement:
Run a MATLAB script for the mathematical model of lead acid battery and comment on it.
Solution:
Matlab script file: Battery discharge curve_Lead acid battery.
clear all
close all
clc
% Mathematical model for lead acid battery.
% Defining time step variables with T
T = (0:50:500000)
CS = zeros(1,length(T)); % Charge supplied
DOD = zeros(1,length(T)); % Depth of discharge
CR = zeros(1,length(T)); % Charge removed
V = zeros(1,length(T)); % Voltage
E = zeros(1,length(T)); % Operating circuit voltage
I = [10,50,100,150,200] % Current in amperes
n = 1; % Number of cells
C = 50; % Capacity in Amp.hrs
k = 1.045; % 0.045 loss of capacity due to discharge.
dt = (T(2) - T(1))*ones(1,length(T)); % Time step
R_in = (0.06/C)*n; % Internal resistance
E(1) = 2.15; % Initial voltage
for i = 1:length(I)
V(1) = n*(2.15-I(i)*R_in);
% Defining the OCV equation.
for n = 2:length(T)
dt(n) = T(n) - T(1);
Cp = (I(i)^k)*(dt(n));
CR(n) = (CR(n-1) + (dt(n)*(I(i)^k))/3600);
DOD(n) = (CR(n)/Cp);
E(n) = 2.15 - DOD(n)*(2.155-1.60);
V(n) = E(n) - I(i)*R_in;
if DOD(n) > 0.99
E(n) = 0;
V(n) = 0;
end
if DOD(n) > 1;
E(n) = 1;
end
if E(n) > 0
CS(n) = (CS(n-1) + (dt(n)*(I(i)^k))/3600);
else
CS(n) = (CS(n-1));
end
end
figure (1)
hold on
plot(DOD,V)
xlabel('DOD')
ylabel('Voltage')
xlim([0 1])
ylim([0 2.5])
legend('10-Amps', '50-Amps' ,'100-Amps', '150-Amps', '200-Amps')
end
figure (2)
plot(DOD,E)
hold on
plot(DOD,V)
xlabel('DOD')
ylabel('Voltage')
xlim([0 1])
ylim([0 2.5])
legend('OCV','Voltage')
figure (3)
plot(CR,E)
hold on
plot(CR,V)
xlabel('CR')
ylabel('Voltage')
xlim([0 1*10^7])
ylim([0 2.5])
legend('OCV','Voltage')
figure (4)
plot(CS,E)
hold on
plot(CS,V)
xlabel('CS')
ylabel('Voltage')
xlim([0 1*10^8])
ylim([0 2.5])
legend('OCV','Voltage')
Firstly we entered the values of the all the input parameters we will need for the modeling.
Where time is defined by the variable 'T' with the step rise of 50.
Charge supplied is defined by the variable 'CS' where it take all the tenth values from the 1 to length(T).
Depth of discharge is defined by the variable 'DOD' where it take all the tenth values from the 1 to length(T).
Charge removed is defined by the variable 'CR' where it take all the tenth values from the 1 to length(T).
Voltage is defined by the variable 'V' where it take all the tenth values from the 1 to length(T).
Open circuit voltage is defined by the variable 'E' where it take all the tenth values from the 1 to length(T).
Current is defined by the variable 'I' for which various input vaules were defined to study their effect on the voltage of the battery.
Number of cells (n), Capacity (C) and Peukert's coefficient(k) were defined as constants.
Time step is defined by the variable 'dt'.

Fig02: Voltage Vs. DOD.
As the magnitude of the current increases the voltage across the battery terminal decreases.

Fig03:(OCV & Voltage) Vs. DOD
Both OCV is greater than that of the voltage threfore it can be seen in the plot.

Fig04:(OCV & Voltage) Vs. CR
With removal of the battery charge OCV and voltage both keeps falling. Since the charge removed is same because of the same battery for both voltages; the magnitude of the OCV remains greater than magnitude of the voltage and it's decrement is praportional to that of the charge removed.

Fig05:(OCV & Voltage) Vs. CS.
With supplied charge of the battery OCV and voltage both keeps falling. Since the charge removed is same because of the same battery for both voltages; the magnitude of the OCV remains greater than magnitude of the voltage and it's decrement is praportional to that of the charge removed.
Conclusion:
In this study we learn various characteristics and modeling of the battery pack using the matlab script.
