11 #include <dpsim-models/Base/Base_SynchronGenerator.h>
12 #include <dpsim-models/CompositePowerComp.h>
13 #include <dpsim-models/SP/SP_Ph1_Inductor.h>
14 #include <dpsim-models/SP/SP_Ph1_VoltageSource.h>
15 #include <dpsim-models/Solver/MNAInterface.h>
65 Logger::Level logLevel = Logger::Level::off);
68 Logger::Level logLevel = Logger::Level::off)
77 void setInitialValues(Complex elecPower, Real mechPower);
80 Real Ll, Real Lmd, Real Llfd, Real inertia,
84 Int polePairNumber, Real Rs, Real Lpd,
85 Real inertiaJ, Real Kd = 0);
88 Real Xpd, Real inertia, Real Rs = 0, Real D = 0);
101 void mnaParentPostStep(Real time, Int timeStepCount,
104 void mnaCompUpdateCurrent(
const Matrix &leftVector)
override;
106 void mnaCompUpdateVoltage(
const Matrix &leftVector)
override;
109 AttributeBase::List &prevStepDependencies,
110 AttributeBase::List &attributeDependencies,
111 AttributeBase::List &modifiedAttributes)
override;
113 mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
114 AttributeBase::List &attributeDependencies,
115 AttributeBase::List &modifiedAttributes,
123 :
Task(**generator.
mName +
".AddBStep"), mGenerator(generator) {
124 mAttributeDependencies.push_back(
126 mAttributeDependencies.push_back(
128 mModifiedAttributes.push_back(generator.
attribute(
"right_vector"));
131 void execute(Real time, Int timeStepCount);
Base synchronous generator model.
Base class for composite power components.
const Attribute< String >::Ptr mName
Human readable name.
String uid()
Returns unique id.
AttributeBase::Ptr attribute(const String &name) const
Return pointer to an attribute.
Synchronous generator model for transient stability analysis.
Complex mImpedance
Equivalent impedance for loadflow calculation.
void mnaParentPreStep(Real time, Int timeStepCount) override
MNA pre and post step operations.
Bool mConvertWithOmegaMech
Flag for usage of actual mechanical speed for torque conversion (otherwise mNomOmega is used)
Real mKd
Absolute damping coefficient.
SimPowerComp< Complex >::Ptr clone(String name) override
DEPRECATED: Delete method.
void setModelFlags(Bool convertWithOmegaMech)
Flags to modify model behavior.
void initializeFromNodesAndTerminals(Real frequency) override
Initializes Component variables according to power flow data stored in Nodes.
std::shared_ptr< VoltageSource > mSubVoltageSource
Inner voltage source that represents the generator.
const Attribute< Complex >::Ptr mEp
emf behind transient reactance
void setStandardParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Xpd, Real inertia, Real Rs=0, Real D=0)
Initializes the machine parameters.
const Attribute< Real >::Ptr mDelta_p
Angle by which the emf Ep is leading the terminal voltage.
std::shared_ptr< Inductor > mSubInductor
Inner inductor that represents the generator impedance.
Real mLpd
Absolute d-axis transient inductance.
const Attribute< Real >::Ptr mEp_phase
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of component.
const Attribute< Real >::Ptr mEp_abs
void setStandardParametersSI(Real nomPower, Real nomVolt, Real nomFreq, Int polePairNumber, Real Rs, Real Lpd, Real inertiaJ, Real Kd=0)
Initializes the machine parameters.
Bool mUseOmegaRef
Flag for usage of attribute of w_ref (otherwise mNomOmega is used)
Real mXpd
Absolute d-axis transient reactance X'd.
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
void setFundamentalParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Ll, Real Lmd, Real Llfd, Real inertia, Real D=0)
Initializes the machine parameters.
Base class for all components that are transmitting power.
Tasks to be defined by every component.