Skip to content

Commit

Permalink
dynawo#30 Add rate limiter to PLLfreeze
Browse files Browse the repository at this point in the history
Signed-off-by: FredericSabot <[email protected]>
  • Loading branch information
FredericSabot committed Oct 3, 2024
1 parent f644100 commit dc5d2c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ model PLLFreeze "Phase-Locked Loop whose angle can be frozen"

//Initial parameter
parameter Types.ComplexVoltagePu u0Pu "Start value of complex voltage at PCC in pu (base UNom)";

Modelica.Blocks.Nonlinear.Limiter limiter(limitsAtInit = true, uMax = 0.5/SystemBase.omegaNom) annotation(
Placement(visible = true, transformation(origin = {116, 44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(add2.y, omegaPLLPu) annotation(
Line(points = {{81, -84}, {170, -84}}, color = {0, 0, 127}));
Expand All @@ -76,9 +77,10 @@ equation
Line(points = {{80.5, -8}, {87.5, -8}}, color = {0, 0, 127}));
connect(freeze, switch1.u2) annotation(
Line(points = {{-150, -49}, {60, -49}, {60, 0}, {88, 0}}, color = {255, 0, 255}));
connect(switch1.y, integrator.u) annotation(
Line(points = {{111, 0}, {128, 0}}, color = {0, 0, 127}));

connect(switch1.y, limiter.u) annotation(
Line(points = {{111, 0}, {104, 0}, {104, 44}}, color = {0, 0, 127}));
connect(limiter.y, integrator.u) annotation(
Line(points = {{127, 44}, {127, 22}, {128, 22}, {128, 0}}, color = {0, 0, 127}));
annotation(
preferredView = "diagram",
Documentation(info = "<html><head></head><body><p> The PLL calculates the frequency of the grid voltage by synchronizing the internal phase angle with measured voltage phasor. q-component of internal voltage phasor is therefore controlled to be zero. </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ model GenericIBG "Generic model of inverter-based generation (IBG)"
Placement(visible = true, transformation(origin = {-90, -386}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Dynawo.NonElectrical.Blocks.NonLinear.StandAloneRampRateLimiter iPSlewLimit(DuMax = IpSlewMaxPu, Y0 = Id0Pu, tS = tRateLim) annotation(
Placement(visible = true, transformation(origin = {150, -160}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Dynawo.NonElectrical.Blocks.NonLinear.StandAloneRampRateLimiter iQSlewLimit(DuMax = IqSlewMaxPu, Y0 = Iq0Pu, tS = tRateLim) annotation(
Dynawo.NonElectrical.Blocks.NonLinear.StandAloneRampRateLimiter iQSlewLimit(DuMax = IqSlewMaxPu, Y0 = Iq0Pu, tS = tRateLim) annotation(
Placement(visible = true, transformation(origin = {150, -280}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Continuous.FirstOrder iPcmdFirstOrder(T = tG, y_start = Id0Pu) annotation(
Placement(visible = true, transformation(origin = {110, -160}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Expand All @@ -120,7 +120,7 @@ model GenericIBG "Generic model of inverter-based generation (IBG)"
Placement(visible = true, transformation(origin = {77, -189}, extent = {{-3, -3}, {3, 3}}, rotation = -90)));
Modelica.Blocks.Math.Feedback feedback annotation(
Placement(visible = true, transformation(origin = {180, -160}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Continuous.Derivative derivative(T = tf, k = Kf, x_start = Id0Pu) annotation(
Modelica.Blocks.Continuous.Derivative derivative(T = tf, k = Kf, x_start = Id0Pu) annotation(
Placement(visible = true, transformation(origin = {230, -160}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

// Initial values
Expand Down

0 comments on commit dc5d2c0

Please sign in to comment.