pydynamicestimator.devices.inverter
Classes
Metaclass for inverters |
|
Grid-Following Inverter (with Droop) |
|
Grid-Forming Inverter (Droop-Based) |
Module Contents
- class pydynamicestimator.devices.inverter.Inverter[source]
Bases:
pydynamicestimator.devices.device.DeviceRect
Metaclass for inverters
- omega_net
- Kp
- Kq
- Kpv
- Kiv
- Kffv
- Kpc
- Kic
- Kffc
- Rv
- Lv
- Rf
- Lf
- Cf
- Rt
- Lt
- omega_f
- ns = 13
- Vfd_ext
- Vfq_ext
- ifd_ext
- ifq_ext
- itd_ext
- itq_ext
- Pc_tilde
- delta_c
- Qc_tilde
- xi_d
- xi_q
- gamma_d
- gamma_q
- Pref
- Qref
- Vref
- gcall(dae: pydynamicestimator.system.Dae) None [source]
- Parameters:
- Return type:
None
- filter_init(dae: pydynamicestimator.system.Dae)[source]
Steady-state initialization of the inverter filter. Based on methods used in https://github.com/NREL-Sienna/PowerSimulationsDynamics.jl
- Parameters:
dae (pydynamicestimator.system.Dae) – DAE object
- Returns:
Vswd (ndarray): d-component of the switching block voltage Vswq (ndarray): q-component of the switching block voltage ifd_ext (ndarray): d-component of the filter current in the network (external) dq-reference frame ifq_ext (ndarray): q-component of the filter current in the network (external) dq-reference frame Vfd_ext (ndarray): d-component of the filter voltage in the network (external) dq-reference frame Vfq_ext (ndarray): q-component of the filter voltage in the network (external) dq-reference frame itd_ext (ndarray): d-component of the terminal current in the network (external) dq-reference frame itq_ext (ndarray): q-component of the terminal current in the network (external) dq-reference frame
- Return type:
Tuple
- frequency_estimator_init(Vfd_ext: numpy.ndarray, Vfq_ext: numpy.ndarray) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray] [source]
Steady-state initialization of the frequency estimator. Based on methods used in https://github.com/NREL-Sienna/PowerSimulationsDynamics.jl
- Parameters:
Vfd_ext (ndarray) – d-component of the filter voltage in the network (external) dq-reference frame
Vfq_ext (ndarray) – q-component of the filter voltage in the network (external) dq-reference frame
- Returns:
Vfq_pll (ndarray): q-component of the filter voltage in the PLL’s dq-reference frame epsilon (ndarray): integrator state of the PLL delta_pll (ndarray): angle difference between the dq-reference frame of the PLL and the network
- Return type:
Tuple
- outer_loop_init(dae: pydynamicestimator.system.Dae, Vfd_ext: numpy.ndarray, Vfq_ext: numpy.ndarray) Tuple[numpy.ndarray, numpy.ndarray] [source]
Steady-state initialization of the inverter outer loop. Based on methods used in https://github.com/NREL-Sienna/PowerSimulationsDynamics.jl
- Parameters:
dae (pydynamicestimator.system.Dae) – DAE object
Vfd_ext (ndarray) – d-component of the filter voltage in the network (external) dq-reference frame
Vfq_ext (ndarray) – q-component of the filter voltage in the network (external) dq-reference frame
- Returns:
Pref (ndarray): active power reference Qref (ndarray): reactive power reference
- Return type:
Tuple
- inner_loop_init(dae: pydynamicestimator.system.Dae, ifd_ext: numpy.ndarray, ifq_ext: numpy.ndarray, Vfd_ext: numpy.ndarray, Vfq_ext: numpy.ndarray, Vswd: numpy.ndarray, Vswq: numpy.ndarray) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray] [source]
Steady-state initialization of the inverter inner loop. Based on methods used in https://github.com/NREL-Sienna/PowerSimulationsDynamics.jl
- Parameters:
dae (pydynamicestimator.system.Dae) – DAE object
ifd_ext (numpy.ndarray)
ifq_ext (numpy.ndarray)
Vfd_ext (numpy.ndarray)
Vfq_ext (numpy.ndarray)
Vswd (numpy.ndarray)
Vswq (numpy.ndarray)
- Returns:
delta_c Vref xi_d xi_q gamma_d gamma_q Pc_tilde Qc_tilde
- Return type:
Tuple
- finit(dae: pydynamicestimator.system.Dae)[source]
- Parameters:
- Returns:
None
- class pydynamicestimator.devices.inverter.GridFollowing[source]
Bases:
Inverter
Grid-Following Inverter (with Droop) Based on the grid-following inverter model in https://doi.org/10.1109/TPWRS.2021.3061434
The dynamic behavior of the grid-following converter is described by the following differential equations:
Converter Voltage Dynamics
\[\dot{v}_{fd_{ext}} = \frac{\omega_{b}}{c_{f}}(i_{fd_{ext}} - i_{td_{ext}}) + \omega_{net}\omega_{b}v_{fq_{ext}}\]\[\dot{v}_{fq_{ext}} = \frac{\omega_{b}}{c_{f}}(i_{fq_{ext}} - i_{tq_{ext}}) - \omega_{net}\omega_{b}v_{fd_{ext}}\]Converter Current Dynamics
\[\dot{i}_{fd_{ext}} = \frac{\omega_{b}}{l_{f}}(v_{swd} - v_{fd_{ext}}) - \frac{\omega_{b}r_{f}}{l_{f}}i_{fd_{ext}} + \omega_{net}\omega_{b}i_{fq_{ext}}\]\[\dot{i}_{fq_{ext}} = \frac{\omega_{b}}{l_{f}}(v_{swq} - v_{fq_{ext}}) - \frac{\omega_{b}r_{f}}{l_{f}}i_{fq_{ext}} - \omega_{net}\omega_{b}i_{fd_{ext}}\]Grid-Side Current Dynamics
\[\dot{i}_{td_{ext}} = \frac{\omega_b}{l_t}(v_{fd_{ext}} - v_{n_{re}}) - \frac{\omega_b r_t}{l_t}i_{td_{ext}} + \omega_{net} \omega_b i_{tq_{ext}}\]\[\dot{i}_{tq_{ext}} = \frac{\omega_b}{l_t}(v_{fq_{ext}} - v_{n_{im}}) - \frac{\omega_b r_t}{l_t}i_{tq_{ext}} - \omega_{net} \omega_b i_{td_{ext}}\]Phase-Locked Loop (PLL) Dynamics
\[\dot{\epsilon} = v_{fq_{pll}}\]\[\delta\dot{\theta}_{pll} = \omega_{b}\delta\omega_{pll}\]Power and Frequency Dynamics
\[\dot{\tilde{p}}_{c} = \omega_{f}(p_{c} - \tilde{p}_{c})\]\[\delta\dot{\theta}_{c} = \omega_{b}\delta\omega_{c}\]\[\dot{\tilde{q}}_{c} = \omega_{f}(q_{c} - \tilde{q}_{c})\]Control Dynamics
\[\dot{\xi}_{d} = v_{fd^{*}} - v_{fd_{int}}\]\[\dot{\xi}_{q} = v_{fq^{*}} - v_{fq_{int}}\]\[\dot{\gamma}_{d} = i_{fd^{*}} - i_{fd_{int}}\]\[\dot{\gamma}_{q} = i_{fq^{*}} - i_{fq_{int}}\]- _type = 'Inverter'
- _name = 'GridFollowing_inverter_model'
- epsilon
- delta_pll
- Kpll_p
- Kpll_i
- 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
- finit(dae: pydynamicestimator.system.Dae) None [source]
- Parameters:
- Returns:
None
- Return type:
None
- class pydynamicestimator.devices.inverter.GridForming[source]
Bases:
Inverter
Grid-Forming Inverter (Droop-Based) Based on the grid-forming inverter model in https://doi.org/10.1109/TPWRS.2021.3061434 The dynamic behavior of the grid-forming converter is described by the following differential equations:
Converter Voltage Dynamics
\[\dot{v}_{fd_{ext}} = \frac{\omega_{b}}{c_{f}}(i_{fd_{ext}} - i_{td_{ext}}) + \omega_{net}\omega_{b}v_{fq_{ext}}\]\[\dot{v}_{fq_{ext}} = \frac{\omega_{b}}{c_{f}}(i_{fq_{ext}} - i_{tq_{ext}}) - \omega_{net}\omega_{b}v_{fd_{ext}}\]Converter Current Dynamics
\[\dot{i}_{fd_{ext}} = \frac{\omega_{b}}{l_{f}}(v_{swd} - v_{fd_{ext}}) - \frac{\omega_{b}r_{f}}{l_{f}}i_{fd_{ext}} + \omega_{net}\omega_{b}i_{fq_{ext}}\]\[\dot{i}_{fq_{ext}} = \frac{\omega_{b}}{l_{f}}(v_{swq} - v_{fq_{ext}}) - \frac{\omega_{b}r_{f}}{l_{f}}i_{fq_{ext}} - \omega_{net}\omega_{b}i_{fd_{ext}}\]Grid-Side Current Dynamics
\[\dot{i}_{td_{ext}} = \frac{\omega_b}{l_t}(v_{fd_{ext}} - v_{n_{re}}) - \frac{\omega_b r_t}{l_t}i_{td_{ext}} + \omega_{net} \omega_b i_{tq_{ext}}\]\[\dot{i}_{tq_{ext}} = \frac{\omega_b}{l_t}(v_{fq_{ext}} - v_{n_{im}}) - \frac{\omega_b r_t}{l_t}i_{tq_{ext}} - \omega_{net} \omega_b i_{td_{ext}}\]Power and Frequency Dynamics
\[\dot{\tilde{p}}_{c} = \omega_{f}(p_{c} - \tilde{p}_{c})\]\[\delta\dot{\theta}_{c} = \omega_{b}\delta\omega_{c}\]\[\dot{\tilde{q}}_{c} = \omega_{f}(q_{c} - \tilde{q}_{c})\]Control Dynamics
\[\dot{\xi}_{d} = v_{fd^{*}} - v_{fd_{int}}\]\[\dot{\xi}_{q} = v_{fq^{*}} - v_{fq_{int}}\]\[\dot{\gamma}_{d} = i_{fd^{*}} - i_{fd_{int}}\]\[\dot{\gamma}_{q} = i_{fq^{*}} - i_{fq_{int}}\]- _type = 'Inverter'
- _name = 'GridForming_inverter_model'
- 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