|
| 1 | +within MicroGrid.Electrical.Controls.TG.GGOV1.Original; |
| 2 | +model GGOV1 "GE General Governor/Turbine Mode" |
| 3 | + parameter Real R "Permanent droop (pu)"; |
| 4 | + parameter Real T_pelec "Electrical power transducer time constant (s)"; |
| 5 | + parameter Real maxerr "Maximum value for speed error signal"; |
| 6 | + parameter Real minerr "Minimum value for speed error signal"; |
| 7 | + parameter Real Kpgov "Governor proportional gain"; |
| 8 | + parameter Real Kigov "Governor integral gain"; |
| 9 | + parameter Real Kdgov "Governor derivative gain"; |
| 10 | + parameter Real Tdgov "Governor derivative controller time constant (s)"; |
| 11 | + parameter Real Vmax "Maximum valve position limit"; |
| 12 | + parameter Real Vmin "Minimum valve position limit"; |
| 13 | + parameter Real Tact "Actuator time constant (s)"; |
| 14 | + parameter Real Kturb "Turbine gain"; |
| 15 | + parameter Real Wfnl "No load fuel flow (pu)"; |
| 16 | + parameter Real Tb "Turbine lag time constant (s)"; |
| 17 | + parameter Real Tc "Turbine lead time constant (s)"; |
| 18 | + parameter Real Teng "Transport lag time constant for diesel engine (s)"; |
| 19 | + parameter Real Tfload "Load Limiter time constant (s)"; |
| 20 | + parameter Real Kpload "Load limiter proportional gain for PI controller"; |
| 21 | + parameter Real Kiload "Load limiter integral gain for PI controller"; |
| 22 | + parameter Real Ldref "Load limiter reference value (pu)"; |
| 23 | + parameter Real Dm "Mechanical damping coefficient (pu)"; |
| 24 | + parameter Real Ropen "Maximum valve opening rate (p.u./s)"; |
| 25 | + parameter Real Rclose "Maximum valve closing rate (p.u./s)"; |
| 26 | + parameter Real Kimw "Power controller (reset) gain"; |
| 27 | + parameter Real Aset "Acceleration limiter setpoint (p.u./s)"; |
| 28 | + parameter Real Ka "Acceleration limiter gain"; |
| 29 | + parameter Real Ta "Acceleration limiter time constant (s)"; |
| 30 | + parameter Real Trate "Turbine rating (MW)"; |
| 31 | + parameter Real db "Speed governor deadband"; |
| 32 | + parameter Real Tsa "Temperature detection lead time constant (s)"; |
| 33 | + parameter Real Tsb "Temperature detection lag time constant (s)"; |
| 34 | + parameter Real Rup "Maximum rate of load limit increase"; |
| 35 | + parameter Real Rdown "Maximum rate of load limit decrease"; |
| 36 | + parameter Real DELT "PSSE time step"; |
| 37 | + Modelica.Blocks.Interfaces.RealInput SPEED "Machine speed deviation from nominal (pu)" |
| 38 | + annotation (Placement(transformation(extent={{-302,-2},{-264,36}}), iconTransformation(extent={{-346,100},{-308,138}}))); |
| 39 | + Modelica.Blocks.Interfaces.RealInput PELEC "Machine electrical power (pu)" annotation (Placement(transformation(extent={{-320,-72},{-284,-36}}), iconTransformation(extent={{-348,-118},{-310,-80}}))); |
| 40 | + Modelica.Blocks.Sources.Constant AccelerationSet(k=Aset) annotation (Placement(transformation(extent={{-198,-14},{-176,8}}))); |
| 41 | + Modelica.Blocks.Sources.Constant P_ref(k=Pref) annotation (Placement(transformation(extent={{-234,-102},{-212,-80}}))); |
| 42 | + Modelica.Blocks.Sources.Constant Pmw_set(k=Pmwset) "Supervisory Load Controller Setpoint," annotation (Placement(transformation(extent={{-234,-146},{-212,-124}}))); |
| 43 | + Modelica.Blocks.Sources.Constant set(k=Ldref) "load reference" annotation (Placement(transformation(extent={{-200,72},{-178,94}}))); |
| 44 | + OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.GGOV1.Min_select min_select(frs0=fsr0, nu=3) annotation (Placement(transformation(extent={{-20,-34},{34,20}}))); |
| 45 | + Modelica.Blocks.Interfaces.RealOutput PMECH "Turbine mechanical power (pu)" annotation (Placement(transformation(extent={{228,22},{254,48}}), iconTransformation(extent={{260,-12},{284,12}}))); |
| 46 | +public |
| 47 | + Original.LoadLimiter gGOV1_Temp( |
| 48 | + Kturb=Kturb, |
| 49 | + Kpload=Kpload, |
| 50 | + Kiload=Kiload, |
| 51 | + Dm=Dm, |
| 52 | + Wfnl=Wfnl) annotation (Placement(transformation(extent={{-140,40},{-80,100}}))); |
| 53 | + Modelica.Blocks.Nonlinear.Limiter V(uMax=Vmax, uMin=Vmin) annotation (Placement(transformation(extent={{70,-20},{96,6}}))); |
| 54 | + Original.Turbine gGOV1_Turb( |
| 55 | + Tact=Tact, |
| 56 | + Kturb=Kturb, |
| 57 | + Tb=Tb, |
| 58 | + Tc=Tc, |
| 59 | + Teng=Teng, |
| 60 | + Tfload=Tfload, |
| 61 | + Dm=Dm, |
| 62 | + Ropen=Ropen, |
| 63 | + Rclose=Rclose, |
| 64 | + Tsa=Tsa, |
| 65 | + Tsb=Tsb, |
| 66 | + DELT=DELT, |
| 67 | + Flag=0, |
| 68 | + Wfnl=Wfnl) annotation (Placement(transformation(extent={{136,-20},{196,40}}))); |
| 69 | + Original.AccelerationLimiter gGOV1_Accel( |
| 70 | + Ka=Ka, |
| 71 | + Ta=Ta, |
| 72 | + DELT=DELT) annotation (Placement(transformation(extent={{-140,-48},{-80,12}}))); |
| 73 | + Original.PIDGovernor gGOV1_Power( |
| 74 | + R=R, |
| 75 | + T_pelec=T_pelec, |
| 76 | + maxerr=maxerr, |
| 77 | + minerr=minerr, |
| 78 | + Kpgov=Kpgov, |
| 79 | + Kigov=Kigov, |
| 80 | + Kdgov=Kdgov, |
| 81 | + Tdgov=Tdgov, |
| 82 | + Dm=Dm, |
| 83 | + Kimw=Kimw, |
| 84 | + db=db, |
| 85 | + Kturb=Kturb, |
| 86 | + Wfnl=Wfnl) annotation (Placement(transformation(extent={{-140,-140},{-80,-80}}))); |
| 87 | +protected |
| 88 | + parameter Real Pe0(fixed=false); |
| 89 | + parameter Real Pmech0(fixed=false); |
| 90 | + parameter Real Pref(fixed=false); |
| 91 | + parameter Real Pmwset(fixed=false); |
| 92 | + parameter Real fsr0(fixed=false); |
| 93 | + |
| 94 | +initial equation |
| 95 | + Pe0 = PELEC; |
| 96 | + Pmech0 = PELEC; |
| 97 | + Pref = R*Pe0; |
| 98 | + Pmwset = Pe0; |
| 99 | + fsr0 = (Pmech0 + Dm)/Kturb + Wfnl; |
| 100 | + |
| 101 | +equation |
| 102 | + connect(set.y, gGOV1_Temp.LDREF) annotation (Line(points={{-176.9,83},{-158,83},{-158,69.7},{-142.7,69.7}}, color={0,0,127})); |
| 103 | + connect(gGOV1_Temp.FSRT, min_select.u[1]) annotation (Line(points={{-77,52},{-52,52},{-52,4},{-52,5.6},{-20,5.6}}, color={0,0,127})); |
| 104 | + connect(min_select.yMin, V.u) annotation (Line(points={{36.7,-7},{ |
| 105 | +52,-7},{52,-7},{67.4,-7}}, color={0,0,127})); |
| 106 | + connect(gGOV1_Turb.FSR, V.y) annotation (Line(points={{133.643,-11.6429},{108, |
| 107 | + -11.6429},{108,-7},{97.3,-7}}, color={0,0,127})); |
| 108 | + connect(gGOV1_Turb.TEXM, gGOV1_Temp.TEXM) annotation (Line(points={{166, |
| 109 | + 42.5714},{166,42.5714},{166,70},{166,85},{-77.6,85}}, |
| 110 | + color={0,0,127})); |
| 111 | + connect(AccelerationSet.y, gGOV1_Accel.ASET) annotation (Line(points={{-174.9,-3},{-156,-3},{-156,-2.7},{-141.5,-2.7}}, color={0,0,127})); |
| 112 | + connect(gGOV1_Accel.FSR, V.y) annotation (Line(points={{-78.2,-33},{-60,-33},{-60,-60},{106,-60},{106,-6},{97.3,-7}}, color={0,0,127})); |
| 113 | + connect(gGOV1_Accel.FSRA, min_select.u[2]) annotation (Line(points={{-76.7,-3.3},{-62,-3.3},{-62,-7},{-20,-7}}, color={0,0,127})); |
| 114 | + connect(P_ref.y, gGOV1_Power.P_REF) annotation (Line(points={{-210.9,-91},{ |
| 115 | + -198,-91},{-198,-102.071},{-142.357,-102.071}}, |
| 116 | + color={0,0,127})); |
| 117 | + connect(Pmw_set.y, gGOV1_Power.PMW_SET) annotation (Line(points={{-210.9,-135}, |
| 118 | + {-196,-135},{-196,-118.786},{-142.357,-118.786}}, color={0,0,127})); |
| 119 | + connect(gGOV1_Power.FSRN, min_select.u[3]) annotation (Line(points={{-77.4286, |
| 120 | + -110},{-50,-110},{-50,-19.6},{-20,-19.6}}, color={0,0,127})); |
| 121 | + connect(gGOV1_Accel.SPEED, SPEED) annotation (Line(points={{-141.5,-33.3},{-240,-33.3},{-240,17},{-283,17}}, color={0,0,127})); |
| 122 | + connect(gGOV1_Power.SPEED, SPEED) annotation (Line(points={{-142.357,-90.5},{ |
| 123 | + -180,-90.5},{-180,-34},{-240,-34},{-240,17},{-283,17}}, |
| 124 | + color={0,0,127})); |
| 125 | + connect(gGOV1_Turb.SPEED, SPEED) annotation (Line(points={{133.857,31.4286},{ |
| 126 | + 100,31.4286},{100,140},{-240,140},{-240,17},{-283,17}}, |
| 127 | + color={0,0,127})); |
| 128 | + connect(gGOV1_Power.PELEC, PELEC) annotation (Line(points={{-142.357,-131.643}, |
| 129 | + {-182,-131.643},{-182,-168},{-256,-168},{-256,-54},{-302,-54}}, |
| 130 | + color={0,0,127})); |
| 131 | + connect(gGOV1_Temp.WF, V.y) annotation (Line(points={{-78.2,67},{80,67},{80,20},{106,20},{106,-6},{97.3,-7}}, color={0,0,127})); |
| 132 | + connect(gGOV1_Temp.PELEC, PELEC) annotation (Line(points={{-110,37.6},{-110,20},{-220,20},{-220,-54},{-302,-54}}, color={0,0,127})); |
| 133 | + connect(gGOV1_Power.VSTROKE, gGOV1_Turb.VSTROKE) annotation (Line(points={{ |
| 134 | + -116.214,-141.929},{-116.214,-180},{212,-180},{212,-11.4286},{198.571, |
| 135 | + -11.4286}}, color={0,0,127})); |
| 136 | + connect(gGOV1_Turb.PELEC, PELEC) annotation (Line(points={{134.071,10.2143},{ |
| 137 | + 120,10.2143},{120,-200},{-274,-200},{-274,-54},{-302,-54}}, |
| 138 | + color={0,0,127})); |
| 139 | + connect(gGOV1_Turb.PMECH, PMECH) annotation (Line(points={{198.571,10},{214, |
| 140 | + 10},{214,35},{241,35}}, |
| 141 | + color={0,0,127})); |
| 142 | + connect(gGOV1_Power.GOVOUT1, V.y) annotation (Line(points={{-94.7857,-141.929}, |
| 143 | + {-94.7857,-160},{112,-160},{112,-12},{108,-12},{108,-7},{97.3,-7}}, |
| 144 | + color={0,0,127})); |
| 145 | + annotation ( |
| 146 | + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-320,-240},{260,220}})), |
| 147 | + Icon(coordinateSystem(extent={{-320,-240},{260,220}}, preserveAspectRatio=false), graphics={Rectangle(extent={{-320,220},{260,-240}}, lineColor={0,0,255}),Text( |
| 148 | + extent={{-306,146},{-216,92}}, |
| 149 | + lineColor={0,0,255}, |
| 150 | + textString="SPEED"),Text( |
| 151 | + extent={{-306,-74},{-222,-126}}, |
| 152 | + lineColor={0,0,255}, |
| 153 | + textString="PELEC"),Text( |
| 154 | + extent={{-114,64},{92,-64}}, |
| 155 | + lineColor={0,0,255}, |
| 156 | + textString="GGOV1"),Text( |
| 157 | + extent={{172,24},{256,-28}}, |
| 158 | + lineColor={0,0,255}, |
| 159 | + textString="PMECH")}), |
| 160 | + Documentation(revisions="<html> |
| 161 | +<!--DISCLAIMER--> |
| 162 | +<p>OpenIPSL:</p> |
| 163 | +<p>Copyright 2016 SmarTS Lab (Sweden)</p> |
| 164 | +<ul> |
| 165 | +<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li> |
| 166 | +</ul> |
| 167 | +<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p> |
| 168 | +
|
| 169 | +<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p> |
| 170 | +<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p> |
| 171 | +
|
| 172 | +<p></p> |
| 173 | +<p>iPSL:</p> |
| 174 | +<p>Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)</p> |
| 175 | +<ul> |
| 176 | +<li>RTE: <a href=\"http://www.rte-france.com\">http://www.rte-france.com</a></li> |
| 177 | +<li>SmarTS Lab, research group at KTH: <a href=\"https://www.kth.se/en\">https://www.kth.se/en</a></li> |
| 178 | +<li>AIA: <a href=\"http://www.aia.es/en/energy\"> http://www.aia.es/en/energy</a></li> |
| 179 | +<li>DTU: <a href=\"http://www.dtu.dk/english\"> http://www.dtu.dk/english</a></li> |
| 180 | +</ul> |
| 181 | +<p>The authors can be contacted by email: <a href=\"mailto:[email protected]\">[email protected]</a></p> |
| 182 | +
|
| 183 | +<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. </p> |
| 184 | +<p>If a copy of the MPL was not distributed with this file, You can obtain one at <a href=\"http://mozilla.org/MPL/2.0/\"> http://mozilla.org/MPL/2.0</a>.</p> |
| 185 | +</html> |
| 186 | +")); |
| 187 | +end GGOV1; |
0 commit comments