22template <
typename VarType>
89 Real initMechanicalPower,
Complex initTerminalVoltage);
95 addGovernor(std::shared_ptr<Signal::TurbineGovernorType1> turbineGovernor);
99 std::shared_ptr<Base::GovernorParameters> govParams,
100 std::shared_ptr<Base::Turbine> turbine,
101 std::shared_ptr<Base::TurbineParameters> turbineParams);
104 std::shared_ptr<Base::Turbine> turbine);
106 void addExciter(std::shared_ptr<Base::Exciter> exciter,
107 std::shared_ptr<Base::ExciterParameters> params);
109 void addExciter(std::shared_ptr<Base::Exciter> exciter);
115 void addPSS(std::shared_ptr<Base::PSS> pss,
116 std::shared_ptr<Base::PSSParameters> parameters);
118 void addPSS(std::shared_ptr<Base::PSS> pss);
299 std::shared_ptr<Base::PSS>
mPSS;
AttributePointer< Attribute< T > > Ptr
const Attribute< Matrix >::Ptr mVdq
Bool mInitialValuesSet
Flag to remember when initial values are set.
void addGovernorAndTurbine(std::shared_ptr< Base::Governor > governor, std::shared_ptr< Base::GovernorParameters > govParams, std::shared_ptr< Base::Turbine > turbine, std::shared_ptr< Base::TurbineParameters > turbineParams)
Add a modular governor + turbine pair (new API for SteamTurbineGovernor / SteamTurbine)
void scaleInertiaConstant(Real scalingFactor)
Complex mInitVoltage
initial terminal voltage phase a (p.u.)
Real mTd0_s
Subtransient time constant of d-axis.
const Attribute< Matrix >::Ptr mIdq0
Real mBase_L
Base inductance.
Real mL0
0-axis inductance
void setBaseParameters(Real nomPower, Real nomVolt, Real nomFreq)
Real mNomPower
Nominal power.
Complex mIntfCurrentComplex
Complex interface current.
Real mBase_OmElec
Base omega electric.
virtual void specificInitialization()=0
Function to initialize the specific variables of each SG model.
virtual void mnaCompPostStep(const Matrix &leftVector)=0
Real mEf_prev
induced emf by the field current under no-load conditions at time k (p.u.)
Real mBase_OmMech
Base omega mech.
Real mTq0_t
Transient time constant of q-axis.
const Attribute< Matrix >::Ptr mIdq
void addPSS(std::shared_ptr< Base::PSS > pss, std::shared_ptr< Base::PSSParameters > parameters)
Attach a PSS (initialises parameters) to this generator.
void setInitialValues(Complex initComplexElectricalPower, Real initMechanicalPower, Complex initTerminalVoltage)
Complex mInitCurrent
initial armature voltage phase a (p.u.)
Bool mHasTurbineGovernor
Determines if TurbineGovernorType1 is activated.
void setOperationalParametersPerUnit(Real nomPower, Real nomVolt, Real nomFreq, Real H, Real Ld, Real Lq, Real L0, Real Ld_t, Real Td0_t)
Initialization for 3 Order SynGen.
Real mNomVolt
Nominal voltage.
Bool mHasGovernorAndTurbine
Determines if modular Governor + Turbine pair is activated.
void mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
Add MNA post step dependencies.
Bool mModelAsNortonSource
Model flag indicating whether the machine is modelled as Norton or Thevenin equivalent.
virtual ~ReducedOrderSynchronGenerator()
Destructor - does nothing.
Real mBase_Z
Base impedance.
virtual void setModelAsNortonSource(Bool modelAsCurrentSource)
const Attribute< Real >::Ptr mElecTorque
stator electrical torque
Real mLq_t
Subtransient q-axis inductance.
std::shared_ptr< Base::Governor > mGovernor
Modular governor (SteamTurbineGovernor / HydroTurbineGovernor)
Real mBase_V_RMS
Base voltage RMS.
void addExciter(std::shared_ptr< Base::Exciter > exciter, std::shared_ptr< Base::ExciterParameters > params)
Add voltage regulator and exciter.
Real mInitVoltageAngle
angle of initial armature voltage
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
const Attribute< Real >::Ptr mOmMech
Rotor speed.
Real mNomOmega
Nominal Omega.
Real mLd_s
Subtransient d-axis inductance.
std::shared_ptr< Base::PSS > mPSS
Power system stabilizer.
Real mBase_I_RMS
Base RMS current.
std::shared_ptr< Base::Exciter > mExciter
Signal component modelling voltage regulator and exciter.
Real mTaa
d-axis additional leakage time constant
void calculateVBRconstants()
void calculateResistanceMatrixConstants()
void initializeFromNodesAndTerminals(Real frequency) override
Initializes Component variables according to power flow data stored in Nodes.
Real mBase_V
Base peak voltage.
Real mTq0_s
Subtransient time constant of q-axis.
Real mTd0_t
Transient time constant of d-axis.
void mnaCompPreStep(Real time, Int timeStepCount) override
void mnaCompAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
Add MNA pre step dependencies.
Real mBase_I
Base peak current.
virtual void stepInPerUnit()=0
Model specific step.
const Attribute< Real >::Ptr mDelta
Load angle (between q-axis and stator a-axis)
Real mInitCurrentAngle
angle of initial armature current
const Attribute< Real >::Ptr mMechTorque
Mechanical torque.
const Attribute< Real >::Ptr mEf
induced emf by the field current under no-load conditions at time k+1 (p.u.)
const Attribute< Complex >::Ptr mPower
Electrical power.
std::shared_ptr< Base::Turbine > mTurbine
Modular turbine (SteamTurbine / HydroTurbine)
Bool mHasPSS
Determines if PSS is activated.
const Attribute< Real >::Ptr mThetaMech
mechanical system angle (between d-axis and stator a-axis)
Real mInitMechPower
initial mechanical power
Complex mInitElecPower
initial electrical power
void addGovernor(Real T3, Real T4, Real T5, Real Tc, Real Ts, Real R, Real Pmin, Real Pmax, Real OmRef, Real TmRef)
Add governor and turbine (TurbineGovernorType1 legacy API)
Real mLq
d-axis inductance
Complex mIntfVoltageComplex
Complex interface voltage.
virtual void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override=0
Stamps system matrix.
Real mLq_s
Subtransient q-axis inductance.
Bool mHasExciter
Determines if Exciter is activated.
Real mLd
d-axis inductance
virtual void initializeResistanceMatrix()=0
ReducedOrderSynchronGenerator(String uid, String name, Logger::Level logLevel)
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) final
const Attribute< Matrix >::Ptr mVdq0
std::shared_ptr< Signal::TurbineGovernorType1 > mTurbineGovernor
TurbineGovernorType1 (legacy)
Real mLd_t
Subtransient d-axis inductance.
String uid()
Returns unique id.
spdlog::level::level_enum Level
Base class for all MNA components that are transmitting power.
MNASimPowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
Basic constructor that takes UID, name and log level.
Attribute< Matrix >::Ptr mRightVector
const Attribute< MatrixVar< VarType > >::Ptr mIntfVoltage
Voltage between terminals.
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
std::complex< Real > Complex
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).