pydynamicestimator.devices.synchronous

Classes

Synchronous

Metaclass for SG in rectangular coordinates with TGOV1 governor and IEEEDC1 exciter

SynchronousTransient

Transient two-axis SG with TGOV1 governor and IEEEDC1A AVR

SynchronousSubtransient

Subtransient Anderson Fouad SG with TGOV1 governor and IEEEDC1A AVR

SynchronousSubtransientSP

Subtransient Sauer and Pai SG model with stator dynamics

SynchronousSubtransientSP6

Subtransient Sauer and Pai SG 6th order model with neglected stator dynamics

Module Contents

class pydynamicestimator.devices.synchronous.Synchronous[source]

Bases: pydynamicestimator.devices.device.DeviceRect

Metaclass for SG in rectangular coordinates with TGOV1 governor and IEEEDC1 exciter

fn
H
R_s
x_d
x_q
D
f
Rd
Tch
Tsv
KA
TA
KF
TF
KE
TE
Vr_max
Vr_min
psv_max
psv_min
ns = 7
delta
omega
psv
pm
Efd
Rf
Vr
Vf_ref
Pref
gcall(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX) None[source]
Parameters:
Return type:

None

tgov1(dae: pydynamicestimator.system.Dae) None[source]

TGOV1 governor model as presented in Power System Dynamics and Stability by P.W. Sauer and M.A. Pai, 2006. (page 100)

Parameters:

dae (DAE)

Return type:

None

ieeedc1a(dae: pydynamicestimator.system.Dae) None[source]

IEEEDC1 exciter and AVR model as presented in Power System Dynamics and Stability by P.W. Sauer and M.A. Pai, 2006. (page 100)

Parameters:

dae (differential-algebraic model class)

Return type:

None

class pydynamicestimator.devices.synchronous.SynchronousTransient[source]

Bases: Synchronous

Transient two-axis SG with TGOV1 governor and IEEEDC1A AVR

Rotor Dynamics

\[\begin{split}\dot{\delta} &= 2 \pi f_n \Delta \omega \\ \Delta \dot{\omega} &= \frac{1}{2 H} \left( P_m - E_d I_d - E_q I_q + (X_q' - X_d') I_d I_q - D \Delta \omega - f (\Delta \omega + 1) \right)\end{split}\]

Electromagnetic Equations

\[\begin{split}\dot{E}_q &= \frac{1}{T_{d'}} \left( -E_q + E_f + (X_d - X_d') I_d \right)\\ \dot{E}_d &= \frac{1}{T_{q'}} \left( -E_d - (X_q - X_q') I_q \right)\end{split}\]

Excitation System Equations

\[\begin{split} \dot{E}_{\textup{fd}} &= \frac{1}{T_{E}} \left( -K_{E,i}E_{\textup{fd},i} + V_{R,i}\right)\\ \dot{R}_{f} &= \frac{1}{T_{F} } \left(- R_{f} + \frac{K_{F}}{T_{F}}E_{\textup{fd}} \right)\\ \dot{V}_{R} &= \frac{1}{T_{A}} \left(-V_{R} + K_{A}R_{f} - \frac{K_{A}K_{F}}{T_{F}}E_{\textup{fd}} + K_{A}(v_{\textup{ref}} - v_i) \right)\end{split}\]

Turbine-Governor System Equations

\[\begin{split}\dot{p}_{\textup{m}} &= \frac{1}{T_{ch}} \left( p_{\textup{sv}}- p_{\textup{m}} \right)\\ \dot{p}_{sv} &= \frac{1}{T_{sv}} \left( - \frac{\Delta \omega}{R_d} - p_{\textup{sv}} + p_{\textup{ref}} \right)\end{split}\]
_type = 'Synchronous_machine'
_name = 'Synchronous_machine_transient_model'
e_dprim
e_qprim
x_dprim
x_qprim
T_dprim
T_qprim
input_current(dae: pydynamicestimator.system.Dae) Tuple[casadi.SX, casadi.SX][source]
Parameters:

dae (pydynamicestimator.system.Dae)

Return type:

Tuple[casadi.SX, casadi.SX]

two_axis(dae, i_d: casadi.SX, i_q: casadi.SX) None[source]

Mechanical and electrical equations for the two-axis model.

Parameters:
  • dae – Dae

  • i_d (casadi.SX) – Stator d-current

  • i_q (casadi.SX) – Stator q-current

Returns:

None

Return type:

None

fgcall(dae: pydynamicestimator.system.Dae) None[source]

A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class

Parameters:

dae – an instance of a class Dae

Returns:

None

Return type:

None

class pydynamicestimator.devices.synchronous.SynchronousSubtransient[source]

Bases: Synchronous

Subtransient Anderson Fouad SG with TGOV1 governor and IEEEDC1A AVR The subtransient behavior of the synchronous generator is described by the following differential equations:

Rotor Dynamics

\[\begin{split}\dot{\delta} &= 2 \pi f_n \Delta \omega \\ \Delta \dot{\omega} &= \frac{1}{2 H} \Big( P_m - E_{d}^{\prime\prime} I_d - E_{q}^{\prime\prime} I_q + (X_q^{\prime\prime} - X_d^{\prime\prime}) I_d I_q - D \Delta \omega - f (\Delta \omega + 1) \Big) \\\end{split}\]

Electromagnetic Equations

\[\begin{split}\dot{E}_q^{\prime} &= \frac{1}{T_{d}^{\prime}} \Big( -E_q + E_f + (X_d - X_d^{\prime}) I_d \Big) \\ \dot{E}_d^{\prime} &= \frac{1}{T_{q}^{\prime}} \Big( -E_d - (X_q - X_q^{\prime}) I_q \Big) \\ \dot{E}_{q}^{\prime\prime} &= \frac{1}{T_{d}^{\prime\prime}} \Big( E_q - E_{q}^{\prime\prime} + (X_d^{\prime} - X_d^{\prime\prime}) I_d \Big) \\ \dot{E}_{d}^{\prime\prime} &= \frac{1}{T_{q}^{\prime\prime}} \Big( E_d - E_{d}^{\prime\prime} - (X_q^{\prime} - X_q^{\prime\prime}) I_q \Big) \\\end{split}\]

Excitation System Equations

\[\begin{split} \dot{E}_{\textup{fd}} &= \frac{1}{T_{E}} \left( -K_{E,i}E_{\textup{fd},i} + V_{R,i}\right)\\ \dot{R}_{f} &= \frac{1}{T_{F} } \left(- R_{f} + \frac{K_{F}}{T_{F}}E_{\textup{fd}} \right)\\ \dot{V}_{R} &= \frac{1}{T_{A}} \left(-V_{R} + K_{A}R_{f} - \frac{K_{A}K_{F}}{T_{F}}E_{\textup{fd}} + K_{A}(v_{\textup{ref}} - v_i) \right)\end{split}\]

Turbine-Governor System Equations

\[\begin{split}\dot{p}_{\textup{m}} &= \frac{1}{T_{ch}} \left( p_{\textup{sv}}- p_{\textup{m}} \right)\\ \dot{p}_{sv} &= \frac{1}{T_{sv}} \left( - \frac{\Delta \omega}{R_d} - p_{\textup{sv}} + p_{\textup{ref}} \right)\end{split}\]
_type = 'Synchronous_machine'
_name = 'Synchronous_machine_subtransient_model'
e_dprim
e_qprim
e_dsec
e_qsec
x_dprim
x_qprim
T_dprim
T_qprim
x_dsec
x_qsec
T_dsec
T_qsec
input_current(dae: pydynamicestimator.system.Dae) Tuple[casadi.SX, casadi.SX][source]
Parameters:

dae (pydynamicestimator.system.Dae)

Return type:

Tuple[casadi.SX, casadi.SX]

anderson_fouad(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX)[source]
Parameters:
  • dae

  • i_d

  • i_q

Returns:

Return type:

fgcall(dae: pydynamicestimator.system.Dae) None[source]

A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class

Parameters:

dae – an instance of a class Dae

Returns:

None

Return type:

None

class pydynamicestimator.devices.synchronous.SynchronousSubtransientSP[source]

Bases: Synchronous

Subtransient Sauer and Pai SG model with stator dynamics with TGOV1 governor and IEEEDC1A AVR

The model includes the following equations for rotor dynamics, stator dynamics, and the excitation system:

Rotor Dynamics

\[\begin{split}\dot{\delta} &= 2 \pi f_n \Delta \omega \\ \Delta \dot{\omega} &= \frac{1}{2 H} \Big( P_m - (\psi_d I_q - \psi_q I_d) - D \Delta \omega - f (\Delta \omega + 1) \Big)\end{split}\]

Electromagnetic Equations

The stator dynamics include the following equations for the flux linkages in the d and q axes:

\[\begin{split}\dot{E}_d' &= \frac{1}{T_q'} \Big( -E_d' + (X_q - X_q') (i_q - g_{q2} \Psi_{q2} - (1 - g_{q1}) i_q - g_{q2} E_d') \Big) \\ \dot{E}_q' &= \frac{1}{T_d'} \Big( -E_q' - (X_d - X_d') (i_d - g_{d2} \Psi_{d2} - (1 - g_{d1}) i_d + g_{d2} E_q') + E_f \Big)\\ \dot{\Psi}_{d2} &= \frac{1}{T_{d2}} \Big( -\Psi_{d2} + E_q' - (X_d' - X_l) i_d \Big) \\ \dot{\Psi}_{q2} &= \frac{1}{T_{q2}} \Big( -\Psi_{q2} - E_d' - (X_q' - X_l) i_q \Big)\end{split}\]

Flux Linkage Dynamics

The following equations describe the stator flux linkage dynamics in the d and q axes:

\[\begin{split}\dot{\Psi}_d &= 2 \pi f_n (R_s i_d + (1 + \Delta \omega) \Psi_q + v_d) \\ \dot{\Psi}_q &= 2 \pi f_n (R_s i_q - (1 + \Delta \omega) \Psi_d + v_q)\end{split}\]

Algebraic Equations

The following algebraic equations govern the system:

\[\begin{split}i_d &= \frac{1}{x_d''} \Big( -\psi_d + g_{d1} e_q' + (1 - g_{d1}) \psi_{d2} \Big)\\ i_q &= \frac{1}{x_q''} \Big( -\psi_q - g_{q1} e_d' + (1 - g_{q1}) \psi_{q2} \Big)\\ g_{d1} &= \frac{x_d'' - x_l}{x_d' - x_l}\\ g_{q1} &= \frac{x_q'' - x_l}{x_q' - x_l}\\ g_{d2} &= \frac{1 - g_{d1}}{x_d' - x_l}\\ g_{q2} &= \frac{1 - g_{q1}}{x_q' - x_l}\end{split}\]
_type = 'Synchronous_machine'
_name = 'Synchronous_machine_subtransient_model_Sauer_Pai'
e_dprim
e_qprim
psid
psiq
psid2
psiq2
x_l
gd1
gq1
gd2
gq2
x_dprim
x_qprim
T_dprim
T_qprim
x_dsec
x_qsec
T_dsec
T_qsec
sauer_pai(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX)[source]

Sauer and Pai model. :param dae: :type dae: DAE :param i_d: :type i_d: casadi.SX :param i_q: :type i_q: casadi.SX

Parameters:
fgcall(dae: pydynamicestimator.system.Dae) None[source]

A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class

Parameters:

dae – an instance of a class Dae

Returns:

None

Return type:

None

class pydynamicestimator.devices.synchronous.SynchronousSubtransientSP6[source]

Bases: Synchronous

Subtransient Sauer and Pai SG 6th order model with neglected stator dynamics (stator modeled with algebraic equations) and included TGOV1 governor and IEEEDC1A AVR

The model includes the following equations:

Rotor Dynamics

\[\begin{split}\dot{\delta} &= 2 \pi f_n \Delta \omega \\ \Delta \dot{\omega} &= \frac{1}{2 H} \Big( P_m - (\psi_d I_q - \psi_q I_d) - D \Delta \omega - f (\Delta \omega + 1) \Big)\end{split}\]

Electromagnetic Equations

The stator dynamics include the following equations for the flux linkages in the d and q axes:

\[\begin{split}\dot{E}_d' &= \frac{1}{T_q'} \Big( -E_d' + (X_q - X_q') (i_q - g_{q2} \Psi_{q2} - (1 - g_{q1}) i_q - g_{q2} E_d') \Big) \\ \dot{E}_q' &= \frac{1}{T_d'} \Big( -E_q' - (X_d - X_d') (i_d - g_{d2} \Psi_{d2} - (1 - g_{d1}) i_d + g_{d2} E_q') + E_f \Big)\\ \dot{\Psi}_{d2} &= \frac{1}{T_{d2}} \Big( -\Psi_{d2} + E_q' - (X_d' - X_l) i_d \Big) \\ \dot{\Psi}_{q2} &= \frac{1}{T_{q2}} \Big( -\Psi_{q2} - E_d' - (X_q' - X_l) i_q \Big)\end{split}\]

Flux Linkage Dynamics

The following equations describe the stator flux linkage dynamics in the d and q axes:

Algebraic Equations

The following algebraic equations govern the system:

\[\begin{split}0 &=-i_d +\frac{1}{x_d''} \Big( -\psi_d + g_{d1} e_q' + (1 - g_{d1}) \psi_{d2} \Big)\\ 0&=-i_q +\frac{1}{x_q''} \Big( -\psi_q - g_{q1} e_d' + (1 - g_{q1}) \psi_{q2} \Big)\\ 0&= R_s i_d + (1 + \Delta \omega) \Psi_q + v_d \\ 0&= R_s i_q - (1 + \Delta \omega) \Psi_d + v_q \\ g_{d1} &= \frac{x_d'' - x_l}{x_d' - x_l}\\ g_{q1} &= \frac{x_q'' - x_l}{x_q' - x_l}\\ g_{d2} &= \frac{1 - g_{d1}}{x_d' - x_l}\\ g_{q2} &= \frac{1 - g_{q1}}{x_q' - x_l}\end{split}\]
_type = 'Synchronous_machine'
_name = 'Synchronous_machine_subtransient_model_Sauer_Pai_6th_order'
e_dprim
e_qprim
psid2
psiq2
x_l
gd1
gq1
gd2
gq2
x_dprim
x_qprim
T_dprim
T_qprim
x_dsec
x_qsec
T_dsec
T_qsec
sauer_pai_6(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX, psid: casadi.SX, psiq: casadi.SX)[source]

Sauer and Pai model. :param dae: :type dae: DAE :param i_d: :type i_d: casadi.SX :param i_q: :type i_q: casadi.SX :param psid: :type psid: casadi.SX :param psiq: :type psiq: casadi.SX

Returns:

  • Args – psid (): psiq ():

Parameters:
fgcall(dae: pydynamicestimator.system.Dae) None[source]

A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class

Parameters:

dae – an instance of a class Dae

Returns:

None

Return type:

None