Skip to content

Commit b1c118c

Browse files
GiuseppeLaeradietmarw
authored andcommitted
Cleanup and update of existing models. Add of some new models
1 parent b0dc3b9 commit b1c118c

43 files changed

Lines changed: 1691 additions & 1459 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,54 @@
11
within OpenIPSL.Electrical.Controls.PSSE;
22
package COMP
3-
model IEEEVC
4-
import Modelica.Units.SI;
3+
model IEEEVC "Voltage Regulator Current Compensating Model"
54
import Modelica.ComplexMath.j;
65
import 'abs' =
76
Modelica.ComplexMath.abs;
8-
parameter SI.PerUnit RC;
9-
parameter SI.PerUnit XC;
7+
parameter Types.PerUnit RC;
8+
parameter Types.PerUnit XC;
109
OpenIPSL.Interfaces.PwPin Gen_terminal annotation (Placement(transformation(
11-
extent={{-90,50},{-70,70}}), iconTransformation(extent={{-90,50},{
12-
-70,70}})));
13-
OpenIPSL.Interfaces.PwPin Bus annotation (Placement(transformation(extent={{50,50},
14-
{70,70}}), iconTransformation(extent={{50,50},{70,70}})));
10+
extent={{-80,60},{-60,80}}), iconTransformation(extent={{-80,60},{
11+
-60,80}})));
12+
OpenIPSL.Interfaces.PwPin Bus annotation (Placement(transformation(extent={{60,60},
13+
{80,80}}), iconTransformation(extent={{60,60},{80,80}})));
1514
Modelica.Blocks.Interfaces.RealOutput VCT annotation (Placement(
16-
transformation(extent={{80,-16},{112,16}}), iconTransformation(extent={{
17-
80,-16},{112,16}})));
15+
transformation(extent={{100,-16},{132,16}}),iconTransformation(extent={{100,-16},
16+
{132,16}})));
1817
protected
1918
Complex V_T;
2019
Complex I_T;
2120
equation
2221
VCT = 'abs'(V_T + (RC + j*XC)*I_T);
2322
V_T = Gen_terminal.vr + j*Gen_terminal.vi;
2423
I_T = Gen_terminal.ir + j*Gen_terminal.ii;
25-
connect(Gen_terminal,Bus) annotation (Line(points={{-80,60},{60,60}},
24+
connect(Gen_terminal,Bus) annotation (Line(points={{-70,70},{70,70}},
2625
color={0,0,255}));
27-
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
28-
-60},{80,80}}), graphics={Rectangle(extent={{-100,80},{80,-60}},
29-
lineColor={28,108,200})}), Diagram(
30-
coordinateSystem(preserveAspectRatio=false, extent={{-100,-60},{80,80}})),
31-
experiment(
32-
Interval=0.0001,
33-
Tolerance=1e-06,
34-
__Dymola_Algorithm="Dassl"),
26+
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},
27+
{100,100}}), graphics={Rectangle(extent={{-100,100},{100,-100}},
28+
lineColor={28,108,200}), Text(
29+
extent={{-54,36},{68,-36}},
30+
textColor={28,108,200},
31+
textString="IEEEVC")}), Diagram(
32+
coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
33+
Documentation(info="<html>
34+
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"><tr>
35+
<td><p>Reference</p></td>
36+
<td><p>Voltage Regulator Current Compensating Model (PSS/E Manual)</p></td>
37+
</tr>
38+
<tr>
39+
<td><p>Last update</p></td>
40+
<td><p>2024-10-05</p></td>
41+
</tr>
42+
<tr>
43+
<td><p>Author</p></td>
44+
<td><p>Giuseppe Laera, ALSETLab, RPI Rensselaer Polytechnic Institute</p></td>
45+
</tr>
46+
<tr>
47+
<td><p>Contact</p></td>
48+
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
49+
</tr>
50+
</table>
51+
</html>"),
3552
conversion(noneFromVersion=""));
3653
end IEEEVC;
3754
end COMP;

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

Lines changed: 68 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
within OpenIPSL.Electrical.Controls.PSSE.ES;
2-
model AC7B
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;
6-
parameter Real T_R "Filter time constant (s)";
7-
parameter Real K_PR "Voltage regulator proportional gain (pu)";
8-
parameter Real K_IR "Voltage regulator integral gain (pu)";
9-
parameter Real K_DR "Voltage regulator derivative gain (pu)";
10-
parameter Real T_DR "Lag time constant (s)";
11-
parameter Real V_RMIN "Minimum voltage regulator output (pu)";
12-
parameter Real V_RMAX "Maximum voltage regulator output (pu)";
13-
parameter Real K_PA "Voltage regulator proportional gain (pu)";
14-
parameter Real K_IA "Voltage regulator integral gain(pu)";
15-
parameter Real VA_MIN "Minimum voltage regulator output (pu)";
16-
parameter Real VA_MAX "Maximum voltage regulator output (pu)";
17-
parameter Real K_P "Potential circuit gain coefficient (pu)";
18-
parameter Real K_L "Exciter field voltage lower limit parameter (pu)";
19-
parameter Real T_E "Exciter time constant, integration rate associated with exciter
6+
parameter Types.Time T_R "Filter time constant (s)";
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)";
10+
parameter Types.Time T_DR "Lag time constant (s)";
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)";
19+
parameter Types.Time T_E "Exciter time constant, integration rate associated with exciter
2020
control (s)";
21-
parameter Real K_C "Rectifier loading factor proportional to commutating reactance(pu)";
22-
parameter Real K_D "Demagnetizing factor, a function of exciter alternator
21+
parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance(pu)";
22+
parameter Types.PerUnit K_D "Demagnetizing factor, a function of exciter alternator
2323
reactances(pu)";
24-
parameter Real K_E "Exciter constant related to self-excited field(pu)";
25-
parameter Real K_F1 "Excitation control system stabilizer gain(pu)";
26-
parameter Real K_F2 "Excitation control system stabilizer gain(pu)";
27-
parameter Real K_F3 "Excitation control system stabilizer gain(pu)";
28-
parameter Real T_F3 "Excitation control system stabilizer time constant (s)";
29-
parameter Real VE_MIN "Minimum exciter voltage output(pu)";
30-
parameter Real VFEMAX "Exciter field current limit reference(pu)";
31-
parameter Real E_1 "Exciter alternator output voltages back of commutating
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)";
28+
parameter Types.Time T_F3 "Excitation control system stabilizer time constant (s)";
29+
parameter Types.PerUnit VE_MIN "Minimum exciter voltage output(pu)";
30+
parameter Types.PerUnit VFEMAX "Exciter field current limit reference(pu)";
31+
parameter Types.PerUnit E_1 "Exciter alternator output voltages back of commutating
3232
reactance at which saturation is defined (pu)";
33-
parameter Real S_EE_1 "Exciter saturation function value at the corresponding exciter
33+
parameter Types.PerUnit S_EE_1 "Exciter saturation function value at the corresponding exciter
3434
voltage, E1, back of commutating reactance (pu)";
35-
parameter Real E_2 "Exciter alternator output voltages back of commutating
35+
parameter Types.PerUnit E_2 "Exciter alternator output voltages back of commutating
3636
reactance at which saturation is defined (pu)";
37-
parameter Real S_EE_2 "Exciter saturation function value at the corresponding exciter
37+
parameter Types.PerUnit S_EE_2 "Exciter saturation function value at the corresponding exciter
3838
voltage, E2, back of commutating reactance(pu)";
3939

4040
Modelica.Blocks.Continuous.Derivative imDerivativeLag(
@@ -120,16 +120,16 @@ reactances(pu)";
120120
Modelica.Blocks.Math.Add add3(k2=-1)
121121
annotation (Placement(transformation(extent={{-10,-10},{10,10}},
122122
rotation=90,
123-
origin={-76,102})));
124-
NonElectrical.Continuous.PID_No_Windup_AC7B pID_No_Windup(
123+
origin={-72,70})));
124+
NonElectrical.Continuous.PID_No_Windup pID_No_Windup(
125125
K_IR=K_IR,
126126
K_DR=K_DR,
127127
T_DR=T_DR,
128128
V_RMAX=V_RMAX,
129129
V_RMIN=V_RMIN,
130130
K_PR=K_PR,
131-
VR0=VR0)
132-
annotation (Placement(transformation(extent={{-36,110},{-14,126}})));
131+
y_start_int=y_start_int_PID)
132+
annotation (Placement(transformation(extent={{-56,92},{-10,130}})));
133133
Modelica.Blocks.Nonlinear.VariableLimiter variableLimiter annotation (
134134
Placement(transformation(
135135
extent={{-10,10},{10,-10}},
@@ -153,8 +153,8 @@ reactances(pu)";
153153
K_I=K_IA,
154154
V_RMAX=VA_MAX,
155155
V_RMIN=VA_MIN,
156-
y_start=VA0)
157-
annotation (Placement(transformation(extent={{78,100},{100,120}})));
156+
y_start_int=y_start_int_PI)
157+
annotation (Placement(transformation(extent={{66,88},{104,120}})));
158158
protected
159159
parameter Real VA0(fixed=false);
160160
parameter Real VR0(fixed=false);
@@ -164,6 +164,8 @@ parameter Real VE0(fixed=false);
164164
parameter Real VT0(fixed=false);
165165
parameter Real Efd0(fixed=false);
166166
parameter Real max_lim0(fixed=false);
167+
parameter Real y_start_int_PID(fixed=false);
168+
parameter Real y_start_int_PI(fixed=false);
167169

168170
initial equation
169171
// Finding initial value of excitation voltage, VE0, via going through conditions of FEX function
@@ -184,6 +186,8 @@ initial equation
184186
VT0 = VT;
185187
Ifd0 = XADIFD;
186188
max_lim0 = (VFEMAX - K_D*Ifd0)/(K_E + SE(VE0,S_EE_1,S_EE_2,E_1,E_2));
189+
y_start_int_PID = VR0;
190+
y_start_int_PI = VA0;
187191

188192
equation
189193
connect(DiffV.u2, TransducerDelay.y) annotation (Line(points={{-122,-6},{-134,
@@ -229,21 +233,19 @@ equation
229233
-78},{-128,46},{-116,46}}, color={0,0,127}));
230234
connect(DiffV.y, add3_2.u3) annotation (Line(points={{-99,0},{-94,0},{-94,22},
231235
{-124,22},{-124,38},{-116,38}}, color={0,0,127}));
232-
connect(add3_2.y, add3.u1) annotation (Line(points={{-93,46},{-82,46},{-82,90}},
236+
connect(add3_2.y, add3.u1) annotation (Line(points={{-93,46},{-78,46},{-78,58}},
233237
color={0,0,127}));
234238
connect(imDerivativeLag.y, add3.u2) annotation (Line(points={{-75,-104},{-82,-104},
235-
{-82,10},{-70,10},{-70,90}},
239+
{-82,10},{-66,10},{-66,58}},
236240
color={0,0,127}));
237-
connect(add3.y, pID_No_Windup.u)
238-
annotation (Line(points={{-76,113},{-76,120},{-38,120}}, color={0,0,127}));
239241
connect(VT, gain4.u) annotation (Line(points={{-111,79},{-96,79},{-96,140},{104,
240242
140}}, color={0,0,127}));
241243
connect(gain.u, rotatingExciterWithDemagnetizationVarLim.V_FE) annotation (
242244
Line(points={{184,46},{190,46},{190,18},{126,18},{126,-60},{50.125,-60},{50.125,
243245
-44.375}}, color={0,0,127}));
244246
connect(product.y, variableLimiter.u) annotation (Line(points={{195,110},{198,
245247
110},{198,64},{132,64}}, color={0,0,127}));
246-
connect(pID_No_Windup.y, add1.u1) annotation (Line(points={{-13,120},{6,120},
248+
connect(pID_No_Windup.y, add1.u1) annotation (Line(points={{-7.7,111},{6,111},
247249
{6,116},{18,116}}, color={0,0,127}));
248250
connect(imDerivativeLag.u, gain1.u) annotation (Line(points={{-52,-104},{50,-104},
249251
{50,-60},{16,-60},{16,-56}}, color={0,0,127}));
@@ -271,12 +273,15 @@ equation
271273
connect(variableLimiter.y, rotatingExciterWithDemagnetizationVarLim.I_C)
272274
annotation (Line(points={{109,64},{68,64},{68,60},{32,60},{32,-35},{50.125,
273275
-35}}, color={0,0,127}));
274-
connect(pI_No_Windup.y, product.u2) annotation (Line(points={{101,110},{164,
275-
110},{164,104},{172,104}}, color={0,0,127}));
276+
connect(pI_No_Windup.y, product.u2) annotation (Line(points={{105.9,104},{172,
277+
104}}, color={0,0,127}));
276278
connect(add1.y, pI_No_Windup.u)
277-
annotation (Line(points={{41,110},{78,110}}, color={0,0,127}));
279+
annotation (Line(points={{41,110},{46,110},{46,104},{62.2,104}},
280+
color={0,0,127}));
281+
connect(add3.y, pID_No_Windup.u) annotation (Line(points={{-72,81},{-72,111},{
282+
-60.6,111}}, color={0,0,127}));
278283
annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,160}})),
279-
Icon(coordinateSystem(extent={{-200,-200},{200,160}}), graphics={
284+
Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={
280285
Text(
281286
extent={{-96,-60},{-26,-80}},
282287
lineColor={28,108,200},
@@ -287,8 +292,27 @@ equation
287292
lineColor={28,108,200},
288293
textString="ETERM"),
289294
Text(
290-
extent={{-16,80},{86,46}},
295+
extent={{-74,140},{70,98}},
291296
textColor={28,108,200},
292297
textString="AC7B")}),
298+
Documentation(info="<html>
299+
<table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"><tr>
300+
<td><p>Reference</p></td>
301+
<td><p>IEEE 421.5 2016 AC7B Excitation System (PSS/E Manual)</p></td>
302+
</tr>
303+
<tr>
304+
<td><p>Last update</p></td>
305+
<td><p>2024-10-05</p></td>
306+
</tr>
307+
<tr>
308+
<td><p>Author</p></td>
309+
<td><p>Giuseppe Laera, ALSETLab, RPI Rensselaer Polytechnic Institute</p></td>
310+
</tr>
311+
<tr>
312+
<td><p>Contact</p></td>
313+
<td><p><a href=\"mailto:luigiv@kth.se\">luigiv@kth.se</a></p></td>
314+
</tr>
315+
</table>
316+
</html>"),
293317
conversion(noneFromVersion=""));
294318
end AC7B;

0 commit comments

Comments
 (0)