필터 지우기
필터 지우기

SoC estimation using the equation in attached image

조회 수: 7 (최근 30일)
Mustafa Ahmed
Mustafa Ahmed 2021년 5월 30일
댓글: Mustafa Ahmed 2021년 8월 7일
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
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
NAMRATA MOHANTY
NAMRATA MOHANTY 2021년 7월 16일
Hello Sir. I need your help in understanding SOC estimation concept.

댓글을 달려면 로그인하십시오.

답변 (1개)

Joel Van Sickel
Joel Van Sickel 2021년 8월 3일
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
  댓글 수: 1
Mustafa Ahmed
Mustafa Ahmed 2021년 8월 7일
thank you sir for your reply
please share your email for more contact details
or contact me via
mufasa.moose@gmail.com

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Propulsion and Power Systems에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by