|
| 1 | +within OpenIPSL.Electrical.Controls.PSSE.ES; |
| 2 | +model AC7B "AC7B Excitation System [IEEE2005]" |
| 3 | + extends BaseClasses.BaseExciter; |
| 4 | + import OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.invFEX; |
| 5 | + 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 V_AMIN "Minimum voltage regulator output (pu)"; |
| 16 | + parameter Real V_AMAX "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 |
| 20 | + 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 |
| 23 | +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 V_EMIN "Minimum exciter voltage output(pu)"; |
| 30 | + parameter Real V_FEMAX "Exciter field current limit reference(pu)"; |
| 31 | + parameter Real E_1 "Exciter alternator output voltages back of commutating |
| 32 | + reactance at which saturation is defined (pu)"; |
| 33 | + parameter Real S_EE_1 "Exciter saturation function value at the corresponding exciter |
| 34 | + voltage, E1, back of commutating reactance (pu)"; |
| 35 | + parameter Real E_2 "Exciter alternator output voltages back of commutating |
| 36 | + reactance at which saturation is defined (pu)"; |
| 37 | + parameter Real S_EE_2 "Exciter saturation function value at the corresponding exciter |
| 38 | + voltage, E2, back of commutating reactance(pu)"; |
| 39 | + |
| 40 | + Modelica.Blocks.Continuous.Derivative imDerivativeLag( |
| 41 | + k=K_F3, |
| 42 | + T=T_F3, |
| 43 | + y_start=0, |
| 44 | + initType=Modelica.Blocks.Types.Init.InitialOutput) |
| 45 | + annotation (Placement(transformation(extent={{-54,-114},{-74,-94}}))); |
| 46 | + Modelica.Blocks.Math.Add3 add3_2 |
| 47 | + annotation (Placement(transformation(extent={{-114,36},{-94,56}}))); |
| 48 | + OpenIPSL.NonElectrical.Continuous.SimpleLag |
| 49 | + TransducerDelay( |
| 50 | + K=1, |
| 51 | + T=T_R, |
| 52 | + y_start=ECOMP0) |
| 53 | + annotation (Placement(transformation(extent={{-168,-10},{-148,10}}))); |
| 54 | + Modelica.Blocks.Math.Add add1(k2=-1) |
| 55 | + annotation (Placement(transformation(extent={{20,100},{40,120}}))); |
| 56 | + Modelica.Blocks.Math.Add add annotation (Placement(transformation( |
| 57 | + extent={{-10,-10},{10,10}}, |
| 58 | + rotation=90, |
| 59 | + origin={-6,46}))); |
| 60 | + Modelica.Blocks.Math.Gain gain1(k=K_F2) annotation (Placement( |
| 61 | + transformation( |
| 62 | + extent={{-10,-10},{10,10}}, |
| 63 | + rotation=90, |
| 64 | + origin={16,-44}))); |
| 65 | + Modelica.Blocks.Math.Gain gain2(k=K_F1) annotation (Placement( |
| 66 | + transformation( |
| 67 | + extent={{-10,-10},{10,10}}, |
| 68 | + rotation=90, |
| 69 | + origin={-6,-70}))); |
| 70 | + Modelica.Blocks.Math.Product product |
| 71 | + annotation (Placement(transformation(extent={{174,100},{194,120}}))); |
| 72 | + Modelica.Blocks.Math.Gain gain4(k=K_P) |
| 73 | + annotation (Placement(transformation(extent={{106,130},{126,150}}))); |
| 74 | + BaseClasses.RotatingExciterWithDemagnetizationVarLim |
| 75 | + rotatingExciterWithDemagnetizationVarLim( |
| 76 | + T_E=T_E, |
| 77 | + K_E=K_E, |
| 78 | + E_1=E_1, |
| 79 | + E_2=E_2, |
| 80 | + S_EE_1=S_EE_1, |
| 81 | + S_EE_2=S_EE_2, |
| 82 | + Efd0=VE0, |
| 83 | + K_D=K_D) annotation (Placement(transformation(extent={{52,-50},{82,-20}}))); |
| 84 | + Modelica.Blocks.Sources.Constant lowLim(k=V_EMIN) |
| 85 | + annotation (Placement(transformation(extent={{116,-16},{96,4}}))); |
| 86 | + Modelica.Blocks.Sources.Constant FEMAX(k=V_FEMAX) |
| 87 | + annotation (Placement(transformation(extent={{-74,-24},{-54,-4}}))); |
| 88 | + Modelica.Blocks.Math.Add DiffV2(k2=-1) |
| 89 | + annotation (Placement(transformation(extent={{-38,-34},{-18,-14}}))); |
| 90 | + OpenIPSL.NonElectrical.Functions.ImSE |
| 91 | + se1( |
| 92 | + SE1=S_EE_1, |
| 93 | + SE2=S_EE_2, |
| 94 | + E1=E_1, |
| 95 | + E2=E_2) annotation (Placement(transformation( |
| 96 | + extent={{-9,-6},{9,6}}, |
| 97 | + rotation=180, |
| 98 | + origin={157,30}))); |
| 99 | + Modelica.Blocks.Sources.Constant const(k=K_E) |
| 100 | + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, |
| 101 | + rotation=0, |
| 102 | + origin={162,0}))); |
| 103 | + Modelica.Blocks.Math.Add DiffV3 |
| 104 | + annotation (Placement(transformation(extent={{114,18},{94,38}}))); |
| 105 | + Modelica.Blocks.Math.Division division annotation (Placement(transformation( |
| 106 | + extent={{-10,-10},{10,10}}, |
| 107 | + rotation=270, |
| 108 | + origin={52,6}))); |
| 109 | + Modelica.Blocks.Math.Gain gain5(k=K_D) annotation (Placement( |
| 110 | + transformation( |
| 111 | + extent={{-10,-10},{10,10}}, |
| 112 | + rotation=90, |
| 113 | + origin={-28,-150}))); |
| 114 | + Modelica.Blocks.Interfaces.RealInput VT annotation (Placement(transformation( |
| 115 | + extent={{-122,68},{-100,90}}), iconTransformation(extent={{-122,68},{-100, |
| 116 | + 90}}))); |
| 117 | + Modelica.Blocks.Math.Add add3(k2=-1) |
| 118 | + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, |
| 119 | + rotation=90, |
| 120 | + origin={-76,102}))); |
| 121 | + BaseClasses.PID_No_Windup |
| 122 | + pID_No_Windup( |
| 123 | + K_IR=K_IR, |
| 124 | + K_DR=K_DR, |
| 125 | + T_DR=T_DR, |
| 126 | + V_RMAX=V_RMAX, |
| 127 | + V_RMIN=V_RMIN, |
| 128 | + K_PR=K_PR, |
| 129 | + VR0=VR0) |
| 130 | + annotation (Placement(transformation(extent={{-36,110},{-14,126}}))); |
| 131 | + Modelica.Blocks.Nonlinear.VariableLimiter variableLimiter annotation ( |
| 132 | + Placement(transformation( |
| 133 | + extent={{-10,10},{10,-10}}, |
| 134 | + rotation=180, |
| 135 | + origin={120,64}))); |
| 136 | + Modelica.Blocks.Sources.Constant Upper_Limit(k=Modelica.Constants.inf) |
| 137 | + annotation (Placement(transformation( |
| 138 | + extent={{-10,-10},{10,10}}, |
| 139 | + rotation=180, |
| 140 | + origin={180,82}))); |
| 141 | + Modelica.Blocks.Math.Gain gain(k=-K_L) annotation (Placement(transformation( |
| 142 | + extent={{-10,-10},{10,10}}, |
| 143 | + rotation=180, |
| 144 | + origin={172,46}))); |
| 145 | + OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.RectifierCommutationVoltageDrop |
| 146 | + rectifierCommutationVoltageDrop(K_C=K_C) |
| 147 | + annotation (Placement(transformation(extent={{148,-66},{182,-32}}))); |
| 148 | + |
| 149 | + BaseClasses.PI_No_Windup |
| 150 | + pI_No_Windup( |
| 151 | + K_P=K_PA, |
| 152 | + K_I=K_IA, |
| 153 | + V_RMAX=V_AMAX, |
| 154 | + V_RMIN=V_AMIN, |
| 155 | + y_start=VA0) |
| 156 | + annotation (Placement(transformation(extent={{78,100},{100,120}}))); |
| 157 | +protected |
| 158 | +parameter Real VA0(fixed=false); |
| 159 | +parameter Real VR0(fixed=false); |
| 160 | +parameter Real VFE0(fixed=false); |
| 161 | +parameter Real Ifd0(fixed=false); |
| 162 | +parameter Real VE0(fixed=false); |
| 163 | +parameter Real VT0(fixed=false); |
| 164 | +parameter Real Efd0(fixed=false); |
| 165 | + |
| 166 | +initial equation |
| 167 | + // Finding initial value of excitation voltage, VE0, via going through conditions of FEX function |
| 168 | + VE0 = invFEX( |
| 169 | + K_C=K_C, |
| 170 | + Efd0=Efd0, |
| 171 | + Ifd0=Ifd0); |
| 172 | + // Case IN>0 not checked because it will be resolved in the next iteration |
| 173 | + VFE0 = VE0*(SE( |
| 174 | + VE0, |
| 175 | + S_EE_1, |
| 176 | + S_EE_2, |
| 177 | + E_1, |
| 178 | + E_2) + K_E) + Ifd0*K_D; |
| 179 | + VA0 = VFE0/(K_P*VT0); |
| 180 | + VR0 = Efd0*K_F1 + VFE0*K_F2; |
| 181 | + V_REF = ECOMP0; |
| 182 | + VT0 = VT; |
| 183 | + Ifd0 = XADIFD; |
| 184 | +equation |
| 185 | + connect(DiffV.u2, TransducerDelay.y) annotation (Line(points={{-122,-6},{-134, |
| 186 | + -6},{-134,0},{-147,0}}, color={0,0,127})); |
| 187 | + connect(TransducerDelay.u, ECOMP) |
| 188 | + annotation (Line(points={{-170,0},{-200,0}}, color={0,0,127})); |
| 189 | + connect(gain1.y, add.u2) |
| 190 | + annotation (Line(points={{16,-33},{16,16},{0,16},{0,34}}, |
| 191 | + color={0,0,127})); |
| 192 | + connect(add.y, add1.u2) annotation (Line(points={{-6,57},{-6,104},{18,104}}, |
| 193 | + color={0,0,127})); |
| 194 | + connect(product.u1, gain4.y) annotation (Line(points={{172,116},{172,128},{127, |
| 195 | + 128},{127,140}}, color={0,0,127})); |
| 196 | + connect(gain2.y, add.u1) annotation (Line(points={{-6,-59},{-6,-12},{-12,-12}, |
| 197 | + {-12,34}}, color={0,0,127})); |
| 198 | + connect(FEMAX.y,DiffV2. u1) annotation (Line(points={{-53,-14},{-40,-14},{-40, |
| 199 | + -18}}, color={0,0,127})); |
| 200 | + connect(gain5.y, DiffV2.u2) annotation (Line(points={{-28,-139},{-28,-94},{-44, |
| 201 | + -94},{-44,-30},{-40,-30}}, |
| 202 | + color={0,0,127})); |
| 203 | + connect(se1.VE_OUT, DiffV3.u1) annotation (Line(points={{147.46,30},{132,30},{ |
| 204 | + 132,34},{116,34}}, color={0,0,127})); |
| 205 | + connect(const.y, DiffV3.u2) annotation (Line(points={{151,0},{136,0},{136,22}, |
| 206 | + {116,22}},color={0,0,127})); |
| 207 | + connect(DiffV2.y, division.u1) annotation (Line(points={{-17,-24},{22,-24},{22, |
| 208 | + 46},{58,46},{58,18}}, |
| 209 | + color={0,0,127})); |
| 210 | + connect(DiffV3.y, division.u2) |
| 211 | + annotation (Line(points={{93,28},{46,28},{46,18}}, color={0,0,127})); |
| 212 | + connect(rectifierCommutationVoltageDrop.V_EX, |
| 213 | + rotatingExciterWithDemagnetizationVarLim.EFD) annotation (Line(points={{146.3, |
| 214 | + -49},{146,-49},{146,-48},{138,-48},{138,-34},{118,-34},{118,-35},{83.875, |
| 215 | + -35}}, color={0,0, |
| 216 | + 127})); |
| 217 | + connect(gain2.u, EFD) annotation (Line(points={{-6,-82},{196,-82},{196,0},{210, |
| 218 | + 0}}, color={0,0,127})); |
| 219 | + connect(rotatingExciterWithDemagnetizationVarLim.V_FE, gain1.u) annotation ( |
| 220 | + Line(points={{50.125,-44.375},{50.125,-52},{50,-52},{50,-60},{16,-60},{16, |
| 221 | + -56}}, color={0,0,127})); |
| 222 | + connect(VOTHSG, add3_2.u1) annotation (Line(points={{-200,90},{-124,90},{-124, |
| 223 | + 54},{-116,54}}, color={0,0,127})); |
| 224 | + connect(VUEL, add3_2.u2) annotation (Line(points={{-130,-200},{-130,-78},{-128, |
| 225 | + -78},{-128,46},{-116,46}}, color={0,0,127})); |
| 226 | + connect(DiffV.y, add3_2.u3) annotation (Line(points={{-99,0},{-94,0},{-94,22}, |
| 227 | + {-124,22},{-124,38},{-116,38}}, color={0,0,127})); |
| 228 | + connect(add3_2.y, add3.u1) annotation (Line(points={{-93,46},{-82,46},{-82,90}}, |
| 229 | + color={0,0,127})); |
| 230 | + connect(imDerivativeLag.y, add3.u2) annotation (Line(points={{-75,-104},{-82,-104}, |
| 231 | + {-82,10},{-70,10},{-70,90}}, |
| 232 | + color={0,0,127})); |
| 233 | + connect(add3.y, pID_No_Windup.u) |
| 234 | + annotation (Line(points={{-76,113},{-76,120},{-38,120}}, color={0,0,127})); |
| 235 | + connect(VT, gain4.u) annotation (Line(points={{-111,79},{-96,79},{-96,140},{104, |
| 236 | + 140}}, color={0,0,127})); |
| 237 | + connect(gain.u, rotatingExciterWithDemagnetizationVarLim.V_FE) annotation ( |
| 238 | + Line(points={{184,46},{190,46},{190,18},{126,18},{126,-60},{50.125,-60},{50.125, |
| 239 | + -44.375}}, color={0,0,127})); |
| 240 | + connect(product.y, variableLimiter.u) annotation (Line(points={{195,110},{198, |
| 241 | + 110},{198,64},{132,64}}, color={0,0,127})); |
| 242 | + connect(pID_No_Windup.y, add1.u1) annotation (Line(points={{-13,120},{6,120}, |
| 243 | + {6,116},{18,116}}, color={0,0,127})); |
| 244 | + connect(imDerivativeLag.u, gain1.u) annotation (Line(points={{-52,-104},{50,-104}, |
| 245 | + {50,-60},{16,-60},{16,-56}}, color={0,0,127})); |
| 246 | + connect(Upper_Limit.y, variableLimiter.limit1) annotation (Line(points={{169,82}, |
| 247 | + {152,82},{152,72},{132,72}}, color={0,0,127})); |
| 248 | + connect(gain.y, variableLimiter.limit2) annotation (Line(points={{161,46},{152, |
| 249 | + 46},{152,56},{132,56}}, color={0,0,127})); |
| 250 | + connect(se1.VE_IN, rotatingExciterWithDemagnetizationVarLim.EFD) annotation ( |
| 251 | + Line(points={{166.9,30},{182,30},{182,-20},{138,-20},{138,-34},{118,-34},{ |
| 252 | + 118,-35},{83.875,-35}}, color={0,0,127})); |
| 253 | + connect(lowLim.y, rotatingExciterWithDemagnetizationVarLim.outMin) |
| 254 | + annotation (Line(points={{95,-6},{92,-6},{92,-23.75},{83.875,-23.75}}, |
| 255 | + color={0,0,127})); |
| 256 | + connect(division.y, rotatingExciterWithDemagnetizationVarLim.outMax) |
| 257 | + annotation (Line(points={{52,-5},{52,-14},{50.125,-14},{50.125,-23.75}}, |
| 258 | + color={0,0,127})); |
| 259 | + connect(rectifierCommutationVoltageDrop.EFD, EFD) annotation (Line(points={{183.7, |
| 260 | + -49},{196,-49},{196,0},{210,0}}, color={0,0,127})); |
| 261 | + connect(gain5.u, XADIFD) annotation (Line(points={{-28,-162},{-28,-172},{80, |
| 262 | + -172},{80,-200}}, color={0,0,127})); |
| 263 | + connect(rotatingExciterWithDemagnetizationVarLim.XADIFD, XADIFD) annotation ( |
| 264 | + Line(points={{67,-51.875},{67,-146},{80,-146},{80,-200}}, color={0,0,127})); |
| 265 | + connect(rectifierCommutationVoltageDrop.XADIFD, XADIFD) annotation (Line( |
| 266 | + points={{165,-67.7},{165,-172},{80,-172},{80,-200}}, color={0,0,127})); |
| 267 | + connect(variableLimiter.y, rotatingExciterWithDemagnetizationVarLim.I_C) |
| 268 | + annotation (Line(points={{109,64},{68,64},{68,60},{32,60},{32,-35},{50.125, |
| 269 | + -35}}, color={0,0,127})); |
| 270 | + connect(pI_No_Windup.y, product.u2) annotation (Line(points={{101,110},{164, |
| 271 | + 110},{164,104},{172,104}}, color={0,0,127})); |
| 272 | + connect(add1.y, pI_No_Windup.u) |
| 273 | + annotation (Line(points={{41,110},{78,110}}, color={0,0,127})); |
| 274 | + annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,160}})), |
| 275 | + Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={ |
| 276 | + Text( |
| 277 | + extent={{-96,-60},{-26,-80}}, |
| 278 | + lineColor={28,108,200}, |
| 279 | + textString=" |
| 280 | + |
| 281 | + "), Text( |
| 282 | + extent={{-104,90},{-22,70}}, |
| 283 | + lineColor={28,108,200}, |
| 284 | + textString="ETERM"), |
| 285 | + Text( |
| 286 | + extent={{-16,80},{86,46}}, |
| 287 | + textColor={28,108,200}, |
| 288 | + textString="AC7B")}), |
| 289 | + Documentation(info="<html> |
| 290 | +<p>IEEE Type AC7B Excitation System Model.</p> |
| 291 | +</html>", |
| 292 | + revisions="<html><table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"> |
| 293 | +<tr> |
| 294 | +<td><p>Reference</p></td> |
| 295 | +<td><p>PSS®E Manual</p></td> |
| 296 | +</tr> |
| 297 | +<tr> |
| 298 | +<td><p>Last update</p></td> |
| 299 | +<td><p>2022-12</p></td> |
| 300 | +</tr> |
| 301 | +<tr> |
| 302 | +<td><p>Author</p></td> |
| 303 | +<td><p>ALSETLab, Rensselaer Polytechnic Institute</p></td> |
| 304 | +</tr> |
| 305 | +<tr> |
| 306 | +<td><p>Contact</p></td> |
| 307 | +<td><p>see <a href=\"modelica://OpenIPSL.UsersGuide.Contact\">UsersGuide.Contact</a></p></td> |
| 308 | +</tr> |
| 309 | +</table> |
| 310 | +</html>")); |
| 311 | +end AC7B; |
0 commit comments