11 #include <dpsim-models/Base/Base_SynchronGenerator.h>
12 #include <dpsim-models/CompositePowerComp.h>
13 #include <dpsim-models/EMT/EMT_Ph3_Inductor.h>
14 #include <dpsim-models/EMT/EMT_Ph3_VoltageSource.h>
15 #include <dpsim-models/Solver/MNAInterface.h>
63 Logger::Level logLevel = Logger::Level::off);
66 Logger::Level logLevel = Logger::Level::off)
72 Matrix parkTransformPowerInvariant(Real theta,
const Matrix &fabc);
74 Matrix getParkTransformMatrixPowerInvariant(Real theta);
78 void setInitialValues(Complex elecPower, Real mechPower);
81 Real Ll, Real Lmd, Real Llfd, Real inertia,
85 Int polePairNumber, Real Rs, Real Lpd,
86 Real inertiaJ, Real Kd = 0);
89 Real Xpd, Real inertia, Real Rs = 0, Real D = 0);
106 void mnaCompUpdateCurrent(
const Matrix &leftVector)
override;
108 void mnaCompUpdateVoltage(
const Matrix &leftVector)
override;
110 void mnaParentAddPreStepDependencies(
111 AttributeBase::List &prevStepDependencies,
112 AttributeBase::List &attributeDependencies,
113 AttributeBase::List &modifiedAttributes)
override;
115 mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
116 AttributeBase::List &attributeDependencies,
117 AttributeBase::List &modifiedAttributes,
123 :
Task(**generator.
mName +
".AddBStep"), mGenerator(generator) {
124 mAttributeDependencies.push_back(
126 mAttributeDependencies.push_back(generator.
mSubInductor->mRightVector);
130 void execute(Real time, Int timeStepCount);
Base synchronous generator model.
Base class for composite power components.
Synchronous generator model for transient stability analysis.
void setStandardParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Xpd, Real inertia, Real Rs=0, Real D=0)
Initializes the machine parameters.
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of component.
Real mThetaN
Nominal system angle.
void setStandardParametersSI(Real nomPower, Real nomVolt, Real nomFreq, Int polePairNumber, Real Rs, Real Lpd, Real inertiaJ, Real Kd=0)
Initializes the machine parameters.
Real mKd
Absolute damping coefficient.
std::shared_ptr< VoltageSource > mSubVoltageSource
Inner voltage source that represents the generator.
SimPowerComp< Real >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
Retrieves calculated voltage from simulation for next step.
const Attribute< Complex >::Ptr mEp
emf behind transient reactance
void mnaParentPreStep(Real time, Int timeStepCount) override
Complex mImpedance
Equivalent impedance for loadflow calculation.
std::shared_ptr< Inductor > mSubInductor
Inner inductor that represents the generator impedance.
void initializeFromNodesAndTerminals(Real frequency) override
Initializes Component variables according to power flow data stored in Nodes.
const Attribute< Real >::Ptr mEp_abs
const Attribute< Real >::Ptr mDelta_p
Angle by which the emf Ep is leading the terminal voltage.
void setFundamentalParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Ll, Real Lmd, Real Llfd, Real inertia, Real D=0)
Initializes the machine parameters.
Real mLpd
Absolute d-axis transient inductance.
const Attribute< Real >::Ptr mEp_phase
Real mXpd
Absolute d-axis transient reactance X'd.
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.