SoC estimation using the equation in attached image
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi ,I have done this code in order to estimate the battery state of chaege (SoC) by using nasa data-set for battery charging and discharging , the data-sets are taking from this website https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/, part no 5 (Battery Data Set) BatteryAgingARC_53_54_55_56
in specific file named B0056.mat
sorry i could not upload it here due to the size of the file
my code as below
clc
clear all
A=load('B0056.mat');
load('B0056.mat');
for i=1:252![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/636355/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/636355/image.png)
Type=B0056.cycle(i).type;
if strcmp(Type,'discharge')==1
Voltage_measured=B0056.cycle(i).data.Voltage_measured;
Current_measured=B0056.cycle(i).data.Current_measured;
Temperature_measured=B0056.cycle(i).data.Temperature_measured;
% Current_charge=B0056.cycle(i).data.Current_load;
% Voltage_charge=B0056.cycle(i).data.Voltage_load;
Current_charge=B0056.cycle(i).data.Current_charge;
Voltage_charge=B0056.cycle(i).data.Voltage_charge;
Time=B0056.cycle(i).data.Time/3600;
Capacity=B0056.cycle(i).data.Capacity;
for j=1:length(Current_charge)
if (j == 1)
SOC0 = 0;
else
State =(SOC0 -(-(Current_charge(j)*(Time(j)-Time(j-1)))./Capacity)*100);
end
end
end
end
SOC=State;
A=[ Voltage_measured', Current_measured',Temperature_measured',Current_charge',Voltage_charge',Time'];
A(1:end,end+1)=SOC;
a=strcat('B0006.cycle(', num2str(i),').charge.xlsx');
xlswrite(a,A);
data = readtable('B0006.cycle(252).charge.xlsx'); % read Excel file as table
data.Properties.VariableNames = {'Voltage Measured','Current Measured','Temp Measured','Current Charge','Voltage Charge','Time','SoC'}
writetable(data,'B0006.cycle(252).charge.xlsx') % write back modified data to excel file
[num,txt,raw] = xlsread('B0006.cycle(252).charge.xlsx');
[v,T,vT]=xlsread('B0006.cycle(252).charge.xlsx');
t=v(:,6);y=v(:,7);
plot(t,y)
xlabel('time')
ylabel('soc')
it does not show error but it does not show the required results as SoC during discharge should decrease from 100 to some points
I also want to get the recharge cycle when SOC=0 but it shows error in SOC=State;
please help me with that
note: the attach image is for the equation of SOC estimation
1 comentario
NAMRATA MOHANTY
el 16 de Jul. de 2021
Hello Sir. I need your help in understanding SOC estimation concept.
Respuestas (1)
Joel Van Sickel
el 3 de Ag. de 2021
Hello Mustafa,
the link to your data set does not work and you did not include the relevant .mat file so it would be particularly hard for anyone to help answer this question.
However, here: State =(SOC0 -(-(Current_charge(j)*(Time(j)-Time(j-1)))./Capacity)*100);
you are not correctly implementing the equation for an integral so this is probably at least part of the problem. Please see: https://www.mathworks.com/help/matlab/ref/integral.html
Regards,
Joel
Ver también
Categorías
Más información sobre Propulsion and Power Systems en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!