-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathV_OC_R_0.m
109 lines (86 loc) · 3.47 KB
/
V_OC_R_0.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
%% View open-circuit voltage, internal resistance as previously identified by Edoardo
% See: https://doi.org/10.1016/j.apenergy.2021.116473
% Kevin Moy
% 8/23/2021
clearvars
close all
%% NMC, all cells
NMC_num_cells = 6;
load('/Users/kmoy14/Documents/Research/Model parameter identification/Identification_results_chemistry_comparison/R0_iden_NMC25degC.mat')
load('/Users/kmoy14/Documents/Research/Model parameter identification/Identification_results_chemistry_comparison/Vocv_iden_NMC25degC.mat')
% Concatenate SOC (R0), R0, SOC (OCV), OCV
SOC_R0_NMC = {SOC_points_NMC25_R0_M1; SOC_points_NMC25_R0_M2; ...
SOC_points_NMC25_R0_M3; SOC_points_NMC25_R0_M4; ...
SOC_points_NMC25_R0_M5; SOC_points_NMC25_R0_M6};
R0_NMC = {R0_NMC25_M1; R0_NMC25_M2; R0_NMC25_M3; R0_NMC25_M4; ...
R0_NMC25_M5; R0_NMC25_M6};
SOC_OCV_NMC = {SOC_points_NMC25_Vocv_M1; SOC_points_NMC25_Vocv_M2; ...
SOC_points_NMC25_Vocv_M3; SOC_points_NMC25_Vocv_M4; ...
SOC_points_NMC25_Vocv_M5; SOC_points_NMC25_Vocv_M6};
OCV_NMC = {V_points_NMC25_M1; V_points_NMC25_M2; V_points_NMC25_M3;...
V_points_NMC25_M4; V_points_NMC25_M5; V_points_NMC25_M6};
hFig = figure(1);
set(hFig, 'Position', [100 100 800 1000])
subplot(2,1,1)
hold on
for i = 1:NMC_num_cells
plot(SOC_R0_NMC{i}, R0_NMC{i}, 'LineWidth', 2)
end
legendCell = cellstr(num2str((1:NMC_num_cells)', 'Cell %-d'));
xlabel('SOC, [-]')
ylabel('R_0, [Ohm]')
title('Internal Resistance vs. SOC')
legend(legendCell, 'Location', 'eastoutside')
set(gca, "FontSize", 20)
subplot(2,1,2)
hold on
for i = 1:NMC_num_cells
plot(SOC_OCV_NMC{i}, OCV_NMC{i}, 'LineWidth', 2)
end
legendCell = cellstr(num2str((1:NMC_num_cells)', 'Cell %-d'));
xlabel('SOC, [-]')
ylabel('V_{OC}, [V]')
title('Open Circuit Voltage vs. SOC')
legend(legendCell, 'Location', 'eastoutside')
sgtitle('NMC', 'FontSize', 22)
set(gca, "FontSize", 20)
%% LFP, all cells
LFP_num_cells = 6;
load('/Users/kmoy14/Documents/Research/Model parameter identification/Identification_results_chemistry_comparison/R0_iden_LFP25degC.mat')
load('/Users/kmoy14/Documents/Research/Model parameter identification/Identification_results_chemistry_comparison/Vocv_iden_LFP25degC.mat')
% Concatenate SOC (R0), R0, SOC (OCV), OCV
SOC_R0_LFP = {SOC_points_LFP25_R0_M1; SOC_points_LFP25_R0_M2; ...
SOC_points_LFP25_R0_M3; SOC_points_LFP25_R0_M4; ...
SOC_points_LFP25_R0_M5; SOC_points_LFP25_R0_M6};
R0_LFP = {R0_LFP25_M1; R0_LFP25_M2; R0_LFP25_M3; R0_LFP25_M4; ...
R0_LFP25_M5; R0_LFP25_M6};
SOC_OCV_LFP = {SOC_points_LFP25_Vocv_M1; SOC_points_LFP25_Vocv_M2; ...
SOC_points_LFP25_Vocv_M3; SOC_points_LFP25_Vocv_M4; ...
SOC_points_LFP25_Vocv_M5; SOC_points_LFP25_Vocv_M6};
OCV_LFP = {V_points_LFP25_M1; V_points_LFP25_M2; V_points_LFP25_M3;...
V_points_LFP25_M4; V_points_LFP25_M5; V_points_LFP25_M6};
hFig = figure(1);
set(hFig, 'Position', [100 100 800 1000])
subplot(2,1,1)
hold on
for i = 1:LFP_num_cells
plot(SOC_R0_LFP{i}, R0_LFP{i}, 'LineWidth', 2)
end
legendCell = cellstr(num2str((1:LFP_num_cells)', 'Cell %-d'));
xlabel('SOC, [-]')
ylabel('R_0, [Ohm]')
title('Internal Resistance vs. SOC')
legend(legendCell, 'Location', 'eastoutside')
set(gca, "FontSize", 20)
subplot(2,1,2)
hold on
for i = 1:LFP_num_cells
plot(SOC_OCV_LFP{i}, OCV_LFP{i}, 'LineWidth', 2)
end
legendCell = cellstr(num2str((1:LFP_num_cells)', 'Cell %-d'));
xlabel('SOC, [-]')
ylabel('V_{OC}, [V]')
title('Open Circuit Voltage vs. SOC')
legend(legendCell, 'Location', 'eastoutside')
sgtitle('LFP', 'FontSize', 22)
set(gca, "FontSize", 20)