diff --git a/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator1.mo b/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator1.mo index d182b0084..82c3b1540 100644 --- a/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator1.mo +++ b/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator1.mo @@ -130,8 +130,7 @@ equation fillPattern=FillPattern.Solid, textString="%name"), Line(points={{-60,-20},{-20,20},{20,-20},{60,20}}, - color={28,108,200}),Ellipse(extent={{-100,-100},{100,100}}, lineColor - = + color={28,108,200}),Ellipse(extent={{-100,-100},{100,100}}, lineColor= {28,108,200})}), Documentation(info="
Generation group for the example that uses the IEEE421.5-based data set.
diff --git a/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator2.mo b/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator2.mo index 81715295d..128f3686e 100644 --- a/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator2.mo +++ b/OpenIPSL/Data/PowerPlant/GenerationGroup/Generator2.mo @@ -127,8 +127,7 @@ equation fillPattern=FillPattern.Solid, textString="%name"), Line(points={{-60,-20},{-20,20},{20,-20},{60,20}}, - color={28,108,200}),Ellipse(extent={{-100,-100},{100,100}}, lineColor - = + color={28,108,200}),Ellipse(extent={{-100,-100},{100,100}}, lineColor= {28,108,200})}), Documentation(info="Generation Group for the example that uses the Anderson-based data set.
diff --git a/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PID_No_Windup.mo b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PID_No_Windup.mo new file mode 100644 index 000000000..76af8c28f --- /dev/null +++ b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PID_No_Windup.mo @@ -0,0 +1,80 @@ +within OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses; +model PID_No_Windup + import Modelica.Units.SI; + parameter SI.PerUnit K_PR "Voltage regulator proportional gain (pu)"; + parameter SI.TimeAging K_IR "Voltage regulator integral gain (pu)"; + parameter SI.PerUnit K_DR "Voltage regulator derivative gain (pu)"; + parameter SI.Time T_DR "Voltage regulator derivative channel time constant (sec)"; + parameter SI.PerUnit V_RMAX "Maximum regulator output (pu)"; + parameter SI.PerUnit V_RMIN "Minimum regulator output (pu)"; + parameter Real VR0; + Modelica.Blocks.Continuous.Integrator integral( + k=K_IR, + use_reset=false, + initType=Modelica.Blocks.Types.Init.InitialOutput, + y_start=VR0) + annotation (Placement(transformation(extent={{-44,30},{-24,50}}))); + Modelica.Blocks.Math.Gain proportional(k=K_PR) + annotation (Placement(transformation(extent={{-42,-10},{-22,10}}))); + Modelica.Blocks.Math.Gain gain1(k=K_DR*kd) + annotation (Placement(transformation(extent={{-40,-44},{-20,-24}}))); + Modelica.Blocks.Math.Add3 PID_add + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + Modelica.Blocks.Math.Add derivative_add(k2=-1) + annotation (Placement(transformation(extent={{-2,-50},{18,-30}}))); + Modelica.Blocks.Interfaces.RealInput u + annotation (Placement(transformation(extent={{-160,-20},{-120,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + Modelica.Blocks.Continuous.Integrator derivative(initType=Modelica.Blocks.Types.Init.InitialOutput, + y_start=0) + annotation (Placement(transformation(extent={{-42,-80},{-22,-60}}))); + Modelica.Blocks.Math.Gain gain2(k=kd) + annotation (Placement(transformation(extent={{-80,-80},{-60,-60}}))); + Modelica.Blocks.Nonlinear.Limiter limiter(uMax=V_RMAX, uMin=V_RMIN) + annotation (Placement(transformation(extent={{68,-10},{88,10}}))); + Modelica.Blocks.Logical.Switch reset_switch + annotation (Placement(transformation(extent={{-82,30},{-62,50}}))); + Modelica.Blocks.Sources.RealExpression realExpression + annotation (Placement(transformation(extent={{-116,38},{-96,58}}))); +protected + parameter Real kd = if T_DR <= Modelica.Constants.eps then 1 else 1/T_DR; +equation + reset_switch.u2 = + if (abs(V_RMAX - y) <= Modelica.Constants.eps and der(integral.y)>0) then true + else if (abs(V_RMIN - y) <= Modelica.Constants.eps and der(integral.y)<0) then true + else false; + connect(integral.y, PID_add.u1) + annotation (Line(points={{-23,40},{6,40},{6,8},{30,8}}, color={0,0,127})); + connect(proportional.y, PID_add.u2) + annotation (Line(points={{-21,0},{30,0}}, color={0,0,127})); + connect(gain1.y, derivative_add.u1) + annotation (Line(points={{-19,-34},{-4,-34}}, color={0,0,127})); + connect(derivative.y, derivative_add.u2) annotation (Line(points={{-21,-70},{-12, + -70},{-12,-46},{-4,-46}}, color={0,0,127})); + connect(gain2.y,derivative. u) + annotation (Line(points={{-59,-70},{-44,-70}}, color={0,0,127})); + connect(y, limiter.y) + annotation (Line(points={{110,0},{89,0}}, color={0,0,127})); + connect(PID_add.y, limiter.u) + annotation (Line(points={{53,0},{60,0},{60,0},{66,0}}, color={0,0,127})); + connect(reset_switch.u1, realExpression.y) + annotation (Line(points={{-84,48},{-95,48}}, color={0,0,127})); + connect(reset_switch.u3, u) annotation (Line(points={{-84,32},{-96,32},{-96,0}, + {-140,0}}, color={0,0,127})); + connect(reset_switch.y, integral.u) + annotation (Line(points={{-61,40},{-46,40}}, color={0,0,127})); + connect(proportional.u, u) + annotation (Line(points={{-44,0},{-140,0}}, color={0,0,127})); + connect(gain1.u, u) annotation (Line(points={{-42,-34},{-96,-34},{-96,0},{-140, + 0}}, color={0,0,127})); + connect(derivative_add.y, PID_add.u3) annotation (Line(points={{19,-40},{24,-40}, + {24,-8},{30,-8}}, color={0,0,127})); + connect(gain2.u, PID_add.u3) annotation (Line(points={{-82,-70},{-90,-70},{-90, + -90},{24,-90},{24,-8},{30,-8}}, color={0,0,127})); + annotation ( + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{100,60}})), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{100, + 60}})), + conversion(noneFromVersion="")); +end PID_No_Windup; diff --git a/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PI_No_Windup.mo b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PI_No_Windup.mo new file mode 100644 index 000000000..89dd7ea50 --- /dev/null +++ b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/PI_No_Windup.mo @@ -0,0 +1,55 @@ +within OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses; +model PI_No_Windup + import Modelica.Units.SI; + parameter SI.PerUnit K_P "Voltage regulator proportional gain (pu)"; + parameter SI.TimeAging K_I "Voltage regulator integral gain (pu)"; + parameter SI.PerUnit V_RMAX "Maximum regulator output (pu)"; + parameter SI.PerUnit V_RMIN "Minimum regulator output (pu)"; + parameter Real y_start; + Modelica.Blocks.Continuous.Integrator integral( + k=K_I, + use_reset=false, + initType=Modelica.Blocks.Types.Init.InitialOutput, + y_start=y_start) + annotation (Placement(transformation(extent={{-18,30},{2,50}}))); + Modelica.Blocks.Math.Gain proportional(k=K_P) + annotation (Placement(transformation(extent={{-26,-50},{-6,-30}}))); + Modelica.Blocks.Math.Add PI_add + annotation (Placement(transformation(extent={{38,-10},{58,10}}))); + Modelica.Blocks.Nonlinear.Limiter limiter(uMax=V_RMAX, uMin=V_RMIN) + annotation (Placement(transformation(extent={{68,-10},{88,10}}))); + Modelica.Blocks.Logical.Switch reset_switch + annotation (Placement(transformation(extent={{-56,30},{-36,50}}))); + Modelica.Blocks.Sources.RealExpression realExpression + annotation (Placement(transformation(extent={{-90,38},{-70,58}}))); + Modelica.Blocks.Interfaces.RealInput u + annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.RealOutput y + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); +equation + reset_switch.u2 = + if (abs(V_RMAX - y) <= Modelica.Constants.eps and der(integral.y)>0) then true + else if (abs(V_RMIN - y) <= Modelica.Constants.eps and der(integral.y)<0) then true + else false; + connect(integral.y, PI_add.u1) annotation (Line(points={{3,40},{30,40},{30,6}, + {36,6}}, color={0,0,127})); + connect(proportional.y, PI_add.u2) annotation (Line(points={{-5,-40},{30,-40}, + {30,-6},{36,-6}}, color={0,0,127})); + connect(y,limiter. y) + annotation (Line(points={{110,0},{89,0}}, color={0,0,127})); + connect(PI_add.y, limiter.u) + annotation (Line(points={{59,0},{66,0}}, color={0,0,127})); + connect(reset_switch.u1,realExpression. y) + annotation (Line(points={{-58,48},{-69,48}}, color={0,0,127})); + connect(reset_switch.u3,u) annotation (Line(points={{-58,32},{-70,32},{-70,0}, + {-120,0}}, color={0,0,127})); + connect(reset_switch.y,integral. u) + annotation (Line(points={{-35,40},{-20,40}}, color={0,0,127})); + connect(proportional.u,u) + annotation (Line(points={{-28,-40},{-70,-40},{-70,0},{-120,0}}, + color={0,0,127})); + annotation ( + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{100,100}})), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ + 100,100}}))); +end PI_No_Windup; diff --git a/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/package.order b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/package.order index 8d2b8b600..598832273 100644 --- a/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/package.order +++ b/OpenIPSL/Electrical/Controls/PSSE/ES/BaseClasses/package.order @@ -9,3 +9,5 @@ RectifierCommutationVoltageDrop calculate_dc_exciter_params RotatingExciterBase invFEX +PID_No_Windup +PI_No_Windup diff --git a/OpenIPSL/Electrical/Controls/PSSE/ES/ESST2A.mo b/OpenIPSL/Electrical/Controls/PSSE/ES/ESST2A.mo new file mode 100644 index 000000000..7a488b7cb --- /dev/null +++ b/OpenIPSL/Electrical/Controls/PSSE/ES/ESST2A.mo @@ -0,0 +1,224 @@ +within OpenIPSL.Electrical.Controls.PSSE.ES; +model ESST2A "ST2A Excitation System [IEEE2005]" + extends OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter; + import Modelica.ComplexMath.j; + import 'abs' = + Modelica.ComplexMath.abs; + parameter OpenIPSL.Types.Time T_R=0.01 "Regulator input filter time constant"; + parameter OpenIPSL.Types.PerUnit V_RMAX=4.5 "Maximum regulator output"; + parameter OpenIPSL.Types.PerUnit V_RMIN=-4.5 "Minimum regulator output"; + parameter OpenIPSL.Types.PerUnit K_A=240 "Voltage regulator gain"; + parameter OpenIPSL.Types.Time T_A=0.01 "Voltage regulator time constant"; + parameter OpenIPSL.Types.PerUnit K_P=0.7 + "Potential circuit (voltage) gain coefficient"; + parameter OpenIPSL.Types.PerUnit K_I=1 + "Compound circuit (current) gain coefficient"; + parameter OpenIPSL.Types.PerUnit K_C=0.03 + "Rectifier loading factor proportional to commutating reactance"; + parameter OpenIPSL.Types.PerUnit K_F=0.05 "Rate feedback gain"; + parameter OpenIPSL.Types.Time T_F=0.7 "Rate feedback time constant"; + parameter Real K_E=1 "Excitation power source output gain"; + parameter Real T_E=0.5 "Excitation power source output time constant"; + parameter OpenIPSL.Types.PerUnit EFD_MAX=5 "Maximum exciter output"; + Modelica.Blocks.Math.Product product + annotation (Placement(transformation(extent={{54,-16},{74,4}}))); + OpenIPSL.Interfaces.PwPin Gen_terminal annotation (Placement(transformation( + extent={{-180,120},{-160,140}}), iconTransformation(extent={{-100,70},{-80,90}}))); + OpenIPSL.Interfaces.PwPin Bus annotation (Placement(transformation(extent={{180,120},{200,140}}), + iconTransformation(extent={{80,70},{100,90}}))); + Modelica.Blocks.Math.Add3 add3_1(k3=-1) + annotation (Placement(transformation(extent={{-60,-8},{-40,12}}))); + OpenIPSL.NonElectrical.Continuous.SimpleLag TransducerDelay( + K=1, + T=T_R, + y_start=ECOMP0) + annotation (Placement(transformation(extent={{-170,-10},{-150,10}}))); + OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.RectifierCommutationVoltageDrop + rectifierCommutationVoltageDrop(K_C=K_C) + annotation (Placement(transformation(extent={{-48,-142},{-28,-122}}))); + Modelica.Blocks.Continuous.Derivative imDerivativeLag( + y_start=0, + k=K_F, + T=T_F, + initType=Modelica.Blocks.Types.Init.InitialOutput, + x_start=0) + annotation (Placement(transformation(extent={{62,-62},{42,-42}}))); + OpenIPSL.NonElectrical.Logical.HV_GATE hV_GATE + annotation (Placement(transformation(extent={{-20.7,-5.5},{2,6}}))); + OpenIPSL.NonElectrical.Continuous.SimpleLagLim simpleLagLim( + K=K_A, + T=T_A, + y_start=VA0, + outMax=V_RMAX, + outMin=V_RMIN) + annotation (Placement(transformation(extent={{16,-10},{36,10}}))); + Modelica.Blocks.Math.Feedback feedback + annotation (Placement(transformation(extent={{88,4},{108,-16}}))); + Modelica.Blocks.Math.Gain gain(k=K_E) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={136,60}))); + Modelica.Blocks.Math.Add add1 + annotation (Placement(transformation(extent={{-108,36},{-88,56}}))); + Modelica.Blocks.Sources.Constant vB_default(k=1) + annotation (Placement(transformation(extent={{-54,-80},{-34,-60}}))); + Modelica.Blocks.Sources.BooleanConstant + booleanConstant(k=bypass_vb) + annotation (Placement(transformation(extent={{-80,-109},{-58,-86}}))); + Modelica.Blocks.Logical.Switch swith_vb + annotation (Placement(transformation(extent={{-2,-107},{18,-88}}))); + OpenIPSL.NonElectrical.Continuous.IntegratorLimVar integratorLimVar(K=1/T_E, + y_start=Efd0) + annotation (Placement(transformation(extent={{128,-16},{148,4}}))); + Modelica.Blocks.Sources.Constant MaxOutput(k=EFD_MAX) + annotation (Placement(transformation(extent={{108,18},{128,38}}))); + Modelica.Blocks.Sources.Constant MinOutput(k=0) + annotation (Placement(transformation(extent={{92,-42},{112,-22}}))); +protected + Modelica.Blocks.Interfaces.RealOutput VE + annotation (Placement(transformation(extent={{-76,-142},{-56,-122}}))); + Complex V_T; + Complex I_T; + parameter Real Ifd0(fixed=false); + parameter Real IN0(fixed=false); + parameter Real VB0(fixed=false); + parameter Real VA0(fixed=false); + parameter Real VE0(fixed=false); + parameter Boolean bypass_vb(fixed=false); +initial equation + Ifd0 = XADIFD; + VE0 = VE; + IN0 = K_C*Ifd0/VE0; + if K_P == 0 and K_I == 0 then + bypass_vb = true; + VB0 = 1; + else + bypass_vb = false; + if IN0 <= 0 then + VB0 = VE0*1; + elseif IN0 > 0 and IN0 <= 0.433 then + VB0 = VE0*(1 - 0.577*IN0); + elseif IN0 > 0.433 and IN0 < 0.75 then + VB0 = VE0*sqrt(0.75 - IN0^2); + elseif IN0 >= 0.75 and IN0 <= 1 then + VB0 = VE0*1.732*(1 - IN0); + else + VB0 = VE0*0; + end if; + end if; +// VA0 = if abs(VB0) < Modelica.Constants.eps then 0 else Efd0*(K_E)/(VB0); + VA0 = Efd0*(K_E)/(VB0); + V_REF = ECOMP0 + VA0/K_A; + +equation + if K_P == 0 and K_I == 0 then + VE = 1; + else + VE = 'abs'(K_P*V_T + j*K_I*I_T); + end if; + V_T = Gen_terminal.vr + j*Gen_terminal.vi; + I_T = Gen_terminal.ir + j*Gen_terminal.ii; + connect(ECOMP, TransducerDelay.u) + annotation (Line(points={{-200,0},{-172,0},{-172,0}}, color={0,0,127})); + connect(TransducerDelay.y, DiffV.u2) annotation (Line(points={{-149,0},{-132, + 0},{-132,-6},{-122,-6}}, color={0,0,127})); + connect(DiffV.y, add3_1.u2) + annotation (Line(points={{-99,0},{-96,0},{-96,2},{-62,2}}, + color={0,0,127})); + connect(VE, rectifierCommutationVoltageDrop.V_EX) + annotation (Line(points={{-66,-132},{-49,-132}}, + color={0,0,127})); + connect(Gen_terminal, Bus) annotation (Line(points={{-170,130},{190,130}}, + color={0,0,255})); + connect(XADIFD, rectifierCommutationVoltageDrop.XADIFD) annotation (Line(points={{80,-200}, + {80,-160},{-38,-160},{-38,-143}}, color={0,0,127})); + connect(imDerivativeLag.y, add3_1.u3) annotation (Line(points={{41,-52},{-76,-52}, + {-76,-6},{-62,-6}}, color={0,0,127})); + connect(simpleLagLim.y, product.u1) + annotation (Line(points={{37,0},{52,0}}, color={0,0,127})); + connect(feedback.u1, product.y) + annotation (Line(points={{90,-6},{75,-6}}, color={0,0,127})); + connect(gain.y, feedback.u2) + annotation (Line(points={{125,60},{98,60},{98,2}}, color={0,0,127})); + connect(gain.u, EFD) annotation (Line(points={{148,60},{188,60},{188,0},{ + 210,0}}, color={0,0,127})); + connect(imDerivativeLag.u, EFD) annotation (Line(points={{64,-52},{180,-52},{180, + 0},{210,0}}, color={0,0,127})); + connect(VOTHSG, add1.u1) annotation (Line(points={{-200,90},{-120,90},{-120,52}, + {-110,52},{-110,52}}, color={0,0,127})); + connect(VOEL, add1.u2) annotation (Line(points={{-70,-200},{-70,-160},{-100,-160}, + {-100,-32},{-90,-32},{-90,24},{-120,24},{-120,40},{-110,40}}, color={0, + 0,127})); + connect(add1.y, add3_1.u1) annotation (Line(points={{-87,46},{-74,46},{-74,10}, + {-62,10}}, color={0,0,127})); + connect(booleanConstant.y, swith_vb.u2) + annotation (Line(points={{-56.9,-97.5},{-4,-97.5}}, color={255,0,255})); + connect(swith_vb.y, product.u2) annotation (Line(points={{19,-97.5},{34,-97.5}, + {34,-22},{44,-22},{44,-12},{52,-12}}, color={0,0,127})); + connect(feedback.y, integratorLimVar.u) + annotation (Line(points={{107,-6},{126,-6}}, color={0,0,127})); + connect(integratorLimVar.y, EFD) annotation (Line(points={{149,-6},{162,-6}, + {162,0},{210,0}}, color={0,0,127})); + connect(MaxOutput.y, integratorLimVar.outMax) + annotation (Line(points={{129,28},{146,28},{146,8}}, color={0,0,127})); + connect(MinOutput.y, integratorLimVar.outMin) annotation (Line(points={{113, + -32},{130,-32},{130,-20}}, color={0,0,127})); + connect(add3_1.y, hV_GATE.u1) annotation (Line(points={{-39,2},{-39,3.7},{-22.97, + 3.7}}, color={0,0,127})); + connect(VUEL, hV_GATE.u2) annotation (Line(points={{-130,-200},{-130,-26},{-30, + -26},{-30,-3.2},{-22.97,-3.2}}, color={0,0,127})); + connect(hV_GATE.y, simpleLagLim.u) annotation (Line(points={{3.135,0.25},{8.5675, + 0.25},{8.5675,0},{14,0}}, color={0,0,127})); + connect(rectifierCommutationVoltageDrop.EFD, swith_vb.u3) annotation (Line( + points={{-27,-132},{-12,-132},{-12,-105.1},{-4,-105.1}}, color={0,0,127})); + connect(vB_default.y, swith_vb.u1) + annotation (Line(points={{-33,-70},{-4,-70},{-4,-89.9}}, color={0,0,127})); + annotation ( + Diagram(coordinateSystem(extent={{-180,-180},{200,140}}), + graphics={Text( + extent={{4,-32},{28,-46}}, + lineColor={255,0,0}, + textString="VB"), + Text( + extent={{42,56},{66,42}}, + lineColor={255,0,0}, + textString="VR"), + Text( + extent={{-74,48},{-50,34}}, + lineColor={255,0,0}, + textString="VS")}), + Icon(coordinateSystem(extent={{-100,-100},{100,100}}), + graphics={Text( + extent={{-80,90},{-20,70}}, + lineColor={0,0,255}, + textString="GenT"), Text( + extent={{-100,160},{100,100}}, + lineColor={28,108,200}, + textString="ESST2A"), + Text( + extent={{40,90},{80,70}}, + lineColor={0,0,255}, + textString="Bus")}), + Documentation(info=" +IEEE Type ST2A Excitation System Model.
+", + revisions="Reference |
+PSS®E Manual | +
Last update |
+2022-12 |
+
Author |
+ALSETLab, Rensselaer Polytechnic Institute |
+
Contact |
++ |
University Campus A microgrid is located in Texas and is connected to the local utility through four 69kV feeder. +The utility bus voltage level is reduced to 12kV through four step-down transformers, namely T1 through T4. +The microgrid also contains a 4.16kV portion in bus B15, stepped down from 12kV to 4.16kV through transformers T5, and T6. +The university campus microgrid is powered by two combustion turbo generators (CTs) and four steam turbo generators (STs). The two oldest steam turbine generation units rarely operate, typically online for a few days a year in extreme load conditions. +For that reason, the model contains two CTs and two STs, producing power at 12kV each. +The maximum amount of power that the combined generation units can produce is approximately 127MW.
+")); end CampusGridA; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GUnitTest/package.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GUnitTest/package.mo deleted file mode 100644 index feb24e05e..000000000 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GUnitTest/package.mo +++ /dev/null @@ -1,5 +0,0 @@ -within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA; -package GUnitTest "Experiment models to carry out individual tests on each generation unit" - extends Modelica.Icons.ExamplesPackage; - -end GUnitTest; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineComplete.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineComplete.mo new file mode 100644 index 000000000..c5b9fc77a --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineComplete.mo @@ -0,0 +1,114 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.CTG1; +model CTG1MachineComplete + "Generation group for CTG1 containing the synchronous machine, excitation system, voltage compensator, and turbine governor system." + extends OpenIPSL.Interfaces.Generator; + + replaceable OpenIPSL.Electrical.Machines.PSSE.GENROU machine( + V_b=V_b, + Tpd0=guData.guDynamics.machine.Tpd0, + Tppd0=guData.guDynamics.machine.Tppd0, + Tpq0=guData.guDynamics.machine.Tpq0, + Tppq0=guData.guDynamics.machine.Tppq0, + D=guData.guDynamics.machine.D, + Xd=guData.guDynamics.machine.Xd, + Xq=guData.guDynamics.machine.Xq, + Xpd=guData.guDynamics.machine.Xpd, + Xpq=guData.guDynamics.machine.Xpq, + Xppd=guData.guDynamics.machine.Xppd, + Xl=guData.guDynamics.machine.Xl, + S10=guData.guDynamics.machine.S10, + S12=guData.guDynamics.machine.S12, + angle_0=angle_0, + Xppq=guData.guDynamics.machine.Xppq, + R_a=guData.guDynamics.machine.R_a, + Xpp=guData.guDynamics.machine.Xpp, + H=guData.guDynamics.machine.H, + M_b=guData.guDynamics.machine.M_b, + P_0=P_0, + Q_0=Q_0, + v_0=v_0) constrainedby + OpenIPSL.Electrical.Machines.PSSE.BaseClasses.baseMachine + annotation (choicesAllMatching=true, + Placement(transformation(extent={{40,-10}, + {60,10}}))); + replaceable Electrical.Controls.PSSE.ES.ESST4B exciter( + T_R=guData.guDynamics.excSystem.T_R, + K_PR=guData.guDynamics.excSystem.K_PR, + K_IR=guData.guDynamics.excSystem.K_IR, + V_RMAX=guData.guDynamics.excSystem.V_RMAX, + V_RMIN=guData.guDynamics.excSystem.V_RMIN, + T_A=guData.guDynamics.excSystem.T_A, + K_PM=guData.guDynamics.excSystem.K_PM, + K_IM=guData.guDynamics.excSystem.K_IM, + V_MMAX=guData.guDynamics.excSystem.V_MMAX, + V_MMIN=guData.guDynamics.excSystem.V_MMIN, + K_G=guData.guDynamics.excSystem.K_G, + K_P=guData.guDynamics.excSystem.K_P, + K_I=guData.guDynamics.excSystem.K_I, + V_BMAX=guData.guDynamics.excSystem.V_BMAX, + K_C=guData.guDynamics.excSystem.K_C, + X_L=guData.guDynamics.excSystem.X_L, + THETAP=guData.guDynamics.excSystem.THETAP) + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, + {10,10}}))); + Modelica.Blocks.Sources.Constant const(k=0) + annotation (Placement(transformation(extent={{-40,-64},{-32,-56}}))); + Modelica.Blocks.Sources.Constant const1(k=Modelica.Constants.inf) + annotation (Placement(transformation(extent={{-28,-76},{-20,-68}}))); + replaceable Electrical.Controls.PSSE.TG.GAST governor( + R=guData.guDynamics.tg.R, + T_1=guData.guDynamics.tg.T_1, + T_2=guData.guDynamics.tg.T_2, + T_3=guData.guDynamics.tg.T_3, + AT=guData.guDynamics.tg.AT, + K_T=guData.guDynamics.tg.K_T, + V_MAX=guData.guDynamics.tg.V_MAX, + V_MIN=guData.guDynamics.tg.V_MIN, + D_turb=guData.guDynamics.tg.D_turb) + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, + {-10,60}}))); + replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss + constrainedby OpenIPSL.Electrical.Controls.PSSE.PSS.BaseClasses.BasePSS + annotation (choicesAllMatching=true, + Placement(transformation(extent = {{-88, -6}, {-48, 12}}))); + DynParamRecords.GUDynamics guData(redeclare record GUnitDynamics = + DynParamRecords.CTG1) + annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); + Electrical.Controls.PSSE.VC.IEEEVC iEEEVC(RC=0, XC=0.05) + annotation (Placement(transformation(extent={{44,-60},{18,-38}}))); +equation + connect(pss.V_S2, governor.PMECH0) annotation ( + Line(points={{-90,-0.6},{-94,-0.6},{-94,30},{-40,30},{-40,44},{-28,44}}, color = {0, 0, 127})); + connect(pss.V_S1, machine.SPEED) annotation ( + Line(points={{-90,6.6},{-98,6.6},{-98,68},{80,68},{80,7},{61,7}}, color = {0, 0, 127})); + connect(pss.VOTHSG, exciter.VOTHSG) annotation ( + Line(points={{-46,3},{-40,3},{-40,-0.2},{-29.9,-0.2}}, color = {0, 0, 127})); + connect(exciter.EFD, machine.EFD) annotation (Line(points={{11.9,-7},{38,-7},{ + 38,-6}}, color={0,0,127})); + connect(exciter.XADIFD, machine.XADIFD) annotation (Line(points={{6.2,-25.7},{ + 6.2,-30},{64,-30},{64,-9},{61,-9}}, color={0,0,127})); + connect(machine.EFD0, exciter.EFD0) annotation (Line(points={{61,-5},{68,-5},{ + 68,-34},{-34,-34},{-34,-13.8},{-29.9,-13.8}}, color={0,0,127})); + connect(const.y, exciter.VUEL) annotation (Line(points={{-31.6,-60},{-16.6, + -60},{-16.6,-25.7}},color={0,0,127})); + connect(const1.y, exciter.VOEL) annotation (Line(points={{-19.6,-72},{-12,-72}, + {-12,-30},{-9,-30},{-9,-25.7}}, + color={0,0,127})); + connect(governor.PMECH, machine.PMECH) annotation (Line(points={{-9,50},{28,50}, + {28,6},{38,6}}, color={0,0,127})); + connect(governor.SPEED, machine.SPEED) annotation (Line(points={{-28,56},{-40, + 56},{-40,68},{80,68},{80,7},{61,7}}, color={0,0,127})); + connect(machine.PMECH0, governor.PMECH0) annotation (Line(points={{61,5},{74,5}, + {74,30},{-40,30},{-40,44},{-28,44}}, color={0,0,127})); + + connect(exciter.Bus, pwPin) annotation (Line(points={{8.1,6.6},{20,6.6},{20,34}, + {86,34},{86,0},{110,0}}, color={0,0,255})); + connect(machine.p, iEEEVC.Gen_terminal) annotation (Line(points={{60,0},{74,0}, + {74,-41.1429},{41.1111,-41.1429}}, color={0,0,255})); + connect(iEEEVC.Bus, exciter.Gen_terminal) annotation (Line(points={{20.8889, + -41.1429},{-38,-41.1429},{-38,6.6},{-26.1,6.6}}, color={0,0,255})); + connect(iEEEVC.VCT, exciter.ECOMP) annotation (Line(points={{15.6889,-50.5714}, + {-42,-50.5714},{-42,-7},{-29.9,-7}}, color={0,0,127})); +end CTG1MachineComplete; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineES.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineES.mo index fdae536d9..617533e94 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineES.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineES.mo @@ -49,8 +49,7 @@ model CTG1MachineES K_C=guData.guDynamics.excSystem.K_C, X_L=guData.guDynamics.excSystem.X_L, THETAP=guData.guDynamics.excSystem.THETAP) - constrainedby - OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, {10,10}}))); Modelica.Blocks.Sources.Constant const(k=0) @@ -58,8 +57,7 @@ model CTG1MachineES Modelica.Blocks.Sources.Constant const1(k=Modelica.Constants.inf) annotation (Placement(transformation(extent={{-40,-72},{-32,-64}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.TG.ConstantPower governor - constrainedby - OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, {-10,60}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineESVC.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineESVC.mo index 2e6eef5cb..210da0100 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineESVC.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineESVC.mo @@ -49,8 +49,7 @@ model CTG1MachineESVC K_C=guData.guDynamics.excSystem.K_C, X_L=guData.guDynamics.excSystem.X_L, THETAP=guData.guDynamics.excSystem.THETAP) - constrainedby - OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, {10,10}}))); Modelica.Blocks.Sources.Constant const(k=0) @@ -58,8 +57,7 @@ model CTG1MachineESVC Modelica.Blocks.Sources.Constant const1(k=Modelica.Constants.inf) annotation (Placement(transformation(extent={{-28,-76},{-20,-68}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.TG.ConstantPower governor - constrainedby - OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, {-10,60}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineOnly.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineOnly.mo index 320ccd319..7879f2512 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineOnly.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/CTG1MachineOnly.mo @@ -32,8 +32,7 @@ model CTG1MachineOnly Placement(transformation(extent={{40,-10}, {60,10}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.ES.ConstantExcitation exciter - constrainedby - OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, {10,10}}))); Modelica.Blocks.Sources.Constant const(k=0) @@ -41,8 +40,7 @@ model CTG1MachineOnly Modelica.Blocks.Sources.Constant const1(k=0) annotation (Placement(transformation(extent={{-40,-72},{-32,-64}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.TG.ConstantPower governor - constrainedby - OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, {-10,60}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/package.order index b4d8f46f1..4f6c51288 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/package.order +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG1/package.order @@ -1,3 +1,4 @@ CTG1MachineOnly CTG1MachineES CTG1MachineESVC +CTG1MachineComplete diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineComplete.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineComplete.mo new file mode 100644 index 000000000..2470fd569 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineComplete.mo @@ -0,0 +1,117 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.CTG2; +model CTG2MachineComplete + "Generation group for CTG2 containing the synchronous machine, excitation system, and turbine governor system." + extends OpenIPSL.Interfaces.Generator; + + replaceable OpenIPSL.Electrical.Machines.PSSE.GENROU machine( + V_b=V_b, + Tpd0=guData.guDynamics.machine.Tpd0, + Tppd0=guData.guDynamics.machine.Tppd0, + Tpq0=guData.guDynamics.machine.Tpq0, + Tppq0=guData.guDynamics.machine.Tppq0, + D=guData.guDynamics.machine.D, + Xd=guData.guDynamics.machine.Xd, + Xq=guData.guDynamics.machine.Xq, + Xpd=guData.guDynamics.machine.Xpd, + Xpq=guData.guDynamics.machine.Xpq, + Xppd=guData.guDynamics.machine.Xppd, + Xl=guData.guDynamics.machine.Xl, + S10=guData.guDynamics.machine.S10, + S12=guData.guDynamics.machine.S12, + angle_0=angle_0, + Xppq=guData.guDynamics.machine.Xppq, + R_a=guData.guDynamics.machine.R_a, + Xpp=guData.guDynamics.machine.Xpp, + H=guData.guDynamics.machine.H, + M_b=guData.guDynamics.machine.M_b, + P_0=P_0, + Q_0=Q_0, + v_0=v_0) constrainedby + OpenIPSL.Electrical.Machines.PSSE.BaseClasses.baseMachine + annotation (choicesAllMatching=true, + Placement(transformation(extent={{40,-10}, + {60,10}}))); + replaceable Electrical.Controls.PSSE.ES.AC7B exciter( + T_R=guData.guDynamics.excSystem.T_R, + K_PR=guData.guDynamics.excSystem.K_PR, + K_IR=guData.guDynamics.excSystem.K_IR, + K_DR=guData.guDynamics.excSystem.K_DR, + T_DR=guData.guDynamics.excSystem.T_DR, + V_RMAX=guData.guDynamics.excSystem.V_RMAX, + V_RMIN=guData.guDynamics.excSystem.V_RMIN, + K_PA=guData.guDynamics.excSystem.K_PA, + K_IA=guData.guDynamics.excSystem.K_IA, + V_AMIN=guData.guDynamics.excSystem.V_AMIN, + V_AMAX=guData.guDynamics.excSystem.V_AMAX, + K_P=guData.guDynamics.excSystem.K_P, + K_L=guData.guDynamics.excSystem.K_L, + T_E=guData.guDynamics.excSystem.T_E, + K_C=guData.guDynamics.excSystem.K_C, + K_D=guData.guDynamics.excSystem.K_D, + K_E=guData.guDynamics.excSystem.K_E, + K_F1=guData.guDynamics.excSystem.K_F1, + K_F2=guData.guDynamics.excSystem.K_F2, + K_F3=guData.guDynamics.excSystem.K_F3, + T_F3=guData.guDynamics.excSystem.T_F3, + V_EMIN=guData.guDynamics.excSystem.V_EMIN, + V_FEMAX=guData.guDynamics.excSystem.V_FEMAX, + E_1=guData.guDynamics.excSystem.E_1, + S_EE_1=guData.guDynamics.excSystem.S_EE_1, + E_2=guData.guDynamics.excSystem.E_2, + S_EE_2=guData.guDynamics.excSystem.S_EE_2) + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, + {10,10}}))); + Modelica.Blocks.Sources.Constant const(k=0) + annotation (Placement(transformation(extent={{-40,-54},{-32,-46}}))); + replaceable Electrical.Controls.PSSE.TG.GAST governor( + R=guData.guDynamics.tg.R, + T_1=guData.guDynamics.tg.T_1, + T_2=guData.guDynamics.tg.T_2, + T_3=guData.guDynamics.tg.T_3, + AT=guData.guDynamics.tg.AT, + K_T=guData.guDynamics.tg.K_T, + V_MAX=guData.guDynamics.tg.V_MAX, + V_MIN=guData.guDynamics.tg.V_MIN, + D_turb=guData.guDynamics.tg.D_turb) + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, + {-10,60}}))); + replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss + constrainedby OpenIPSL.Electrical.Controls.PSSE.PSS.BaseClasses.BasePSS + annotation (choicesAllMatching=true, + Placement(transformation(extent = {{-88, -6}, {-48, 12}}))); + DynParamRecords.GUDynamics guData(redeclare record GUnitDynamics = + DynParamRecords.CTG2) + annotation (Placement(transformation(extent={{-80,-54},{-60,-34}}))); +equation + connect(pss.V_S2, governor.PMECH0) annotation ( + Line(points={{-90,-0.6},{-94,-0.6},{-94,30},{-40,30},{-40,44},{-28,44}}, color = {0, 0, 127})); + connect(pss.V_S1, machine.SPEED) annotation ( + Line(points={{-90,6.6},{-98,6.6},{-98,68},{80,68},{80,7},{61,7}}, color = {0, 0, 127})); + connect(pss.VOTHSG, exciter.VOTHSG) annotation ( + Line(points={{-46,3},{-40,3},{-40,-0.2},{-29.9,-0.2}}, color = {0, 0, 127})); + connect(exciter.EFD, machine.EFD) annotation (Line(points={{11.9,-7},{38,-7},{ + 38,-6}}, color={0,0,127})); + connect(exciter.XADIFD, machine.XADIFD) annotation (Line(points={{6.2,-25.7},{ + 6.2,-30},{64,-30},{64,-9},{61,-9}}, color={0,0,127})); + connect(machine.EFD0, exciter.EFD0) annotation (Line(points={{61,-5},{68,-5},{ + 68,-34},{-36,-34},{-36,-13.8},{-29.9,-13.8}}, color={0,0,127})); + connect(exciter.ECOMP, machine.ETERM) annotation (Line(points={{-29.9,-7},{-36, + -7},{-36,20},{68,20},{68,-3},{61,-3}}, color={0,0,127})); + connect(const.y, exciter.VUEL) annotation (Line(points={{-31.6,-50},{-16.6,-50}, + {-16.6,-25.7}}, color={0,0,127})); + connect(governor.PMECH, machine.PMECH) annotation (Line(points={{-9,50},{28,50}, + {28,6},{38,6}}, color={0,0,127})); + connect(governor.SPEED, machine.SPEED) annotation (Line(points={{-28,56},{-40, + 56},{-40,68},{80,68},{80,7},{61,7}}, color={0,0,127})); + connect(machine.PMECH0, governor.PMECH0) annotation (Line(points={{61,5},{74,5}, + {74,30},{-40,30},{-40,44},{-28,44}}, color={0,0,127})); + + connect(machine.p, pwPin) + annotation (Line(points={{60,0},{110,0}}, color={0,0,255})); + connect(exciter.VT, machine.ETERM) annotation (Line(points={{-30.09,6.43},{-36, + 6.43},{-36,20},{68,20},{68,-3},{61,-3}}, color={0,0,127})); + connect(exciter.VOEL, exciter.VUEL) annotation (Line(points={{-9,-25.7},{-9,-50}, + {-16.6,-50},{-16.6,-25.7}}, color={0,0,127})); +end CTG2MachineComplete; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineES.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineES.mo index 0237c86be..ca274d21d 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineES.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineES.mo @@ -59,15 +59,13 @@ model CTG2MachineES S_EE_1=guData.guDynamics.excSystem.S_EE_1, E_2=guData.guDynamics.excSystem.E_2, S_EE_2=guData.guDynamics.excSystem.S_EE_2) - constrainedby - OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, {10,10}}))); Modelica.Blocks.Sources.Constant const(k=0) annotation (Placement(transformation(extent={{-40,-54},{-32,-46}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.TG.ConstantPower governor - constrainedby - OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, {-10,60}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineOnly.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineOnly.mo index 1bcb35002..a561ee0f0 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineOnly.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/CTG2MachineOnly.mo @@ -32,8 +32,7 @@ model CTG2MachineOnly Placement(transformation(extent={{40,-10}, {60,10}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.ES.ConstantExcitation exciter - constrainedby - OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + constrainedby OpenIPSL.Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter annotation (choicesAllMatching=true, Placement(transformation(extent={{-28,-24}, {10,10}}))); Modelica.Blocks.Sources.Constant const(k=0) @@ -41,8 +40,7 @@ model CTG2MachineOnly Modelica.Blocks.Sources.Constant const1(k=0) annotation (Placement(transformation(extent={{-40,-72},{-32,-64}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.TG.ConstantPower governor - constrainedby - OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + constrainedby OpenIPSL.Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor annotation (choicesAllMatching=true, Placement(transformation(extent={{-30,40}, {-10,60}}))); replaceable OpenIPSL.Electrical.Controls.PSSE.PSS.DisabledPSS pss diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/package.order index 1663547f9..47a2bb582 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/package.order +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/CTG2/package.order @@ -1,2 +1,3 @@ CTG2MachineOnly CTG2MachineES +CTG2MachineComplete diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG1.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG1.mo index 7ddd40b36..594192aed 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG1.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG1.mo @@ -14,4 +14,9 @@ record CTG1 "Machine, ES and PSS Parameters for CTG1" PSSData.PSS2BTemplate "Power system stabilizer data"; PSS pss; + replaceable record TG = TGData.GASTCTG1 constrainedby TGData.GASTTemplate + "Turbine governor data"; + TG tg; + + end CTG1; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG2.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG2.mo index 41ece505c..5cf30d141 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG2.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/CTG2.mo @@ -14,4 +14,9 @@ record CTG2 "Machine, ES and PSS Parameters for CTG2" PSSData.PSS2BTemplate "Power system stabilizer data"; PSS pss; + replaceable record TG = TGData.GASTCTG2 constrainedby TGData.GASTTemplate + "Turbine governor data"; + TG tg; + + end CTG2; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/EXAC1Template.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/EXAC1Template.mo new file mode 100644 index 000000000..d2ea10bb3 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/EXAC1Template.mo @@ -0,0 +1,22 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.ESData; +partial record EXAC1Template "Type ST-A Excitation System Data" + parameter Types.Time T_R "Regulator input filter time constant"; + parameter Types.Time T_B "Regulator denominator (lag) time constant"; + parameter Types.Time T_C "Regulator numerator (lead) time constant"; + parameter Types.PerUnit K_A "Regulator output gain"; + parameter Types.Time T_A "Regulator output time constant"; + parameter Types.PerUnit V_RMAX "Maximum regulator output"; + parameter Types.PerUnit V_RMIN "Minimum regulator output"; + parameter Types.Time T_E "Exciter field time constant"; + parameter Types.PerUnit K_F "Rate feedback excitation system stabilizer gain"; + parameter Types.Time T_F "Rate feedback time constant"; + parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance"; + parameter Types.PerUnit K_D "Demagnetizing factor, function of exciter alternator reactances"; + parameter Types.PerUnit K_E "Exciter field proportional constant"; + parameter Types.PerUnit E_1 "Exciter output voltage for saturation factor S_E(E_1)"; + parameter Types.PerUnit E_2 "Exciter output voltage for saturation factor S_E(E_2)"; + parameter Types.PerUnit S_EE_1 "Exciter saturation factor at exciter output voltage E1"; + parameter Types.PerUnit S_EE_2 "Exciter saturation factor at exciter output voltage E2"; + + +end EXAC1Template; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/package.order index e1c836e95..4e938429b 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/package.order +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/ESData/package.order @@ -1,3 +1,4 @@ +EXAC1Template ESSTxATemplate ESSTxBTemplate ACxBTemplate diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG1.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG1.mo index d157d4638..f0953a9eb 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG1.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG1.mo @@ -14,4 +14,8 @@ record STG1 "Machine, ES and PSS Parameters for STG1" PSSData.PSS2BTemplate "Power system stabilizer data"; PSS pss; + replaceable record TG = TGData.TGOV1STG1 constrainedby TGData.TGOV1Template + "Turbine governor data"; + TG tg; + end STG1; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG2.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG2.mo index b0a87e1d3..e30987fc7 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG2.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/STG2.mo @@ -14,4 +14,8 @@ record STG2 "Machine, ES and PSS Parameters for STG2" PSSData.PSS2BTemplate "Power system stabilizer data"; PSS pss; + replaceable record TG = TGData.TGOV1STG2 constrainedby TGData.TGOV1Template + "Turbine governor data"; + TG tg; + end STG2; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG1.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG1.mo new file mode 100644 index 000000000..7d0c6856b --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG1.mo @@ -0,0 +1,15 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record GASTCTG1 "Type GAST TG for CTG1" + extends GASTTemplate( + R=25, + T_1=0.5, + T_2=0.7, + T_3=0.0001, + AT=10, + K_T=0, + V_MAX=1.3, + V_MIN=0.2, + D_turb=0); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end GASTCTG1; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG2.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG2.mo new file mode 100644 index 000000000..af9e51311 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTCTG2.mo @@ -0,0 +1,15 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record GASTCTG2 "Type GAST TG for CTG2" + extends GASTTemplate( + R=20.00, + T_1=0.2, + T_2=0.3, + T_3=0.0001, + AT=10, + K_T=0, + V_MAX=1.05, + V_MIN=0.2, + D_turb=0); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end GASTCTG2; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTTemplate.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTTemplate.mo new file mode 100644 index 000000000..95d1ae15b --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/GASTTemplate.mo @@ -0,0 +1,14 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record GASTTemplate "Template for GAST motor model" + parameter Types.PerUnit R "Speed droop gain"; + parameter Types.Time T_1 "Valve response time constant"; + parameter Types.Time T_2 "Turbine response time constant"; + parameter Types.Time T_3 "Load limit response time constant"; + parameter Types.PerUnit AT "Ambient temperature load limit"; + parameter Types.PerUnit K_T "Load-limited feedback path adjustment gain"; + parameter Types.PerUnit V_MAX "Operational control high limit on fuel valve opening"; + parameter Types.PerUnit V_MIN "Low output control limit on fuel valve opening"; + parameter Types.PerUnit D_turb "Turbine damping"; + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end GASTTemplate; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG1.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG1.mo new file mode 100644 index 000000000..a3db4d562 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG1.mo @@ -0,0 +1,13 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record TGOV1STG1 "Type TGOV1 TG for STG1" + extends TGOV1Template( + R=0.05, + D_t=0, + T_1=0.2, + T_2=0.001, + T_3=0.3, + V_MAX=1, + V_MIN=0.3); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TGOV1STG1; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG2.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG2.mo new file mode 100644 index 000000000..b8c337e38 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1STG2.mo @@ -0,0 +1,13 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record TGOV1STG2 "Type TGOV1 TG for STG2" + extends TGOV1Template( + R=0.05, + D_t=0, + T_1=0.2, + T_2=0.001, + T_3=0.3, + V_MAX=1, + V_MIN=0.3); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TGOV1STG2; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1Template.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1Template.mo new file mode 100644 index 000000000..361d1ca9f --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/TGOV1Template.mo @@ -0,0 +1,12 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords.TGData; +record TGOV1Template "Template for TGOV1 motor model" + parameter Types.PerUnit R "Inverse of governor gain (the actual gain is 1/R)"; + parameter Types.PerUnit D_t "Turbine damping factor (on Machine Base)"; + parameter Types.Time T_1 "Regulator time constant. It must be greater than 0"; + parameter Types.Time T_2 "High-pressure reheater time constant"; + parameter Types.Time T_3 "Reheater time constant. It must be greater than 0"; + parameter Types.PerUnit V_MAX "Maximum valve position (on Machine Base)"; + parameter Types.PerUnit V_MIN "Minimum valve position (on Machine Base)"; + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TGOV1Template; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.mo new file mode 100644 index 000000000..1645355c5 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.mo @@ -0,0 +1,3 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups.DynParamRecords; +package TGData "Records with Turbine Governor (TG) Parameters" +end TGData; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.order new file mode 100644 index 000000000..a16e76c0f --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/TGData/package.order @@ -0,0 +1,6 @@ +GASTTemplate +TGOV1Template +GASTCTG1 +GASTCTG2 +TGOV1STG1 +TGOV1STG2 diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/package.order index 05a1ad0d4..de094ddb5 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/package.order +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/DynParamRecords/package.order @@ -3,6 +3,7 @@ GUDynamics MachineData ESData PSSData +TGData CTG1 CTG2 STG1 diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/GeneratorInf.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/GeneratorInf.mo deleted file mode 100644 index f0cbfc2b2..000000000 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusA/GenerationGroups/GeneratorInf.mo +++ /dev/null @@ -1,65 +0,0 @@ -within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusA.GenerationGroups; -model GeneratorInf "Infinite Bus Generator" - extends OpenIPSL.Interfaces.Generator; - OpenIPSL.Electrical.Machines.PSSE.GENCLS gENCLS( - D=0, - X_d=0.2, - angle_0=angle_0, - v_0=v_0, - P_0=P_0, - Q_0=Q_0, - V_b=V_b, - M_b=M_b) annotation (Placement(transformation(extent={{0,-30},{60,30}}))); - parameter OpenIPSL.Types.ApparentPower M_b=100000000 "Machine base power"; -equation - connect(gENCLS.p, pwPin) - annotation (Line(points={{60,0},{110,0}}, color={0,0,255})); - annotation ( - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Documentation(revisions=" - -OpenIPSL:
-Copyright 2016 SmarTS Lab (Sweden)
-The authors can be contacted by email: luigiv@kth.se
- -This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
- -iPSL:
-Copyright 2015-2016 RTE (France), SmarTS Lab (Sweden), AIA (Spain) and DTU (Denmark)
-The authors can be contacted by email: info@itesla-ipsl.org
- -This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0.
- -", info=" -Reference |
-SMIB PSAT, d_kundur2.mdl, PSAT |
-
Last update |
-February 2016 | -
Author |
-Maxime Baudette, Ahsan Murad, SmarTS Lab, KTH Royal Institute of Technology |
-
Contact |
-- |
The university campus microgrid accommodates two Mitsubishi MF-111 Gas Turbines. Both gas turbines are single shaft and have nominal operating speeds of 9,660 RPM, reduced to 3,600 RPM by means of a reduction gear. The generator is a two pole machine, rated at 15,000 kW, 13.8 kV at 0.90 lagging power factor while operating at 60 Hz. The excitation system of the generator is a shaft mounted main and pilot permanent magnet brushless exciter with rotating fused diodes. The turbine governor is a Woodward 2301A Dual Fuel Control. +The campus also accomodates a steam turbine unit. The unit is comprised of a Siemens Dresser-Rand steam turbine, connected via rotor to a Kato Engineering Synchronous Generator. The generator is a brushless field revolving generator with direct connected rotating brushless exciter. The turbine's nominal operating speed is 4,700 RPM, with a single reduction parallel shaft speed reducer that decreases the rotor speed to 1,800 RPM. The generator construction is defined by a four-pole machine, with a nominal power of 3,580 kW, 13.8 kV at 0.8 lagging power factor, operating at 60 Hz. +The microgrid also has solar farm. The university campus microgrid has five distinct photovoltaic systems (PV) spread through the microgrid, ranging from a few kW to roughly 900 kW in nominal power. The terminal voltage of the photovoltaic installation is 0.6 kV, which is increased to 13.8 kV by means of a step-up transformer (to match the microgrid's voltage magnitude).
+")); end CampusGridB; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/DynParamRecords.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/DynParamRecords.mo new file mode 100644 index 000000000..fd7e2fd3d --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/DynParamRecords.mo @@ -0,0 +1,263 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups; +package DynParamRecords "Sets of generator parameters" + extends Modelica.Icons.RecordsPackage; + + record GUDynamicsTemplate + "Template Record for Generation Unit Dynamic Parameters" + extends Modelica.Icons.Record; + annotation (Documentation(info=" +Template Record for Generation Unit Dynamic Parameters.
+")); + end GUDynamicsTemplate; + + record GUDynamics "Instantiable Record for Generation Unit Dynamic Parameters" + extends Modelica.Icons.Record; + + replaceable record GUnitDynamics = GUDynamicsTemplate + constrainedby GUDynamicsTemplate + annotation(choicesAllMatching); + + GUnitDynamics guDynamics; + + annotation (Documentation(info=" +Instantiable Record for Generation Unit Dynamic Parameters
+")); + end GUDynamics; + + package MachineData "Records with Synchronous Machine Dynamic Parameters" + + partial record MachineDataTemplate "Synchronous Machine Dynamic Data Record Template" + parameter Types.ApparentPower M_b "Machine base power"; + parameter Types.Time Tpd0 "d-axis transient open-circuit time constant"; + parameter Types.Time Tppd0 "d-axis sub-transient open-circuit time constant"; + parameter Types.Time Tppq0 "q-axis sub-transient open-circuit time constant"; + parameter Types.Time H "Inertia constant"; + parameter Real D "Speed damping"; + parameter Types.PerUnit Xd "d-axis reactance"; + parameter Types.PerUnit Xq "q-axis reactance"; + parameter Types.PerUnit Xpd "d-axis transient reactance"; + parameter Types.PerUnit Xppd "d-axis sub-transient reactance"; + parameter Types.PerUnit Xppq "q-axis sub-transient reactance"; + parameter Types.PerUnit Xl "leakage reactance"; + parameter Types.PerUnit S10 "Saturation factor at 1.0 pu"; + parameter Types.PerUnit S12 "Saturation factor at 1.2 pu"; + parameter Types.PerUnit R_a "Armature resistance"; + parameter Types.PerUnit Xpq "q-axis transient reactance (pu)"; + parameter Types.Time Tpq0 "q-axis transient open-circuit time constant (s)"; + parameter Types.PerUnit Xpp "Sub-transient reactance (pu)"; + + end MachineDataTemplate; + + record MachineParsGT "Machine Parameters for GT" + extends MachineDataTemplate( + M_b=16667000, + Tpd0=4.822, + Tppd0=0.023, + Tppq0=0.065, + H=8.75, + D=2, + Xd=1.897, + Xq=1.78, + Xpd=0.23, + Xppd=0.156, + Xppq=0.156, + Xl=0.123, + S10=0.12, + S12=0.4, + R_a=0.01, + Xpq=0.4610, + Tpq0=0.391, + Xpp=Xppd); + + end MachineParsGT; + + record MachineParsST "Machine Parameters for ST" + extends MachineDataTemplate( + M_b=4475000, + Tpd0=7, + Tppd0=0.03, + Tppq0=0.05, + H=3, + D=0, + Xd=2.1, + Xq=2, + Xpd=0.2, + Xppd=0.18, + Xppq=0.18, + Xl=0.15, + S10=0.05, + S12=0.3, + R_a=0.01, + Xpq=0.5, + Tpq0=0.75, + Xpp=Xppd); + end MachineParsST; + end MachineData; + + package ESData "Records with Excitation System (ES) Parameters" + partial record EXST1Template "Type EXST1 Excitation System Data" + parameter Types.Time T_R "Regulator input filter time constant"; + parameter Types.PerUnit V_IMAX "Maximum voltage error (regulator input)"; + parameter Types.PerUnit V_IMIN "Minimum voltage error (regulator input)"; + parameter Types.Time T_C "Regulator numerator (lead) time constant"; + parameter Types.Time T_B "Regulator denominator (lag) time constant"; + parameter Types.PerUnit K_A "Voltage regulator gain"; + parameter Types.Time T_A "Voltage regulator time constant"; + parameter Types.PerUnit V_RMAX "Maximum exciter output"; + parameter Types.PerUnit V_RMIN "Minimum exciter output"; + parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance"; + parameter Types.PerUnit K_F "Rate feedback gain"; + parameter Types.Time T_F "Rate feedback time constant"; + + end EXST1Template; + + partial record EXAC1Template "Type EXAC1 Excitation System Data" + parameter Types.Time T_R "Regulator input filter time constant"; + parameter Types.Time T_B "Regulator denominator (lag) time constant"; + parameter Types.Time T_C "Regulator numerator (lead) time constant"; + parameter Types.PerUnit K_A "Regulator output gain"; + parameter Types.Time T_A "Regulator output time constant"; + parameter Types.PerUnit V_RMAX "Maximum regulator output"; + parameter Types.PerUnit V_RMIN "Minimum regulator output"; + parameter Types.Time T_E "Exciter field time constant"; + parameter Types.PerUnit K_F "Rate feedback excitation system stabilizer gain"; + parameter Types.Time T_F "Rate feedback time constant"; + parameter Types.PerUnit K_C "Rectifier loading factor proportional to commutating reactance"; + parameter Types.PerUnit K_D "Demagnetizing factor, function of exciter alternator reactances"; + parameter Types.PerUnit K_E "Exciter field proportional constant"; + parameter Types.PerUnit E_1 "Exciter output voltage for saturation factor S_E(E_1)"; + parameter Types.PerUnit E_2 "Exciter output voltage for saturation factor S_E(E_2)"; + parameter Types.PerUnit S_EE_1 "Exciter saturation factor at exciter output voltage E1"; + parameter Types.PerUnit S_EE_2 "Exciter saturation factor at exciter output voltage E2"; + + end EXAC1Template; + + record EXST1ST "Type EXST1 ES for ST" + extends EXST1Template( + T_R = 0.02, + V_IMAX=1, + V_IMIN=-1, + T_C=1, + T_B=10, + K_A=200, + T_A=0.05, + V_RMAX=5, + V_RMIN=-4, + K_C=0.04, + K_F=0.02, + T_F=1); + end EXST1ST; + + record EXAC1GT "Type EXAC1 ES for TG" + extends EXAC1Template( + T_R=0, + T_B=0, + T_C=0, + K_A=150, + T_A=0.02, + V_RMAX=20, + V_RMIN=-20, + T_E=0.5, + K_F=0.0045, + T_F=0.1, + K_C=0.1, + K_D=1, + K_E=1, + E_1=4.20, + E_2=5.6, + S_EE_1=0.1827, + S_EE_2=0.2558); + end EXAC1GT; + end ESData; + + package TGData "Records with Turbine Governor (TG) Parameters" + record GASTTemplate "Template for GAST turbine governor model" + parameter Types.PerUnit R "Speed droop gain"; + parameter Types.Time T_1 "Valve response time constant"; + parameter Types.Time T_2 "Turbine response time constant"; + parameter Types.Time T_3 "Load limit response time constant"; + parameter Types.PerUnit AT "Ambient temperature load limit"; + parameter Types.PerUnit K_T "Load-limited feedback path adjustment gain"; + parameter Types.PerUnit V_MAX "Operational control high limit on fuel valve opening"; + parameter Types.PerUnit V_MIN "Low output control limit on fuel valve opening"; + parameter Types.PerUnit D_turb "Turbine damping"; + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + end GASTTemplate; + + record TGOV1Template "Template for TGOV1 turbine governor model" + parameter Types.PerUnit R "Inverse of governor gain (the actual gain is 1/R)"; + parameter Types.PerUnit D_t "Turbine damping factor (on Machine Base)"; + parameter Types.Time T_1 "Regulator time constant. It must be greater than 0"; + parameter Types.Time T_2 "High-pressure reheater time constant"; + parameter Types.Time T_3 "Reheater time constant. It must be greater than 0"; + parameter Types.PerUnit V_MAX "Maximum valve position (on Machine Base)"; + parameter Types.PerUnit V_MIN "Minimum valve position (on Machine Base)"; + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + end TGOV1Template; + + record GASTTG "Type GAST TG for CTG1" + extends GASTTemplate( + R=0.05, + T_1=0.4, + T_2=0.1, + T_3=3.0, + AT=0.9, + K_T=2.0, + V_MAX=1.0, + V_MIN=-0.05, + D_turb=0.0); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + end GASTTG; + + record TGOV1ST "Type TGOV1 TG for STG1" + extends TGOV1Template( + R=0.05, + D_t=0, + T_1=0.49, + T_2=2.1, + T_3=7, + V_MAX=1, + V_MIN=0); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + end TGOV1ST; + + end TGData; + + record GT "Machine, ES and TG Parameters for TG" + extends GUDynamicsTemplate; + + replaceable record Machine = MachineData.MachineParsGT constrainedby + MachineData.MachineDataTemplate "Machine data"; + Machine machine; + + replaceable record ExcSystem = ESData.EXAC1GT constrainedby + ESData.EXAC1Template "Excitation system data"; + ExcSystem excSystem; + + replaceable record TG = TGData.GASTTG constrainedby TGData.GASTTemplate + "Turbine governor data"; + TG tg; + + end GT; + + record ST "Machine, ES and TG Parameters for ST" + extends GUDynamicsTemplate; + + replaceable record Machine = MachineData.MachineParsST constrainedby + MachineData.MachineDataTemplate "Machine data"; + Machine machine; + + replaceable record ExcSystem = ESData.EXST1ST constrainedby + ESData.EXST1Template "Excitation system data"; + ExcSystem excSystem; + + replaceable record TG = TGData.TGOV1ST constrainedby TGData.TGOV1Template + "Turbine governor data"; + TG tg; + + end ST; +end DynParamRecords; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GT.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GT.mo new file mode 100644 index 000000000..14f8462bd --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GT.mo @@ -0,0 +1,99 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups; +package GT "Gas turbine unit for Microgrid B." + model GasTurbineUnit + "Generation group for GT containing the synchronous machine, excitation system, and turbine governor system." + extends OpenIPSL.Interfaces.Generator; + Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement(transformation( + extent={{6,6},{-6,-6}}, + rotation=180, + origin={-84,-32}))); + replaceable Electrical.Machines.PSSE.GENROE machine( + V_b=V_b, + Tpd0=gUData.guDynamics.machine.Tpd0, + Tppd0=gUData.guDynamics.machine.Tppd0, + Tpq0=gUData.guDynamics.machine.Tpq0, + Tppq0=gUData.guDynamics.machine.Tppq0, + D=gUData.guDynamics.machine.D, + Xd=gUData.guDynamics.machine.Xd, + Xq=gUData.guDynamics.machine.Xq, + Xpd=gUData.guDynamics.machine.Xpd, + Xpq=gUData.guDynamics.machine.Xpq, + Xppd=gUData.guDynamics.machine.Xppd, + Xl=gUData.guDynamics.machine.Xl, + S10=gUData.guDynamics.machine.S10, + S12=gUData.guDynamics.machine.S12, + angle_0=angle_0, + Xppq=gUData.guDynamics.machine.Xppq, + R_a=gUData.guDynamics.machine.R_a, + Xpp=gUData.guDynamics.machine.Xpp, + H=gUData.guDynamics.machine.H, + M_b=gUData.guDynamics.machine.M_b, + P_0=P_0, + Q_0=Q_0, + v_0=v_0) constrainedby + OpenIPSL.Electrical.Machines.PSSE.BaseClasses.baseMachine + annotation (choicesAllMatching=true, + Placement(transformation(extent={{20,-20},{60,20}}))); + replaceable Electrical.Controls.PSSE.TG.GAST governor( + R=gUData.guDynamics.tg.R, + T_1=gUData.guDynamics.tg.T_1, + T_2=gUData.guDynamics.tg.T_2, + T_3=gUData.guDynamics.tg.T_3, + AT=gUData.guDynamics.tg.AT, + K_T=gUData.guDynamics.tg.K_T, + V_MAX=gUData.guDynamics.tg.V_MAX, + V_MIN=gUData.guDynamics.tg.V_MIN, + D_turb=gUData.guDynamics.tg.D_turb) + constrainedby Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + annotation (Placement(transformation(extent={{-54,20},{-14,60}}))); + replaceable Electrical.Controls.PSSE.ES.EXAC1 baseExciter( + T_R=gUData.guDynamics.excSystem.T_R, + T_B=gUData.guDynamics.excSystem.T_B, + T_C=gUData.guDynamics.excSystem.T_C, + K_A=gUData.guDynamics.excSystem.K_A, + T_A=gUData.guDynamics.excSystem.T_A, + V_RMAX=gUData.guDynamics.excSystem.V_RMAX, + V_RMIN=gUData.guDynamics.excSystem.V_RMIN, + T_E=gUData.guDynamics.excSystem.T_E, + K_F=gUData.guDynamics.excSystem.K_F, + T_F=gUData.guDynamics.excSystem.T_F, + K_C=gUData.guDynamics.excSystem.K_C, + K_D=gUData.guDynamics.excSystem.K_D, + K_E=gUData.guDynamics.excSystem.K_E, + E_1=gUData.guDynamics.excSystem.E_1, + E_2=gUData.guDynamics.excSystem.E_2, + S_EE_1=gUData.guDynamics.excSystem.S_EE_1, + S_EE_2=gUData.guDynamics.excSystem.S_EE_2) + constrainedby Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + annotation (Placement(transformation(extent={{-54,-60},{-14,-20}}))); + DynParamRecords.GUDynamics gUData(redeclare record GUnitDynamics = + OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups.DynParamRecords.GT) + annotation (Placement(transformation(extent={{-92,-4},{-72,16}}))); + equation + connect(zero.y, baseExciter.VOTHSG) + annotation (Line(points={{-77.4,-32},{-56,-32}}, color={0,0,127})); + connect(baseExciter.VUEL, zero.y) annotation (Line(points={{-42,-62},{-42,-70}, + {-62,-70},{-62,-32},{-77.4,-32}}, color={0,0,127})); + connect(baseExciter.VOEL, zero.y) annotation (Line(points={{-34,-62},{-34,-70}, + {-62,-70},{-62,-32},{-77.4,-32}}, color={0,0,127})); + connect(machine.PMECH, governor.PMECH) annotation (Line(points={{16,12},{-2,12}, + {-2,40},{-12,40}}, color={0,0,127})); + connect(machine.EFD, baseExciter.EFD) annotation (Line(points={{16,-12},{-2,-12}, + {-2,-40},{-12,-40}}, color={0,0,127})); + connect(machine.SPEED, governor.SPEED) annotation (Line(points={{62,14},{80,14}, + {80,78},{-70,78},{-70,52},{-50,52}}, color={0,0,127})); + connect(machine.PMECH0, governor.PMECH0) annotation (Line(points={{62,10},{88, + 10},{88,84},{-78,84},{-78,28},{-50,28}}, color={0,0,127})); + connect(machine.p, pwPin) + annotation (Line(points={{60,0},{110,0}}, color={0,0,255})); + connect(machine.XADIFD, baseExciter.XADIFD) annotation (Line(points={{62,-18}, + {74,-18},{74,-72},{-18,-72},{-18,-62}}, color={0,0,127})); + connect(machine.EFD0, baseExciter.EFD0) annotation (Line(points={{62,-10},{82, + -10},{82,-80},{-66,-80},{-66,-48},{-56,-48}}, color={0,0,127})); + connect(machine.ETERM, baseExciter.ECOMP) annotation (Line(points={{62,-6},{90, + -6},{90,-88},{-72,-88},{-72,-40},{-56,-40}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio= + false))); + end GasTurbineUnit; +end GT; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GasTurbineUnit.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GasTurbineUnit.mo deleted file mode 100644 index 43853ee0f..000000000 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/GasTurbineUnit.mo +++ /dev/null @@ -1,80 +0,0 @@ -within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups; -model GasTurbineUnit - extends OpenIPSL.Interfaces.Generator(V_b = 13800); - Electrical.Machines.PSSE.GENROE gENROE( - V_b=13800, - P_0=P_0, - Q_0=Q_0, - v_0=v_0, - angle_0=angle_0, - M_b=16667000, - Tpd0=4.822, - Tppd0=0.023, - Tppq0=0.065, - H=8.75, - D=2, - Xd=1.897, - Xq=1.78, - Xpd=0.23, - Xppd=0.156, - Xppq=0.156, - Xl=0.123, - S10=0.12, - S12=0.4, - R_a=0.01, - Xpq=0.4610, - Tpq0=0.391) - annotation (Placement(transformation(extent={{38,-20},{78,20}}))); - Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement(transformation( - extent={{6,6},{-6,-6}}, - rotation=180, - origin={-20,-16}))); - Electrical.Controls.PSSE.ES.EXAC1 eXAC1_1( - T_R=0, - T_B=0, - T_C=0, - K_A=150, - T_A=0.02, - V_RMAX=20, - V_RMIN=-20, - T_E=0.5, - K_F=0.0045, - T_F=0.1, - K_C=0.1, - K_D=1, - K_E=1, - E_1=4.20, - E_2=5.6, - S_EE_1=0.1827, - S_EE_2=0.2558) - annotation (Placement(transformation(extent={{4,-30},{24,-10}}))); - Electrical.Controls.PSSE.TG.GAST gAST - annotation (Placement(transformation(extent={{4,2},{24,22}}))); -equation - connect(gENROE.p, pwPin) - annotation (Line(points={{78,0},{110,0}}, color={0,0,255})); - connect(eXAC1_1.EFD, gENROE.EFD) annotation (Line(points={{25,-20},{28,-20},{ - 28,-12},{34,-12}}, - color={0,0,127})); - connect(zero.y, eXAC1_1.VOTHSG) - annotation (Line(points={{-13.4,-16},{3,-16}}, color={0,0,127})); - connect(gENROE.XADIFD, eXAC1_1.XADIFD) annotation (Line(points={{80,-18},{86, - -18},{86,-38},{22,-38},{22,-31}}, color={0,0,127})); - connect(gENROE.EFD0, eXAC1_1.EFD0) annotation (Line(points={{80,-10},{90,-10}, - {90,-42},{0,-42},{0,-24},{3,-24}}, color={0,0,127})); - connect(gENROE.ETERM, eXAC1_1.ECOMP) annotation (Line(points={{80,-6},{94,-6}, - {94,-46},{-4,-46},{-4,-20},{3,-20}}, color={0,0,127})); - connect(gAST.PMECH, gENROE.PMECH) - annotation (Line(points={{25,12},{34,12}},color={0,0,127})); - connect(gAST.SPEED, gENROE.SPEED) annotation (Line(points={{6,18},{0,18},{0, - 32},{86,32},{86,14},{80,14}}, color={0,0,127})); - connect(gAST.PMECH0, gENROE.PMECH0) annotation (Line(points={{6,6},{-4,6},{-4, - 36},{90,36},{90,10},{80,10}}, color={0,0,127})); - connect(eXAC1_1.VUEL, eXAC1_1.VOTHSG) annotation (Line(points={{10,-31},{10, - -36},{-8,-36},{-8,-16},{3,-16}}, color={0,0,127})); - connect(eXAC1_1.VOEL, eXAC1_1.VOTHSG) annotation (Line(points={{14,-31},{14, - -36},{-8,-36},{-8,-16},{3,-16}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), - Diagram(coordinateSystem(preserveAspectRatio= - false))); -end GasTurbineUnit; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/ST.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/ST.mo new file mode 100644 index 000000000..8a90b5ff6 --- /dev/null +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/ST.mo @@ -0,0 +1,85 @@ +within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups; +package ST "Steam turbine generation unit for Microgrid B." + model SteamTurbineUnit + "Generation group for ST containing the synchronous machine, excitation system, and turbine governor system." + extends OpenIPSL.Interfaces.Generator(V_b = 13800); + replaceable Electrical.Machines.PSSE.GENROE baseMachine( + M_b=gUData.guDynamics.machine.M_b, + Tpd0=gUData.guDynamics.machine.Tpd0, + Tppd0=gUData.guDynamics.machine.Tppd0, + Tppq0=gUData.guDynamics.machine.Tppq0, + H=gUData.guDynamics.machine.H, + D=gUData.guDynamics.machine.D, + Xd=gUData.guDynamics.machine.Xd, + Xq=gUData.guDynamics.machine.Xq, + Xpd=gUData.guDynamics.machine.Xpd, + Xppd=gUData.guDynamics.machine.Xppd, + Xppq=gUData.guDynamics.machine.Xppq, + Xl=gUData.guDynamics.machine.Xl, + S10=gUData.guDynamics.machine.S10, + S12=gUData.guDynamics.machine.S12, + R_a=gUData.guDynamics.machine.R_a, + Xpq=gUData.guDynamics.machine.Xpq, + Tpq0=gUData.guDynamics.machine.Tpq0, + Xpp=gUData.guDynamics.machine.Xpp) constrainedby + Electrical.Machines.PSSE.BaseClasses.baseMachine + annotation (Placement(transformation(extent={{40,-20},{80,20}}))); + replaceable Electrical.Controls.PSSE.ES.EXST1 baseExciter( + T_R=gUData.guDynamics.excSystem.T_R, + V_IMAX=gUData.guDynamics.excSystem.V_IMAX, + V_IMIN=gUData.guDynamics.excSystem.V_IMIN, + T_C=gUData.guDynamics.excSystem.T_C, + T_B=gUData.guDynamics.excSystem.T_B, + K_A=gUData.guDynamics.excSystem.K_A, + T_A=gUData.guDynamics.excSystem.T_A, + V_RMAX=gUData.guDynamics.excSystem.V_RMAX, + V_RMIN=gUData.guDynamics.excSystem.V_RMIN, + K_C=gUData.guDynamics.excSystem.K_C, + K_F=gUData.guDynamics.excSystem.K_F, + T_F=gUData.guDynamics.excSystem.T_F) constrainedby + Electrical.Controls.PSSE.ES.BaseClasses.BaseExciter + annotation (Placement(transformation(extent={{-60,-60},{-20,-20}}))); + replaceable Electrical.Controls.PSSE.TG.TGOV1 baseGovernor( + R=gUData.guDynamics.tg.R, + D_t=gUData.guDynamics.tg.D_t, + T_1=gUData.guDynamics.tg.T_1, + T_2=gUData.guDynamics.tg.T_2, + T_3=gUData.guDynamics.tg.T_3, + V_MAX=gUData.guDynamics.tg.V_MAX, + V_MIN=gUData.guDynamics.tg.V_MIN) constrainedby + Electrical.Controls.PSSE.TG.BaseClasses.BaseGovernor + annotation (Placement(transformation(extent={{-60,20},{-20,60}}))); + Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement(transformation( + extent={{6,6},{-6,-6}}, + rotation=180, + origin={-84,-32}))); + DynParamRecords.GUDynamics gUData(redeclare record GUnitDynamics = + OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups.DynParamRecords.ST) + annotation (Placement(transformation(extent={{-92,-8},{-72,12}}))); + equation + connect(baseMachine.p, pwPin) + annotation (Line(points={{80,0},{110,0}}, color={0,0,255})); + connect(baseExciter.EFD, baseMachine.EFD) annotation (Line(points={{-18,-40},{ + 20,-40},{20,-12},{36,-12}}, color={0,0,127})); + connect(baseGovernor.PMECH, baseMachine.PMECH) annotation (Line(points={{-18,40}, + {20,40},{20,12},{36,12}}, color={0,0,127})); + connect(zero.y, baseExciter.VOTHSG) + annotation (Line(points={{-77.4,-32},{-62,-32}}, color={0,0,127})); + connect(baseExciter.VUEL, zero.y) annotation (Line(points={{-48,-62},{-48,-70}, + {-70,-70},{-70,-32},{-77.4,-32}}, color={0,0,127})); + connect(baseExciter.VOEL, zero.y) annotation (Line(points={{-40,-62},{-40,-70}, + {-70,-70},{-70,-32},{-77.4,-32}}, color={0,0,127})); + connect(baseMachine.XADIFD, baseExciter.XADIFD) annotation (Line(points={{82,-18}, + {86,-18},{86,-70},{-24,-70},{-24,-62}}, color={0,0,127})); + connect(baseMachine.ETERM, baseExciter.ECOMP) annotation (Line(points={{82,-6}, + {96,-6},{96,-80},{-74,-80},{-74,-40},{-62,-40}}, color={0,0,127})); + connect(baseMachine.EFD0, baseExciter.EFD0) annotation (Line(points={{82,-10}, + {92,-10},{92,-76},{-68,-76},{-68,-48},{-62,-48}}, color={0,0,127})); + connect(baseMachine.SPEED, baseGovernor.SPEED) annotation (Line(points={{82,14}, + {90,14},{90,76},{-70,76},{-70,52},{-56,52}}, color={0,0,127})); + connect(baseMachine.PMECH0, baseGovernor.PMECH0) annotation (Line(points={{82, + 10},{96,10},{96,84},{-76,84},{-76,28},{-56,28}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); + end SteamTurbineUnit; +end ST; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/SteamTurbineUnit.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/SteamTurbineUnit.mo deleted file mode 100644 index 9114a4ec2..000000000 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/SteamTurbineUnit.mo +++ /dev/null @@ -1,76 +0,0 @@ -within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB.GeneratorGroups; -model SteamTurbineUnit - extends OpenIPSL.Interfaces.Generator(V_b = 13800); - Electrical.Machines.PSSE.GENROE gENROE( - P_0=P_0, - Q_0=Q_0, - v_0=v_0, - angle_0=angle_0, - M_b=4475000, - Tpd0=7, - Tppd0=0.03, - Tppq0=0.05, - H=3, - D=0, - Xd=2.1, - Xq=2, - Xpd=0.2, - Xppd=0.18, - Xppq=0.18, - Xl=0.15, - S10=0.05, - S12=0.3, - R_a=0.01, - Xpq=0.5, - Tpq0=0.75) annotation (Placement(transformation(extent={{38,-20},{78,20}}))); - Modelica.Blocks.Sources.Constant zero(k=0) annotation (Placement(transformation( - extent={{6,6},{-6,-6}}, - rotation=180, - origin={-22,-16}))); - Electrical.Controls.PSSE.ES.EXST1 eXST1_1( - V_IMAX=1, - V_IMIN=-1, - T_C=1, - T_B=10, - K_A=200, - T_A=0.05, - V_RMAX=5, - V_RMIN=-4, - K_C=0.04, - K_F=0.02, - T_F=1) annotation (Placement(transformation(extent={{4,-30},{24,-10}}))); - Electrical.Controls.PSSE.TG.TGOV1 tGOV1_1( - R=0.05, - D_t=0, - T_1=0.49, - T_2=2.1, - T_3=7, - V_MAX=1, - V_MIN=0) annotation (Placement(transformation(extent={{4,2},{24,22}}))); -equation - connect(gENROE.p, pwPin) - annotation (Line(points={{78,0},{110,0}}, color={0,0,255})); - connect(eXST1_1.EFD, gENROE.EFD) annotation (Line(points={{25,-20},{28,-20},{ - 28,-12},{34,-12}}, - color={0,0,127})); - connect(zero.y, eXST1_1.VOTHSG) - annotation (Line(points={{-15.4,-16},{3,-16}}, color={0,0,127})); - connect(gENROE.EFD0, eXST1_1.EFD0) annotation (Line(points={{80,-10},{90,-10}, - {90,-40},{-2,-40},{-2,-24},{3,-24}}, color={0,0,127})); - connect(eXST1_1.ECOMP, gENROE.ETERM) annotation (Line(points={{3,-20},{-6,-20}, - {-6,-44},{94,-44},{94,-6},{80,-6}}, color={0,0,127})); - connect(eXST1_1.VUEL, eXST1_1.VOTHSG) annotation (Line(points={{10,-31},{10, - -36},{-10,-36},{-10,-16},{3,-16}}, color={0,0,127})); - connect(eXST1_1.XADIFD, gENROE.XADIFD) annotation (Line(points={{22,-31},{22, - -36},{86,-36},{86,-18},{80,-18}}, color={0,0,127})); - connect(tGOV1_1.PMECH, gENROE.PMECH) - annotation (Line(points={{25,12},{34,12}},color={0,0,127})); - connect(tGOV1_1.SPEED, gENROE.SPEED) annotation (Line(points={{6,18},{0,18},{ - 0,32},{86,32},{86,14},{80,14}}, color={0,0,127})); - connect(tGOV1_1.PMECH0, gENROE.PMECH0) annotation (Line(points={{6,6},{-4,6}, - {-4,36},{90,36},{90,10},{80,10}}, color={0,0,127})); - connect(eXST1_1.VOEL, eXST1_1.VOTHSG) annotation (Line(points={{14,-31},{14, - -36},{-10,-36},{-10,-16},{3,-16}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); -end SteamTurbineUnit; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/package.order b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/package.order index 2b95b85ea..50c79376b 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/package.order +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/GeneratorGroups/package.order @@ -1,2 +1,3 @@ -GasTurbineUnit -SteamTurbineUnit +DynParamRecords +GT +ST diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/PfData/package.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/PfData/package.mo index ec354911e..96a0b3171 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/PfData/package.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/CampusB/PfData/package.mo @@ -1,5 +1,5 @@ within OpenIPSL.Examples.Microgrids.UniversityCampus.CampusB; -package PfData +package PfData "Record data for university campus B" extends Modelica.Icons.RecordsPackage; end PfData; diff --git a/OpenIPSL/Examples/Microgrids/UniversityCampus/package.mo b/OpenIPSL/Examples/Microgrids/UniversityCampus/package.mo index 1e5d58ade..3576b3e50 100644 --- a/OpenIPSL/Examples/Microgrids/UniversityCampus/package.mo +++ b/OpenIPSL/Examples/Microgrids/UniversityCampus/package.mo @@ -2,4 +2,18 @@ within OpenIPSL.Examples.Microgrids; package UniversityCampus "University campus microgrid examples" extends Modelica.Icons.ExamplesPackage; + annotation (Documentation(info=" +This example package contains example of two real-world university campus microgrids.
+For more details on the microgrids and their modeling, refer to:
+This package contains examples of microgrids.
+")); end Microgrids; diff --git a/OpenIPSL/UsersGuide/Publications.mo b/OpenIPSL/UsersGuide/Publications.mo index add5ab092..ec88d4cce 100644 --- a/OpenIPSL/UsersGuide/Publications.mo +++ b/OpenIPSL/UsersGuide/Publications.mo @@ -16,6 +16,15 @@ model Publications "Publications"