Skip to content

Commit a0bca3a

Browse files
committed
Annotation and icon clean ups
1 parent e0da342 commit a0bca3a

4 files changed

Lines changed: 52 additions & 41 deletions

File tree

OpenIPSL/Electrical/Solar/PowerFactory/WECC/PVD1/Controller.mo

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ model Controller
2121
parameter Types.PerUnit Vt1 = 0.9 "Voltage tripping repose curve point 1";
2222
parameter Types.PerUnit Vt2 = 1.1 "Voltage tripping repose curve point 2";
2323
parameter Types.PerUnit Vt3 = 1.2 "Voltage tripping repose curve point 3";
24-
Modelica.Blocks.Interfaces.RealInput Vt annotation (
25-
Placement(transformation(origin = {-200, -10}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-200, 140}, extent = {{-20, -20}, {20, 20}})));
26-
Modelica.Blocks.Interfaces.RealInput It annotation (
27-
Placement(transformation(origin = {-200, -70}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-200, 60}, extent = {{-20, -20}, {20, 20}})));
24+
Modelica.Blocks.Interfaces.RealInput Vt annotation (Placement(transformation(extent={{-240,-30},{-200,10}}), iconTransformation(extent={{-140,40},{-100,80}})));
25+
Modelica.Blocks.Interfaces.RealInput It annotation (Placement(transformation(extent={{-240,-90},{-200,-50}}), iconTransformation(origin={-120,0}, extent={{-20,-20},{20,20}})));
2826
Modelica.Blocks.Math.Gain compensation(k = Xc) annotation (
2927
Placement(transformation(origin = {-150, -70}, extent = {{-10, -10}, {10, 10}})));
3028
Modelica.Blocks.Math.Add add annotation (
@@ -42,8 +40,7 @@ model Controller
4240
Placement(transformation(origin = {182, 90}, extent = {{-10, -10}, {10, 10}})));
4341
Modelica.Blocks.Continuous.FirstOrder QCurrentController(T = Tg, initType = Modelica.Blocks.Types.Init.InitialOutput, k = -1, y_start = -Qref / u_0) annotation (
4442
Placement(transformation(origin = {182, -70}, extent = {{-10, -10}, {10, 10}})));
45-
Modelica.Blocks.Interfaces.RealInput freq annotation (
46-
Placement(transformation(origin = {-200, 150}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-200, -60}, extent = {{-20, -20}, {20, 20}})));
43+
Modelica.Blocks.Interfaces.RealInput freq annotation (Placement(transformation(extent={{-240,130},{-200,170}}), iconTransformation(origin={-120,-60}, extent={{-20,-20},{20,20}})));
4744
Modelica.Blocks.Sources.Constant freq_ref(k = 1) annotation (
4845
Placement(transformation(origin = {-182, 110}, extent = {{-10, -10}, {10, 10}})));
4946
Modelica.Blocks.Math.Add add2(k1 = -1) annotation (
@@ -68,9 +65,9 @@ model Controller
6865
Modelica.Blocks.Sources.Constant reactive_power_reference(k = Qref) annotation (
6966
Placement(transformation(origin = {-70, -110}, extent = {{-10, -10}, {10, 10}})));
7067
Modelica.Blocks.Interfaces.RealOutput Ip annotation (
71-
Placement(transformation(origin = {210, 90}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {210, 110}, extent = {{-10, -10}, {10, 10}})));
68+
Placement(transformation(origin = {210, 90}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin={110,60}, extent = {{-10, -10}, {10, 10}})));
7269
Modelica.Blocks.Interfaces.RealOutput Iq annotation (
73-
Placement(transformation(origin = {210, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {210, -90}, extent = {{-10, -10}, {10, 10}})));
70+
Placement(transformation(origin = {210, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin={110,-60}, extent = {{-10, -10}, {10, 10}})));
7471
Modelica.Blocks.Math.Add add4 annotation (
7572
Placement(transformation(origin = {-50, 50}, extent = {{-10, -10}, {10, 10}})));
7673
parameter Types.PerUnit Qref;
@@ -92,13 +89,13 @@ model Controller
9289
Placement(transformation(origin = {150, -70}, extent = {{-10, -10}, {10, 10}})));
9390
equation
9491
connect(It, compensation.u) annotation (
95-
Line(points = {{-200, -70}, {-162, -70}}, color = {0, 0, 127}));
92+
Line(points={{-220,-70},{-162,-70}}, color = {0, 0, 127}));
9693
connect(compensation.y, add.u2) annotation (
9794
Line(points = {{-139, -70}, {-130.5, -70}, {-130.5, -76}, {-122, -76}}, color = {0, 0, 127}));
9895
connect(Vt, add.u1) annotation (
99-
Line(points = {{-200, -10}, {-128, -10}, {-128, -63}, {-122, -63}, {-122, -64}}, color = {0, 0, 127}));
96+
Line(points={{-220,-10},{-128,-10},{-128,-63},{-122,-63},{-122,-64}}, color = {0, 0, 127}));
10097
connect(numerical_limit.u, Vt) annotation (
101-
Line(points = {{-82, -10}, {-200, -10}}, color = {0, 0, 127}));
98+
Line(points={{-82,-10},{-220,-10}}, color = {0, 0, 127}));
10299
connect(numerical_limit.y, division.u2) annotation (
103100
Line(points = {{-59, -10}, {-8, -10}, {-8, -36}, {78, -36}}, color = {0, 0, 127}));
104101
connect(division.y, qppriority.Iq) annotation (
@@ -108,7 +105,7 @@ equation
108105
connect(division1.y, qppriority.Ip) annotation (
109106
Line(points={{101,30},{106,30},{106,5},{118,5}}, color = {0, 0, 127}));
110107
connect(freq, add2.u1) annotation (
111-
Line(points = {{-200, 150}, {-142, 150}}, color = {0, 0, 127}));
108+
Line(points={{-220,150},{-142,150}}, color = {0, 0, 127}));
112109
connect(deadZone.y, frequency_droop.u) annotation (
113110
Line(points = {{-79, 144}, {-62, 144}}, color = {0, 0, 127}));
114111
connect(freq_ref.y, add2.u2) annotation (
@@ -146,9 +143,9 @@ equation
146143
connect(frequency_tripping.TrpHigh, product.u2) annotation (
147144
Line(points={{41,145},{58,145},{58,144},{58,144}}, color = {0, 0, 127}));
148145
connect(frequency_tripping.u, freq) annotation (
149-
Line(points = {{20, 150}, {0, 150}, {0, 184}, {-188, 184}, {-188, 150}, {-200, 150}}, color = {0, 0, 127}));
146+
Line(points={{18,150},{0,150},{0,184},{-188,184},{-188,150},{-220,150}}, color = {0, 0, 127}));
150147
connect(voltage_tripping.u, Vt) annotation (
151-
Line(points = {{20, 110}, {-128, 110}, {-128, -10}, {-200, -10}}, color = {0, 0, 127}));
148+
Line(points={{18,110},{-128,110},{-128,-10},{-220,-10}}, color = {0, 0, 127}));
152149
connect(voltage_tripping.TrpLow, product2.u1) annotation (
153150
Line(points={{41,115},{58,115},{58,116},{58,116}}, color = {0, 0, 127}));
154151
connect(voltage_tripping.TrpHigh, product2.u2) annotation (
@@ -175,7 +172,26 @@ equation
175172
lineThickness = 1, extent = {{-85, 21}, {79, -57}}), Text(origin = {-120, -41}, lineColor = {0, 170, 0},
176173
lineThickness = 1, extent = {{30, -1}, {76, -9}}, textString = "Volt/Var Control",
177174
horizontalAlignment = TextAlignment.Left)}),
178-
Icon(coordinateSystem(extent = {{-200, -200}, {200, 200}}, initialScale = 0.05), graphics={ Rectangle(origin = {-52, 50}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-150, 150}, {252, -250}}), Text(origin = {26, 194}, extent = {{-228, -34}, {174, 6}}, textString = "PVD1")}),
175+
Icon(graphics={ Rectangle(origin={-24.9099,25}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent={{-74.3452,75},{124.91,-125}}),
176+
Text(
177+
extent={{-100,100},{100,70}},
178+
textString="%name",
179+
lineColor={0,0,0}), Text(
180+
extent={{-96,66},{-78,48}},
181+
lineColor={0,0,0},
182+
textString="Vt"), Text(
183+
extent={{-98,8},{-78,-12}},
184+
lineColor={0,0,0},
185+
textString="It"), Text(
186+
extent={{-96,-52},{-76,-72}},
187+
lineColor={0,0,0},
188+
textString="freq"), Text(
189+
extent={{70,70},{90,50}},
190+
lineColor={0,0,0},
191+
textString="Ip"), Text(
192+
extent={{70,-52},{90,-72}},
193+
lineColor={0,0,0},
194+
textString="Iq")}),
179195
experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.002),
180196
__OpenModelica_simulationFlags(lv = "LOG_STATS", outputFormat = "mat", s = "dassl"));
181197
end Controller;

OpenIPSL/Electrical/Solar/PowerFactory/WECC/PVD1/GenerationTripping.mo

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ model GenerationTripping
66
parameter Real Lv3;
77
parameter Real recov;
88
parameter Real Tfilter = 1e-2 "Best to set about the time step value for fixed-step solvers";
9-
Modelica.Blocks.Interfaces.RealInput u annotation (
10-
Placement(transformation(origin = {-100, 0}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-100, 0}, extent = {{-20, -20}, {20, 20}})));
11-
Modelica.Blocks.Interfaces.RealOutput TrpLow annotation (
12-
Placement(transformation(origin = {110, 50}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, 50}, extent = {{-10, -10}, {10, 10}})));
13-
Modelica.Blocks.Interfaces.RealOutput TrpHigh annotation (
14-
Placement(transformation(origin = {110, -50}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, -50}, extent = {{-10, -10}, {10, 10}})));
9+
Modelica.Blocks.Interfaces.RealInput u annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
10+
Modelica.Blocks.Interfaces.RealOutput TrpLow annotation (Placement(transformation(origin={110,50}, extent={{-10,-10},{10,10}})));
11+
Modelica.Blocks.Interfaces.RealOutput TrpHigh annotation (Placement(transformation(origin={110,-50}, extent={{-10,-10},{10,10}})));
1512
Real umin;
1613
Real umax;
1714
initial equation
@@ -46,5 +43,7 @@ equation
4643
reinit(umax, Lv2);
4744
end when;
4845
annotation (
49-
Icon(graphics={ Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Text(origin = {32, 93}, extent = {{-132, 7}, {68, -13}}, textString = "Generation Tripping"), Text(origin = {144, 53}, extent = {{-132, 7}, {-44, -13}}, textString = "TripLow"), Text(origin = {144, -47}, extent = {{-132, 7}, {-44, -13}}, textString = "TripHigh"), Text(origin = {36, 3}, extent = {{-132, 7}, {-44, -13}}, textString = "Input")}));
46+
Icon(graphics={ Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent={{-100,100},{100,-100}}), Text(origin={32,83}, extent = {{-132, 7}, {68, -13}},
47+
textString="%name",
48+
lineColor={0,0,0}), Text(extent={{38,59},{98,40}}, textString="TripLow"), Text(extent={{38,-40},{98,-60}}, textString="TripHigh"), Text(extent={{-96,9},{-56,-10}}, textString="Input")}));
5049
end GenerationTripping;

OpenIPSL/Electrical/Solar/PowerFactory/WECC/PVD1/PQPriority.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
within OpenIPSL.Electrical.Solar.PowerFactory.WECC.PVD1;
2-
model PQPriority
3-
parameter Boolean PqFlag;
4-
parameter Types.PerUnit Imax;
2+
model PQPriority "P-Q priority module"
3+
parameter Boolean PqFlag "Priority on current limit flag: 1=P prio.; 0 = Q prio.";
4+
parameter Types.PerUnit Imax "Maximum allowable total converter current";
55
Modelica.Blocks.Interfaces.RealInput Ip annotation (
66
Placement(transformation(origin={-120,50}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin={-120,50}, extent = {{-20, -20}, {20, 20}})));
77
Modelica.Blocks.Interfaces.RealInput Iq annotation (

OpenIPSL/Electrical/Solar/PowerFactory/WECC/PVD1/Plant_PVD1.mo

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,23 @@ model Plant_PVD1
6363
OpenIPSL.Interfaces.PwPin p annotation (
6464
Placement(transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}})));
6565
OpenIPSL.Electrical.Solar.PowerFactory.WECC.PVD1.Controller pvd1(Ddn = Ddn, Ft0 = Ft0, Ft1 = Ft1, Ft2 = Ft2, Ft3 = Ft3, Imax = Imax, PqFlag = PqFlag, Pref = P_0 / M_b, Qmn = Qmn, Qmx = Qmx, Qref = Q_0 / M_b, Tg = Tg, Vt0 = Vt0, Vt1 = Vt1, Vt2 = Vt2, Vt3 = Vt3, Xc = Xc, dqdv = dqdv, fdbd = fdbd, fr_recov = fr_recov, u_0 = v_0, v0 = v0, v1 = v1, vr_recov = vr_recov) annotation (
66-
Placement(transformation(origin = {2.66454e-15, -2.66454e-15}, extent = {{-20, -20}, {20, 20}})));
66+
Placement(transformation(origin={-40,0}, extent = {{-20, -20}, {20, 20}})));
6767
OpenIPSL.Electrical.Solar.PowerFactory.General.ElmGenstat static_generator(M_b = M_b, angle_0 = angle_0, pll_connected = false, v_0 = v_0) annotation (
68-
Placement(transformation(origin = {61.625, -0.2}, extent = {{-17.625, -28.2}, {17.625, 28.2}})));
69-
OpenIPSL.Electrical.Solar.PowerFactory.General.StaVmea measurement(angle_0 = angle_0, fn = fn) annotation (
70-
Placement(transformation(origin = {50, -50}, extent = {{10, -10}, {-10, 10}})));
68+
Placement(transformation(origin={40,0}, extent={{-20,-20},{20,20}})));
69+
OpenIPSL.Electrical.Solar.PowerFactory.General.StaVmea staVmea(angle_0=angle_0, fn=fn) annotation (Placement(transformation(origin={40,-60}, extent={{20,-20},{-20,20}})));
7170
equation
7271
connect(static_generator.p, p) annotation (
73-
Line(points = {{80, 0}, {104, 0}, {104, 0}, {110, 0}}, color = {0, 0, 255}));
72+
Line(points={{62,0},{110,0}}, color = {0, 0, 255}));
7473
connect(pvd1.Ip, static_generator.id_ref) annotation (
75-
Line(points = {{22, 10}, {30, 10}, {30, 18}, {48, 18}, {48, 18}}, color = {0, 0, 127}));
74+
Line(points={{-18,12},{0,12},{0,16},{22,16}}, color = {0, 0, 127}));
7675
connect(pvd1.Iq, static_generator.iq_ref) annotation (
77-
Line(points = {{22, -10}, {36, -10}, {36, 8}, {48, 8}, {48, 6}}, color = {0, 0, 127}));
76+
Line(points={{-18,-12},{0,-12},{0,8},{22,8}}, color = {0, 0, 127}));
7877
connect(static_generator.v, pvd1.Vt) annotation (
79-
Line(points = {{82, 18}, {86, 18}, {86, 40}, {-26, 40}, {-26, 14}, {-20, 14}, {-20, 14}}, color = {0, 0, 127}));
78+
Line(points={{62,16},{70,16},{70,40},{-72,40},{-72,14},{-68,14},{-68,12},{-64,12}}, color = {0, 0, 127}));
8079
connect(static_generator.i, pvd1.It) annotation (
81-
Line(points = {{82, 6}, {92, 6}, {92, 46}, {-34, 46}, {-34, 6}, {-20, 6}, {-20, 6}}, color = {0, 0, 127}));
82-
connect(measurement.p, p) annotation (
83-
Line(points = {{62, -50}, {92, -50}, {92, -6}, {110, -6}, {110, 0}}, color = {0, 0, 255}));
84-
connect(measurement.fe, pvd1.freq) annotation (
85-
Line(points = {{40, -54}, {-28, -54}, {-28, -6}, {-20, -6}, {-20, -6}}, color = {0, 0, 127}));
86-
annotation (
87-
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Line(origin = {0, 60.3123}, points = {{-100, 39.6877}, {0, -40.3123}, {100, 39.6877}, {100, 39.6877}})}, coordinateSystem()),
88-
__OpenModelica_simulationFlags(lv = "LOG_STATS", outputFormat = "mat", s = "dassl"));
80+
Line(points={{62,8},{80,8},{80,46},{-80,46},{-80,0},{-64,0}}, color = {0, 0, 127}));
81+
connect(staVmea.p, p) annotation (Line(points={{62,-60},{80,-60},{80,0},{110,0}}, color={0,0,255}));
82+
connect(staVmea.fe, pvd1.freq) annotation (Line(points={{18,-72},{-80,-72},{-80,-12},{-64,-12}}, color={0,0,127}));
83+
annotation (Icon(graphics={
84+
Rectangle(lineColor = {118, 18, 62},fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Line(origin = {0, 60.31}, points = {{-100, 39.6877}, {0, -40.3123}, {100, 39.6877}, {100, 39.6877}}, color = {118, 18, 62}), Text(origin = {0, -10}, lineColor = {0, 0, 255}, extent = {{-100, 150}, {100, 110}}, textString = "%name")}));
8985
end Plant_PVD1;

0 commit comments

Comments
 (0)