Skip to content

Commit cc8272b

Browse files
committed
Added documentation and comments to all models and examples
1 parent 42e306b commit cc8272b

13 files changed

Lines changed: 203 additions & 880 deletions

File tree

OpenIPSL/Electrical/Controls/VariableSpeedDrive/ControllerLogic/VoltsHertzController.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ model VoltsHertzController "Volts/Hertz controller model"
2424
rotation=180,
2525
origin={120,40})));
2626
OpenIPSL.NonElectrical.Continuous.SimpleLag Speed_Sensor(K=1, T=Tr,
27-
y_start=1.9*Modelica.Constants.pi*SysData.fn)
27+
y_start=0.1*1.9*Modelica.Constants.pi*SysData.fn)
2828
annotation (Placement(transformation(extent={{-38,-22},{-18,-2}})));
2929
parameter OpenIPSL.Types.Time Tr=0.01 "Time constant for speed sensor filter"
3030
annotation (Dialog(group="Control Parameters"));

OpenIPSL/Electrical/Controls/VariableSpeedDrive/PowerElectronics/AC2DCandDC2AC.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ model AC2DCandDC2AC "Phasor based voltage source converter model."
5858
Modelica.Blocks.Sources.RealExpression Qmotor(y=n.vr*n.ii - n.vi*n.ir) "Reactive power for drawn motor current"
5959
annotation (Placement(transformation(extent={{24,54},{44,74}})));
6060
OpenIPSL.Types.PerUnit P "Active Power";
61-
Modelica.Units.SI.ActivePower Pdc;
61+
Modelica.Units.SI.ActivePower Pdc "DC Circuit Active Power";
6262
OpenIPSL.Types.PerUnit Q "Reactive Power";
63-
OpenIPSL.Types.PerUnit S "Motor Slip";
63+
OpenIPSL.Types.PerUnit S "Apparent Power";
6464

6565
Modelica.Blocks.Sources.RealExpression Vmotor(y=Capacitor.v*m_input/(2*sqrt(2)
6666
*V_b)) "Motor terminal voltage"

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ partial model baseMotor "Base model for the PSSE three-phase induction motor mod
4141
OpenIPSL.Types.PerUnit Ir "Real part of terminal current";
4242
OpenIPSL.Types.PerUnit Ii "Imaginary part of terminal current";
4343
OpenIPSL.Types.PerUnit Imag "Terminal current magnitude";
44+
OpenIPSL.Types.PerUnit Te_motor "Electromagnetic torque in motor base";
45+
OpenIPSL.Types.PerUnit Te_sys "Electromagnetic torque in system base";
4446

4547
Modelica.Blocks.Math.Gain we_fix(k=1) "Necessary gain for controllable synchronous speed functionality"
4648
annotation (Placement(transformation(extent={{80,-88},{90,-78}})));
@@ -94,8 +96,12 @@ equation
9496
v = sqrt(p.vr^2 + p.vi^2);
9597
anglev = atan2(p.vi, p.vr);
9698
delta = anglev;
97-
P = if Ctrl == true then (p.vr*p.ir + p.vi*p.ii)*(we_fix.y/w_b) else (p.vr*p.ir + p.vi*p.ii);
98-
Q = if Ctrl == true then ((-p.vr*p.ii) + p.vi*p.ir)*(we_fix.y/w_b) else ((-p.vr*p.ii) + p.vi*p.ir);
99+
//P = if Ctrl == true then (p.vr*p.ir + p.vi*p.ii)*(we_fix.y/w_b) else (p.vr*p.ir + p.vi*p.ii);
100+
//Q = if Ctrl == true then ((-p.vr*p.ii) + p.vi*p.ir)*(we_fix.y/w_b) else ((-p.vr*p.ii) + p.vi*p.ir);
101+
//P = (p.vr*p.ir + p.vi*p.ii);
102+
P = if Ctrl == true then Te_sys*nr/w_b else Te_sys;
103+
Q = (-p.vr*p.ii) + p.vi*p.ir;
104+
99105
P_motor = P/CoB;
100106
Q_motor = Q/CoB;
101107
ns = w_sync/N;

OpenIPSL/Electrical/Machines/PSSE/CIM5.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ model CIM5 "PSSE CIM5 three-phase induction motor model"
2323
parameter Real T_nom = 1 "Load torque at 1 pu speed" annotation (Dialog(group="Machine parameters"));
2424
parameter Real D = 1 "Load Damping Factor" annotation (Dialog(group="Machine parameters"));
2525

26-
OpenIPSL.Types.PerUnit Te_motor "Electromagnetic torque in motor base";
27-
OpenIPSL.Types.PerUnit Te_sys "Electromagnetic torque in system base";
26+
2827
OpenIPSL.Types.PerUnit TL "Load torque";
2928

3029
OpenIPSL.Types.PerUnit Epr "Real voltage behind transient reactance";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
within OpenIPSL.Examples.Microgrids.IEEEMicrogrid;
2-
package Data
2+
package Data "Record Data for IEEE Microgrid Example"
33
end Data;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
within OpenIPSL.Examples.Microgrids.IEEEMicrogrid.GeneratorGroups;
2-
model DieselGeneratorUnit
2+
model DieselGeneratorUnit "Diesel Generation Unit"
33
extends OpenIPSL.Interfaces.Generator(V_b = 400);
44
Electrical.Machines.PSSE.GENROE gENROE(
55
V_b=400,
@@ -51,8 +51,8 @@ equation
5151
annotation (Line(points={{-59.4,-16},{-21,-16}}, color={0,0,127}));
5252
connect(sEXS.XADIFD, gENROE.XADIFD) annotation (Line(points={{-2,-31},{-2,-40},
5353
{70,-40},{70,-18},{62,-18}}, color={0,0,127}));
54-
connect(sEXS.EFD0, gENROE.EFD0) annotation (Line(points={{-21,-24},{-26,-24},
55-
{-26,-44},{74,-44},{74,-10},{62,-10}}, color={0,0,127}));
54+
connect(sEXS.EFD0, gENROE.EFD0) annotation (Line(points={{-21,-24},{-26,-24},{
55+
-26,-44},{74,-44},{74,-10},{62,-10}}, color={0,0,127}));
5656
connect(sEXS.ECOMP, gENROE.ETERM) annotation (Line(points={{-21,-20},{-30,-20},
5757
{-30,-48},{78,-48},{78,-6},{62,-6}}, color={0,0,127}));
5858
connect(dEGOV.PMECH,gENROE. PMECH)
@@ -61,10 +61,10 @@ equation
6161
70,28},{-24,28},{-24,18},{-18,18}}, color={0,0,127}));
6262
connect(gENROE.PMECH0, dEGOV.PMECH0) annotation (Line(points={{62,10},{74,10},
6363
{74,32},{-28,32},{-28,6},{-18,6}}, color={0,0,127}));
64-
connect(sEXS.VUEL, zero.y) annotation (Line(points={{-14,-31},{-14,-38},{-36,
65-
-38},{-36,-16},{-59.4,-16}}, color={0,0,127}));
66-
connect(sEXS.VOEL, zero.y) annotation (Line(points={{-10,-31},{-10,-38},{-36,
67-
-38},{-36,-16},{-59.4,-16}}, color={0,0,127}));
64+
connect(sEXS.VUEL, zero.y) annotation (Line(points={{-14,-31},{-14,-38},{-36,-38},
65+
{-36,-16},{-59.4,-16}}, color={0,0,127}));
66+
connect(sEXS.VOEL, zero.y) annotation (Line(points={{-10,-31},{-10,-38},{-36,-38},
67+
{-36,-16},{-59.4,-16}}, color={0,0,127}));
6868
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
6969
coordinateSystem(preserveAspectRatio=false)));
7070
end DieselGeneratorUnit;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
within OpenIPSL.Examples.Microgrids.IEEEMicrogrid;
2-
package GeneratorGroups
2+
package GeneratorGroups "Synchronous Generator Group"
33
extends Modelica.Icons.ExamplesPackage;
44
end GeneratorGroups;

0 commit comments

Comments
 (0)