pydynamicestimator.devices.static
Classes
Dynamic or static device modeled in rectangular coordinates. Used as a parent class |
|
Dynamic or static device modeled in rectangular coordinates. Used as a parent class |
|
This model implements the infinite bus with current balance equations. Resistance |
|
ZIP static load. The shares of Z, I, and P (z_share, i_share, p_share) in the overall load need to be specified, |
Module Contents
- class pydynamicestimator.devices.static.StaticLoadPower[source]
Bases:
pydynamicestimator.devices.device.DeviceRect
Dynamic or static device modeled in rectangular coordinates. Used as a parent class for all devices modeled in rectangular coordinates.
- properties
Flags for method calls (e.g., ‘gcall’, ‘fcall’).
- Type:
dict[str, bool]
- xf
Final state results for simulation/estimation.
- Type:
dict[str, np.ndarray]
- xinit
Initial state values for all devices of the instance.
- Type:
dict[State, list[float]]
- xmin
Minimum limited state value.
- Type:
list[float]
- xmax
Maximum limited state value.
- Type:
list[float]
- _params
Device parameters, such as rated voltage, power, and frequency and internal parameters.
- Type:
dict[str, float]
- _data
Additional data which will be used in a list, one entry for each device of this object instance.
- Type:
dict[str, str]
- bus
Buses where the device is connected. Each device has an entry in the list.
- Type:
list[Optional[str]]
- states
State variables.
- Type:
list[States]
- units
Units of state variables.
- Type:
list[States]
- ns
Total number of states in the model.
- Type:
float
- _states_noise
Noise for each state variable.
- Type:
dict[States, float]
- _states_init_error
Initial error for each state variable.
- Type:
dict[States, float]
- vre
Order of the real voltage value for each device in the overall DAE model.
- Type:
list[float]
- vim
Order of the real voltage value for each device in the overall DAE model.
- Type:
list[float]
- _algebs
Algebraic variables (‘vre’, ‘vim’).
- Type:
list[str]
- _descr
Descriptions for key parameters.
- Type:
dict[str, str]
- _type = 'Static_load_power'
- _name = 'Static_load_power'
- p
- q
- gcall(dae: system.Dae) None [source]
- Parameters:
dae (system.Dae)
- Return type:
None
- fgcall(dae: 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.static.StaticLoadImpedance[source]
Bases:
pydynamicestimator.devices.device.DeviceRect
Dynamic or static device modeled in rectangular coordinates. Used as a parent class for all devices modeled in rectangular coordinates.
- properties
Flags for method calls (e.g., ‘gcall’, ‘fcall’).
- Type:
dict[str, bool]
- xf
Final state results for simulation/estimation.
- Type:
dict[str, np.ndarray]
- xinit
Initial state values for all devices of the instance.
- Type:
dict[State, list[float]]
- xmin
Minimum limited state value.
- Type:
list[float]
- xmax
Maximum limited state value.
- Type:
list[float]
- _params
Device parameters, such as rated voltage, power, and frequency and internal parameters.
- Type:
dict[str, float]
- _data
Additional data which will be used in a list, one entry for each device of this object instance.
- Type:
dict[str, str]
- bus
Buses where the device is connected. Each device has an entry in the list.
- Type:
list[Optional[str]]
- states
State variables.
- Type:
list[States]
- units
Units of state variables.
- Type:
list[States]
- ns
Total number of states in the model.
- Type:
float
- _states_noise
Noise for each state variable.
- Type:
dict[States, float]
- _states_init_error
Initial error for each state variable.
- Type:
dict[States, float]
- vre
Order of the real voltage value for each device in the overall DAE model.
- Type:
list[float]
- vim
Order of the real voltage value for each device in the overall DAE model.
- Type:
list[float]
- _algebs
Algebraic variables (‘vre’, ‘vim’).
- Type:
list[str]
- _descr
Descriptions for key parameters.
- Type:
dict[str, str]
- _type = 'Static_load_impedance'
- _name = 'Static_load_impedance'
- g
- b
- gcall(dae: system.Dae)[source]
- Parameters:
dae (system.Dae)
- fgcall(dae: 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: system.Dae) None [source]
Initialize the device by setting up setpoints, initial states based on the power flow solution. :param dae: The DAE object used to simulate the system. :type dae: Dae
- Parameters:
dae (system.Dae)
- Return type:
None
- class pydynamicestimator.devices.static.StaticInfiniteBus[source]
Bases:
pydynamicestimator.devices.device.DeviceRect
This model implements the infinite bus with current balance equations. Resistance and reactance need to be set and the voltage values get calculated during initialization.
- r
Resistance value
- Type:
np.ndarray
- x
Reactance value
- Type:
np.ndarray
- vre_int
Internal voltage value
- Type:
np.ndarray
- vim_int
Internal voltage value
- Type:
np.ndarray
\begin{aligned} i_{re} &= \frac{1}{r^2 + x^2} \left( (v_{re} - v_{re}^{\text{int}}) r + (v_{im} - v_{im}^{\text{int}}) x \right) \\ i_{im} &= \frac{1}{r^2 + x^2} \left( -\left(v_{re} - v_{re}^{\text{int}}\right) x + \left(v_{im} - v_{im}^{\text{int}}\right) r \right) \end{aligned}- _type = 'Infinite_bus'
- _name = 'Infinite_bus'
- vre_int
- vim_int
- r
- x
- gcall(dae: system.Dae)[source]
- Parameters:
dae (system.Dae)
- fgcall(dae: 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.static.StaticZIP[source]
Bases:
pydynamicestimator.devices.device.DeviceRect
ZIP static load. The shares of Z, I, and P (z_share, i_share, p_share) in the overall load need to be specified, and then the inner parameters of the load will be set during the initialization to satisfy the initial power flow and the share of contributions of each load tape. The shares need to sum up to one for the initialization to work perfectly. Positive reactive current i_q means consumption.
\begin{aligned} i_{re} &= \left(\frac{{p}v_{re} + {q} v_{im}}{v_{re}^2 + v_{im}^2}\right) + (g v_{re} - b v_{im}) + (\cos{\theta} i_d + \sin{\theta} i_q)\\ i_{re} &=\left(\frac{{p}v_{im} - {q} v_{re}}{v_{re}^2 + v_{im}^2} \right)+ (b v_{re} + g v_{im}) + (\sin{\theta} i_q - \sin{\theta} i_d) \end{aligned}- g (np.ndarray
Conductance value
- b
Susceptance value
- Type:
np.ndarray
- p
Active power value
- Type:
np.ndarray
- q
Reactive power value
- Type:
np.ndarray
- id
Active current value
- Type:
np.ndarray
- iq
Reactive current value
- Type:
np.ndarray
Share of power load (default: 0.0)
- Type:
np.ndarray
Share of current load (default: 0.0)
- Type:
np.ndarray
Share of impedance load (default: 1.0)
- Type:
np.ndarray
- _type = 'Static_load_ZIP'
- _name = 'Static_load_ZIP'
- _setpoints_z
- _setpoints_i
- _setpoints_p
- g
- b
- p
- q
- id
- iq
- p_share
- i_share
- z_share
- gcall_i(dae: system.Dae)[source]
- Parameters:
dae (system.Dae)
- gcall_p(dae: system.Dae)[source]
- Parameters:
dae (system.Dae)
- gcall_z(dae: system.Dae)[source]
- Parameters:
dae (system.Dae)
- fgcall(dae: 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_sub(dae: system.Dae, sub: str) None [source]
- Parameters:
dae (system.Dae)
sub (str)
- Return type:
None
- finit(dae: system.Dae) None [source]
Initialize the device by setting up setpoints, initial states based on the power flow solution. :param dae: The DAE object used to simulate the system. :type dae: Dae
- Parameters:
dae (system.Dae)
- Return type:
None