11 #include <dpsim-models/MNASimPowerComp.h>
12 #include <dpsim-models/Signal/Exciter.h>
13 #include <dpsim-models/Signal/TurbineGovernorType1.h>
14 #include <dpsim-models/Solver/MNAInterface.h>
19 template <
typename VarType>
46 Real mMechTorque_prev;
67 Real nomFreq, Real H, Real Ld, Real Lq,
68 Real L0, Real Ld_t, Real Td0_t);
71 Real nomFreq, Real H, Real Ld, Real Lq,
72 Real L0, Real Ld_t, Real Lq_t,
73 Real Td0_t, Real Tq0_t);
77 Real nomFreq, Real H, Real Ld, Real Lq,
78 Real L0, Real Ld_t, Real Lq_t,
79 Real Td0_t, Real Tq0_t, Real Ld_s,
80 Real Lq_s, Real Td0_s, Real Tq0_s,
83 void setInitialValues(Complex initComplexElectricalPower,
84 Real initMechanicalPower, Complex initTerminalVoltage);
87 void addGovernor(Real T3, Real T4, Real T5, Real Tc, Real Ts, Real R,
88 Real Pmin, Real Pmax, Real OmRef, Real TmRef);
90 addGovernor(std::shared_ptr<Signal::TurbineGovernorType1> turbineGovernor);
92 void addExciter(Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf,
94 void addExciter(std::shared_ptr<Signal::Exciter> exciter);
105 Logger::Level logLevel);
107 void calculateVBRconstants();
109 void calculateResistanceMatrixConstants();
111 virtual void initializeResistanceMatrix() = 0;
121 void mnaCompInitialize(Real omega, Real timeStep,
125 AttributeBase::List &prevStepDependencies,
126 AttributeBase::List &attributeDependencies,
127 AttributeBase::List &modifiedAttributes)
override;
128 void mnaCompPreStep(Real time, Int timeStepCount)
override;
132 AttributeBase::List &attributeDependencies,
133 AttributeBase::List &modifiedAttributes,
135 void mnaCompPostStep(Real time, Int timeStepCount,
137 virtual void mnaCompPostStep(
const Matrix &leftVector) = 0;
void addExciter(Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf, Real Tr)
Add voltage regulator and exciter.
const Attribute< Matrix >::Ptr mVdq
Bool mInitialValuesSet
Flag to remember when initial values are set.
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.
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
Complex mInitCurrent
initial armature voltage phase a (p.u.)
Bool mHasTurbineGovernor
Determines if Turbine and Governor are 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.
std::shared_ptr< Signal::Exciter > mExciter
Signal component modelling voltage regulator and exciter.
Real mNomVolt
Nominal voltage.
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.
Real mBase_V_RMS
Base voltage RMS.
Real mInitVoltageAngle
angle of initial armature voltage
const Attribute< Real >::Ptr mOmMech
Rotor speed.
Real mNomOmega
Nominal Omega.
Real mLd_s
Subtransient d-axis inductance.
Real mBase_I_RMS
Base RMS current.
Real mTaa
d-axis additional leakage time constant
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 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< 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.
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
const Attribute< Matrix >::Ptr mVdq0
std::shared_ptr< Signal::TurbineGovernorType1 > mTurbineGovernor
Signal component modelling governor control and steam turbine.
Real mLd_t
Subtransient d-axis inductance.
String uid()
Returns unique id.
Base class for all MNA components that are transmitting power.