-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRint_script_decibel.m
More file actions
71 lines (50 loc) · 1.79 KB
/
Copy pathRint_script_decibel.m
File metadata and controls
71 lines (50 loc) · 1.79 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
%% 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
OCV_LUT=[3.49; 3.55; 3.62; 3.71; 3.91; 4.17; 4.19]; %ocv lookup table data
R_int_LUT=[0.0085; 0.0085; 0.0087; 0.0082; 0.0083; 0.0085; 0.0097]; %internal resistance lookup table data
%% setting the model runtime (set_param is used for setting the model run time)
set_param('Rint_model_decibel', 'StopTime', '3600')
%% Model simulation
sim 'Rint_model_decibel'
%% 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