Skip to content

Commit 2c64c45

Browse files
committed
Cleaner implementation of the new PI controllers using extend
1 parent a125df3 commit 2c64c45

5 files changed

Lines changed: 127 additions & 208 deletions

File tree

OpenIPSL/Electrical/Controls/PSSE/ES/AC7B.mo

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
within OpenIPSL.Electrical.Controls.PSSE.ES;
2-
model AC7B "AC7B Excitation System [IEEE2016]"
2+
model AC7B "IEEE 421.5 2016 AC7B Excitation System"
33
extends OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter;
44
import OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.invFEX;
55
import OpenIPSL.NonElectrical.Functions.SE;
66
parameter Types.Time T_R "Filter time constant (s)";
7-
parameter Types.PerUnit K_PR "Voltage regulator proportional gain";
8-
parameter Types.PerUnit K_IR "Voltage regulator integral gain";
9-
parameter Types.PerUnit K_DR "Voltage regulator derivative gain";
7+
parameter Types.PerUnit K_PR "Voltage regulator proportional gain (pu)";
8+
parameter Types.PerUnit K_IR "Voltage regulator integral gain (pu)";
9+
parameter Types.PerUnit K_DR "Voltage regulator derivative gain (pu)";
1010
parameter Types.Time T_DR "Lag time constant (s)";
11-
parameter Types.PerUnit V_RMIN "Minimum voltage regulator output";
12-
parameter Types.PerUnit V_RMAX "Maximum voltage regulator output";
13-
parameter Types.PerUnit K_PA "Voltage regulator proportional gain";
14-
parameter Types.PerUnit K_IA "Voltage regulator integral gain";
15-
parameter Types.PerUnit VA_MIN "Minimum voltage regulator output";
16-
parameter Types.PerUnit VA_MAX "Maximum voltage regulator output";
17-
parameter Types.PerUnit K_P "Potential circuit gain coefficient";
18-
parameter Types.PerUnit K_L "Exciter field voltage lower limit parameter";
11+
parameter Types.PerUnit V_RMIN "Minimum voltage regulator output (pu)";
12+
parameter Types.PerUnit V_RMAX "Maximum voltage regulator output (pu)";
13+
parameter Types.PerUnit K_PA "Voltage regulator proportional gain (pu)";
14+
parameter Types.PerUnit K_IA "Voltage regulator integral gain(pu)";
15+
parameter Types.PerUnit VA_MIN "Minimum voltage regulator output (pu)";
16+
parameter Types.PerUnit VA_MAX "Maximum voltage regulator output (pu)";
17+
parameter Types.PerUnit K_P "Potential circuit gain coefficient (pu)";
18+
parameter Types.PerUnit K_L "Exciter field voltage lower limit parameter (pu)";
1919
parameter Types.Time T_E "Exciter time constant, integration rate associated with exciter
2020
control (s)";
21-
parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance";
21+
parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance(pu)";
2222
parameter Types.PerUnit K_D "Demagnetizing factor, a function of exciter alternator
23-
reactances";
24-
parameter Types.PerUnit K_E "Exciter constant related to self-excited field";
25-
parameter Types.PerUnit K_F1 "Excitation control system stabilizer gain";
26-
parameter Types.PerUnit K_F2 "Excitation control system stabilizer gain";
27-
parameter Types.PerUnit K_F3 "Excitation control system stabilizer gain";
23+
reactances(pu)";
24+
parameter Types.PerUnit K_E "Exciter constant related to self-excited field(pu)";
25+
parameter Types.PerUnit K_F1 "Excitation control system stabilizer gain(pu)";
26+
parameter Types.PerUnit K_F2 "Excitation control system stabilizer gain(pu)";
27+
parameter Types.PerUnit K_F3 "Excitation control system stabilizer gain(pu)";
2828
parameter Types.Time T_F3 "Excitation control system stabilizer time constant (s)";
29-
parameter Types.PerUnit VE_MIN "Minimum exciter voltage output";
30-
parameter Types.PerUnit VFEMAX "Exciter field current limit reference";
29+
parameter Types.PerUnit VE_MIN "Minimum exciter voltage output(pu)";
30+
parameter Types.PerUnit VFEMAX "Exciter field current limit reference(pu)";
3131
parameter Types.PerUnit E_1 "Exciter alternator output voltages back of commutating
32-
reactance at which saturation is defined";
33-
parameter Types.PerUnit S_EE_1 "Exciter saturation function value at the corresponding exciter
34-
voltage, E1, back of commutating reactance";
32+
reactance at which saturation is defined (pu)";
33+
parameter Types.PerUnit S_EE_1 "Exciter saturation function value at the corresponding exciter
34+
voltage, E1, back of commutating reactance (pu)";
3535
parameter Types.PerUnit E_2 "Exciter alternator output voltages back of commutating
36-
reactance at which saturation is defined";
36+
reactance at which saturation is defined (pu)";
3737
parameter Types.PerUnit S_EE_2 "Exciter saturation function value at the corresponding exciter
38-
voltage, E2, back of commutating reactance";
38+
voltage, E2, back of commutating reactance(pu)";
3939

4040
Modelica.Blocks.Continuous.Derivative imDerivativeLag(
4141
k=K_F3,
@@ -122,12 +122,12 @@ reactances";
122122
rotation=90,
123123
origin={-72,70})));
124124
NonElectrical.Continuous.PID_No_Windup pID_No_Windup(
125-
K_IR=K_IR,
126-
K_DR=K_DR,
127-
T_DR=T_DR,
125+
K_P=K_PR,
126+
K_I=K_IR,
127+
K_D=K_DR,
128+
T_D=T_DR,
128129
V_RMAX=V_RMAX,
129130
V_RMIN=V_RMIN,
130-
K_PR=K_PR,
131131
y_start_int=y_start_int_PID)
132132
annotation (Placement(transformation(extent={{-56,92},{-10,130}})));
133133
Modelica.Blocks.Nonlinear.VariableLimiter variableLimiter annotation (
@@ -281,11 +281,12 @@ equation
281281
connect(add3.y, pID_No_Windup.u) annotation (Line(points={{-72,81},{-72,111},{
282282
-60.6,111}}, color={0,0,127}));
283283
annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,160}})),
284-
Icon(graphics={ Text(
284+
Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={
285+
Text(
285286
extent={{-96,-60},{-26,-80}},
286287
lineColor={28,108,200},
287288
textString="
288-
289+
289290
"), Text(
290291
extent={{-104,90},{-22,70}},
291292
lineColor={28,108,200},
@@ -294,7 +295,7 @@ equation
294295
extent={{-74,140},{70,98}},
295296
textColor={28,108,200},
296297
textString="AC7B")}),
297-
Documentation(revisions="<html>
298+
Documentation(info="<html>
298299
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"><tr>
299300
<td><p>Reference</p></td>
300301
<td><p>IEEE 421.5 2016 AC7B Excitation System (PSS/E Manual)</p></td>
@@ -309,8 +310,9 @@ equation
309310
</tr>
310311
<tr>
311312
<td><p>Contact</p></td>
312-
<td><p>see <a href=\"modelica://OpenIPSL.UsersGuide.Contact\">UsersGuide.Contact</a></p></td>
313+
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
313314
</tr>
314315
</table>
315-
</html>"));
316+
</html>"),
317+
conversion(noneFromVersion=""));
316318
end AC7B;

OpenIPSL/Electrical/Controls/PSSE/ES/AC8B.mo

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
within OpenIPSL.Electrical.Controls.PSSE.ES;
2-
model AC8B "AC8B Excitation System [IEEE2005]"
2+
model AC8B "IEEE 421.5 2005 AC8B Excitation System"
33
import OpenIPSL.NonElectrical.Functions.SE;
44
import OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.invFEX;
55
extends OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter;
66
parameter Types.Time TR "Filter time constant (s)";
7-
parameter Types.PerUnit KPR "Voltage regulator proportional gain";
8-
parameter Types.PerUnit KIR "Voltage regulator integral gain";
9-
parameter Types.PerUnit KDR "Voltage regulator derivative gain";
7+
parameter Types.PerUnit KPR "Voltage regulator proportional gain (pu)";
8+
parameter Types.PerUnit KIR "Voltage regulator integral gain (pu)";
9+
parameter Types.PerUnit KDR "Voltage regulator derivative gain (pu)";
1010
parameter Types.Time TDR "Regulator derivative block time constant (s)";
11-
parameter Types.PerUnit VPIDMAX "PID maximum limit";
12-
parameter Types.PerUnit VPIDMIN "PID minimum limit";
13-
parameter Types.PerUnit KA "Voltage regulator gain";
11+
parameter Types.PerUnit VPIDMAX "PID maximum limit (pu)";
12+
parameter Types.PerUnit VPIDMIN "PID minimum limit (pu)";
13+
parameter Types.PerUnit KA "Voltage regulator gain (pu)";
1414
parameter Types.Time TA "Voltage regulator time constant (s)";
15-
parameter Types.PerUnit VRMAX "Maximum voltage regulator output";
16-
parameter Types.PerUnit VRMIN "Minimum voltage regulator output";
15+
parameter Types.PerUnit VRMAX "Maximum voltage regulator output (pu)";
16+
parameter Types.PerUnit VRMIN "Minimum voltage regulator output (pu)";
1717
parameter Types.Time TE "Exciter time constant, integration rate associated with exciter
1818
control (s)";
19-
parameter Types.PerUnit KC "Rectifier loading factor proportional to commutating reactance";
19+
parameter Types.PerUnit KC "Rectifier loading factor proportional to commutating reactance (pu)";
2020
parameter Types.PerUnit KD "Demagnetizing factor, a function of exciter alternator
21-
reactances";
22-
parameter Types.PerUnit KE "Exciter constant related to self-excited field";
23-
parameter Types.PerUnit E1 "Exciter alternator output voltages back of commutating reactance
24-
at which saturation is defined";
21+
reactances (pu)";
22+
parameter Types.PerUnit KE "Exciter constant related to self-excited field (pu)";
23+
parameter Types.PerUnit E1 "Exciter alternator output voltages back of commutating reactance
24+
at which saturation is defined (pu)";
2525
parameter Types.PerUnit SE1 "Exciter saturation function value at the corresponding exciter
26-
voltage, E1, back of commutating reactance";
26+
voltage, E1, back of commutating reactance (pu)";
2727
parameter Types.PerUnit E2 "Exciter alternator output voltages back of commutating
28-
reactance at which saturation is defined";
28+
reactance at which saturation is defined (pu)";
2929
parameter Types.PerUnit SE2 "Exciter saturation function value at the correspponding exciter
30-
voltage, E2, back of commutating reactance";
31-
parameter Types.PerUnit VFEMAX "Exciter field current limit reference";
32-
parameter Types.PerUnit VEMIN "Minimum exciter voltage output";
30+
voltage, E2, back of commutating reactance (pu)";
31+
parameter Types.PerUnit VFEMAX "Exciter field current limit reference (pu)";
32+
parameter Types.PerUnit VEMIN "Minimum exciter voltage output (pu)";
3333

3434
OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.RotatingExciterWithDemagnetizationVarLim
3535
rotatingExciterWithDemagnetizationVarLim(
@@ -77,10 +77,10 @@ model AC8B "AC8B Excitation System [IEEE2005]"
7777
rotation=90,
7878
origin={140,-184}),iconTransformation(extent={{-120,-80},{-100,-60}})));
7979
NonElectrical.Continuous.PID_No_Windup pID_No_Windup(
80-
K_PR=KPR,
81-
K_IR=KIR,
82-
K_DR=KDR,
83-
T_DR=TDR,
80+
K_P=KPR,
81+
K_I=KIR,
82+
K_D=KDR,
83+
T_D=TDR,
8484
V_RMAX=VPIDMAX,
8585
V_RMIN=VPIDMIN,
8686
y_start_int=y_start_int)
@@ -194,7 +194,7 @@ equation
194194
extent={{-42,152},{36,82}},
195195
lineColor={28,108,200},
196196
textString="AC8B")}),
197-
Documentation(revisions="<html>
197+
Documentation(info="<html>
198198
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"><tr>
199199
<td><p>Reference</p></td>
200200
<td><p>IEEE 421.5 2005 AC8B Excitation System (PSS/E Manual)</p></td>
@@ -209,8 +209,9 @@ equation
209209
</tr>
210210
<tr>
211211
<td><p>Contact</p></td>
212-
<td><p>see <a href=\"modelica://OpenIPSL.UsersGuide.Contact\">UsersGuide.Contact</a></p></td>
212+
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
213213
</tr>
214214
</table>
215-
</html>"));
215+
</html>"),
216+
conversion(noneFromVersion=""));
216217
end AC8B;

OpenIPSL/Electrical/Controls/PSSE/ES/DC4B.mo

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
within OpenIPSL.Electrical.Controls.PSSE.ES;
2-
model DC4B "DC4B Excitation System [IEEE2005]"
2+
model DC4B "IEEE 421.5 2005 DC4B Excitation System"
33
extends OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter;
44
import OpenIPSL.NonElectrical.Functions.SE;
55
import
66
OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.calculate_dc_exciter_params;
77
parameter Types.Time T_R=0.004 "Regulator input filter time constant (sec)";
8-
parameter Types.PerUnit K_PR=13 "Voltage regulator proportional gain";
9-
parameter Types.PerUnit K_IR=4 "Voltage regulator integral gain";
10-
parameter Types.PerUnit K_DR=6 "Voltage regulator derivative gain";
8+
parameter Types.PerUnit K_PR=13 "Voltage regulator proportional gain (pu)";
9+
parameter Types.PerUnit K_IR=4 "Voltage regulator integral gain (pu)";
10+
parameter Types.PerUnit K_DR=6 "Voltage regulator derivative gain (pu)";
1111
parameter Types.Time T_DR=0.03 "Voltage regulator derivative channel time constant (sec)";
12-
parameter Types.PerUnit V_RMAX=10.8 "Maximum regulator output";
13-
parameter Types.PerUnit V_RMIN=-7 "Minimum regulator output";
14-
parameter Types.PerUnit K_A=10.8 "Voltage regulator gain";
12+
parameter Types.PerUnit V_RMAX=10.8 "Maximum regulator output (pu)";
13+
parameter Types.PerUnit V_RMIN=-7 "Minimum regulator output (pu)";
14+
parameter Types.PerUnit K_A=10.8 "Voltage regulator gain (pu)";
1515
parameter Types.Time T_A=0.01 "Voltage regulator time constant (sec)";
1616
parameter Types.PerUnit K_E=1 "Exciter field proportional constant";
1717
parameter Types.Time T_E=0.8 "Exciter field time constant";
@@ -81,10 +81,10 @@ model DC4B "DC4B Excitation System [IEEE2005]"
8181
rotation=90,
8282
origin={160,-150})));
8383
NonElectrical.Continuous.PID_No_Windup pID_No_Windup(
84-
K_PR=K_PR,
85-
K_IR=K_IR,
86-
K_DR=K_DR,
87-
T_DR=T_DR,
84+
K_P=K_PR,
85+
K_I=K_IR,
86+
K_D=K_DR,
87+
T_D=T_DR,
8888
V_RMAX=V_RMAX/K_A,
8989
V_RMIN=V_RMIN/K_A,
9090
y_start_int=y_start_int)
@@ -185,15 +185,18 @@ equation
185185
124},{100,102},{66,102},{66,62},{74,62}}, color={0,0,127}));
186186
connect(simpleLagLimVar.y, rotatingExciterLimited.I_C) annotation (Line(
187187
points={{97,62},{102,62},{102,0},{112.5,0}}, color={0,0,127}));
188-
annotation (Icon(graphics={Text(
188+
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},
189+
{100,100}}), graphics={
190+
Text(
189191
extent={{-112,-60},{-42,-80}},
190192
lineColor={28,108,200},
191193
textString="VT"), Text(
192194
extent={{-50,142},{44,96}},
193195
textColor={28,108,200},
194-
textString="DC4B")}),
195-
Diagram(coordinateSystem(extent={{-200,-200},{200,160}})),
196-
Documentation(revisions="<html>
196+
textString="DC4B")}), Diagram(
197+
coordinateSystem(preserveAspectRatio=false, extent={{-200,-200},{200,
198+
160}})),
199+
Documentation(info="<html>
197200
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"><tr>
198201
<td><p>Reference</p></td>
199202
<td><p>IEEE 421.5 2005 DC4B Excitation System (PSS/E Manual)</p></td>
@@ -208,8 +211,9 @@ equation
208211
</tr>
209212
<tr>
210213
<td><p>Contact</p></td>
211-
<td><p>see <a href=\"modelica://OpenIPSL.UsersGuide.Contact\">UsersGuide.Contact</a></p></td>
214+
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
212215
</tr>
213216
</table>
214-
</html>"));
217+
</html>"),
218+
conversion(noneFromVersion=""));
215219
end DC4B;

0 commit comments

Comments
 (0)