特征提取(2)
其次,提取的是四块电池的放电至截止电压的时间数据,它将作为预测锂电池的剩余使用寿命的备选健康因子。下图所示,B0005、B0006、B0007、B0018四块电池的放电时间数据经过循环次数的增加而大体上呈下降趋势,与容量退化趋势有一定的相关性。
提取电池放电至截止电压的时间数据如下:
%% 清空环境
clear;%清工作区
clc;%清命令
close all;%关闭所有的Figure窗口
format compact;%压缩空格
tic;%开始计时
%% 005号电池
load('B0005.mat');
j = 0 ;
for i=1:length(B0005.cycle)
cycle_type = B0005.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= min(B0005.cycle(i).data.Voltage_measured);
B0005_Voltage_Data_Time=B0005.cycle(i).data.Time;
A(j,1) =B0005_Voltage_Data_Time(1,n);
end
end
%% 006号电池
load('B0006.mat');
j = 0 ;
for i=1:length(B0006.cycle)
cycle_type = B0006.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= min(B0006.cycle(i).data.Voltage_measured);
B0006_Voltage_Data_Time=B0006.cycle(i).data.Time;
B(j,1) =B0006_Voltage_Data_Time(1,n);
end
end
%% 007号电池
load('B0007.mat');
j = 0 ;
for i=1:length(B0007.cycle)
cycle_type = B0007.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= min(B0007.cycle(i).data.Voltage_measured);
B0007_Voltage_Data_Time=B0007.cycle(i).data.Time;
C(j,1) =B0007_Voltage_Data_Time(1,n);
end
end
%% 018号电池
load('B0018.mat');
j = 0 ;
for i=1:length(B0018.cycle)
cycle_type = B0018.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= min(B0018.cycle(i).data.Voltage_measured);
B0018_Voltage_Data_Time=B0018.cycle(i).data.Time;
D(j,1) =B0018_Voltage_Data_Time(1,n);
end
end
%% 绘图
figure;
plot(A)
hold on;
plot(B)
plot(C)
plot(D)
legend('5号电池','6号电池','7号电池','18号电池');
title('放电至截止电压的时间周期图','FontSize',12);
xlabel('循环周期','FontSize',12);
ylabel('时间/s','FontSize',12);
grid on;
toc;
%% 另存为mat文件
save('data.mat','A')
其中data.mat中的数据为5号电池的提取的备选健康因子的具体数据。
特征提取(3)
提取电池平均温度数据如下:
%% 清空环境
clear;%清工作区
clc;%清命令
%close all;%关闭所有的Figure窗口
format compact;%压缩空格
tic;%开始计时
%% 005号电池
load('B0005.mat');
j = 0 ;
for i=1:length(B0005.cycle)
cycle_type = B0005.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= max(B0005.cycle(i).data.Temperature_measured);
B0006_Voltage_Data_Tem=B0005.cycle(i).data.Temperature_measured;
A(j,1) =(B0006_Voltage_Data_Tem(1,n)-B0006_Voltage_Data_Tem(1,1))/n;
end
end
%% 006号电池
load('B0006.mat');
j = 0 ;
for i=1:length(B0006.cycle)
cycle_type = B0006.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= max(B0006.cycle(i).data.Temperature_measured);
B0006_Voltage_Data_Tem=B0006.cycle(i).data.Temperature_measured;
B(j,1) =(B0006_Voltage_Data_Tem(1,n)-B0006_Voltage_Data_Tem(1,1))/n;
end
end
%% 007号电池
load('B0007.mat');
j = 0 ;
for i=1:length(B0007.cycle)
cycle_type = B0007.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= max(B0007.cycle(i).data.Temperature_measured);
B0007_Voltage_Data_Tem=B0007.cycle(i).data.Temperature_measured;
C(j,1) =(B0007_Voltage_Data_Tem(1,n)-B0007_Voltage_Data_Tem(1,1))/n;
end
end
%% 018号电池
load('B0018.mat');
j = 0 ;
for i=1:length(B0018.cycle)
cycle_type = B0018.cycle(i).type;
data_type = 'discharge';
value = strcmp(cycle_type,data_type);
if value
j=j+1;
[m,n]= max(B0018.cycle(i).data.Temperature_measured);
B0018_Voltage_Data_Tem=B0018.cycle(i).data.Temperature_measured;
D(j,1) =(B0018_Voltage_Data_Tem(1,n)-B0018_Voltage_Data_Tem(1,1))/n;
end
end
%% 绘图
figure;
plot(A)
hold on;
plot(B)
plot(C)
plot(D)
legend('5号电池','6号电池','7号电池','18号电池');
title('放电平均温度值的时间周期图','FontSize',13);
xlabel('循环周期','FontSize',12);
ylabel('放电平均温度','FontSize',12);
grid on;
toc;
最后,提取的是四块电池的从初始温度到最高点的平均温度数据,它将作为预测锂电池的剩余使用寿命的备选健康因子。如下图所示,B0005、B0006、B0007、B0018四块电池的放电平均温度数据经过循环次数的增加而大体上呈增加趋势,与容量退化曲线呈一定程度上的负相关。
相关性分析
上一节中从相关数据中提取备选健康指标,本节通过运用Pearson相关性分析法来探讨温度特征、电压特征与电池容量间的关联关系,做好锂电池剩余使用寿命的准确预测的准备工作。

通过对各备选健康因子的比较和分析,我们最终选择放电截止电压时间作为锂电池的健康因子,并使用其作为预测模型的输入来预测锂电池的剩余使用寿命。
结尾
前置工作完成,数据全部处理完成,后面将是RUL预测的功能实现。如果有没能成功运行的话,我会把处理后的数据集发在评论区。
结束了喵!