forked from modelica/ModelicaStandardLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCCV_CellRC.mo
53 lines (53 loc) · 2.64 KB
/
CCCV_CellRC.mo
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
within Modelica.Electrical.Batteries.Examples;
model CCCV_CellRC
"Charge a transient cell with constant current - constant voltage characteristic"
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.Current Isc = 1200 "Short-circuit current of cell at OCVmax";
parameter Modelica.Electrical.Batteries.ParameterRecords.TransientData.ExampleData cellData(
Qnom=18000,
useLinearSOCDependency=false,
Ri=cellData.OCVmax/Isc,
Idis=0.001) "Cell data"
annotation (Placement(transformation(extent={{-10,-60},{10,-40}})));
Modelica.Electrical.Batteries.Utilities.CCCVcharger cccvCharger(I=25, Vend=4.2) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=270,
origin={-50,0})));
Modelica.Electrical.Analog.Basic.Ground ground
annotation (Placement(transformation(extent={{-30,-40},{-10,-20}})));
Modelica.Electrical.Batteries.BatteryStacksWithSensors.CellRC cell(cellData=cellData) annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=270)));
Analog.Sensors.MultiSensor multiSensor
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
Blocks.Continuous.Integrator energy(u(unit="W"), y(unit="J"))
annotation (Placement(transformation(extent={{-60,24},{-80,44}})));
equation
connect(cell.n, ground.p)
annotation (Line(points={{0,-10},{0,-20},{-20,-20}}, color={0,0,255}));
connect(ground.p, cccvCharger.n)
annotation (Line(points={{-20,-20},{-50,-20},{-50,-10}},
color={0,0,255}));
connect(multiSensor.nc, cell.p)
annotation (Line(points={{-10,40},{0,40},{0,10}}, color={0,0,255}));
connect(multiSensor.power, energy.u)
annotation (Line(points={{-31,34},{-58,34}}, color={0,0,127}));
connect(ground.p, multiSensor.nv)
annotation (Line(points={{-20,-20},{-20,30}}, color={0,0,255}));
connect(multiSensor.pc, multiSensor.pv)
annotation (Line(points={{-30,40},{-30,50},{-20,50}}, color={0,0,255}));
connect(multiSensor.pc, cccvCharger.p)
annotation (Line(points={{-30,40},{-50,40},{-50,10}}, color={0,0,255}));
annotation (experiment(
StopTime=1200,
Interval=0.1,
Tolerance=1e-06),
Documentation(info="<html>
<p>
A single transient cell depleted to <code>SOC = 0.1</code> is recharged with a CC-CV charger.
Charging current in CC mode is 5C which means the battery is theoretically nearly fulled charged after <code>0.9*3600 s/5 = 648 s</code> and the charger switches to CV mode.
Simulate for 1200 s and plot <code>cell.cellBus.soc</code> versus <code>time</code>.
</p>
</html>"));
end CCCV_CellRC;