|
| 1 | +within OpenIPSL.Electrical.Controls.PSSE.ES; |
| 2 | +model ESST2A "ST2A Excitation System [IEEE2005]" |
| 3 | + extends OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter; |
| 4 | + import Modelica.ComplexMath.j; |
| 5 | + import 'abs' = |
| 6 | + Modelica.ComplexMath.abs; |
| 7 | + parameter OpenIPSL.Types.Time T_R=0.01 "Regulator input filter time constant"; |
| 8 | + parameter OpenIPSL.Types.PerUnit V_RMAX=4.5 "Maximum regulator output"; |
| 9 | + parameter OpenIPSL.Types.PerUnit V_RMIN=-4.5 "Minimum regulator output"; |
| 10 | + parameter OpenIPSL.Types.PerUnit K_A=240 "Voltage regulator gain"; |
| 11 | + parameter OpenIPSL.Types.Time T_A=0.01 "Voltage regulator time constant"; |
| 12 | + parameter OpenIPSL.Types.PerUnit K_P=0.7 |
| 13 | + "Potential circuit (voltage) gain coefficient"; |
| 14 | + parameter OpenIPSL.Types.PerUnit K_I=1 |
| 15 | + "Compound circuit (current) gain coefficient"; |
| 16 | + parameter OpenIPSL.Types.PerUnit K_C=0.03 |
| 17 | + "Rectifier loading factor proportional to commutating reactance"; |
| 18 | + parameter OpenIPSL.Types.PerUnit K_F=0.05 "Rate feedback gain"; |
| 19 | + parameter OpenIPSL.Types.Time T_F=0.7 "Rate feedback time constant"; |
| 20 | + parameter Real K_E=1 "Excitation power source output gain"; |
| 21 | + parameter Real T_E=0.5 "Excitation power source output time constant"; |
| 22 | + parameter OpenIPSL.Types.PerUnit EFD_MAX=5 "Maximum exciter output"; |
| 23 | + Modelica.Blocks.Math.Product product |
| 24 | + annotation (Placement(transformation(extent={{54,-16},{74,4}}))); |
| 25 | + OpenIPSL.Interfaces.PwPin Gen_terminal annotation (Placement(transformation( |
| 26 | + extent={{-180,120},{-160,140}}), iconTransformation(extent={{-100,70},{-80,90}}))); |
| 27 | + OpenIPSL.Interfaces.PwPin Bus annotation (Placement(transformation(extent={{180,120},{200,140}}), |
| 28 | + iconTransformation(extent={{80,70},{100,90}}))); |
| 29 | + Modelica.Blocks.Math.Add3 add3_1(k3=-1) |
| 30 | + annotation (Placement(transformation(extent={{-60,-8},{-40,12}}))); |
| 31 | + OpenIPSL.NonElectrical.Continuous.SimpleLag TransducerDelay( |
| 32 | + K=1, |
| 33 | + T=T_R, |
| 34 | + y_start=ECOMP0) |
| 35 | + annotation (Placement(transformation(extent={{-170,-10},{-150,10}}))); |
| 36 | + OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.RectifierCommutationVoltageDrop |
| 37 | + rectifierCommutationVoltageDrop(K_C=K_C) |
| 38 | + annotation (Placement(transformation(extent={{-48,-142},{-28,-122}}))); |
| 39 | + Modelica.Blocks.Continuous.Derivative imDerivativeLag( |
| 40 | + y_start=0, |
| 41 | + k=K_F, |
| 42 | + T=T_F, |
| 43 | + initType=Modelica.Blocks.Types.Init.InitialOutput, |
| 44 | + x_start=0) |
| 45 | + annotation (Placement(transformation(extent={{62,-62},{42,-42}}))); |
| 46 | + OpenIPSL.NonElectrical.Logical.HV_GATE hV_GATE |
| 47 | + annotation (Placement(transformation(extent={{-20.7,-5.5},{2,6}}))); |
| 48 | + OpenIPSL.NonElectrical.Continuous.SimpleLagLim simpleLagLim( |
| 49 | + K=K_A, |
| 50 | + T=T_A, |
| 51 | + y_start=VA0, |
| 52 | + outMax=V_RMAX, |
| 53 | + outMin=V_RMIN) |
| 54 | + annotation (Placement(transformation(extent={{16,-10},{36,10}}))); |
| 55 | + Modelica.Blocks.Math.Feedback feedback |
| 56 | + annotation (Placement(transformation(extent={{88,4},{108,-16}}))); |
| 57 | + Modelica.Blocks.Math.Gain gain(k=K_E) annotation (Placement(transformation( |
| 58 | + extent={{-10,-10},{10,10}}, |
| 59 | + rotation=180, |
| 60 | + origin={136,60}))); |
| 61 | + Modelica.Blocks.Math.Add add1 |
| 62 | + annotation (Placement(transformation(extent={{-108,36},{-88,56}}))); |
| 63 | + Modelica.Blocks.Sources.Constant vB_default(k=1) |
| 64 | + annotation (Placement(transformation(extent={{-54,-80},{-34,-60}}))); |
| 65 | + Modelica.Blocks.Sources.BooleanConstant |
| 66 | + booleanConstant(k=bypass_vb) |
| 67 | + annotation (Placement(transformation(extent={{-80,-109},{-58,-86}}))); |
| 68 | + Modelica.Blocks.Logical.Switch swith_vb |
| 69 | + annotation (Placement(transformation(extent={{-2,-107},{18,-88}}))); |
| 70 | + OpenIPSL.NonElectrical.Continuous.IntegratorLimVar integratorLimVar(K=1/T_E, |
| 71 | + y_start=Efd0) |
| 72 | + annotation (Placement(transformation(extent={{128,-16},{148,4}}))); |
| 73 | + Modelica.Blocks.Sources.Constant MaxOutput(k=EFD_MAX) |
| 74 | + annotation (Placement(transformation(extent={{108,18},{128,38}}))); |
| 75 | + Modelica.Blocks.Sources.Constant MinOutput(k=0) |
| 76 | + annotation (Placement(transformation(extent={{92,-42},{112,-22}}))); |
| 77 | +protected |
| 78 | + Modelica.Blocks.Interfaces.RealOutput VE |
| 79 | + annotation (Placement(transformation(extent={{-76,-142},{-56,-122}}))); |
| 80 | + Complex V_T; |
| 81 | + Complex I_T; |
| 82 | + parameter Real Ifd0(fixed=false); |
| 83 | + parameter Real IN0(fixed=false); |
| 84 | + parameter Real VB0(fixed=false); |
| 85 | + parameter Real VA0(fixed=false); |
| 86 | + parameter Real VE0(fixed=false); |
| 87 | + parameter Boolean bypass_vb(fixed=false); |
| 88 | +initial equation |
| 89 | + Ifd0 = XADIFD; |
| 90 | + VE0 = VE; |
| 91 | + IN0 = K_C*Ifd0/VE0; |
| 92 | + if K_P == 0 and K_I == 0 then |
| 93 | + bypass_vb = true; |
| 94 | + VB0 = 1; |
| 95 | + else |
| 96 | + bypass_vb = false; |
| 97 | + if IN0 <= 0 then |
| 98 | + VB0 = VE0*1; |
| 99 | + elseif IN0 > 0 and IN0 <= 0.433 then |
| 100 | + VB0 = VE0*(1 - 0.577*IN0); |
| 101 | + elseif IN0 > 0.433 and IN0 < 0.75 then |
| 102 | + VB0 = VE0*sqrt(0.75 - IN0^2); |
| 103 | + elseif IN0 >= 0.75 and IN0 <= 1 then |
| 104 | + VB0 = VE0*1.732*(1 - IN0); |
| 105 | + else |
| 106 | + VB0 = VE0*0; |
| 107 | + end if; |
| 108 | + end if; |
| 109 | +// VA0 = if abs(VB0) < Modelica.Constants.eps then 0 else Efd0*(K_E)/(VB0); |
| 110 | + VA0 = Efd0*(K_E)/(VB0); |
| 111 | + V_REF = ECOMP0 + VA0/K_A; |
| 112 | + |
| 113 | +equation |
| 114 | + if K_P == 0 and K_I == 0 then |
| 115 | + VE = 1; |
| 116 | + else |
| 117 | + VE = 'abs'(K_P*V_T + j*K_I*I_T); |
| 118 | + end if; |
| 119 | + V_T = Gen_terminal.vr + j*Gen_terminal.vi; |
| 120 | + I_T = Gen_terminal.ir + j*Gen_terminal.ii; |
| 121 | + connect(ECOMP, TransducerDelay.u) |
| 122 | + annotation (Line(points={{-200,0},{-172,0},{-172,0}}, color={0,0,127})); |
| 123 | + connect(TransducerDelay.y, DiffV.u2) annotation (Line(points={{-149,0},{-132, |
| 124 | + 0},{-132,-6},{-122,-6}}, color={0,0,127})); |
| 125 | + connect(DiffV.y, add3_1.u2) |
| 126 | + annotation (Line(points={{-99,0},{-96,0},{-96,2},{-62,2}}, |
| 127 | + color={0,0,127})); |
| 128 | + connect(VE, rectifierCommutationVoltageDrop.V_EX) |
| 129 | + annotation (Line(points={{-66,-132},{-49,-132}}, |
| 130 | + color={0,0,127})); |
| 131 | + connect(Gen_terminal, Bus) annotation (Line(points={{-170,130},{190,130}}, |
| 132 | + color={0,0,255})); |
| 133 | + connect(XADIFD, rectifierCommutationVoltageDrop.XADIFD) annotation (Line(points={{80,-200}, |
| 134 | + {80,-160},{-38,-160},{-38,-143}}, color={0,0,127})); |
| 135 | + connect(imDerivativeLag.y, add3_1.u3) annotation (Line(points={{41,-52},{-76,-52}, |
| 136 | + {-76,-6},{-62,-6}}, color={0,0,127})); |
| 137 | + connect(simpleLagLim.y, product.u1) |
| 138 | + annotation (Line(points={{37,0},{52,0}}, color={0,0,127})); |
| 139 | + connect(feedback.u1, product.y) |
| 140 | + annotation (Line(points={{90,-6},{75,-6}}, color={0,0,127})); |
| 141 | + connect(gain.y, feedback.u2) |
| 142 | + annotation (Line(points={{125,60},{98,60},{98,2}}, color={0,0,127})); |
| 143 | + connect(gain.u, EFD) annotation (Line(points={{148,60},{188,60},{188,0},{ |
| 144 | + 210,0}}, color={0,0,127})); |
| 145 | + connect(imDerivativeLag.u, EFD) annotation (Line(points={{64,-52},{180,-52},{180, |
| 146 | + 0},{210,0}}, color={0,0,127})); |
| 147 | + connect(VOTHSG, add1.u1) annotation (Line(points={{-200,90},{-120,90},{-120,52}, |
| 148 | + {-110,52},{-110,52}}, color={0,0,127})); |
| 149 | + connect(VOEL, add1.u2) annotation (Line(points={{-70,-200},{-70,-160},{-100,-160}, |
| 150 | + {-100,-32},{-90,-32},{-90,24},{-120,24},{-120,40},{-110,40}}, color={0, |
| 151 | + 0,127})); |
| 152 | + connect(add1.y, add3_1.u1) annotation (Line(points={{-87,46},{-74,46},{-74,10}, |
| 153 | + {-62,10}}, color={0,0,127})); |
| 154 | + connect(booleanConstant.y, swith_vb.u2) |
| 155 | + annotation (Line(points={{-56.9,-97.5},{-4,-97.5}}, color={255,0,255})); |
| 156 | + connect(swith_vb.y, product.u2) annotation (Line(points={{19,-97.5},{34,-97.5}, |
| 157 | + {34,-22},{44,-22},{44,-12},{52,-12}}, color={0,0,127})); |
| 158 | + connect(feedback.y, integratorLimVar.u) |
| 159 | + annotation (Line(points={{107,-6},{126,-6}}, color={0,0,127})); |
| 160 | + connect(integratorLimVar.y, EFD) annotation (Line(points={{149,-6},{162,-6}, |
| 161 | + {162,0},{210,0}}, color={0,0,127})); |
| 162 | + connect(MaxOutput.y, integratorLimVar.outMax) |
| 163 | + annotation (Line(points={{129,28},{146,28},{146,8}}, color={0,0,127})); |
| 164 | + connect(MinOutput.y, integratorLimVar.outMin) annotation (Line(points={{113, |
| 165 | + -32},{130,-32},{130,-20}}, color={0,0,127})); |
| 166 | + connect(add3_1.y, hV_GATE.u1) annotation (Line(points={{-39,2},{-39,3.7},{-22.97, |
| 167 | + 3.7}}, color={0,0,127})); |
| 168 | + connect(VUEL, hV_GATE.u2) annotation (Line(points={{-130,-200},{-130,-26},{-30, |
| 169 | + -26},{-30,-3.2},{-22.97,-3.2}}, color={0,0,127})); |
| 170 | + connect(hV_GATE.y, simpleLagLim.u) annotation (Line(points={{3.135,0.25},{8.5675, |
| 171 | + 0.25},{8.5675,0},{14,0}}, color={0,0,127})); |
| 172 | + connect(rectifierCommutationVoltageDrop.EFD, swith_vb.u3) annotation (Line( |
| 173 | + points={{-27,-132},{-12,-132},{-12,-105.1},{-4,-105.1}}, color={0,0,127})); |
| 174 | + connect(vB_default.y, swith_vb.u1) |
| 175 | + annotation (Line(points={{-33,-70},{-4,-70},{-4,-89.9}}, color={0,0,127})); |
| 176 | + annotation ( |
| 177 | + Diagram(coordinateSystem(extent={{-180,-180},{200,140}}), |
| 178 | + graphics={Text( |
| 179 | + extent={{4,-32},{28,-46}}, |
| 180 | + lineColor={255,0,0}, |
| 181 | + textString="VB"), |
| 182 | + Text( |
| 183 | + extent={{42,56},{66,42}}, |
| 184 | + lineColor={255,0,0}, |
| 185 | + textString="VR"), |
| 186 | + Text( |
| 187 | + extent={{-74,48},{-50,34}}, |
| 188 | + lineColor={255,0,0}, |
| 189 | + textString="VS")}), |
| 190 | + Icon(coordinateSystem(extent={{-100,-100},{100,100}}), |
| 191 | + graphics={Text( |
| 192 | + extent={{-80,90},{-20,70}}, |
| 193 | + lineColor={0,0,255}, |
| 194 | + textString="GenT"), Text( |
| 195 | + extent={{-100,160},{100,100}}, |
| 196 | + lineColor={28,108,200}, |
| 197 | + textString="ESST2A"), |
| 198 | + Text( |
| 199 | + extent={{40,90},{80,70}}, |
| 200 | + lineColor={0,0,255}, |
| 201 | + textString="Bus")}), |
| 202 | + Documentation(info="<html> |
| 203 | +<p>IEEE Type ST2A Excitation System Model.</p> |
| 204 | +</html>", |
| 205 | + revisions="<html><table cellspacing=\"1\" cellpadding=\"1\" border=\"1\"> |
| 206 | +<tr> |
| 207 | +<td><p>Reference</p></td> |
| 208 | +<td>PSS®E Manual</td> |
| 209 | +</tr> |
| 210 | +<tr> |
| 211 | +<td><p>Last update</p></td> |
| 212 | +<td><p>2022-12</p></td> |
| 213 | +</tr> |
| 214 | +<tr> |
| 215 | +<td><p>Author</p></td> |
| 216 | +<td><p>ALSETLab, Rensselaer Polytechnic Institute</p></td> |
| 217 | +</tr> |
| 218 | +<tr> |
| 219 | +<td><p>Contact</p></td> |
| 220 | +<td><p>see <a href=\"modelica://OpenIPSL.UsersGuide.Contact\">UsersGuide.Contact</a></p></td> |
| 221 | +</tr> |
| 222 | +</table> |
| 223 | +</html>")); |
| 224 | +end ESST2A; |
0 commit comments