pydynamicestimator.devices.inverter_inner ========================================= .. py:module:: pydynamicestimator.devices.inverter_inner .. autoapi-nested-parse:: Inverter inner-control strategies (the cascaded voltage/current loops). The inner controller is the converter's fast actuator: it regulates the capacitor voltage to the reference ``Vcd`` from the outer voltage loop and produces the switching voltage ``Vsw`` that drives the filter. It is swapped as a *whole unit* (cascaded PI + virtual impedance), never block-by-block -- the is-a-cluster signal -- so it is a single strategy axis. See ``docs/inverter_modernization_design.md`` ยง4.3. It owns the four PI integrator states (``xi_d``/``xi_q`` voltage loop, ``gamma_d``/``gamma_q`` current loop) and the controller / virtual-impedance gains. It reads the filter capacitance/inductance (``host.Cf`` / ``host.Lf``) for the cross-coupling decoupling terms -- a cross-strategy parameter read via the host, exactly as the SG strategies read host parameters. Attributes ---------- .. autoapisummary:: pydynamicestimator.devices.inverter_inner.INNER_REGISTRY Classes ------- .. autoapisummary:: pydynamicestimator.devices.inverter_inner.InnerControl pydynamicestimator.devices.inverter_inner.Cascaded Module Contents --------------- .. py:class:: InnerControl Bases: :py:obj:`abc.ABC` Abstract base class for inverter inner-control strategies. :meth:`fgcall` consumes the converter-frame internal quantities (from the host's Park transforms), the converter frequency ``omega_c`` and the voltage reference ``Vcd``, writes its PI integrator state equations into ``dae.f``, and returns the switching voltage ``(Vswd, Vswq)`` in the network frame (consumed by the filter strategy). .. py:method:: states() -> List[str] :abstractmethod: .. py:method:: algebs() -> List[str] .. py:method:: algebs_units() -> Dict[str, str] .. py:method:: algebs_noise() -> Dict[str, float] .. py:method:: algebs_x0() -> Dict[str, float] .. py:method:: units() -> List[str] :abstractmethod: .. py:method:: params() -> Dict[str, float] :abstractmethod: .. py:method:: states_noise() -> Dict[str, float] :abstractmethod: .. py:method:: states_init_error() -> Dict[str, float] :abstractmethod: .. py:method:: x0() -> Dict[str, float] :abstractmethod: .. py:method:: descriptions() -> Dict[str, str] :abstractmethod: .. py:method:: fgcall(host, dae: pydynamicestimator.system.Dae, internals, omega_c, delta_c) :abstractmethod: Run the inner control. ``internals`` is a dict of the converter-frame quantities {"Vfd","Vfq","itd","itq","ifd","ifq"}; the voltage command is read via ``host.voltage_command(dae)``. Publishes the switching voltage on ``host.Vswd``/``host.Vswq`` (read by the filter via ``host.switching_voltage(dae)``) and the current references on ``host.ifd_ref``/``host.ifq_ref`` (via ``host.current_ref(dae)``); writes the integrator state equations into ``dae.f``. .. py:method:: requires() -> Set[str] Plant capability tags this controller needs from the filter (checked at construction, warning on mismatch). Empty by default. .. py:method:: finit_sequential(host, dae: pydynamicestimator.system.Dae, filt, omega_c) -> Dict[str, numpy.ndarray] :abstractmethod: Steady-state init of the control loop. ``filt`` is the filter strategy's init dict (op-point + Vsw); ``omega_c`` is the synchronizing frequency from the angle source. Returns the integrator states plus the frame angle ``delta_c`` and the voltage command ``Vcd`` -- handed by the host to the angle (the delta_c slot) and the voltage controller (which unpacks Vcd). .. py:class:: Cascaded Bases: :py:obj:`InnerControl` Cascaded voltage + current PI control with virtual impedance. Voltage loop (xi): regulates the capacitor voltage to ``Vcd`` (minus the virtual-impedance drop), producing the filter-current reference. Current loop (gamma): regulates the filter current, producing the switching voltage. With the cross-coupling decoupling and feed-forward terms. Byte-identical to the control ladder previously inlined in ``Inverter.fgcall``. .. py:method:: states() -> List[str] .. py:method:: units() -> List[str] .. py:method:: params() -> Dict[str, float] .. py:method:: states_noise() -> Dict[str, float] .. py:method:: states_init_error() -> Dict[str, float] .. py:method:: x0() -> Dict[str, float] .. py:method:: descriptions() -> Dict[str, str] .. py:method:: fgcall(host, dae: pydynamicestimator.system.Dae, internals, omega_c, delta_c) Run the inner control. ``internals`` is a dict of the converter-frame quantities {"Vfd","Vfq","itd","itq","ifd","ifq"}; the voltage command is read via ``host.voltage_command(dae)``. Publishes the switching voltage on ``host.Vswd``/``host.Vswq`` (read by the filter via ``host.switching_voltage(dae)``) and the current references on ``host.ifd_ref``/``host.ifq_ref`` (via ``host.current_ref(dae)``); writes the integrator state equations into ``dae.f``. .. py:method:: requires() -> Set[str] Plant capability tags this controller needs from the filter (checked at construction, warning on mismatch). Empty by default. .. py:method:: finit_sequential(host, dae: pydynamicestimator.system.Dae, filt, omega_c) -> Dict[str, numpy.ndarray] Steady-state of the cascaded control ladder. Solves the 6 conditions (the four PI integrators steady + the two switching-voltage matches) for the frame angle ``delta_c``, the voltage command ``Vcd`` and the four integrators. ``Pc_tilde/Qc_tilde`` are NOT solved here -- they are the frame-invariant powers, computed by the host from the filter op-point. This is the first six (decoupled) rows of the previous 8x8 inner_loop_init, so the roots are bit-identical. .. py:data:: INNER_REGISTRY :type: Dict[str, type]