Skip to content

Commit 0eb06d9

Browse files
committed
Conversion to MSL4.0.0
The following changes were applied to the MicroGrid library: * It now uses MSL v4.0.0, Modelon v4.0 and ThermalPower v1.23. * The MicroGrid library merged with OpenCPS_D53B. * Packages are saved in independent folders. * Models are saved in independent files.
1 parent 72828e7 commit 0eb06d9

File tree

486 files changed

+33904
-58696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

486 files changed

+33904
-58696
lines changed

MicroGrid/Copyright.mo

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
within MicroGrid;
2+
class Copyright "Full Legal Disclaimer<html>
3+
<p>&nbsp;</p>
4+
<li>“The MicroGrid subpackage was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.”</li>
5+
<p>&nbsp;</p>
6+
<p>Acknowledgment:</p>
7+
<ul>
8+
<li>“This material is based upon work supported by the U.S. Department of Energy’s Office of Energy Efficiency and Renewable Energy (EERE) under the Advanced Manufacturing Office, Award Number DE-EE0009139”.</li>
9+
</ul>
10+
<p>&nbsp;</p>
11+
</html>"
12+
annotation (
13+
preferredView="info",
14+
DocumentationClass=false,
15+
Icon(graphics={
16+
Text(
17+
extent={{-100,140},{100,100}},
18+
lineColor={0,127,0},
19+
textString="%name%"),
20+
Ellipse(
21+
extent={{-100,100},{100,-100}},
22+
lineColor={0,127,0},
23+
fillColor={255,255,255},
24+
fillPattern=FillPattern.Solid),
25+
Ellipse(
26+
extent={{-60,60},{60,-60}},
27+
lineColor={0,127,72},
28+
fillColor={0,127,0},
29+
fillPattern=FillPattern.Solid),
30+
Ellipse(
31+
extent={{-40,40},{40,-40}},
32+
lineColor={255,255,255},
33+
fillColor={255,255,255},
34+
fillPattern=FillPattern.Solid),
35+
Rectangle(
36+
extent={{28,22},{64,-20}},
37+
lineColor={255,255,255},
38+
fillColor={255,255,255},
39+
fillPattern=FillPattern.Solid)}));
40+
41+
end Copyright;
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
within MicroGrid.Electrical.Controls.TG.GGOV1.Original;
2+
model AccelerationLimiter "GE General GGOV Governor Acceleration Control"
3+
parameter Real Ka "Acceleration limiter gain";
4+
parameter Real Ta "Acceleration limiter time constant (s)";
5+
parameter Real DELT "PSSE time step";
6+
Modelica.Blocks.Math.Gain Acceleration(k=Ka*DELT) annotation (Placement(transformation(extent={{14,-12},{38,12}})));
7+
Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{66,-14},{84,4}})));
8+
Modelica.Blocks.Interfaces.RealInput SPEED "Machine speed deviation from nominal (pu)"
9+
annotation (Placement(transformation(extent={{-124,-78},{-92,-46}}), iconTransformation(extent={{-118,-64},{-92,-38}})));
10+
Modelica.Blocks.Continuous.Derivative s8(
11+
k=1,
12+
T=Ta,
13+
y_start=0,
14+
initType=Modelica.Blocks.Types.Init.InitialOutput) annotation (Placement(transformation(extent={{-76,-26},{-50,0}})));
15+
Modelica.Blocks.Math.Add add1(k2=-1) annotation (Placement(transformation(extent={{-26,-10},{-6,10}})));
16+
protected
17+
parameter Real s80(fixed=false);
18+
public
19+
Modelica.Blocks.Interfaces.RealInput ASET "Acceleration limiter setpoint (p.u./s)"
20+
annotation (Placement(transformation(extent={{-124,32},{-92,64}}), iconTransformation(extent={{-118,38},{-92,64}})));
21+
Modelica.Blocks.Interfaces.RealOutput FSRA "Acceleration Controller Output" annotation (Placement(transformation(extent={{100,38},{122,60}}), iconTransformation(extent={{100,38},{122,60}})));
22+
Modelica.Blocks.Interfaces.RealInput FSR annotation (Placement(transformation(extent={{126,-70},{94,-38}}), iconTransformation(extent={{118,-62},{94,-38}})));
23+
initial equation
24+
s80 = 0;
25+
26+
equation
27+
connect(Acceleration.y, add.u1) annotation (Line(
28+
points={{39.2,0},{34,0},{34,0.4},{64.2,0.4}},
29+
color={0,0,127},
30+
smooth=Smooth.None));
31+
connect(s8.y, add1.u2) annotation (Line(
32+
points={{-48.7,-13},{-40,-13},{-40,-6},{-28,-6}},
33+
color={0,0,127},
34+
smooth=Smooth.None));
35+
connect(Acceleration.u, add1.y) annotation (Line(
36+
points={{11.6,0},{-5,0}},
37+
color={0,0,127},
38+
smooth=Smooth.None));
39+
connect(add1.u1, ASET) annotation (Line(points={{-28,6},{-44,6},{-44,48},{-108,48}}, color={0,0,127}));
40+
connect(s8.u, SPEED) annotation (Line(points={{-78.6,-13},{-87.3,-13},{-87.3,-62},{-108,-62}}, color={0,0,127}));
41+
connect(add.u2, FSR) annotation (Line(points={{64.2,-10.4},{52,-10.4},{52,-54},{110,-54}}, color={0,0,127}));
42+
connect(add.y, FSRA) annotation (Line(points={{84.9,-5},{90.45,-5},{90.45,49},{111,49}}, color={0,0,127}));
43+
annotation (
44+
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={Text(
45+
extent={{-50,-26},{-40,-34}},
46+
lineColor={255,0,0},
47+
textString="s8")}),
48+
Icon(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false), graphics={Rectangle(extent={{-100,100},{100,-100}}, lineColor={0,0,255}),Text(
49+
extent={{-90,62},{-58,40}},
50+
lineColor={28,108,200},
51+
textString="ASET"),Text(
52+
extent={{-62,46},{68,-46}},
53+
lineColor={28,108,200},
54+
fontSize=12,
55+
textString="Acceleration
56+
Limiter"),Text(
57+
extent={{-88,-40},{-52,-64}},
58+
lineColor={28,108,200},
59+
textString="SPEED"),Text(
60+
extent={{64,60},{96,38}},
61+
lineColor={28,108,200},
62+
textString="FSRA"),Text(
63+
extent={{68,-42},{92,-58}},
64+
lineColor={28,108,200},
65+
textString="FSR")}),
66+
Documentation(revisions="<html>
67+
<!--DISCLAIMER-->
68+
<p>OpenIPSL:</p>
69+
<p>Copyright 2016 SmarTS Lab (Sweden)</p>
70+
<ul>
71+
<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li>
72+
</ul>
73+
<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p>
74+
75+
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p>
76+
<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p>
77+
78+
<p></p>
79+
<p>iPSL:</p>
80+
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
81+
<ul>
82+
<li>RTE: <a href=\"http://www.rte-france.com\">http://www.rte-france.com</a></li>
83+
<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li>
84+
<li>AIA: <a href=\"http://www.aia.es/en/energy\"> http://www.aia.es/en/energy</a></li>
85+
<li>DTU: <a href=\"http://www.dtu.dk/english\"> http://www.dtu.dk/english</a></li>
86+
</ul>
87+
<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p>
88+
89+
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p>
90+
<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p>
91+
</html>
92+
"));
93+
end AccelerationLimiter;
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
within MicroGrid.Electrical.Controls.TG.GGOV1.Original;
2+
model GGOV1 "GE General Governor/Turbine Mode"
3+
parameter Real R "Permanent droop (pu)";
4+
parameter Real T_pelec "Electrical power transducer time constant (s)";
5+
parameter Real maxerr "Maximum value for speed error signal";
6+
parameter Real minerr "Minimum value for speed error signal";
7+
parameter Real Kpgov "Governor proportional gain";
8+
parameter Real Kigov "Governor integral gain";
9+
parameter Real Kdgov "Governor derivative gain";
10+
parameter Real Tdgov "Governor derivative controller time constant (s)";
11+
parameter Real Vmax "Maximum valve position limit";
12+
parameter Real Vmin "Minimum valve position limit";
13+
parameter Real Tact "Actuator time constant (s)";
14+
parameter Real Kturb "Turbine gain";
15+
parameter Real Wfnl "No load fuel flow (pu)";
16+
parameter Real Tb "Turbine lag time constant (s)";
17+
parameter Real Tc "Turbine lead time constant (s)";
18+
parameter Real Teng "Transport lag time constant for diesel engine (s)";
19+
parameter Real Tfload "Load Limiter time constant (s)";
20+
parameter Real Kpload "Load limiter proportional gain for PI controller";
21+
parameter Real Kiload "Load limiter integral gain for PI controller";
22+
parameter Real Ldref "Load limiter reference value (pu)";
23+
parameter Real Dm "Mechanical damping coefficient (pu)";
24+
parameter Real Ropen "Maximum valve opening rate (p.u./s)";
25+
parameter Real Rclose "Maximum valve closing rate (p.u./s)";
26+
parameter Real Kimw "Power controller (reset) gain";
27+
parameter Real Aset "Acceleration limiter setpoint (p.u./s)";
28+
parameter Real Ka "Acceleration limiter gain";
29+
parameter Real Ta "Acceleration limiter time constant (s)";
30+
parameter Real Trate "Turbine rating (MW)";
31+
parameter Real db "Speed governor deadband";
32+
parameter Real Tsa "Temperature detection lead time constant (s)";
33+
parameter Real Tsb "Temperature detection lag time constant (s)";
34+
parameter Real Rup "Maximum rate of load limit increase";
35+
parameter Real Rdown "Maximum rate of load limit decrease";
36+
parameter Real DELT "PSSE time step";
37+
Modelica.Blocks.Interfaces.RealInput SPEED "Machine speed deviation from nominal (pu)"
38+
annotation (Placement(transformation(extent={{-302,-2},{-264,36}}), iconTransformation(extent={{-346,100},{-308,138}})));
39+
Modelica.Blocks.Interfaces.RealInput PELEC "Machine electrical power (pu)" annotation (Placement(transformation(extent={{-320,-72},{-284,-36}}), iconTransformation(extent={{-348,-118},{-310,-80}})));
40+
Modelica.Blocks.Sources.Constant AccelerationSet(k=Aset) annotation (Placement(transformation(extent={{-198,-14},{-176,8}})));
41+
Modelica.Blocks.Sources.Constant P_ref(k=Pref) annotation (Placement(transformation(extent={{-234,-102},{-212,-80}})));
42+
Modelica.Blocks.Sources.Constant Pmw_set(k=Pmwset) "Supervisory Load Controller Setpoint," annotation (Placement(transformation(extent={{-234,-146},{-212,-124}})));
43+
Modelica.Blocks.Sources.Constant set(k=Ldref) "load reference" annotation (Placement(transformation(extent={{-200,72},{-178,94}})));
44+
OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.GGOV1.Min_select min_select(frs0=fsr0, nu=3) annotation (Placement(transformation(extent={{-20,-34},{34,20}})));
45+
Modelica.Blocks.Interfaces.RealOutput PMECH "Turbine mechanical power (pu)" annotation (Placement(transformation(extent={{228,22},{254,48}}), iconTransformation(extent={{260,-12},{284,12}})));
46+
public
47+
Original.LoadLimiter gGOV1_Temp(
48+
Kturb=Kturb,
49+
Kpload=Kpload,
50+
Kiload=Kiload,
51+
Dm=Dm,
52+
Wfnl=Wfnl) annotation (Placement(transformation(extent={{-140,40},{-80,100}})));
53+
Modelica.Blocks.Nonlinear.Limiter V(uMax=Vmax, uMin=Vmin) annotation (Placement(transformation(extent={{70,-20},{96,6}})));
54+
Original.Turbine gGOV1_Turb(
55+
Tact=Tact,
56+
Kturb=Kturb,
57+
Tb=Tb,
58+
Tc=Tc,
59+
Teng=Teng,
60+
Tfload=Tfload,
61+
Dm=Dm,
62+
Ropen=Ropen,
63+
Rclose=Rclose,
64+
Tsa=Tsa,
65+
Tsb=Tsb,
66+
DELT=DELT,
67+
Flag=0,
68+
Wfnl=Wfnl) annotation (Placement(transformation(extent={{136,-20},{196,40}})));
69+
Original.AccelerationLimiter gGOV1_Accel(
70+
Ka=Ka,
71+
Ta=Ta,
72+
DELT=DELT) annotation (Placement(transformation(extent={{-140,-48},{-80,12}})));
73+
Original.PIDGovernor gGOV1_Power(
74+
R=R,
75+
T_pelec=T_pelec,
76+
maxerr=maxerr,
77+
minerr=minerr,
78+
Kpgov=Kpgov,
79+
Kigov=Kigov,
80+
Kdgov=Kdgov,
81+
Tdgov=Tdgov,
82+
Dm=Dm,
83+
Kimw=Kimw,
84+
db=db,
85+
Kturb=Kturb,
86+
Wfnl=Wfnl) annotation (Placement(transformation(extent={{-140,-140},{-80,-80}})));
87+
protected
88+
parameter Real Pe0(fixed=false);
89+
parameter Real Pmech0(fixed=false);
90+
parameter Real Pref(fixed=false);
91+
parameter Real Pmwset(fixed=false);
92+
parameter Real fsr0(fixed=false);
93+
94+
initial equation
95+
Pe0 = PELEC;
96+
Pmech0 = PELEC;
97+
Pref = R*Pe0;
98+
Pmwset = Pe0;
99+
fsr0 = (Pmech0 + Dm)/Kturb + Wfnl;
100+
101+
equation
102+
connect(set.y, gGOV1_Temp.LDREF) annotation (Line(points={{-176.9,83},{-158,83},{-158,69.7},{-142.7,69.7}}, color={0,0,127}));
103+
connect(gGOV1_Temp.FSRT, min_select.u[1]) annotation (Line(points={{-77,52},{-52,52},{-52,4},{-52,5.6},{-20,5.6}}, color={0,0,127}));
104+
connect(min_select.yMin, V.u) annotation (Line(points={{36.7,-7},{
105+
52,-7},{52,-7},{67.4,-7}}, color={0,0,127}));
106+
connect(gGOV1_Turb.FSR, V.y) annotation (Line(points={{133.643,-11.6429},{108,
107+
-11.6429},{108,-7},{97.3,-7}}, color={0,0,127}));
108+
connect(gGOV1_Turb.TEXM, gGOV1_Temp.TEXM) annotation (Line(points={{166,
109+
42.5714},{166,42.5714},{166,70},{166,85},{-77.6,85}},
110+
color={0,0,127}));
111+
connect(AccelerationSet.y, gGOV1_Accel.ASET) annotation (Line(points={{-174.9,-3},{-156,-3},{-156,-2.7},{-141.5,-2.7}}, color={0,0,127}));
112+
connect(gGOV1_Accel.FSR, V.y) annotation (Line(points={{-78.2,-33},{-60,-33},{-60,-60},{106,-60},{106,-6},{97.3,-7}}, color={0,0,127}));
113+
connect(gGOV1_Accel.FSRA, min_select.u[2]) annotation (Line(points={{-76.7,-3.3},{-62,-3.3},{-62,-7},{-20,-7}}, color={0,0,127}));
114+
connect(P_ref.y, gGOV1_Power.P_REF) annotation (Line(points={{-210.9,-91},{
115+
-198,-91},{-198,-102.071},{-142.357,-102.071}},
116+
color={0,0,127}));
117+
connect(Pmw_set.y, gGOV1_Power.PMW_SET) annotation (Line(points={{-210.9,-135},
118+
{-196,-135},{-196,-118.786},{-142.357,-118.786}}, color={0,0,127}));
119+
connect(gGOV1_Power.FSRN, min_select.u[3]) annotation (Line(points={{-77.4286,
120+
-110},{-50,-110},{-50,-19.6},{-20,-19.6}}, color={0,0,127}));
121+
connect(gGOV1_Accel.SPEED, SPEED) annotation (Line(points={{-141.5,-33.3},{-240,-33.3},{-240,17},{-283,17}}, color={0,0,127}));
122+
connect(gGOV1_Power.SPEED, SPEED) annotation (Line(points={{-142.357,-90.5},{
123+
-180,-90.5},{-180,-34},{-240,-34},{-240,17},{-283,17}},
124+
color={0,0,127}));
125+
connect(gGOV1_Turb.SPEED, SPEED) annotation (Line(points={{133.857,31.4286},{
126+
100,31.4286},{100,140},{-240,140},{-240,17},{-283,17}},
127+
color={0,0,127}));
128+
connect(gGOV1_Power.PELEC, PELEC) annotation (Line(points={{-142.357,-131.643},
129+
{-182,-131.643},{-182,-168},{-256,-168},{-256,-54},{-302,-54}},
130+
color={0,0,127}));
131+
connect(gGOV1_Temp.WF, V.y) annotation (Line(points={{-78.2,67},{80,67},{80,20},{106,20},{106,-6},{97.3,-7}}, color={0,0,127}));
132+
connect(gGOV1_Temp.PELEC, PELEC) annotation (Line(points={{-110,37.6},{-110,20},{-220,20},{-220,-54},{-302,-54}}, color={0,0,127}));
133+
connect(gGOV1_Power.VSTROKE, gGOV1_Turb.VSTROKE) annotation (Line(points={{
134+
-116.214,-141.929},{-116.214,-180},{212,-180},{212,-11.4286},{198.571,
135+
-11.4286}}, color={0,0,127}));
136+
connect(gGOV1_Turb.PELEC, PELEC) annotation (Line(points={{134.071,10.2143},{
137+
120,10.2143},{120,-200},{-274,-200},{-274,-54},{-302,-54}},
138+
color={0,0,127}));
139+
connect(gGOV1_Turb.PMECH, PMECH) annotation (Line(points={{198.571,10},{214,
140+
10},{214,35},{241,35}},
141+
color={0,0,127}));
142+
connect(gGOV1_Power.GOVOUT1, V.y) annotation (Line(points={{-94.7857,-141.929},
143+
{-94.7857,-160},{112,-160},{112,-12},{108,-12},{108,-7},{97.3,-7}},
144+
color={0,0,127}));
145+
annotation (
146+
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-320,-240},{260,220}})),
147+
Icon(coordinateSystem(extent={{-320,-240},{260,220}}, preserveAspectRatio=false), graphics={Rectangle(extent={{-320,220},{260,-240}}, lineColor={0,0,255}),Text(
148+
extent={{-306,146},{-216,92}},
149+
lineColor={0,0,255},
150+
textString="SPEED"),Text(
151+
extent={{-306,-74},{-222,-126}},
152+
lineColor={0,0,255},
153+
textString="PELEC"),Text(
154+
extent={{-114,64},{92,-64}},
155+
lineColor={0,0,255},
156+
textString="GGOV1"),Text(
157+
extent={{172,24},{256,-28}},
158+
lineColor={0,0,255},
159+
textString="PMECH")}),
160+
Documentation(revisions="<html>
161+
<!--DISCLAIMER-->
162+
<p>OpenIPSL:</p>
163+
<p>Copyright 2016 SmarTS Lab (Sweden)</p>
164+
<ul>
165+
<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li>
166+
</ul>
167+
<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p>
168+
169+
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p>
170+
<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p>
171+
172+
<p></p>
173+
<p>iPSL:</p>
174+
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
175+
<ul>
176+
<li>RTE: <a href=\"http://www.rte-france.com\">http://www.rte-france.com</a></li>
177+
<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li>
178+
<li>AIA: <a href=\"http://www.aia.es/en/energy\"> http://www.aia.es/en/energy</a></li>
179+
<li>DTU: <a href=\"http://www.dtu.dk/english\"> http://www.dtu.dk/english</a></li>
180+
</ul>
181+
<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p>
182+
183+
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p>
184+
<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p>
185+
</html>
186+
"));
187+
end GGOV1;

0 commit comments

Comments
 (0)