Skip to content

Commit

Permalink
#3237 Modify HoldIq sign convention according to the norm
Browse files Browse the repository at this point in the history
Signed-off-by: Joy El Feghali <joy.elfeghali@rte-france.com>
  • Loading branch information
joyelfeghali committed Jun 20, 2024
1 parent ceeb59c commit 9732b34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ within Dynawo.Electrical.Controls.WECC.BaseControls;
model IqInjectionLogic "Reactive Current Injection Logic"

parameter Types.CurrentModulePu IqFrzPu "Constant reactive current injection value in pu (base SNom, UNom)";
parameter Types.Time HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq < 0 for constant, 0 for no injection after voltage dip, HoldIq > 0 for voltage-dependent injection";
parameter Types.Time HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq > 0 for constant, 0 for no injection after voltage dip, HoldIq < 0 for voltage-dependent injection";

Modelica.Blocks.Interfaces.RealInput iqVPu(start = 0) "Input for voltage-dependent reactive current injection in pu (base SNom, UNom)" annotation(
Placement(visible = true, transformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Expand Down Expand Up @@ -43,16 +43,16 @@ equation
vDipInjEndTime = -1;
end when;

if (vDip == true) or (vDip == false and vDipInjEndTime >= 0 and HoldIq > 0 and time <= vDipInjEndTime) then // check for vDipInjEndTime >= 0 to see if there is a freeze state and time <= vDipInjEndTime for additional safety.
if (vDip == true) or (vDip == false and vDipInjEndTime >= 0 and HoldIq < 0 and time <= vDipInjEndTime) then // check for vDipInjEndTime >= 0 to see if there is a freeze state and time <= vDipInjEndTime for additional safety.
iqInjPu = iqVPu;
elseif (vDip == false and vDipInjEndTime >= 0 and HoldIq < 0 and time <= vDipInjEndTime) then
elseif (vDip == false and vDipInjEndTime >= 0 and HoldIq > 0 and time <= vDipInjEndTime) then
iqInjPu = IqFrzPu;
else
iqInjPu = 0;
end if;

annotation(
preferredView = "text",
Documentation(info = "<html><head></head><body><p>This block implements the behavior of the switch mechanic for reactive current injection, as specified in:<br><a href=\"https://www.wecc.org/Reliability/WECC-Second-Generation-Wind-Turbine-Models-012314.pdf\">https://www.wecc.org/Reliability/WECC-Second-Generation-Wind-Turbine-Models-012314.pdf</a></p><ul><li>Setting HoldIq to 0 results in abrupt ending of injection after the voltage dip has ended.</li><li>Setting HoldIq to a positive value continues the injection with the voltage-dependent injection for the absolute value of HoldIq seconds after the voltage dip has ended.</li><li>Setting HoldIq to a negative value continues the injection with a set constant (IqFrzPu) for the absolute value of HoldIq seconds after the voltage dip has ended.</li></ul></body></html>"),
Documentation(info = "<html><head></head><body><p>This block implements the behavior of the switch mechanic for reactive current injection, as specified in:<br><a href=\"https://www.wecc.org/Reliability/WECC-Second-Generation-Wind-Turbine-Models-012314.pdf\">https://www.wecc.org/Reliability/WECC-Second-Generation-Wind-Turbine-Models-012314.pdf</a></p><ul><li>Setting HoldIq to 0 results in abrupt ending of injection after the voltage dip has ended.</li><li>Setting HoldIq to a negative value continues the injection with the voltage-dependent injection for the absolute value of HoldIq seconds after the voltage dip has ended.</li><li>Setting HoldIq to a positive value continues the injection with a set constant (IqFrzPu) for the absolute value of HoldIq seconds after the voltage dip has ended.</li></ul></body></html>"),
Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(origin = {-2, 74}, extent = {{-74, -38}, {82, -78}}, textString = "Reactive Current"), Text(origin = {1, -7}, extent = {{-63, 17}, {69, -21}}, textString = "Injection Logic"), Text(origin = {-129, 108}, extent = {{-19, 10}, {19, -10}}, textString = "vDip"), Text(origin = {-127, 28}, extent = {{-19, 10}, {19, -10}}, textString = "iqVPu"), Text(origin = {-127, 28}, extent = {{-19, 10}, {19, -10}}, textString = "iqVPu"), Text(origin = {121, 16}, extent = {{-19, 10}, {19, -10}}, textString = "iqInjPu")}));
end IqInjectionLogic;
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ model ElectricalControlWind "WECC Wind Electrical Control REEC"
parameter Types.VoltageComponent VDLIqPoints[:, :] = [VDLIq11, VDLIq12 ; VDLIq21, VDLIq22 ; VDLIq31, VDLIq32 ; VDLIq41, VDLIq42] "Pair of points for voltage-dependent reactive current limitation piecewise linear curve [u1,y1; u2,y2;...]";
parameter Types.PerUnit VRef1Pu "User-defined reference/bias on the inner-loop voltage control in pu (base UNom) (typical: 0 pu)";
parameter Types.Time HoldIpMax "Time delay for which the active current limit (ipMaxPu) is held after voltage dip in s";
parameter Types.Time HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq < 0 for constant, 0 for no injection after voltage dip, HoldIq > 0 for voltage-dependent injection (typical: -1 .. 1 s)";
parameter Types.Time HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq > 0 for constant, 0 for no injection after voltage dip, HoldIq < 0 for voltage-dependent injection (typical: -1 .. 1 s)";
parameter Types.PerUnit IqFrzPu "Constant reactive current injection value in pu (base UNom, SNom) (typical: -0.1 .. 0.1 pu)";
parameter Boolean PFlag "Power reference flag: const. Pref (0) or consider generator speed (1)";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ partial model BaseWT4 "Partial base model for the WECC Wind Turbine models inclu
parameter Types.ApparentPowerModule SNom "Nominal apparent power in MVA";

parameter Types.Time HoldIpMax "Time delay for which the active current limit (ipMaxPu) is held after voltage dip vDip returns to zero for HoldIpMax seconds at its value during the voltage dip";
parameter Real HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq < 0 for constant, 0 for no injection after voltage dip, HoldIq > 0 for voltage-dependent injection (typical: -1 .. 1 s)";
parameter Real HoldIq "Absolute value of HoldIq defines seconds to hold current injection after voltage dip ended. HoldIq > 0 for constant, 0 for no injection after voltage dip, HoldIq < 0 for voltage-dependent injection (typical: -1 .. 1 s)";
parameter Types.PerUnit IqFrzPu "Constant reactive current injection value (typical: -0.1 .. 0.1 pu)";
parameter Boolean PFlag "Power reference flag: const. Pref (0) or consider generator speed (1)";
parameter Types.PerUnit RPu "Resistance of equivalent branch connection to the grid in pu (base SnRef, UNom)";
Expand Down

0 comments on commit 9732b34

Please sign in to comment.