DPsim
|
Base synchronous generator model. More...
#include <Base_SynchronGenerator.h>
Public Types | |
enum class | StateType { perUnit , statorReferred , rotorReferred } |
State type of machine variables. More... | |
enum class | ParameterType { perUnit , statorReferred , operational } |
Machine parameters type. | |
Public Member Functions | |
void | addGovernor (Real Ta, Real Tb, Real Tc, Real Fa, Real Fb, Real Fc, Real K, Real Tsr, Real Tsm, Real Tm_init, Real PmRef) |
Add governor and turbine. | |
void | addExciter (Real Ta, Real Ka, Real Te, Real Ke, Real Tf, Real Kf, Real Tr) |
Add voltage regulator and exciter. | |
virtual | ~SynchronGenerator () |
Destructor - does nothing. | |
void | setBaseAndFundamentalPerUnitParameters (Real nomPower, Real nomVolt, Real nomFreq, Real nomFieldCur, Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd, Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2, Real inertia) |
Initializes the base and fundamental machine parameters in per unit. | |
void | setBaseAndOperationalPerUnitParameters (Real nomPower, Real nomVolt, Real nomFreq, Int poleNumber, Real nomFieldCur, Real Rs, Real Ld, Real Lq, Real Ld_t, Real Lq_t, Real Ld_s, Real Lq_s, Real Ll, Real Td0_t, Real Tq0_t, Real Td0_s, Real Tq0_s, Real inertia) |
void | setFundamentalPerUnitParameters (Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd, Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2, Real inertia) |
void | applyFundamentalPerUnitParameters () |
void | setAndApplyFundamentalPerUnitParameters (Int poleNumber, Real Rs, Real Ll, Real Lmd, Real Lmq, Real Rfd, Real Llfd, Real Rkd, Real Llkd, Real Rkq1, Real Llkq1, Real Rkq2, Real Llkq2, Real inertia) |
void | setOperationalPerUnitParameters (Int poleNumber, Real inertia, Real Rs, Real Ld, Real Lq, Real Ll, Real Ld_t, Real Lq_t, Real Ld_s, Real Lq_s, Real Td0_t, Real Tq0_t, Real Td0_s, Real Tq0_s) |
void | calculateFundamentalFromOperationalParameters () |
void | setInitialValues (Real initActivePower, Real initReactivePower, Real initTerminalVolt, Real initVoltAngle, Real initMechPower) |
void | setNumericalMethod (NumericalMethod method) |
Switch to determine the integration method for the machine model. | |
Public Attributes | |
const Attribute< Real >::Ptr | mRs |
stator resistance Rs [Ohm] | |
const Attribute< Real >::Ptr | mLl |
leakage inductance Ll [H] | |
const Attribute< Real >::Ptr | mLd |
d-axis inductance Ld [H] | |
const Attribute< Real >::Ptr | mLq |
q-axis inductance Lq [H] | |
const Attribute< Real >::Ptr | mLd_t |
Transient d-axis inductance [H]. | |
const Attribute< Real >::Ptr | mLq_t |
Transient q-axis inductance [H]. | |
const Attribute< Real >::Ptr | mLd_s |
Subtransient d-axis inductance [H]. | |
const Attribute< Real >::Ptr | mLq_s |
Subtransient q-axis inductance [H]. | |
const Attribute< Real >::Ptr | mTd0_t |
Transient time constant of d-axis [s]. | |
const Attribute< Real >::Ptr | mTq0_t |
Transient time constant of q-axis [s]. | |
const Attribute< Real >::Ptr | mTd0_s |
Subtransient time constant of d-axis [s]. | |
const Attribute< Real >::Ptr | mTq0_s |
Subtransient time constant of q-axis [s]. | |
const Attribute< Real >::Ptr | mDelta |
rotor angle delta | |
const Attribute< Real >::Ptr | mMechTorque |
mechanical torque | |
const Attribute< Real >::Ptr | mInertia |
inertia constant H [s] for per unit or moment of inertia J [kg*m^2] | |
const Attribute< Real >::Ptr | mOmMech |
rotor speed omega_r | |
const Attribute< Real >::Ptr | mElecActivePower |
Active part of the electrical power. | |
const Attribute< Real >::Ptr | mElecReactivePower |
Reactive part of the electrical power. | |
const Attribute< Real >::Ptr | mMechPower |
mechanical Power Pm [W] | |
const Attribute< Real >::Ptr | mElecTorque |
electrical torque | |
std::shared_ptr< Signal::TurbineGovernor > | mTurbineGovernor |
Signal component modelling governor control and steam turbine. | |
std::shared_ptr< Signal::Exciter > | mExciter |
Signal component modelling voltage regulator and exciter. | |
Protected Member Functions | |
void | initPerUnitStates () |
SynchronGenerator (CPS::AttributeList::Ptr attributeList) | |
Constructor. | |
void | setBaseParameters (Real nomPower, Real nomVolt, Real nomFreq) |
void | setBaseParameters (Real nomPower, Real nomVolt, Real nomFreq, Real nomFieldCur) |
void | calcStateSpaceMatrixDQ () |
Real | calcHfromJ (Real J, Real omegaNominal, Int polePairNumber) |
Protected Attributes | |
NumericalMethod | mNumericalMethod |
Real | mSystemOmega |
Simulation angular system speed. | |
Real | mTimeStep |
Simulation time step. | |
StateType | mStateType = StateType::perUnit |
specifies if the machine parameters are transformed to per unit | |
ParameterType | mParameterType |
Bool | mInitialValuesSet = false |
Flag to remember when initial values are set. | |
Real | mNomPower = 0 |
nominal power Pn [VA] | |
Real | mNomVolt = 0 |
nominal voltage Vn [V] (phase-to-phase RMS) | |
Real | mNomFreq = 0 |
nominal frequency fn [Hz] | |
Real | mNomOmega = 0 |
nominal angular frequency wn [Hz] | |
Real | mNomFieldCur = 0 |
nominal field current Ifn [A] | |
Int | mNumDampingWindings = 0 |
Number of damping windings in q. | |
Int | mPoleNumber = 0 |
mNumber of poles | |
Real | mLmd = 0 |
d-axis mutual inductance Lmd [H] | |
Real | mLmq = 0 |
q-axis mutual inductance Lmq [H] | |
Real | mRfd = 0 |
field resistance Rfd [Ohm] | |
Real | mLlfd = 0 |
field leakage inductance Llfd [H] | |
Real | mLfd = 0 |
field inductance Lfd [H] | |
Real | mLf = 0 |
field winding inductance Lf [H] | |
Real | mRkd = 0 |
d-axis damper resistance Rkd [Ohm] | |
Real | mLlkd = 0 |
d-axis damper leakage inductance Llkd [H] | |
Real | mLkd = 0 |
d-axis damper inductance Lkd [H] | |
Real | mRkq1 = 0 |
q-axis damper resistance 1 Rkq1 [Ohm] | |
Real | mLlkq1 = 0 |
q-axis damper leakage inductance 1 Llkq1 [H] | |
Real | mLkq1 = 0 |
q-axis damper inductance 1 Lkq1 [H] | |
Real | mRkq2 = 0 |
q-axis damper resistance 2 Rkq2 [Ohm] | |
Real | mLlkq2 = 0 |
q-axis damper leakage inductance 2 Llkq2 [H] | |
Real | mLkq2 = 0 |
q-axis damper inductance 2 Lkq2 [H] | |
Complex | mInitElecPower = 0 |
Complex | mInitTermVoltage = 0 |
Real | mInitMechPower = 0 |
Real | mBase_V = 0 |
base stator voltage (phase-to-ground peak) | |
Real | mBase_V_RMS = 0 |
base stator voltage (phase-to-ground RMS) | |
Real | mBase_I = 0 |
base stator current peak | |
Real | mBase_I_RMS = 0 |
base stator current RMS | |
Real | mBase_Z = 0 |
base stator impedance | |
Real | mBase_OmElec = 0 |
base electrical angular frequency | |
Real | mBase_OmMech = 0 |
base mechanical angular frequency | |
Real | mBase_L = 0 |
base stator inductance | |
Real | mBase_T = 0 |
base torque | |
Real | mBase_Psi = 0 |
base flux linkage | |
Real | mBase_ifd = 0 |
base field current | |
Real | mBase_vfd = 0 |
base field voltage | |
Real | mBase_Zfd = 0 |
base field impedance | |
Real | mBase_Lfd = 0 |
base field inductance | |
Matrix | mInductanceMat |
Inductance matrix which is numerically equal to the reactance matrix in per unit. | |
Matrix | mResistanceMat |
resistance matrix | |
Matrix | mInvInductanceMat |
Inverse of the inductance matrix. | |
Real | mThetaMech = 0 |
theta | |
Matrix | mVsr |
Vector of stator and rotor voltages. More... | |
Matrix | mIsr |
Vector of stator and rotor currents. More... | |
Matrix | mPsisr |
Vector of stator and rotor fluxes. More... | |
Matrix | mVdq0 |
dq0 voltage calculated from terminal voltage More... | |
Matrix | mIdq0 |
dq0 current calculated from terminal current | |
Matrix | mFluxStateSpaceMat |
Flux state space matrix excluding omega term. | |
Matrix | mOmegaFluxMat |
Omega-flux matrix for state space system. | |
Matrix | mFluxToCurrentMat |
Calculates currents from fluxes. | |
Real | mLad |
Inductance to calculate magnetizing flux linkage from winding flux linkages. | |
Real | mLaq |
Inductance to calculate magnetizing flux linkage from winding flux linkages. | |
Real | mDetLd |
Determinant of d-axis inductance matrix. | |
Real | mDetLq |
Determinant of q-axis inductance matrix. | |
Bool | mCompensationOn |
Determines if compensation elements are used. | |
Real | mRcomp |
Compensation Resistance. | |
Bool | mHasTurbineGovernor = false |
Determines if Turbine and Governor are activated. | |
Bool | mHasExciter = false |
Determines if Exciter is activated. | |
Real | mInitTerminalVoltage = 0 |
Real | mInitVoltAngle = 0 |
Base synchronous generator model.
If parInPerUnit is not set, the parameters have to be given with their respective stator or rotor referred values. The calculation to per unit is performed in the initialization. The case where parInPerUnit is not set will be implemented later. parameter names include underscores and typical variables names found in literature instead of descriptive names in order to shorten formulas and increase the readability
Definition at line 25 of file Base_SynchronGenerator.h.
|
strong |
State type of machine variables.
Determines if the machine states are considered in per unit, referred to the stator parameters or the rotor parameters.
Definition at line 31 of file Base_SynchronGenerator.h.
|
protected |
Initializes states in per unit. All machine parameters are assumed to be in per unit. Function parameters have to be given in real units.
Definition at line 227 of file Base_SynchronGenerator.cpp.
void Base::SynchronGenerator::setBaseAndOperationalPerUnitParameters | ( | Real | nomPower, |
Real | nomVolt, | ||
Real | nomFreq, | ||
Int | poleNumber, | ||
Real | nomFieldCur, | ||
Real | Rs, | ||
Real | Ld, | ||
Real | Lq, | ||
Real | Ld_t, | ||
Real | Lq_t, | ||
Real | Ld_s, | ||
Real | Lq_s, | ||
Real | Ll, | ||
Real | Td0_t, | ||
Real | Tq0_t, | ||
Real | Td0_s, | ||
Real | Tq0_s, | ||
Real | inertia | ||
) |
Initializes the base and operational machine parameters in per unit. The fundamental machine parameters in per unit are calculated and set accordingly.
Definition at line 55 of file Base_SynchronGenerator.cpp.
|
protected |
Vector of stator and rotor currents.
i_d - stator current in d axis i_fd - Rotor current field winding i_kd - Rotor current damping winding in d axis i_q - stator current in q axis i_kq1 - Rotor current damping winding 1 in q axis i_kq2 - Rotor current damping winding 2 in q axis i_0 - stator current 0 component
Definition at line 219 of file Base_SynchronGenerator.h.
|
protected |
Vector of stator and rotor fluxes.
psi_d - stator flux linkage in d axis psi_fd - rotor flux linkage in field winding psi_kd - rotor flux linkage in damping winding from d axis psi_q - stator flux linkage in q axis psi_kq1 - rotor flux linkage in damping winding 1 from q axis psi_kq2 - rotor flux linkage in damping winding 2 from q axis psi_0 - stator flux linkage 0 component
Definition at line 229 of file Base_SynchronGenerator.h.
|
protected |
dq0 voltage calculated from terminal voltage
Initializes the per unit or stator referred machine parameters with the machine parameters given in per unit. The initialization mode depends on the setting of state type.
Definition at line 235 of file Base_SynchronGenerator.h.
|
protected |
Vector of stator and rotor voltages.
v_d - Stator voltage in d axis
v_fd - Rotor voltage field winding
v_kd - Rotor voltage damping winding in d axis
v_q - Stator voltage in q axis
v_kq1 - Rotor voltage damping winding 1 in q axis
v_kq2 - Rotor voltage damping winding 2 in q axis
v_0 - Stator voltage 0 component
Definition at line 209 of file Base_SynchronGenerator.h.