Repository navigation
Expand file tree
/
Copy pathRint_script_temp.m
More file actions
85 lines (64 loc) · 2.27 KB
/
Copy pathRint_script_temp.m
File metadata and controls
85 lines (64 loc) · 2.27 KB
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
%% cell constants
T_amb=293.15; %Ambient Temperature in Kelvin
Capacity=31; %cell initial capacity in Ah
cell_length=0.227; %cell length in meters
cell_width=0.226; %cell width in meters
cell_thickness=0.0078; %cell thickness in meters
A_cell=cell_length*cell_width; %cell surface area in meter^2
cell_volume=A_cell*cell_thickness; %cell volume in m^3
m_cell=0.72; %mass of cell in kg
Cp_cell=810.5328; %cell specific heat capacity J/(KgK)
h_cell=5; %convective heat transfer coefficient in W/m^2/K
%% Lookup table data
SOC_LUT=[0; 0.1; 0.25; 0.5; 0.75; 0.9; 1.0]; %state of charge lookup table data
Temperature_LUT=[278.15, 293.15, 313.15]; %Temperature lookup table data
Capacity_LUT=[28.01, 27.63, 27.64]; %Capacity lookup table data
OCV_LUT = [3.49, 3.51, 3.52; %ocv lookup table data
3.55, 3.56, 3.56;
3.62, 3.64, 3.64;
3.71, 3.71, 3.72;
3.91, 3.93, 3.94;
4.07, 4.08, 4.08;
4.19, 4.19, 4.19];
R_int_LUT = [0.0117,0.0085, 0.009;
0.0110,0.0085, 0.009;
0.0114,0.0087,0.0092;
0.0107,0.0082,0.0088;
0.0107,0.0083,0.0091;
0.0113,0.0085,0.0089;
0.0116,0.0085,0.0089]; %internal resistance lookup table data
%% setting the model runtime (set_param is used for setting the model run time)
set_param('Rint_model_temp', 'StopTime', '3600')
%% Model simulation
sim 'Rint_model_temp'
%% Results
figure(1)
plot(ans.soc(:,1), ans.soc(:,2))
xlabel ('time(s)')
ylabel('state of charge(%))')
grid on
figure(2)
plot(ans.OCV(:,1),ans.OCV(:,2))
xlabel ('time(s)')
ylabel('open circuit voltage(V))')
grid on
figure(3)
plot(ans.temp(:,1), ans.temp(:,2))
xlabel ('time(s)')
ylabel('Temperature(K))')
grid on
figure(4)
plot(ans.ploss(:,1), ans.ploss(:,2))
xlabel ('time(s)')
ylabel('power loss(watts))')
grid on
figure(5)
plot(ans.rint(:,1), ans.rint(:,2))
xlabel ('time(s)')
ylabel('internal resistance(ohms))')
grid on
figure(6)
plot(ans.vt(:,1), ans.vt(:,2))
xlabel ('time(s)')
ylabel('terminal voltage(V))')
grid on