11 #include <dpsim-models/Base/Base_SynchronGenerator.h>
12 #include <dpsim-models/CompositePowerComp.h>
13 #include <dpsim-models/DP/DP_Ph1_Inductor.h>
14 #include <dpsim-models/DP/DP_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);
105 void mnaCompUpdateCurrent(
const Matrix &leftVector)
override;
107 void mnaCompUpdateVoltage(
const Matrix &leftVector)
override;
110 AttributeBase::List &prevStepDependencies,
111 AttributeBase::List &attributeDependencies,
112 AttributeBase::List &modifiedAttributes)
override;
114 mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
115 AttributeBase::List &attributeDependencies,
116 AttributeBase::List &modifiedAttributes,
125 :
Task(**generator.
mName +
".AddBStep"), mGenerator(generator) {
126 mAttributeDependencies.push_back(
128 mAttributeDependencies.push_back(generator.
mSubInductor->mRightVector);
132 void execute(Real time, Int timeStepCount);
Base synchronous generator model.
Base class for composite power components.
Synchronous generator model for transient stability analysis.
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
Retrieves calculated voltage from simulation for next step.
std::shared_ptr< Inductor > mSubInductor
Inner inductor that represents the generator impedance.
void setStandardParametersSI(Real nomPower, Real nomVolt, Real nomFreq, Int polePairNumber, Real Rs, Real Lpd, Real inertiaJ, Real Kd=0)
Initializes the machine parameters.
void initializeFromNodesAndTerminals(Real frequency) override
Initializes Component variables according to power flow data stored in Nodes.
Complex mImpedance
Equivalent impedance for loadflow calculation.
const Attribute< Complex >::Ptr mEp
emf behind transient reactance
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
const Attribute< Real >::Ptr mEp_phase
SimPowerComp< Complex >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
Real mKd
Absolute damping coefficient.
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.
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of component.
void setModelFlags(Bool convertWithOmegaMech)
Flags to modify model behavior.
Real mXpd
Absolute d-axis transient reactance X'd.
Bool mConvertWithOmegaMech
Flag for usage of actual mechanical speed for torque conversion (otherwise mNomOmega is used)
Bool mUseOmegaRef
Flag for usage of attribute of w_ref (otherwise mNomOmega is used)
void setFundamentalParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Ll, Real Lmd, Real Llfd, Real inertia, Real D=0)
Initializes the machine parameters.
std::shared_ptr< VoltageSource > mSubVoltageSource
Inner voltage source that represents the generator.
const Attribute< Real >::Ptr mEp_abs
void mnaParentPreStep(Real time, Int timeStepCount) override
Real mLpd
Absolute d-axis transient inductance.
const Attribute< String >::Ptr mName
Human readable name.
String uid()
Returns unique id.
Attribute< Matrix >::Ptr mRightVector
Base class for all components that are transmitting power.
Tasks to be defined by every component.