81 std::shared_ptr<Signal::PLL>
mPLL;
222 :
Task(**gfl.
mName +
".ControlPreStep"), mGFL(gfl) {
223 mGFL.addControlPreStepDependencies(
228 mGFL.controlPreStep(time, timeStepCount);
238 :
Task(**gfl.
mName +
".ControlStep"), mGFL(gfl) {
239 mGFL.addControlStepDependencies(
244 mGFL.controlStep(time, timeStepCount);
AttributePointer< Attribute< T > > Ptr
CompositePowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
void execute(Real time, Int timeStepCount) override
void execute(Real time, Int timeStepCount) override
Bool mManualInitialStatesSet
Matrix parkTransformPowerInvariant(Real theta, const Matrix &fabc) const
void setInitialStateValues(Real pInit, Real qInit, Real phiDInit, Real phiQInit, Real gammaDInit, Real gammaQInit)
const Attribute< Real >::Ptr mIgridQ
const Attribute< Matrix >::Ptr mPowerctrlStates
const Attribute< Matrix >::Ptr mPowerctrlInputs
Power-controller logging vectors.
void controlPreStep(Real time, Int timeStepCount)
void mnaParentPreStep(Real time, Int timeStepCount) override
void updateMeasurementAttributes(Real theta)
void addControlStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
SimPowerComp< Real >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
Matrix inverseParkTransformPowerInvariant(Real theta, const Matrix &fdq) const
void mnaCompUpdateCurrent(const Matrix &leftVector) override
Matrix getInverseParkTransformMatrixPowerInvariant(Real theta) const
void mnaCompUpdateVoltage(const Matrix &leftVector) override
std::shared_ptr< EMT::Ph3::Capacitor > mSubCapacitorF
void addControlPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
GFL(String name, Logger::Level logLevel=Logger::Level::off)
const Attribute< Matrix >::Ptr mPowerctrlOutputs
void setFilterParameters(Real lf, Real cf, Real rf)
Filter parameters. No Rc exists in this model.
const Attribute< Real >::Ptr mVcd
PCC voltage in controller dq frame.
const Attribute< Real >::Ptr mVcq
void setControllerParameters(Real kpPLL, Real kiPLL, Real kpPowerCtrl, Real kiPowerCtrl, Real kpCurrCtrl, Real kiCurrCtrl, Real omegaCutoff)
Controller parameters.
const Attribute< Real >::Ptr mPInst
Instantaneous controller-frame active/reactive power.
Bool mControllerParametersSet
void setParameters(Real sysOmega, Real sysVoltNom, Real pRef, Real qRef)
General operating parameters.
const Attribute< Matrix >::Ptr mPllOutput
PLL output [theta, phi_pll].
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
std::shared_ptr< Signal::PLL > mPLL
std::shared_ptr< EMT::Ph3::Inductor > mSubInductorF
void withControl(Bool controlOn)
const Attribute< Real >::Ptr mOmegaPLL
Estimated PLL angular frequency [rad/s].
void initializeParentFromNodesAndTerminals(Real frequency) override
const Attribute< Matrix >::Ptr mVs
Actual controlled source voltage.
std::shared_ptr< Signal::PowerControllerVSI > mPowerControllerVSI
const Attribute< Matrix >::Ptr mVsref
Controlled source voltage reference in abc instantaneous peak values.
std::shared_ptr< EMT::Ph3::VoltageSource > mSubControlledVoltageSource
const Attribute< Real >::Ptr mIgridD
Positive converter-to-grid current in controller dq frame.
void mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
void controlStep(Real time, Int timeStepCount)
std::shared_ptr< EMT::Ph3::Resistor > mSubResistorF
Matrix getParkTransformMatrixPowerInvariant(Real theta) const
void updatePowerAndFrequencyAttributes()
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
const Attribute< Real >::Ptr mQInst
Bool mFilterParametersSet
GFL(String uid, String name, Logger::Level logLevel=Logger::Level::off)
String uid()
Returns unique id.
spdlog::level::level_enum Level
std::shared_ptr< SimPowerComp< VarType > > Ptr
Tasks to be defined by every component.
std::vector< AttributeBase::Ptr > mModifiedAttributes
std::vector< AttributeBase::Ptr > mPrevStepDependencies
std::vector< AttributeBase::Ptr > mAttributeDependencies
static std::shared_ptr< GFL > make(Args &&...args)
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.