pydynamicestimator.devices.inverter_inner

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

INNER_REGISTRY

Classes

InnerControl

Abstract base class for inverter inner-control strategies.

Cascaded

Cascaded voltage + current PI control with virtual impedance.

Module Contents

class pydynamicestimator.devices.inverter_inner.InnerControl[source]

Bases: abc.ABC

Abstract base class for inverter inner-control strategies.

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).

abstract states() List[str][source]
Return type:

List[str]

algebs() List[str][source]
Return type:

List[str]

algebs_units() Dict[str, str][source]
Return type:

Dict[str, str]

algebs_noise() Dict[str, float][source]
Return type:

Dict[str, float]

algebs_x0() Dict[str, float][source]
Return type:

Dict[str, float]

abstract units() List[str][source]
Return type:

List[str]

abstract params() Dict[str, float][source]
Return type:

Dict[str, float]

abstract states_noise() Dict[str, float][source]
Return type:

Dict[str, float]

abstract states_init_error() Dict[str, float][source]
Return type:

Dict[str, float]

abstract x0() Dict[str, float][source]
Return type:

Dict[str, float]

abstract descriptions() Dict[str, str][source]
Return type:

Dict[str, str]

abstract fgcall(host, dae: pydynamicestimator.system.Dae, internals, omega_c, delta_c)[source]

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.

Parameters:

dae (pydynamicestimator.system.Dae)

requires() Set[str][source]

Plant capability tags this controller needs from the filter (checked at construction, warning on mismatch). Empty by default.

Return type:

Set[str]

abstract finit_sequential(host, dae: pydynamicestimator.system.Dae, filt, omega_c) Dict[str, numpy.ndarray][source]

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).

Parameters:

dae (pydynamicestimator.system.Dae)

Return type:

Dict[str, numpy.ndarray]

class pydynamicestimator.devices.inverter_inner.Cascaded[source]

Bases: 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.

states() List[str][source]
Return type:

List[str]

units() List[str][source]
Return type:

List[str]

params() Dict[str, float][source]
Return type:

Dict[str, float]

states_noise() Dict[str, float][source]
Return type:

Dict[str, float]

states_init_error() Dict[str, float][source]
Return type:

Dict[str, float]

x0() Dict[str, float][source]
Return type:

Dict[str, float]

descriptions() Dict[str, str][source]
Return type:

Dict[str, str]

fgcall(host, dae: pydynamicestimator.system.Dae, internals, omega_c, delta_c)[source]

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.

Parameters:

dae (pydynamicestimator.system.Dae)

requires() Set[str][source]

Plant capability tags this controller needs from the filter (checked at construction, warning on mismatch). Empty by default.

Return type:

Set[str]

finit_sequential(host, dae: pydynamicestimator.system.Dae, filt, omega_c) Dict[str, numpy.ndarray][source]

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.

Parameters:

dae (pydynamicestimator.system.Dae)

Return type:

Dict[str, numpy.ndarray]

pydynamicestimator.devices.inverter_inner.INNER_REGISTRY: Dict[str, type]