pydynamicestimator.devices.synchronous ====================================== .. py:module:: pydynamicestimator.devices.synchronous Classes ------- .. autoapisummary:: pydynamicestimator.devices.synchronous.Synchronous pydynamicestimator.devices.synchronous.SynchronousTransient pydynamicestimator.devices.synchronous.SynchronousSubtransient pydynamicestimator.devices.synchronous.SynchronousSubtransientSP pydynamicestimator.devices.synchronous.SynchronousSubtransientSP6 Module Contents --------------- .. py:class:: Synchronous Bases: :py:obj:`pydynamicestimator.devices.device.DeviceRect` Metaclass for SG in rectangular coordinates with TGOV1 governor and IEEEDC1 exciter .. py:attribute:: fn .. py:attribute:: H .. py:attribute:: R_s .. py:attribute:: x_d .. py:attribute:: x_q .. py:attribute:: D .. py:attribute:: f .. py:attribute:: Rd .. py:attribute:: Tch .. py:attribute:: Tsv .. py:attribute:: KA .. py:attribute:: TA .. py:attribute:: KF .. py:attribute:: TF .. py:attribute:: KE .. py:attribute:: TE .. py:attribute:: Vr_max .. py:attribute:: Vr_min .. py:attribute:: psv_max .. py:attribute:: psv_min .. py:attribute:: ns :value: 7 .. py:attribute:: delta .. py:attribute:: omega .. py:attribute:: psv .. py:attribute:: pm .. py:attribute:: Efd .. py:attribute:: Rf .. py:attribute:: Vr .. py:attribute:: Vf_ref .. py:attribute:: Pref .. py:method:: gcall(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX) -> None .. py:method:: tgov1(dae: pydynamicestimator.system.Dae) -> None TGOV1 governor model as presented in Power System Dynamics and Stability by P.W. Sauer and M.A. Pai, 2006. (page 100) :param dae: :type dae: DAE .. py:method:: ieeedc1a(dae: pydynamicestimator.system.Dae) -> None IEEEDC1 exciter and AVR model as presented in Power System Dynamics and Stability by P.W. Sauer and M.A. Pai, 2006. (page 100) :param dae: :type dae: differential-algebraic model class .. py:class:: SynchronousTransient Bases: :py:obj:`Synchronous` Transient two-axis SG with TGOV1 governor and IEEEDC1A AVR **Rotor Dynamics** .. math:: \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) **Electromagnetic Equations** .. math:: \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) **Excitation System Equations** .. math:: \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) **Turbine-Governor System Equations** .. math:: \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) .. py:attribute:: _type :value: 'Synchronous_machine' .. py:attribute:: _name :value: 'Synchronous_machine_transient_model' .. py:attribute:: e_dprim .. py:attribute:: e_qprim .. py:attribute:: x_dprim .. py:attribute:: x_qprim .. py:attribute:: T_dprim .. py:attribute:: T_qprim .. py:method:: input_current(dae: pydynamicestimator.system.Dae) -> Tuple[casadi.SX, casadi.SX] .. py:method:: two_axis(dae, i_d: casadi.SX, i_q: casadi.SX) -> None Mechanical and electrical equations for the two-axis model. :param dae: Dae :type dae: :param i_d: Stator d-current :type i_d: casadi.SX :param i_q: Stator q-current :type i_q: casadi.SX :return: None :rtype: None .. py:method:: fgcall(dae: pydynamicestimator.system.Dae) -> None A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class :param dae: an instance of a class Dae :type dae: :return: None :rtype: None .. py:class:: SynchronousSubtransient Bases: :py:obj:`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** .. math:: \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) \\ **Electromagnetic Equations** .. math:: \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) \\ **Excitation System Equations** .. math:: \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) **Turbine-Governor System Equations** .. math:: \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) .. py:attribute:: _type :value: 'Synchronous_machine' .. py:attribute:: _name :value: 'Synchronous_machine_subtransient_model' .. py:attribute:: e_dprim .. py:attribute:: e_qprim .. py:attribute:: e_dsec .. py:attribute:: e_qsec .. py:attribute:: x_dprim .. py:attribute:: x_qprim .. py:attribute:: T_dprim .. py:attribute:: T_qprim .. py:attribute:: x_dsec .. py:attribute:: x_qsec .. py:attribute:: T_dsec .. py:attribute:: T_qsec .. py:method:: input_current(dae: pydynamicestimator.system.Dae) -> Tuple[casadi.SX, casadi.SX] .. py:method:: anderson_fouad(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX) :param dae: :type dae: :param i_d: :type i_d: :param i_q: :type i_q: :return: :rtype: .. py:method:: fgcall(dae: pydynamicestimator.system.Dae) -> None A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class :param dae: an instance of a class Dae :type dae: :return: None :rtype: None .. py:class:: SynchronousSubtransientSP Bases: :py:obj:`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** .. math:: \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) **Electromagnetic Equations** The stator dynamics include the following equations for the flux linkages in the d and q axes: .. math:: \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) **Flux Linkage Dynamics** The following equations describe the stator flux linkage dynamics in the d and q axes: .. math:: \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) **Algebraic Equations** The following algebraic equations govern the system: .. math:: 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} .. py:attribute:: _type :value: 'Synchronous_machine' .. py:attribute:: _name :value: 'Synchronous_machine_subtransient_model_Sauer_Pai' .. py:attribute:: e_dprim .. py:attribute:: e_qprim .. py:attribute:: psid .. py:attribute:: psiq .. py:attribute:: psid2 .. py:attribute:: psiq2 .. py:attribute:: x_l .. py:attribute:: gd1 .. py:attribute:: gq1 .. py:attribute:: gd2 .. py:attribute:: gq2 .. py:attribute:: x_dprim .. py:attribute:: x_qprim .. py:attribute:: T_dprim .. py:attribute:: T_qprim .. py:attribute:: x_dsec .. py:attribute:: x_qsec .. py:attribute:: T_dsec .. py:attribute:: T_qsec .. py:method:: sauer_pai(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX) 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 .. py:method:: fgcall(dae: pydynamicestimator.system.Dae) -> None A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class :param dae: an instance of a class Dae :type dae: :return: None :rtype: None .. py:class:: SynchronousSubtransientSP6 Bases: :py:obj:`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** .. math:: \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) **Electromagnetic Equations** The stator dynamics include the following equations for the flux linkages in the d and q axes: .. math:: \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) **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: .. math:: 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} .. py:attribute:: _type :value: 'Synchronous_machine' .. py:attribute:: _name :value: 'Synchronous_machine_subtransient_model_Sauer_Pai_6th_order' .. py:attribute:: e_dprim .. py:attribute:: e_qprim .. py:attribute:: psid2 .. py:attribute:: psiq2 .. py:attribute:: x_l .. py:attribute:: gd1 .. py:attribute:: gq1 .. py:attribute:: gd2 .. py:attribute:: gq2 .. py:attribute:: x_dprim .. py:attribute:: x_qprim .. py:attribute:: T_dprim .. py:attribute:: T_qprim .. py:attribute:: x_dsec .. py:attribute:: x_qsec .. py:attribute:: T_dsec .. py:attribute:: T_qsec .. py:method:: sauer_pai_6(dae: pydynamicestimator.system.Dae, i_d: casadi.SX, i_q: casadi.SX, psid: casadi.SX, psiq: casadi.SX) 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 (): .. py:method:: fgcall(dae: pydynamicestimator.system.Dae) -> None A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class :param dae: an instance of a class Dae :type dae: :return: None :rtype: None