SRF PLL

class SRFPLL : public vslib::Component

Public Functions

inline SRFPLL(std::string_view name, Component &parent)

Synchronous Reference Frame PLL constructor. Allows to set the name of the Component, set this controller as a child of a given parent Component, and specify an anti-windup function, which by default does not do anything.

Parameters:
  • name – Name identification of the PLL controller

  • parent – Parent of this controller

std::tuple<double, double, double> synchroniseWithDQ(const double f_a, const double f_b, const double f_c) noexcept

Computes one iteration of the the PLL synchronisation and returns wt and q.

Parameters:
  • a – A-phase component of the three-phase system

  • b – B-phase component of the three-phase system

  • c – C-phase component of the three-phase system

Returns:

Pair with balanced angle (omega t), that always fits in 0 to 2pi, d, and q

double synchronise(const double f_a, const double f_b, const double f_c) noexcept

Computes one iteration of the the PLL synchronisation and returns wt.

Parameters:
  • a – A-phase component of the three-phase system

  • b – B-phase component of the three-phase system

  • c – C-phase component of the three-phase system

Returns:

Balanced angle (omega t), always fits in 0 to 2pi values

void reset() noexcept

Resets the controller to the initial state by zeroing the history.

virtual std::optional<fgc4::utils::Warning> verifyParameters() override

Update parameters method, called after any Parameter of this Component is modified.

Returns:

Optionally returns a Warning with pertinent information if verification was unsuccessful, nothing otherwise

Public Members

Parameter<double> f_rated

Frequency of the voltage source.

Parameter<double> angle_offset

Angle offset to be added to calculated wt.

AbcToDq0Transform abc_2_dq0

abc to dq0 transform part of the SRF PLL

PID pi

PI controller part of the SRF PLL.