Project

Matlab script for a discharge curve of a lead acid battery

Following is the matlab script for discharge of lead acid battery.

function E_oc=open_circuit_voltage_LA(x,N)
% Find the open circuit voltage of a lead acid
% battery at any value of depth of discharge
% The depth of discharge value must be between
% 0 (fully charged) and 1.0 (flat).
E_oc = (2.15 - ((2.15-2.00)*x)) * N;

Code for discharge of battery :


T=(0:10:10000); % Time goes up to 10,000 in 10 s steps.
% This gives us 1001 values.
CR=zeros(1,1001); % Charge remaining from battery Peukert corrected.
DoD=zeros(1,1001); % Depth of discharge, start fully charged.
V=zeros(1,1001); % Battery voltage is initially set to zero.
NoCells=60; % 10 of 6 cell (12 Volt) batteries.
Capacity=50; % 50 Ah batteries, 10 h rate capacity
k=1.12; % Peukert coefficient
deltaT = 10; % Take 10s steps, OK for constant power.
P = 5000; % We will drain the battery at 5 kW.
% Calculating values

Rin = (0.022/Capacity)*NoCells; % Internal resistance
PeuCap = ((Capacity/10)^k)*10;
% Starting voltage set outside loop
E = open_circuit_voltage_LA(0,NoCells);
I = (E - (E*E - (4*Rin*P))^0.5)/(2*Rin);
V(1) = E - I*Rin; 


for n=2:1001
E=open_circuit_voltage_LA(DoD(n-1),NoCells); 
I = (E - (E*E - (4*Rin*P))^0.5)/(2*Rin); 
CR(n) = CR(n-1) + ((deltaT * I^k)/3600); %Eq 2.17
DoD(n) = CR(n)/PeuCap; %Eq 2.19
if DoD(n)>1
DoD(n)=1;
end
% We will say that the battery is \"dead\" if the
% depth of discharge exceeds 99%
V(n)=open_circuit_voltage_LA(DoD(n),NoCells) - I*Rin;
if DoD(n)>0.99
V(n)=0;
end
end
color=[rand rand rand];
plot(T,V,\'b.\',\'color\',color);
xlabel(\'Time(secs)\');
ylabel(\'Battery voltage(volts)\');
title(\'Constant power discharge of a Lead acid battery when connected to a load\');
legend(\'Voltage\');
axis([0 4000 100 140]);

Following is the output of the code mentioned :

\"\"

As we can see, as time increases, the voltage drops due to continous draw of current

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.