pydynamicestimator.devices.static ================================= .. py:module:: pydynamicestimator.devices.static Classes ------- .. autoapisummary:: pydynamicestimator.devices.static.StaticLoadPower pydynamicestimator.devices.static.StaticLoadImpedance pydynamicestimator.devices.static.StaticInfiniteBus pydynamicestimator.devices.static.StaticZIP Module Contents --------------- .. py:class:: StaticLoadPower Bases: :py:obj:`pydynamicestimator.devices.device.DeviceRect` Dynamic or static device modeled in rectangular coordinates. Used as a parent class for all devices modeled in rectangular coordinates. .. attribute:: properties Flags for method calls (e.g., 'gcall', 'fcall'). :type: dict[str, bool] .. attribute:: xf Final state results for simulation/estimation. :type: dict[str, np.ndarray] .. attribute:: xinit Initial state values for all devices of the instance. :type: dict[State, list[float]] .. attribute:: xmin Minimum limited state value. :type: list[float] .. attribute:: xmax Maximum limited state value. :type: list[float] .. attribute:: _params Device parameters, such as rated voltage, power, and frequency and internal parameters. :type: dict[str, float] .. attribute:: _data Additional data which will be used in a list, one entry for each device of this object instance. :type: dict[str, str] .. attribute:: bus Buses where the device is connected. Each device has an entry in the list. :type: list[Optional[str]] .. attribute:: states State variables. :type: list[States] .. attribute:: units Units of state variables. :type: list[States] .. attribute:: ns Total number of states in the model. :type: float .. attribute:: _states_noise Noise for each state variable. :type: dict[States, float] .. attribute:: _states_init_error Initial error for each state variable. :type: dict[States, float] .. attribute:: vre Order of the real voltage value for each device in the overall DAE model. :type: list[float] .. attribute:: vim Order of the real voltage value for each device in the overall DAE model. :type: list[float] .. attribute:: _algebs Algebraic variables ('vre', 'vim'). :type: list[str] .. attribute:: _descr Descriptions for key parameters. :type: dict[str, str] .. py:attribute:: _type :value: 'Static_load_power' .. py:attribute:: _name :value: 'Static_load_power' .. py:attribute:: p .. py:attribute:: q .. py:method:: gcall(dae: system.Dae) -> None .. py:method:: fgcall(dae: 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:: StaticLoadImpedance Bases: :py:obj:`pydynamicestimator.devices.device.DeviceRect` Dynamic or static device modeled in rectangular coordinates. Used as a parent class for all devices modeled in rectangular coordinates. .. attribute:: properties Flags for method calls (e.g., 'gcall', 'fcall'). :type: dict[str, bool] .. attribute:: xf Final state results for simulation/estimation. :type: dict[str, np.ndarray] .. attribute:: xinit Initial state values for all devices of the instance. :type: dict[State, list[float]] .. attribute:: xmin Minimum limited state value. :type: list[float] .. attribute:: xmax Maximum limited state value. :type: list[float] .. attribute:: _params Device parameters, such as rated voltage, power, and frequency and internal parameters. :type: dict[str, float] .. attribute:: _data Additional data which will be used in a list, one entry for each device of this object instance. :type: dict[str, str] .. attribute:: bus Buses where the device is connected. Each device has an entry in the list. :type: list[Optional[str]] .. attribute:: states State variables. :type: list[States] .. attribute:: units Units of state variables. :type: list[States] .. attribute:: ns Total number of states in the model. :type: float .. attribute:: _states_noise Noise for each state variable. :type: dict[States, float] .. attribute:: _states_init_error Initial error for each state variable. :type: dict[States, float] .. attribute:: vre Order of the real voltage value for each device in the overall DAE model. :type: list[float] .. attribute:: vim Order of the real voltage value for each device in the overall DAE model. :type: list[float] .. attribute:: _algebs Algebraic variables ('vre', 'vim'). :type: list[str] .. attribute:: _descr Descriptions for key parameters. :type: dict[str, str] .. py:attribute:: _type :value: 'Static_load_impedance' .. py:attribute:: _name :value: 'Static_load_impedance' .. py:attribute:: g .. py:attribute:: b .. py:method:: gcall(dae: system.Dae) .. py:method:: fgcall(dae: 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:method:: finit(dae: system.Dae) -> None 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 .. py:class:: StaticInfiniteBus Bases: :py:obj:`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. .. attribute:: r Resistance value :type: np.ndarray .. attribute:: x Reactance value :type: np.ndarray .. attribute:: vre_int Internal voltage value :type: np.ndarray .. attribute:: vim_int Internal voltage value :type: np.ndarray .. math:: :nowrap: \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} .. py:attribute:: _type :value: 'Infinite_bus' .. py:attribute:: _name :value: 'Infinite_bus' .. py:attribute:: vre_int .. py:attribute:: vim_int .. py:attribute:: r .. py:attribute:: x .. py:method:: gcall(dae: system.Dae) .. py:method:: fgcall(dae: 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:: StaticZIP Bases: :py:obj:`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. .. math:: :nowrap: \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} .. attribute:: g (np.ndarray Conductance value .. attribute:: b Susceptance value :type: np.ndarray .. attribute:: p Active power value :type: np.ndarray .. attribute:: q Reactive power value :type: np.ndarray .. attribute:: id Active current value :type: np.ndarray .. attribute:: iq Reactive current value :type: np.ndarray .. attribute:: p_share Share of power load (default: 0.0) :type: np.ndarray .. attribute:: i_share Share of current load (default: 0.0) :type: np.ndarray .. attribute:: z_share Share of impedance load (default: 1.0) :type: np.ndarray .. py:attribute:: _type :value: 'Static_load_ZIP' .. py:attribute:: _name :value: 'Static_load_ZIP' .. py:attribute:: _setpoints_z .. py:attribute:: _setpoints_i .. py:attribute:: _setpoints_p .. py:attribute:: g .. py:attribute:: b .. py:attribute:: p .. py:attribute:: q .. py:attribute:: id .. py:attribute:: iq .. py:attribute:: p_share .. py:attribute:: i_share .. py:attribute:: z_share .. py:method:: gcall_i(dae: system.Dae) .. py:method:: gcall_p(dae: system.Dae) .. py:method:: gcall_z(dae: system.Dae) .. py:method:: fgcall(dae: 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:method:: finit_sub(dae: system.Dae, sub: str) -> None .. py:method:: finit(dae: system.Dae) -> None 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