82 std::shared_ptr<Signal::PLL>
mPLL;
111 const Matrix &fabc)
const;
245 :
Task(**gfl.
mName +
".ControlPreStep"), mGFL(gfl) {
246 mGFL.addControlPreStepDependencies(
251 mGFL.controlPreStep(time, timeStepCount);
261 :
Task(**gfl.
mName +
".ControlStep"), mGFL(gfl) {
262 mGFL.addControlStepDependencies(
267 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 mDirectCapacitorCurrent
void setInitialStateValues(Real pInit, Real qInit, Real phiDInit, Real phiQInit, Real gammaDInit, Real gammaQInit)
const Attribute< Real >::Ptr mIgridQ
MatrixFixedSize< 2, 1 > parkTransformPowerInvariant(Real theta, const Matrix &fabc) const
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)
Matrix mDirectInductorVoltage
SimPowerComp< Real >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
void mnaCompUpdateCurrent(const Matrix &leftVector) override
void mnaCompUpdateVoltage(const Matrix &leftVector) override
std::shared_ptr< EMT::Ph3::Capacitor > mSubCapacitorF
GFL(String name, Bool useSubcomponents, Logger::Level logLevel=Logger::Level::off)
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.
Matrix mDirectInductorConductance
const Attribute< Real >::Ptr mVcd
PCC voltage in controller dq frame.
const Attribute< Real >::Ptr mVcq
Matrix mDirectInductorCurrent
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
Matrix mDirectCapacitorHistory
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].
Matrix mDirectSourceVoltage
void mnaParentApplyRightSideVectorStamp(Matrix &rightVector) override
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
MatrixFixedSize< 3, 1 > inverseParkTransformPowerInvariant(Real theta, const Matrix &fdq) const
void controlStep(Real time, Int timeStepCount)
std::shared_ptr< EMT::Ph3::Resistor > mSubResistorF
Matrix mDirectCapacitorConductance
const Attribute< Matrix >::Ptr mDirectSourceVoltageAttr
Storage for the source voltage in direct mode, exposed through mVs.
void mnaParentApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override
MatrixFixedSize< 2, 3 > getParkTransformMatrixPowerInvariant(Real theta) const
void updatePowerAndFrequencyAttributes()
Matrix mDirectInductorHistory
Matrix mDirectResistorConductance
MatrixFixedSize< 3, 2 > getInverseParkTransformMatrixPowerInvariant(Real theta) const
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.
Eigen::Matrix< Real, rows, cols, Eigen::ColMajor > MatrixFixedSize
Dense matrix for real numbers with fixed dimension.
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).