Skip to content

Commit

Permalink
Merge pull request #158 from MaximeBaudette/ApplicationExamples
Browse files Browse the repository at this point in the history
Application examples
  • Loading branch information
tinrabuzin committed Apr 5, 2016
2 parents 353ac0c + c389ea3 commit 5aa9438
Show file tree
Hide file tree
Showing 33 changed files with 749 additions and 537 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within KundurSMIB;
package Generation_Groups
package Generation_Groups


annotation (Documentation(revisions="<html>
Expand Down
52 changes: 3 additions & 49 deletions Application Examples/KundurSMIB/SMIB.mo
Original file line number Diff line number Diff line change
@@ -1,71 +1,25 @@
within KundurSMIB;
model SMIB
extends SMIB_Partial;
import Modelica.Constants.pi;
iPSL.Electrical.Buses.Bus B1 annotation (Placement(transformation(extent={{-92,-12},{-68,12}})));
iPSL.Electrical.Buses.Bus B2 annotation (Placement(transformation(extent={{-32,-12},{-8,12}})));
iPSL.Electrical.Buses.Bus B3 annotation (Placement(transformation(extent={{48,-12},{72,12}})));
Generation_Groups.Generator G1(
V_0=1,
P_0=0.899999999997135*S_b,
Q_0=0.436002238696658*S_b,
angle_0=0.494677176989155*180/pi) annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
iPSL.Electrical.Branches.PSAT.TwoWindingTransformer transformer(
Sn=2220,
x=0.15,
r=0,
V_b=400,
Vn=400) annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
iPSL.Electrical.Branches.PwLine line_1(
R=0,
G=0,
B=0,
X=0.5) annotation (Placement(transformation(extent={{10,14},{28,26}})));
iPSL.Electrical.Buses.InfiniteBus infinite_bus(angle_0=0, V_0=0.900810000000000) annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=180,
origin={110,0})));
iPSL.Electrical.Events.PwFault fault(
R=0,
t1=0.5,
t2=0.57,
X=1e-5) annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
iPSL.Electrical.Branches.PwLine line_2(
R=0,
G=0,
B=0,
X=0.93,
t1=0.57,
t2=100,
opening=1) annotation (Placement(transformation(extent={{10,-26},{28,-14}})));
inner iPSL.Electrical.SystemBase SysData(S_b=2220, fn=60) annotation (Placement(transformation(extent={{-140,80},{-86,100}})));
protected
parameter Real S_b=SysData.S_b;
equation
connect(G1.pwPin, B1.p) annotation (Line(points={{-99,0},{-80,0}}, color={0,0,255}));
connect(B1.p, transformer.p) annotation (Line(points={{-80,0},{-70,0},{-61,0}}, color={0,0,255}));
connect(transformer.n, B2.p) annotation (Line(points={{-39,0},{-20,0}}, color={0,0,255}));
connect(B2.p, line_1.p) annotation (Line(points={{-20,0},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_1.n, B3.p) annotation (Line(points={{29.5,20},{50,20},{50,0},{60,0}}, color={0,0,255}));
connect(B3.p, infinite_bus.p) annotation (Line(points={{60,0},{99,0}}, color={0,0,255}));
connect(fault.p, line_1.p) annotation (Line(points={{-1.66667,-50},{-14,-50},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_2.n, B3.p) annotation (Line(points={{29.5,-20},{50,-20},{50,0},{60,0}}, color={0,0,255}));
connect(line_2.p, line_1.p) annotation (Line(points={{8.5,-20},{-10,-20},{-10,20},{8.5,20}}, color={0,0,255}));
annotation (
Diagram(coordinateSystem(extent={{-140,-100},{120,100}}, preserveAspectRatio=false), graphics={Text(
extent={{-110,80},{110,60}},
extent={{-110,68},{110,48}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=15,
textStyle={TextStyle.Bold},
textString="Example 1: Single-machine infinite bus model*
(Constant Efd)"), Text(
extent={{-164,-88},{54,-106}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=12,
textString="*P. Kundur, \"Power System Stability and Control\", Example 13.2")}),
textString="(Constant Efd)")}),
Icon(coordinateSystem(extent={{-140,-100},{120,100}})),
experiment(
StopTime=10,
Expand Down
55 changes: 4 additions & 51 deletions Application Examples/KundurSMIB/SMIB_AVR.mo
Original file line number Diff line number Diff line change
@@ -1,72 +1,25 @@
within KundurSMIB;
model SMIB_AVR
extends SMIB_Partial;
import Modelica.Constants.pi;
iPSL.Electrical.Buses.Bus B1 annotation (Placement(transformation(extent={{-92,-12},{-68,12}})));
iPSL.Electrical.Buses.Bus B2 annotation (Placement(transformation(extent={{-32,-12},{-8,12}})));
iPSL.Electrical.Buses.Bus B3 annotation (Placement(transformation(extent={{48,-12},{72,12}})));
Generation_Groups.Generator_AVR G1(
V_0=1,
P_0=0.899999999997135*S_b,
Q_0=0.436002238696658*S_b,
angle_0=0.494677176989155*180/pi) annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
iPSL.Electrical.Branches.PSAT.TwoWindingTransformer transformer(
Sn=2220,
x=0.15,
r=0,
V_b=400,
Vn=400) annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
iPSL.Electrical.Branches.PwLine line_1(
R=0,
G=0,
B=0,
X=0.5,
opening=1) annotation (Placement(transformation(extent={{10,14},{28,26}})));
iPSL.Electrical.Buses.InfiniteBus infinite_bus(angle_0=0, V_0=0.900810000000000) annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=180,
origin={110,0})));
iPSL.Electrical.Events.PwFault fault(
R=0,
t1=0.5,
t2=0.57,
X=1e-5) annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
iPSL.Electrical.Branches.PwLine line_2(
R=0,
G=0,
B=0,
X=0.93,
t1=0.57,
t2=100,
opening=1) annotation (Placement(transformation(extent={{10,-26},{28,-14}})));
inner iPSL.Electrical.SystemBase SysData(S_b=2220, fn=60) annotation (Placement(transformation(extent={{-140,80},{-86,100}})));
protected
parameter Real S_b=SysData.S_b;
equation
connect(G1.pwPin, B1.p) annotation (Line(points={{-99,0},{-80,0}}, color={0,0,255}));
connect(B1.p, transformer.p) annotation (Line(points={{-80,0},{-70,0},{-61,0}}, color={0,0,255}));
connect(transformer.n, B2.p) annotation (Line(points={{-39,0},{-20,0}}, color={0,0,255}));
connect(B2.p, line_1.p) annotation (Line(points={{-20,0},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_1.n, B3.p) annotation (Line(points={{29.5,20},{50,20},{50,0},{60,0}}, color={0,0,255}));
connect(B3.p, infinite_bus.p) annotation (Line(points={{60,0},{99,0}}, color={0,0,255}));
connect(fault.p, line_1.p) annotation (Line(points={{-1.66667,-50},{-14,-50},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_2.n, B3.p) annotation (Line(points={{29.5,-20},{50,-20},{50,0},{60,0}}, color={0,0,255}));
connect(line_2.p, line_1.p) annotation (Line(points={{8.5,-20},{-10,-20},{-10,20},{8.5,20}}, color={0,0,255}));
connect(G1.pwPin, B1.p) annotation (Line(points={{-99,0},{-90,0},{-80,0}}, color={0,0,255}));
annotation (
Diagram(coordinateSystem(extent={{-140,-100},{120,100}}, preserveAspectRatio=false), graphics={Text(
extent={{-110,80},{110,60}},
extent={{-110,70},{110,50}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=15,
textStyle={TextStyle.Bold},
textString="Example 1: Single-machine infinite bus model*
(AVR)"), Text(
extent={{-164,-88},{54,-106}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=12,
textString="*P. Kundur, \"Power System Stability and Control\", Example 13.2")}),
textString="(AVR)")}),
Icon(coordinateSystem(extent={{-140,-100},{120,100}})),
experiment(
StopTime=10,
Expand Down
54 changes: 4 additions & 50 deletions Application Examples/KundurSMIB/SMIB_AVR_PSS.mo
Original file line number Diff line number Diff line change
@@ -1,71 +1,25 @@
within KundurSMIB;
model SMIB_AVR_PSS
extends SMIB_Partial;
import Modelica.Constants.pi;
iPSL.Electrical.Buses.Bus B1 annotation (Placement(transformation(extent={{-92,-12},{-68,12}})));
iPSL.Electrical.Buses.Bus B2 annotation (Placement(transformation(extent={{-32,-12},{-8,12}})));
iPSL.Electrical.Buses.Bus B3 annotation (Placement(transformation(extent={{48,-12},{72,12}})));
Generation_Groups.Generator_AVR_PSS G1(
V_0=1,
P_0=0.899999999997135*S_b,
Q_0=0.436002238696658*S_b,
angle_0=0.494677176989155*180/pi) annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
iPSL.Electrical.Branches.PSAT.TwoWindingTransformer transformer(
Sn=2220,
x=0.15,
r=0,
V_b=400,
Vn=400) annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
iPSL.Electrical.Branches.PwLine line_1(
R=0,
G=0,
B=0,
X=0.5) annotation (Placement(transformation(extent={{10,14},{28,26}})));
iPSL.Electrical.Buses.InfiniteBus infinite_bus(angle_0=0, V_0=0.900810000000000) annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=180,
origin={110,0})));
iPSL.Electrical.Events.PwFault fault(
R=0,
t1=0.5,
t2=0.57,
X=1e-5) annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
iPSL.Electrical.Branches.PwLine line_2(
R=0,
G=0,
B=0,
X=0.93,
t1=0.57,
t2=100,
opening=1) annotation (Placement(transformation(extent={{10,-26},{28,-14}})));
inner iPSL.Electrical.SystemBase SysData(S_b=2220, fn=60) annotation (Placement(transformation(extent={{-140,80},{-86,100}})));
protected
parameter Real S_b=SysData.S_b;
equation
connect(G1.pwPin, B1.p) annotation (Line(points={{-99,0},{-80,0}}, color={0,0,255}));
connect(B1.p, transformer.p) annotation (Line(points={{-80,0},{-70,0},{-61,0}}, color={0,0,255}));
connect(transformer.n, B2.p) annotation (Line(points={{-39,0},{-20,0}}, color={0,0,255}));
connect(B2.p, line_1.p) annotation (Line(points={{-20,0},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_1.n, B3.p) annotation (Line(points={{29.5,20},{50,20},{50,0},{60,0}}, color={0,0,255}));
connect(B3.p, infinite_bus.p) annotation (Line(points={{60,0},{99,0}}, color={0,0,255}));
connect(fault.p, line_1.p) annotation (Line(points={{-1.66667,-50},{-14,-50},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_2.n, B3.p) annotation (Line(points={{29.5,-20},{50,-20},{50,0},{60,0}}, color={0,0,255}));
connect(line_2.p, line_1.p) annotation (Line(points={{8.5,-20},{-10,-20},{-10,20},{8.5,20}}, color={0,0,255}));
connect(G1.pwPin, B1.p) annotation (Line(points={{-99,0},{-90,0},{-80,0}}, color={0,0,255}));
annotation (
Diagram(coordinateSystem(extent={{-140,-100},{120,100}}, preserveAspectRatio=false), graphics={Text(
extent={{-110,80},{110,60}},
extent={{-110,74},{110,54}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=15,
textStyle={TextStyle.Bold},
textString="Example 1: Single-machine infinite bus model*
(AVR + PSS)"), Text(
extent={{-164,-88},{54,-106}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=12,
textString="*P. Kundur, \"Power System Stability and Control\", Example 13.2")}),
textString="(AVR + PSS)")}),
Icon(coordinateSystem(extent={{-140,-100},{120,100}})),
experiment(
StopTime=10,
Expand Down
103 changes: 103 additions & 0 deletions Application Examples/KundurSMIB/SMIB_Partial.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
within KundurSMIB;
partial model SMIB_Partial "PArtial model containing the network elements"
import Modelica.Constants.pi;
iPSL.Electrical.Buses.Bus B1 annotation (Placement(transformation(extent={{-92,-12},{-68,12}})));
iPSL.Electrical.Buses.Bus B2 annotation (Placement(transformation(extent={{-32,-12},{-8,12}})));
iPSL.Electrical.Buses.Bus B3 annotation (Placement(transformation(extent={{48,-12},{72,12}})));
iPSL.Electrical.Branches.PSAT.TwoWindingTransformer transformer(
Sn=2220,
x=0.15,
r=0,
V_b=400,
Vn=400) annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
iPSL.Electrical.Branches.PwLine line_1(
R=0,
G=0,
B=0,
X=0.5) annotation (Placement(transformation(extent={{10,14},{28,26}})));
iPSL.Electrical.Buses.InfiniteBus infinite_bus(angle_0=0, V_0=0.900810000000000) annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=180,
origin={110,0})));
iPSL.Electrical.Events.PwFault fault(
R=0,
t1=0.5,
t2=0.57,
X=1e-5) annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
iPSL.Electrical.Branches.PwLine line_2(
R=0,
G=0,
B=0,
X=0.93,
t1=0.57,
t2=100,
opening=1) annotation (Placement(transformation(extent={{10,-26},{28,-14}})));
inner iPSL.Electrical.SystemBase SysData(S_b=2220, fn=60) annotation (Placement(transformation(extent={{-140,80},{-86,100}})));
protected
parameter Real S_b=SysData.S_b;
equation
connect(B1.p, transformer.p) annotation (Line(points={{-80,0},{-70,0},{-61,0}}, color={0,0,255}));
connect(transformer.n, B2.p) annotation (Line(points={{-39,0},{-20,0}}, color={0,0,255}));
connect(B2.p, line_1.p) annotation (Line(points={{-20,0},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_1.n, B3.p) annotation (Line(points={{29.5,20},{50,20},{50,0},{60,0}}, color={0,0,255}));
connect(B3.p, infinite_bus.p) annotation (Line(points={{60,0},{99,0}}, color={0,0,255}));
connect(fault.p, line_1.p) annotation (Line(points={{-1.66667,-50},{-14,-50},{-14,0},{-10,0},{-10,20},{8.5,20}}, color={0,0,255}));
connect(line_2.n, B3.p) annotation (Line(points={{29.5,-20},{50,-20},{50,0},{60,0}}, color={0,0,255}));
connect(line_2.p, line_1.p) annotation (Line(points={{8.5,-20},{-10,-20},{-10,20},{8.5,20}}, color={0,0,255}));
annotation (
Diagram(coordinateSystem(extent={{-140,-100},{120,100}}, preserveAspectRatio=false), graphics={Text(
extent={{-110,80},{110,60}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=15,
textStyle={TextStyle.Bold},
textString="Example 1: Single-machine infinite bus model*"), Text(
extent={{-164,-88},{54,-106}},
lineColor={0,0,0},
lineThickness=1,
fillPattern=FillPattern.Solid,
fontSize=12,
textString="*P. Kundur, \"Power System Stability and Control\", Example 13.2")}),
Icon(coordinateSystem(extent={{-140,-100},{120,100}})),
experiment(
StopTime=10,
Interval=0.0001,
Tolerance=1e-006,
__Dymola_fixedstepsize=0.0001,
__Dymola_Algorithm="Rkfix2"),
__Dymola_experimentSetupOutput,
Documentation(revisions="<html>
<!--DISCLAIMER-->
<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p>
<ul>
<li>RTE: <a href=\"http://www.rte-france.com\">http://www.rte-france.com</a></li>
<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li>
<li>AIA: <a href=\"http://www.aia.es/en/energy\"> http://www.aia.es/en/energy</a></li>
<li>DTU: <a href=\"http://www.dtu.dk/english\"> http://www.dtu.dk/english</a></li>
</ul>
<p>The authors can be contacted by email: <a href=\"mailto:info@itesla-ipsl.org\">info@itesla-ipsl.org</a></p>
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p>
<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>
</html>", info="<html>
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\">
<tr>
<td><p>Reference</p></td>
<td><p>SMIB PSAT, d_kundur2.mdl, PSAT</p></td>
</tr>
<tr>
<td><p>Last update</p></td>
<td>February 2016</td>
</tr>
<tr>
<td><p>Author</p></td>
<td><p>Maxime Baudette, Ahsan Murad, SmarTS Lab, KTH Royal Institute of Technology</p></td>
</tr>
<tr>
<td><p>Contact</p></td>
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
</tr>
</table>
</html>"));
end SMIB_Partial;
1 change: 1 addition & 0 deletions Application Examples/KundurSMIB/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ SMIB
SMIB_AVR
SMIB_AVR_PSS
Generation_Groups
SMIB_Partial
41 changes: 41 additions & 0 deletions Application Examples/TwoAreas/Data/PF1.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
within TwoAreas.Data;
record PF1
extends Support.PF_TwoAreas(
voltages(
V1=1.03,
A1=20.2473,
V2=1.01,
A2=10.4897,
V3=1.03,
A3=-6.8,
V4=1.01,
A4=-16.9776,
V5=1.0069,
A5=13.7881,
V6=0.97914,
A6=3.7146,
V7=0.96283,
A7=-4.6748,
V8=0.94828,
A8=-18.5131,
V9=0.97386,
A9=-32.1004,
V10=0.98486,
A10=-23.7131,
V11=1.0088,
A11=-13.4215),
machines(
P1_1=700,
Q1_1=182.450226027067,
P2_1=700,
Q2_1=228.434194888742,
P3_1=718.906215107731,
Q3_1=172.421333322957,
P4_1=700,
Q4_1=193.556043309309),
loads(
PL7_1=967,
QL7_1=-100,
PL9_1=1767,
QL9_1=-250));
end PF1;
Loading

0 comments on commit 5aa9438

Please sign in to comment.