Skip to content

Commit 392ee91

Browse files
committed
Newest updates to PR OpenIPSL#343
* As per recommendation from @dietmarw and @lvanfretti , the variable speed drive package is now under OpenIPSL\Electrical\VSD. * Fixed numerous unit errors in models. * Eliminated Modelica.Constants.pi and Modelica.Constants.eps parameter instances in models and substituted by C.pi and C.eps. * Fixed minor model comment error. * Removed annotation noise.
1 parent 8ab63a7 commit 392ee91

6 files changed

Lines changed: 32 additions & 40 deletions

File tree

OpenIPSL/Electrical/Machines/PSSE/BaseClasses/baseMotor.mo

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ partial model baseMotor "Base model for the PSSE three-phase induction motor mod
1313
final enableP_0=false,
1414
final enableS_b=true);
1515

16-
import Modelica.Constants.pi;
1716
import OpenIPSL.NonElectrical.Functions.SE;
18-
import Modelica.Constants.eps;
1917

2018
parameter Boolean Sup = true "True: Start-up process, False: Steady-state condition" annotation (Dialog(group="Motor Setup"));
2119
parameter Boolean Ctrl = true "True: Model for VSD control, False: Model not controllable"
@@ -74,7 +72,7 @@ partial model baseMotor "Base model for the PSSE three-phase induction motor mod
7472
protected
7573
parameter OpenIPSL.Types.PerUnit p0 = P_0/M_b "Initial active power";
7674
parameter OpenIPSL.Types.PerUnit q0 = Q_0/M_b "Initial reactive power";
77-
parameter Modelica.Units.SI.AngularVelocity w_b=2*pi*fn/N "Base freq in rad/s";
75+
parameter Modelica.Units.SI.AngularVelocity w_b=2*C.pi*fn/N "Base freq in rad/s";
7876
parameter OpenIPSL.Types.PerUnit vr0=v_0*cos(angle_0) "Initial real voltage";
7977
parameter OpenIPSL.Types.PerUnit vi0=v_0*sin(angle_0) "Initial imaginary voltage";
8078
parameter OpenIPSL.Types.PerUnit ir0=(p0*vr0 + q0*vi0)/(vr0^2 + vi0^2) "Initial real current in motor base";

OpenIPSL/Examples/Microgrids/IEEEMicrogrid/Data/LoadsMicrogrid.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ record LoadsMicrogrid "Data record for load power consumption"
33
extends Modelica.Icons.Record;
44

55
// Load 1
6-
parameter Real P1=0.02e6;
7-
parameter Real Q1=0.0123e6;
6+
parameter Modelica.Units.SI.ActivePower P1=0.02e6;
7+
parameter Modelica.Units.SI.ReactivePower Q1=0.0123e6;
88

99

1010
annotation (Documentation(info="<html>
11-
This data record has the active and reactive powers in VA and Var, respectively, that are consumed by the system's loads. The data is used to initialized the network in a certain operating point.
11+
This data record has the active and reactive powers in W and var, respectively, that are consumed by the system's loads. The data is used to initialized the network in a certain operating point.
1212
</html>"));
1313
end LoadsMicrogrid;

OpenIPSL/Examples/Microgrids/IEEEMicrogrid/Data/MachinesMicrogrid.mo

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ record MachinesMicrogrid "Data record for power generation"
33
extends Modelica.Icons.Record;
44

55
// Machine Diesel Unit
6-
parameter Real PDT=0.02e6;
7-
parameter Real QDT=-0.0313e6;
6+
parameter Modelica.Units.SI.ActivePower PDT=0.02e6;
7+
parameter Modelica.Units.SI.ReactivePower QDT=-0.0313e6;
88

99
// PV
10-
parameter Real PPV=0.035e6;
11-
parameter Real QPV=0.0115e6;
10+
parameter Modelica.Units.SI.ActivePower PPV=0.035e6;
11+
parameter Modelica.Units.SI.ReactivePower QPV=0.0115e6;
1212

1313
// BESS
14-
parameter Real PBESS=0.0055e6;
15-
parameter Real QBESS=0;
14+
parameter Modelica.Units.SI.ActivePower PBESS=0.0055e6;
15+
parameter Modelica.Units.SI.ReactivePower QBESS=0;
1616

1717
// Machine Inf
18-
parameter Real PInf=-0.0405e6;
19-
parameter Real QInf= 0.0121e6;
18+
parameter Modelica.Units.SI.ActivePower PInf=-0.0405e6;
19+
parameter Modelica.Units.SI.ReactivePower QInf= 0.0121e6;
2020

2121

2222

2323
annotation (Documentation(info="<html>
24-
This data record has the active and reactive powers in VA and var, respectively, that are delivered by the generation units to the system. The data is used to initialized the network in a certain operating point.
24+
This data record has the active and reactive powers in W and var, respectively, that are delivered by the generation units to the system. The data is used to initialized the network in a certain operating point.
2525
</html>"));
2626
end MachinesMicrogrid;

OpenIPSL/Examples/Microgrids/IEEEMicrogrid/Data/VoltagesMicrogrid.mo

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@ within OpenIPSL.Examples.Microgrids.IEEEMicrogrid.Data;
22
record VoltagesMicrogrid
33
"Data record for voltage magnitude and angle"
44
extends Modelica.Icons.Record;
5-
import Modelica.Constants.pi;
65

76
// Bus HVBus
8-
parameter Real V1=1.00000;
9-
parameter Real A1=0*pi/180;
7+
parameter Modelica.Units.SI.PerUnit V1=1.00000;
8+
parameter Modelica.Units.SI.Angle A1=0*C.pi/180;
109

1110
// Bus LVBus
12-
parameter Real V2=1.00;
13-
parameter Real A2=0.001322568*pi/180;
11+
parameter Modelica.Units.SI.PerUnit V2=1.00;
12+
parameter Modelica.Units.SI.Angle A2=0.001322568*C.pi/180;
1413

1514
// Bus SubBus
16-
parameter Real V3=1.00;
17-
parameter Real A3=0.001845621*pi/180;
15+
parameter Modelica.Units.SI.PerUnit V3=1.00;
16+
parameter Modelica.Units.SI.Angle A3=0.001845621*C.pi/180;
1817

1918
// Bus CentralBus
20-
parameter Real V4=1.00;
21-
parameter Real A4=0.002433209*pi/180;
19+
parameter Modelica.Units.SI.PerUnit V4=1.00;
20+
parameter Modelica.Units.SI.Angle A4=0.002433209*C.pi/180;
2221

2322
// Bus LoadBus
24-
parameter Real V5=1.00;
25-
parameter Real A5=0.002433209*pi/180;
23+
parameter Modelica.Units.SI.PerUnit V5=1.00;
24+
parameter Modelica.Units.SI.Angle A5=0.002433209*C.pi/180;
2625

2726
// Bus CapBus
28-
parameter Real V6=1.00;
29-
parameter Real A6=0.003302665*pi/180;
27+
parameter Modelica.Units.SI.PerUnit V6=1.00;
28+
parameter Modelica.Units.SI.Angle A6=0.003302665*C.pi/180;
3029

3130
// Bus Motor
32-
parameter Real V7=1.00;
33-
parameter Real A7=0.002433209*pi/180;
31+
parameter Modelica.Units.SI.PerUnit V7=1.00;
32+
parameter Modelica.Units.SI.Angle A7=0.002433209*C.pi/180;
3433

3534

3635
annotation (Documentation(info="<html>

OpenIPSL/Examples/Microgrids/IEEEMicrogrid/GeneratorGroups/DieselGeneratorUnit.mo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,4 @@ equation
6565
{-36,-16},{-59.4,-16}}, color={0,0,127}));
6666
connect(sEXS.VOEL, zero.y) annotation (Line(points={{-10,-31},{-10,-38},{-36,-38},
6767
{-36,-16},{-59.4,-16}}, color={0,0,127}));
68-
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
69-
coordinateSystem(preserveAspectRatio=false)));
7068
end DieselGeneratorUnit;

OpenIPSL/Examples/Microgrids/IEEEMicrogrid/IEEEMicrogrid.mo

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,15 @@ model IEEEMicrogrid "IEEE Microgrid Model"
186186
extent={{-16,-16},{16,16}},
187187
rotation=90,
188188
origin={140,-70})));
189-
Electrical.Controls.VariableSpeedDrive.PowerElectronics.AC2DCandDC2AC
190-
aC2DCandDC2AC(
189+
Electrical.VSD.Generic.PowerElectronics.AC2DCandDC2AC aC2DCandDC2AC(
191190
V_b=400,
192191
v_0=PF_results.voltages.V7,
193192
angle_0=PF_results.voltages.A7,
194193
Rdc=0.01,
195194
Cdc=0.000001,
196195
m0=0.095)
197196
annotation (Placement(transformation(extent={{100,-120},{80,-100}})));
198-
Electrical.Controls.VariableSpeedDrive.ControllerLogic.VoltsHertzController
197+
Electrical.VSD.Generic.ControllerLogic.VoltsHertzController
199198
voltsHertzController(
200199
V_b=400,
201200
f_max=80,
@@ -255,16 +254,15 @@ model IEEEMicrogrid "IEEE Microgrid Model"
255254
extent={{-16,-16},{16,16}},
256255
rotation=0,
257256
origin={-196,100})));
258-
Electrical.Controls.VariableSpeedDrive.PowerElectronics.AC2DCandDC2AC
259-
aC2DCandDC2AC1(
257+
Electrical.VSD.Generic.PowerElectronics.AC2DCandDC2AC aC2DCandDC2AC1(
260258
V_b=400,
261259
v_0=PF_results.voltages.V7,
262260
angle_0=PF_results.voltages.A7,
263261
Rdc=0.01,
264262
Cdc=0.000001,
265263
m0=0.095)
266264
annotation (Placement(transformation(extent={{214,-120},{194,-100}})));
267-
Electrical.Controls.VariableSpeedDrive.ControllerLogic.VoltsHertzController
265+
Electrical.VSD.Generic.ControllerLogic.VoltsHertzController
268266
voltsHertzController1(
269267
V_b=400,
270268
f_max=80,
@@ -406,8 +404,7 @@ equation
406404
textString="(7)")}),
407405
experiment(
408406
StopTime=20,
409-
__Dymola_NumberOfIntervals=1000,
410-
__Dymola_Algorithm="Dassl"),
407+
Interval=1000),
411408
Documentation(info="<html>
412409
<p>The IEEEMicrogrid example model was developed based on an example from the IEEE Technical Report <a href=\"modelica://OpenIPSL.UsersGuide.References\">[PES-TR66]</a>.
413410
The microgrid has a total load of 60 kW, distributed equally among three load types: static, and two VSD (Variable Speed Drive) driven motors,

0 commit comments

Comments
 (0)