42 static constexpr Int mStateSize = 17;
43 static constexpr Int mInputSize = 3;
44 static constexpr Int mOutputSize = 3;
46 enum StateIndex :
Int {
53 VoltageIntegratorD = 5,
54 VoltageIntegratorQ = 6,
56 CurrentIntegratorD = 7,
57 CurrentIntegratorQ = 8,
85 Real mDampingCoefficient;
86 Real mVoltageDroopGain;
87 Real mReactiveIntegralGain;
98 Real mActiveDampingGain;
99 Real mPowerFilterCutoff;
100 Real mDelayBandwidth;
103 Real mVirtualResistance;
104 Real mVirtualReactance;
107 Real mGridCurrentFeedforward;
111 Real mReactivePowerDroop;
112 Real mReactiveDroopCutoff;
113 Real mVoltageSetpoint;
116 Real mJacobianRelativeStep;
117 Real mJacobianAbsoluteStep;
138 Matrix getParkTransformMatrix(
Real theta)
const;
140 Matrix getInverseParkTransformMatrix(
Real theta)
const;
143 void evaluateStateDerivative(
const Matrix &x,
const Matrix &u,
144 Matrix &stateDerivative)
const;
159 Real regularizedOmega(
Real omega)
const;
192 Real dampingCoefficient,
Real voltageDroopGain,
193 Real reactiveIntegralGain,
Real kpVoltage,
Real kiVoltage,
195 Real powerFilterCutoff,
Real delayBandwidth);
AttributePointer< Attribute< T > > Ptr
void setNumericalLinearizationParameters(Real relativeStep, Real absoluteStep)
Configure finite-difference steps for local linearization.
SSN_GFM(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Matrix getStateDerivative() const
Bool updateComponentParameters() override final
Matrix getInterfaceCurrent() const
std::vector< SSNComp::LocalAbcStateBlock > getLocalAbcStateBlocks() const override final
Matrix getInterfaceVoltage() const
void updateLogAttributes(const Matrix &u) const override final
Update derived attributes used for logging/inspection.
void setReactivePowerDroop(Real droopGain, Real cutoff)
Opt-in proportional Q-V droop replacing the integral excitation. droopGain is Dq [V/var]; cutoff [rad...
void setParameters(Real lf, Real cf, Real rf, Real rc, Real nominalVoltage, Real omegaN, Real pRef, Real qRef, Real virtualInertia, Real dampingCoefficient, Real voltageDroopGain, Real reactiveIntegralGain, Real kpVoltage, Real kiVoltage, Real kpCurrent, Real kiCurrent, Real activeDampingGain, Real powerFilterCutoff, Real delayBandwidth)
Configure the GFM model.
std::vector< String > getLocalStateNames() const override final
void setGridCurrentFeedforward(Real scale)
Scale on the voltage-loop grid-current feedforward (default 1).
void setVirtualImpedance(Real virtualResistance, Real virtualReactance=0.0)
Opt-in virtual output impedance Zv = Rv + jXv, subtracted from the EMF reference across the filter cu...
void initializeFromNodesAndTerminals(Real frequency) override final
Initializes Component variables according to power flow data stored in Nodes.
SSN_GFM(String name, Logger::Level logLevel=Logger::Level::off)
TwoTerminalVTypeVariableSSNComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Abstract base class for EMT state-space nodal (SSN) components.
String uid()
Returns unique id.
spdlog::level::level_enum Level
static std::shared_ptr< SSN_GFM > make(Args &&...args)
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.