hermess.tests.test_inverter_lcl_static

Validate the quasi-static LCL_static filter (filter quantities as device-private algebraics) against the dynamic LCL filter.

LCL_static is a singular-perturbation reduction that removes the fast LCL dynamics, so it is not byte-identical to dynamic LCL. The validation is:

  1. Self-consistency / machinery: LCL_static runs as a DAE (line_dyn=False), initializes, and is exactly reproducible, proving the algebraic-port plumbing (var_sym + DAE integration + routing the algebraic filter values into dae.yinit) is correct. It supports both init methods (sequential default and joint), which reach the same operating point.

  2. Quasi-static reduction (physics): slow quantities of LCL_static and dynamic LCL (same static network) are machine-identical before a disturbance and re-converge after the fast transient settles; they differ only during the fast transient. Validated for both a bus fault and a small load step.

Attributes

TS

T_END

SLOW

Functions

_build_fixture(root, filter_name, disturbance)

Copy the inverter fixture into root, select filter_name on every

_run(root, filter_name, disturbance)

_dev_state(sim, idx, state)

Trajectory of a named state for the device with the given idx.

test_lcl_static_self_consistent(tmp_path)

LCL_static runs as a DAE, initializes (sequential by default), and is

test_lcl_static_both_init_methods_agree(tmp_path, ...)

LCL_static initializes correctly under BOTH the sequential init (routing the

test_lcl_static_quasi_static_reduction(tmp_path, ...)

The slow quantities of LCL_static and dynamic LCL (same static network)

Module Contents

hermess.tests.test_inverter_lcl_static.TS = 0.005
hermess.tests.test_inverter_lcl_static.T_END = 5.0
hermess.tests.test_inverter_lcl_static.SLOW = [('GFMI4', 'Pc_tilde'), ('GFMI4', 'delta_c'), ('GFMI4', 'Qc_tilde'), ('GFLI7', 'Pc_tilde'),...
hermess.tests.test_inverter_lcl_static._build_fixture(root, filter_name, disturbance)[source]

Copy the inverter fixture into root, select filter_name on every converter, and set the disturbance ("fault" keeps the bus fault at t=4.0; "load" replaces it with a small load step at t=2.0 on a load bus).

hermess.tests.test_inverter_lcl_static._run(root, filter_name, disturbance)[source]
hermess.tests.test_inverter_lcl_static._dev_state(sim, idx, state)[source]

Trajectory of a named state for the device with the given idx.

hermess.tests.test_inverter_lcl_static.test_lcl_static_self_consistent(tmp_path)[source]

LCL_static runs as a DAE, initializes (sequential by default), and is exactly reproducible (the algebraic-port machinery is correct).

hermess.tests.test_inverter_lcl_static.test_lcl_static_both_init_methods_agree(tmp_path, monkeypatch)[source]

LCL_static initializes correctly under BOTH the sequential init (routing the algebraic filter values into dae.yinit) and the joint init (solving them as private-algebraic unknowns); both reach the same operating point.

hermess.tests.test_inverter_lcl_static.test_lcl_static_quasi_static_reduction(tmp_path, disturbance, t_dist, after_atol)[source]

The slow quantities of LCL_static and dynamic LCL (same static network) are machine-identical before the disturbance and re-converge after the fast transient settles – they differ only during the fast transient.