VeraGridEngine.Templates.Rms package

Submodules

VeraGridEngine.Templates.Rms.bus_complex_rms_template module

class VeraGridEngine.Templates.Rms.bus_complex_rms_template.BusComplexRmsTemplate(vf: VarFactory, is_dc: bool = False, name: str = 'rms_bus_complex_template')[source]

Bases: RmsModelTemplate

Complex phasor-based RMS template for buses using a single complex voltage variable.

This template represents bus voltage as a single complex variable V = Vr + j*Vi instead of separate real and imaginary components. The complex representation enables truly multilinear current equations in the network.

For compilation purposes, the complex variable is split into real and imaginary parts, but symbolically it remains a single complex entity.

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
I_complex
Ii
Ir
P
Q
V_complex
Vi
Vr
tpe: DeviceType
VeraGridEngine.Templates.Rms.bus_complex_rms_template.complex_to_polar(V: complex) Tuple[float, float][source]

Convert complex phasor to polar coordinates (magnitude, angle).

Parameters:

V – Complex voltage in p.u.

Returns:

Tuple of (Vm, Va) where Va is in radians

VeraGridEngine.Templates.Rms.bus_complex_rms_template.complex_to_real_imag(V: complex) Tuple[float, float][source]

Convert complex phasor to real and imaginary components.

Parameters:

V – Complex voltage V = Vr + j*Vi

Returns:

Tuple of (Vr, Vi)

VeraGridEngine.Templates.Rms.bus_complex_rms_template.get_bus_complex_rms_algebraic_vars(bus_rms_model: Block) Tuple[Var, Var][source]

Get the algebraic variables (Vr, Vi) from the complex bus model.

Parameters:

bus_rms_model – The block containing the bus model

Returns:

Tuple of (Vr, Vi) RMS variables

VeraGridEngine.Templates.Rms.bus_complex_rms_template.get_bus_complex_voltage(bus_rms_model: Block) Var[source]

Get the complex voltage variable from the bus model.

Parameters:

bus_rms_model – The block containing the bus model

Returns:

Complex voltage variable

VeraGridEngine.Templates.Rms.bus_complex_rms_template.initialize_bus_complex_rms(bus: Bus, vf: VarFactory)[source]

Initialize the complex phasor-based RMS model for a bus.

Parameters:
  • bus – Bus device

  • vf – VarFactory for creating variables

Returns:

None

VeraGridEngine.Templates.Rms.bus_complex_rms_template.polar_to_complex(Vm: float, Va: float) complex[source]

Convert polar coordinates (magnitude, angle) to complex phasor.

Parameters:
  • Vm – Voltage magnitude in p.u.

  • Va – Voltage angle in radians

Returns:

Complex voltage V = Vm * exp(j*Va)

VeraGridEngine.Templates.Rms.bus_complex_rms_template.real_imag_to_complex(Vr: float, Vi: float) complex[source]

Convert real and imaginary components to complex phasor.

Parameters:
  • Vr – Real part of voltage

  • Vi – Imaginary part of voltage

Returns:

Complex voltage V = Vr + j*Vi

VeraGridEngine.Templates.Rms.bus_phasor_rms_template module

class VeraGridEngine.Templates.Rms.bus_phasor_rms_template.BusPhasorRmsTemplate(vf: VarFactory, is_dc: bool = False, name: str = 'rms_bus_phasor_template')[source]

Bases: RmsModelTemplate

Phasor-based RMS template for buses using real and imaginary voltage components.

This template represents bus voltage as V = Vr + j*Vi instead of polar coordinates (Vm, Va). This representation makes line equations linear in the voltage variables.

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
Vi
Vr
tpe: DeviceType
VeraGridEngine.Templates.Rms.bus_phasor_rms_template.check_empty_bus(bus_rms_model: Block)[source]

Check if the bus model has no algebraic variables.

VeraGridEngine.Templates.Rms.bus_phasor_rms_template.get_bus_phasor_rms_algebraic_vars(bus_rms_model: Block) Tuple[Var, Var][source]

Get the algebraic variables (Vr, Vi) from the phasor bus model.

Parameters:

bus_rms_model – The block containing the bus model

Returns:

Tuple of (Vr, Vi) RMS variables

VeraGridEngine.Templates.Rms.bus_phasor_rms_template.initialize_bus_phasor_rms(bus: Bus, vf: VarFactory)[source]

Initialize the phasor-based RMS model for a bus.

Parameters:
  • bus – Bus device

  • vf – VarFactory for creating variables

Returns:

None

VeraGridEngine.Templates.Rms.bus_phasor_rms_template.phasor_to_polar(Vr: float, Vi: float) Tuple[float, float][source]

Convert phasor (real, imaginary) to polar coordinates (magnitude, angle).

Parameters:
  • Vr – Real part of voltage in p.u.

  • Vi – Imaginary part of voltage in p.u.

Returns:

Tuple of (Vm, Va)

VeraGridEngine.Templates.Rms.bus_phasor_rms_template.polar_to_phasor(Vm: float, Va: float) Tuple[float, float][source]

Convert polar coordinates (magnitude, angle) to phasor (real, imaginary).

Parameters:
  • Vm – Voltage magnitude in p.u.

  • Va – Voltage angle in radians

Returns:

Tuple of (Vr, Vi)

VeraGridEngine.Templates.Rms.common module

VeraGridEngine.Templates.Rms.common.create_block_of_type(var_factory: VarFactory, block_type: BlockType, item_name: str = '') Block | None[source]

Create a Block appropriate for block_type.

VeraGridEngine.Templates.Rms.common.create_emt_wizard_block(phase_n: bool, phase_a: bool, phase_b: bool, phase_c: bool, var_factory: VarFactory, block_type: BlockType, item_name: str)[source]
Parameters:
  • phase_n

  • phase_a

  • phase_b

  • phase_c

  • var_factory

  • block_type

  • item_name

Returns:

Return type:

VeraGridEngine.Templates.Rms.common.create_generic_block(var_factory: VarFactory, state_inputs: int, state_outputs: Sequence[str], algebraic_inputs: int, algebraic_outputs: Sequence[str])[source]
Parameters:
  • var_factory

  • state_inputs

  • state_outputs

  • algebraic_inputs

  • algebraic_outputs

Returns:

VeraGridEngine.Templates.Rms.common.create_sum_block(var_factory: VarFactory, item_name: str) Block | None[source]

VeraGridEngine.Templates.Rms.dc_voltage_source module

VeraGridEngine.Templates.Rms.dc_voltage_source.DCCurrentSource(vfactory: VarFactory, Vdc, name: str = '') RmsModelTemplate[source]

Builds an RMS model template for a DC current source with capacitive filtering.

Models a DC current source (e.g., fuel cell, grid-connected inverter) connected through a DC-link capacitor and series resistance. The model captures the DC-side dynamics and power injection into the AC grid.

The circuit consists of: - DC voltage source (Vpv) with internal resistance (Rpv) - DC-link capacitor (C) for energy storage and ripple filtering - DC current (Idc) and power (Pdc) output to the converter

The differential-algebraic equations governing the system:
  • Algebraic: Pdc = Idc * Vdc (power balance)

  • Algebraic: Vpv = Vpv0 (source voltage)

  • Differential: C*dVdc/dt + Idc = (Vpv - Vdc)/Rpv (capacitor dynamics)

Args:

Vdc: DC voltage variable (pu) name (str): Name of the DC voltage source model

Returns:

RmsModelTemplate: Configured RMS model template for DC voltage source simulation

VeraGridEngine.Templates.Rms.dc_voltage_source.DCPVSourceAveraged(vfactory: VarFactory, Vdc, name: str = '') RmsModelTemplate[source]

Averaged PV source with MPPT-like voltage reference and DC-link capacitor.

Model structure: - Irradiance/temperature dependent available PV current (Ipv_av) - MPPT voltage reference set to estimated Vmp - Averaged boost relation to inject DC current into the link - DC-link capacitor dynamics: Cdc * dVdc/dt + Idc - Idc_src = 0

VeraGridEngine.Templates.Rms.dc_voltage_source.DCPowerLimitedSource(vfactory: VarFactory, Vdc, name: str = '') RmsModelTemplate[source]

RMS DC source driven by a power reference with saturation.

This model injects a commanded DC power into the DC-link while limiting the requested power with hard saturation:

P_cmd = hard_sat(Pdc_ref0, -Pmax, Pmax) Idc_src = P_cmd / (Vdc + eps_v)

DC-link dynamics are then:

C * dVdc/dt + Idc - Idc_src = 0

where Pdc = Idc * Vdc is the converter-side DC power variable.

VeraGridEngine.Templates.Rms.dc_voltage_source.DCSimpleSourceAveraged(vfactory: VarFactory, Vdc, name: str = '') RmsModelTemplate[source]

Simplified averaged DC source with a DC-link capacitor.

Model structure: - A controlled or fixed DC current source injects current into the DC link. - The converter extracts active power from the DC link. - A parallel DC resistance models losses/damping. - The DC-link capacitor defines the Vdc dynamic state.

The core equation is:

Cdc * dVdc/dt = Idc_src - Idc_conv - Vdc / Rdc

with:

Pdc = Vdc * Idc_conv

Sign convention: - Idc_src > 0 injects current into the DC link. - Idc_conv > 0 means the converter extracts power from the DC link. - Pdc > 0 means active power is delivered from DC side to AC side.

VeraGridEngine.Templates.Rms.dc_voltage_source.DCVoltageSource(vfactory: VarFactory, Vdc, name: str = '') RmsModelTemplate[source]

Builds an RMS model template for a DC voltage source with capacitive filtering.

Models a DC voltage source (e.g., photovoltaic array, battery) connected through a DC-link capacitor and series resistance. The model captures the DC-side dynamics and power injection into the AC grid.

The circuit consists of: - DC voltage source (Vpv) with internal resistance (Rpv) - DC-link capacitor (C) for energy storage and ripple filtering - DC current (Idc) and power (Pdc) output to the converter

The differential-algebraic equations governing the system:
  • Algebraic: Pdc = Idc * Vdc (power balance)

  • Algebraic: Vpv = Vpv0 (source voltage)

  • Differential: C*dVdc/dt + Idc = (Vpv - Vdc)/Rpv (capacitor dynamics)

Args:

Vdc: DC voltage variable (pu) name (str): Name of the DC voltage source model

Returns:

RmsModelTemplate: Configured RMS model template for DC voltage source simulation

VeraGridEngine.Templates.Rms.esd1_rms_template module

VeraGridEngine.Templates.Rms.esd1_rms_template.get_esd1_rms_template(vfactory: VarFactory, name: str = 'ESD1 RMS template') RmsModelTemplate[source]

ESD1-inspired RMS battery energy storage model.

The model provides: - P/Q setpoint channels (pref0, pext0, qref0) - SoC-dependent active-power availability (charge/discharge windows) - Current-command limiting with P/Q priority - First-order output current dynamics - SoC dynamic state with charge/discharge efficiencies

Sign convention used here: - P > 0: battery discharging (injecting power into AC grid) - P < 0: battery charging (absorbing power from AC grid)

VeraGridEngine.Templates.Rms.generation_tensygrid_ml module

VeraGridEngine.Templates.Rms.generation_tensygrid_ml.ExciterBuild(vfactory: VarFactory, name: str = '', hard_sat_type: str = 'ml') RmsModelTemplate[source]
Parameters:

name

Returns:

VeraGridEngine.Templates.Rms.generation_tensygrid_ml.GenqecBuild(vfactory: VarFactory, name: str = '', hard_sat_type: str = 'ml') RmsModelTemplate[source]

generator with quadratic saturation

VeraGridEngine.Templates.Rms.generation_tensygrid_ml.GovernorBuild(vfactory: VarFactory, name: str = '', hard_sat_type: str = 'ml') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.generation_tensygrid_ml.OELBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
Parameters:

name

Returns:

VeraGridEngine.Templates.Rms.generation_tensygrid_ml.StabilizerBuild(vfactory: VarFactory, name: str = '', hard_sat_type: str = 'ml') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.generation_tensygrid_ml.get_complete_generator_template(vfactory: VarFactory, name: str = 'complete generator rms template', implicit: bool = False, hard_sat_type: str = 'ml') RmsModelTemplate[source]
Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template module

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.OELBuild(vfactory: VarFactory, name: str = 'OEL') RmsModelTemplate[source]
Parameters:

name

Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.get_complete_generator_template_rms(vfactory: VarFactory, name='complete_generator_rms_template') RmsModelTemplate[source]
Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.get_exciter_rms(vfactory: VarFactory, name: str = 'exciter') RmsModelTemplate[source]
Parameters:
  • vfactory

  • name

Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.get_genqec_rms(vfactory: VarFactory, name: str = 'Genqec_rms_template') RmsModelTemplate[source]

generator with quadratic saturation

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.get_governor_rms(vfactory: VarFactory, name: str = 'Governor') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template.get_stabilizer_rms(vfactory: VarFactory, name: str = 'stabilizer') RmsModelTemplate[source]

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references module

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.OELBuild(vfactory: VarFactory, name: str = 'OEL') RmsModelTemplate[source]
Parameters:

name

Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.get_complete_generator_template_rms(vfactory: VarFactory, name='complete generator rms template') RmsModelTemplate[source]
Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.get_exciter_rms(vfactory: VarFactory, name: str = 'exciter') RmsModelTemplate[source]
Parameters:
  • vfactory

  • name

Returns:

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.get_genqec_rms(vfactory: VarFactory, name: str = 'Genqec rms template') RmsModelTemplate[source]

generator with quadratic saturation

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.get_governor_rms(vfactory: VarFactory, name: str = 'Governor') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_references.get_stabilizer_rms(vfactory: VarFactory, name: str = 'stabilizer') RmsModelTemplate[source]

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2 module

Alternative complete generator RMS template with explicit controller states.

This module keeps the generator model from the original template and only rebuilds the controller sections with explicit state equations so the small-signal DAE formulation exposes the controller modes as finite eigenvalues.

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.OELBuild(vfactory: VarFactory, name: str = 'OEL') tuple[Block, Var][source]

Return the original OEL builder.

The complete generator template in this module does not currently wire the OEL into the composed model. The original implementation is therefore reused verbatim to avoid changing unrelated behavior.

Parameters:
  • vfactory – Shared symbolic variable factory.

  • name – Model name.

Returns:

OEL block and its output variable.

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.get_complete_generator_template_rms(vfactory: VarFactory, name: str = 'complete_generator_rms_template') RmsModelTemplate[source]

Build the complete generator using the explicit-state controller variants.

Parameters:
  • vfactory – Shared symbolic variable factory.

  • name – Model name.

Returns:

Complete generator RMS template.

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.get_exciter_rms(vfactory: VarFactory, name: str = 'exciter') RmsModelTemplate[source]

Build the exciter with explicit dynamic states.

The AVR, rate feedback, and exciter field stages are rewritten as explicit states. This preserves the original algebraic nonlinearities while making the controller dynamics visible to the small-signal state matrix.

Parameters:
  • vfactory – Shared symbolic variable factory.

  • name – Model name.

Returns:

Exciter RMS template.

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.get_genqec_rms(vfactory: VarFactory, name: str = 'Genqec_rms_template') RmsModelTemplate[source]

generator with quadratic saturation

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.get_governor_rms(vfactory: VarFactory, name: str = 'Governor') RmsModelTemplate[source]

Build the governor with explicit dynamic states.

The original template relied on helper transfer-function blocks whose internal dynamics were stored as derivative variables attached to algebraic variables. The small-signal assembler only guarantees finite modes for explicit state_vars. This version therefore rewrites every dynamic governor stage as an explicit first-order state.

Parameters:
  • vfactory – Shared symbolic variable factory.

  • name – Model name.

Returns:

Governor RMS template.

VeraGridEngine.Templates.Rms.genqec_exc_gov_sat_template_v2.get_stabilizer_rms(vfactory: VarFactory, name: str = 'stabilizer') RmsModelTemplate[source]

Build the PSS with explicit dynamic states.

The stabilizer chain is rewritten in state-space form so the transducer, washout, second-order notch, and two lead-lag stages are all explicit states visible to the small-signal formulation.

Parameters:
  • vfactory – Shared symbolic variable factory.

  • name – Model name.

Returns:

Stabilizer RMS template.

VeraGridEngine.Templates.Rms.genqec_phasor_rms_template module

Generator template (genqec) for phasor-based RMS simulation.

This template accepts Vr, Vi (phasor voltage components) as inputs instead of Vm, Va (polar coordinates). This allows direct connection to phasor bus models without coordinate conversion.

VeraGridEngine.Templates.Rms.genqec_phasor_rms_template.get_complete_generator_template_phasor(vfactory: VarFactory, name='complete generator phasor rms template', hard_sat_type: str = 'ml') RmsModelTemplate[source]

Complete generator template with governor, exciter, and stabilizer for phasor-based RMS simulation.

This is the phasor version that accepts Vr, Vi (phasor voltage components) as inputs instead of Vm, Va. The governor, exciter, and stabilizer models are internally connected to the generator. The exciter’s Vm input is computed internally as Vm = sqrt(Vr^2 + Vi^2).

Uses models from generation_tensygrid_ml.py (GenqecBuild, GovernorBuild, StabilizerBuild, ExciterBuild).

Args:

vfactory: VarFactory instance for creating variables name: Name of the template

Returns:

RmsModelTemplate: Complete generator model template for phasor simulation

VeraGridEngine.Templates.Rms.genqec_phasor_rms_template.get_genqec_phasor(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

Generator with quadratic saturation for phasor-based RMS simulation.

This version accepts Vr, Vi (phasor voltage components) as inputs instead of Vm, Va. The dq-frame voltages are computed directly from Vr, Vi using Park transformation: - Vd = Vr * sin(delta) - Vi * cos(delta) - Vq = Vr * cos(delta) + Vi * sin(delta)

Args:

vfactory: VarFactory instance for creating variables name: Name suffix for the template

Returns:

RmsModelTemplate: Generator model template for phasor simulation

VeraGridEngine.Templates.Rms.genrow1_rms_template module

VeraGridEngine.Templates.Rms.genrow1_rms_template.get_genrow1_rms_template(var_factory: VarFactory, name='Genrow rms template') RmsModelTemplate[source]

Get the RMS template model of the Genrow :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.genrow2_rms_template module

VeraGridEngine.Templates.Rms.genrow2_rms_template.get_genrow2_rms_template(var_factory: VarFactory, name='Genrow rms template') RmsModelTemplate[source]

Get the RMS template model of the Genrow :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.genrow3_rms_template module

VeraGridEngine.Templates.Rms.genrow3_rms_template.get_genrow3_rms_template(var_factory: VarFactory, name='Genrow rms template') RmsModelTemplate[source]

Get the RMS template model of the Genrow :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.genrow4_rms_template module

VeraGridEngine.Templates.Rms.genrow4_rms_template.get_genrow4_rms_template(var_factory: VarFactory, name='Genrow rms template') RmsModelTemplate[source]

Get the RMS template model of the Genrow :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.genrow_rms_template module

VeraGridEngine.Templates.Rms.genrow_rms_template.get_genrow_rms_template(vfactory: VarFactory, name='Genrow rms template') RmsModelTemplate[source]

Get the RMS template model of the Genrow :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.hvdc_rms_template module

class VeraGridEngine.Templates.Rms.hvdc_rms_template.HvdcRmsTemplate(nc: NumericalCircuit, hvdc: HvdcLine, hvdc_idx: int, vf: VarFactory, name: str = 'hvdc_rms_template')[source]

Bases: RmsModelTemplate

RMS Template for HVDC Line with fixed power setpoint control.

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
tpe: DeviceType
VeraGridEngine.Templates.Rms.hvdc_rms_template.initialize_hvdc_rms(hvdc: HvdcLine, hvdc_idx: int, vf: VarFactory, nc: NumericalCircuit)[source]

Initialize the RMS model for an HVDC Line

Parameters:
  • hvdc – HVDC Line device

  • hvdc_idx – Index of the HVDC in nc.hvdc_data

  • vf – VarFactory

  • nc – NumericalCircuit with compiled data

VeraGridEngine.Templates.Rms.line_complex_rms_template module

VeraGridEngine.Templates.Rms.line_complex_rms_template.calculate_complex_power(Vr: Var, Vi: Var, Ir: Var, Ii: Var) tuple[source]

Calculate complex power from voltage and current.

S = V * conj(I) = (Vr + j*Vi)*(Ir - j*Ii) P = Vr*Ir + Vi*Ii Q = Vi*Ir - Vr*Ii

Parameters:
  • Vr – Voltage real part

  • Vi – Voltage imaginary part

  • Ir – Current real part

  • Ii – Current imaginary part

Returns:

Tuple of (P, Q)

VeraGridEngine.Templates.Rms.line_complex_rms_template.get_line_complex_current_equations(Vrf: Var, Vif: Var, Vrt: Var, Vit: Var, g: Var, b: Var, bsh: Var) tuple[source]

Calculate complex current using MULTILINEAR equations.

This is the core innovation: current is linear in voltage!

Parameters:
  • Vrf – From bus voltage real part

  • Vif – From bus voltage imaginary part

  • Vrt – To bus voltage real part

  • Vit – To bus voltage imaginary part

  • g – Line conductance

  • b – Line susceptance

  • bsh – Shunt susceptance

Returns:

Tuple of (Ir_f, Ii_f, Ir_t, Ii_t) current components

VeraGridEngine.Templates.Rms.line_complex_rms_template.get_line_complex_rms_template(vfactory: VarFactory, name='Line_complex_rms_template') RmsModelTemplate[source]

Get the complex phasor-based RMS template model of the Line with TRULY MULTILINEAR equations.

This template uses complex phasor representation where: - V = Vr + j*Vi is the complex voltage - I = Y * (Vf - Vt) is the complex current (LINEAR in V!) - Y = g + j*b is the complex admittance

The key innovation is that current equations are LINEAR in voltage variables: I = (g + j*b) * ((Vrf + j*Vif) - (Vrt + j*Vit))

When expanded: Ir = g*(Vrf - Vrt) - b*(Vif - Vit) [Linear!] Ii = g*(Vif - Vit) + b*(Vrf - Vrt) [Linear!]

This is truly multilinear because there are no products of voltage variables, unlike power equations S = V * conj(I) which are bilinear.

The current balance at each node: Ξ£I = 0 is linear in all voltage variables.

Parameters:
  • vfactory – Variable factory for creating variables

  • name – Name of the template

Returns:

RmsModelTemplate with complex multilinear line equations

VeraGridEngine.Templates.Rms.line_phasor_rms_template module

VeraGridEngine.Templates.Rms.line_phasor_rms_template.get_line_phasor_rms_template(vfactory: VarFactory, name='Line_phasor_rms_template') RmsModelTemplate[source]

Get the phasor-based RMS template model of the Line using current balance.

This template uses phasor representation (Vr, Vi) for voltages and outputs currents directly for current balance equations: - Current: I = Y * (Vf - Vt) + Ysh * V

Where V = Vr + j*Vi and Y = g + j*b

Parameters:
  • vfactory – Variable factory for creating variables

  • name – Name of the template

Returns:

RmsModelTemplate with phasor-based line current equations

VeraGridEngine.Templates.Rms.line_rms_ml_template module

VeraGridEngine.Templates.Rms.line_rms_ml_template.get_line_rms_ml_template(vfactory: VarFactory, name='Line_rms_template') RmsModelTemplate[source]

Get the RMS template model of the Line :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.line_rms_template module

VeraGridEngine.Templates.Rms.line_rms_template.get_dc_line_rms_template(vfactory: VarFactory, name='DC_Line_rms_template') RmsModelTemplate[source]

Get the RMS template model of a DC line with series R-L dynamics.

VeraGridEngine.Templates.Rms.line_rms_template.get_line_rms_template(vfactory: VarFactory, name='Line_rms_template') RmsModelTemplate[source]

Get the RMS template model of the Line :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.load1_rms_template module

VeraGridEngine.Templates.Rms.load1_rms_template.get_load1_rms_template(var_factory: VarFactory, name='Load rms template') RmsModelTemplate[source]

Get the RMS template model of the Load :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.load2_rms_template module

VeraGridEngine.Templates.Rms.load2_rms_template.get_load2_rms_template(var_factory: VarFactory, name='Load rms template') RmsModelTemplate[source]

Get the RMS template model of the Load :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.load_dynamic_tap_template module

VeraGridEngine.Templates.Rms.load_exponential_template module

VeraGridEngine.Templates.Rms.load_frequency_dependent module

VeraGridEngine.Templates.Rms.load_motor_template module

VeraGridEngine.Templates.Rms.load_motor_template.MotorLoadBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

VeraGridEngine.Templates.Rms.load_phasor_current_rms_template module

VeraGridEngine.Templates.Rms.load_phasor_current_rms_template.get_load_phasor_current_rms_template(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

Get the RMS template model of the load in current-balance phasor coordinates.

This model behaves as a constant-power load (not a current source): - P = Pl0 - Q = Ql0 - I = conj(S / V), with S = P + jQ and V = Vr + jVi

Sign convention follows the rest of the RMS templates: load consumption is represented with negative injections (Pl0 < 0, Ql0 < 0).

Parameters:
  • vfactory – Variable factory for creating variables

  • name – Name of the template

Returns:

RmsModelTemplate with voltage-dependent load current model

VeraGridEngine.Templates.Rms.load_phasor_rms_template module

VeraGridEngine.Templates.Rms.load_phasor_rms_template.get_load_phasor_rms_template(vfactory: VarFactory, name='Load phasor rms template') RmsModelTemplate[source]

Get the RMS template model of the Load using phasor coordinates (Vr, Vi) :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.load_rms_template module

class VeraGridEngine.Templates.Rms.load_rms_template.LoadRmsTemplate(vf)[source]

Bases: TemplateDefinition

eval() RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.load_rms_template.get_load_rms_template(vfactory: VarFactory, name='Load rms template', pl0_init: float | None = None, ql0_init: float | None = None) RmsModelTemplate[source]

Get the RMS template model of the Load :return: RmsModelTemplate

VeraGridEngine.Templates.Rms.load_zip_template module

VeraGridEngine.Templates.Rms.pv_load_template module

VeraGridEngine.Templates.Rms.pvd1_rms_template module

VeraGridEngine.Templates.Rms.pvd1_rms_template.get_pvd1_complete_rms_template(vfactory: VarFactory, name: str = 'PVD1 complete RMS template') RmsModelTemplate[source]

More complete WECC/ANDES-like PVD1 RMS model.

Compared to get_pvd1_rms_template, this variant adds: - frequency deadband and post-deadband active-power support (fdbd, ddn), - explicit pref/pext internal summation channels, - optional active-power limiting switch (plim), - recovery multipliers with separate frequency/voltage enable flags.

Notes: - Frequency is represented by f_hz as a model variable initialized to nominal value.

A direct bus-frequency external mapping is not available in current RMS interfaces.

  • True latching tripping behavior (frflag/vrflag in the original ANDES formulation) is approximated by continuous enable factors; it does not implement memory latching.

PVD1 AC current-command framework adapted to a BESS with DC-link equivalent capacitance.

Main adaptations from the PV DC-link template: - Remove PV/MPPT channels and replace them with bidirectional battery DC power control. - Keep AC-side current control, P/Q limiting, and V/f tripping structure. - Represent stored energy on DC side through equivalent capacitance Cdc_eq and Vdc dynamics.

Sign convention: - P > 0: discharging to AC grid. - P < 0: charging from AC grid. - Pbat > 0: battery injects power into the DC link. - Pbat < 0: battery absorbs power from the DC link.

PVD1 extension with explicit PV-side and DC-link dynamics.

Main additions over get_pvd1_dc_mppt_rms_template: - PV-side voltage target Vmp(G,T) and current Imp(G,T) channels - Boost duty-cycle loop to track Vpv -> Vmp - Explicit DC-link dynamic state Vdc with power balance

VeraGridEngine.Templates.Rms.pvd1_rms_template.get_pvd1_dc_mppt_rms_template(vfactory: VarFactory, name: str = 'PVD1 DC-MPPT RMS template') RmsModelTemplate[source]

PVD1 extension with DC-side power availability and MPPT lag.

Added DC-side channels: - Pavail = Prated * (G / Gref) * (1 + kT * (Tcell - Tref)), limited to [0, Prated] - MPPT first-order tracking: dPmppt/dt = (Pavail - Pmppt) / Tmppt - Active-power command is limited by dynamic MPPT ceiling instead of a fixed pmx

This model keeps the same AC current-command framework as PVD1 while making irradiance and cell temperature directly affect active-power availability.

VeraGridEngine.Templates.Rms.pvd1_rms_template.get_pvd1_rms_template(vfactory: VarFactory, name: str = 'PVD1 RMS template') RmsModelTemplate[source]

WECC/ANDES PVD1-inspired RMS PV model.

This implementation focuses on the core current-command behavior needed for RMS studies in VeraGrid: - P/Q references to current commands - Q(V) droop outside [v0, v1] - active/reactive current hard limits with P/Q priority - simplified V/f tripping multipliers - first-order lag on output currents (tip, tiq)

VeraGridEngine.Templates.Rms.pvd1_rms_template_procedural module

VeraGridEngine.Templates.Rms.pvd1_rms_template_procedural.get_pvd1_complete_rms_template(vfactory: VarFactory, name: str = 'PVD1 complete RMS template') RmsModelTemplate[source]

More complete WECC/ANDES-like PVD1 RMS model.

Compared to get_pvd1_rms_template, this variant adds: - frequency deadband and post-deadband active-power support (fdbd, ddn), - explicit pref/pext internal summation channels, - optional active-power limiting switch (plim), - recovery multipliers with separate frequency/voltage enable flags.

Notes: - Frequency is represented by f_hz as a model variable initialized to nominal value.

A direct bus-frequency external mapping is not available in current RMS interfaces.

  • True latching tripping behavior (frflag/vrflag in the original ANDES formulation) is approximated by continuous enable factors; it does not implement memory latching.

PVD1 AC current-command framework adapted to a BESS with DC-link equivalent capacitance.

Main adaptations from the PV DC-link template: - Remove PV/MPPT channels and replace them with bidirectional battery DC power control. - Keep AC-side current control, P/Q limiting, and V/f tripping structure. - Represent stored energy on DC side through equivalent capacitance Cdc_eq and Vdc dynamics.

Sign convention: - P > 0: discharging to AC grid. - P < 0: charging from AC grid. - Pbat > 0: battery injects power into the DC link. - Pbat < 0: battery absorbs power from the DC link.

PVD1 extension with explicit PV-side and DC-link dynamics.

Main additions over get_pvd1_dc_mppt_rms_template: - PV-side voltage target Vmp(G,T) and current Imp(G,T) channels - Boost duty-cycle loop to track Vpv -> Vmp - Explicit DC-link dynamic state Vdc with power balance

VeraGridEngine.Templates.Rms.pvd1_rms_template_procedural.get_pvd1_dc_mppt_rms_template(vfactory: VarFactory, name: str = 'PVD1 DC-MPPT RMS template') RmsModelTemplate[source]

PVD1 extension with DC-side power availability and MPPT lag.

Added DC-side channels: - Pavail = Prated * (G / Gref) * (1 + kT * (Tcell - Tref)), limited to [0, Prated] - MPPT first-order tracking: dPmppt/dt = (Pavail - Pmppt) / Tmppt - Active-power command is limited by dynamic MPPT ceiling instead of a fixed pmx

This model keeps the same AC current-command framework as PVD1 while making irradiance and cell temperature directly affect active-power availability.

VeraGridEngine.Templates.Rms.pvd1_rms_template_procedural.get_pvd1_rms_template(vfactory: VarFactory, name: str = 'PVD1 RMS template') RmsModelTemplate[source]

WECC/ANDES PVD1-inspired RMS PV model.

This implementation focuses on the core current-command behavior needed for RMS studies in VeraGrid: - P/Q references to current commands - Q(V) droop outside [v0, v1] - active/reactive current hard limits with P/Q priority - simplified V/f tripping multipliers - first-order lag on output currents (tip, tiq)

VeraGridEngine.Templates.Rms.shunt_template module

VeraGridEngine.Templates.Rms.shunt_template.ShuntLoadBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.shunt_template.ShuntPhasorBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
class VeraGridEngine.Templates.Rms.shunt_template.ShuntTemplate(vf)[source]

Bases: TemplateDefinition

eval() RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.shunt_template.get_shunt_template(vfactory: VarFactory, name: str = '', phasor: bool = True) RmsModelTemplate[source]

VeraGridEngine.Templates.Rms.transformer_rms_template module

class VeraGridEngine.Templates.Rms.transformer_rms_template.TrafoPhasorRmsTemplate(vf: VarFactory, name: str = 'rms_trafo_phasor_template')[source]

Bases: RmsModelTemplate

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
class VeraGridEngine.Templates.Rms.transformer_rms_template.TrafoRmsTemplate(vf: VarFactory, name: str = 'rms_trafo_template')[source]

Bases: RmsModelTemplate

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
tpe: DeviceType
VeraGridEngine.Templates.Rms.transformer_rms_template.get_transformer2w_rms(vf: VarFactory, use_phasor_template: bool = False)[source]
VeraGridEngine.Templates.Rms.transformer_rms_template.initialize_trafo_rms(trafo: Transformer2W, vf: VarFactory)[source]
Parameters:
  • trafo

  • vf

Returns:

VeraGridEngine.Templates.Rms.transformer_rms_template.parse_windings_connection(conn: WindingsConnection) tuple[WindingType, WindingType][source]

Parse a WindingsConnection enum into (conn_f, conn_t) WindingType values.

WindingsConnection values are two-character strings: - G: GroundedStar - S: NeutralStar (ungrounded star) - D: Delta

Examples: - GG -> (GroundedStar, GroundedStar) - GD -> (GroundedStar, Delta) - DD -> (Delta, Delta)

VeraGridEngine.Templates.Rms.transformer_rms_template_legacy module

class VeraGridEngine.Templates.Rms.transformer_rms_template_legacy.TrafoPhasorRmsTemplate(trafo: Transformer2W, vf: VarFactory, name: str = 'rms_trafo_phasor_template')[source]

Bases: RmsModelTemplate

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
class VeraGridEngine.Templates.Rms.transformer_rms_template_legacy.TrafoRmsTemplate(trafo: Transformer2W, vf: VarFactory, Sbase: float = 100, name: str = 'rms_bus_template')[source]

Bases: RmsModelTemplate

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'selected_to_merge', 'diff_changes', 'device_idtag', 'tpe', 'device_name', 'block')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:selected_to_merge, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:block, prop:tpe)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'block': prop:block, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'selected_to_merge': prop:selected_to_merge, 'tpe': prop:tpe}
tpe: DeviceType
VeraGridEngine.Templates.Rms.transformer_rms_template_legacy.initialize_trafo_rms(trafo: Transformer2W, vf: VarFactory, Sbase: float = 100, use_phasor_template: bool = False)[source]
Parameters:
  • trafo

  • vf

  • Sbase

Returns:

VeraGridEngine.Templates.Rms.transformer_rms_template_legacy.parse_windings_connection(conn: WindingsConnection) tuple[WindingType, WindingType][source]

Parse a WindingsConnection enum into (conn_f, conn_t) WindingType values.

WindingsConnection values are two-character strings: - G: GroundedStar - S: NeutralStar (ungrounded star) - D: Delta

Examples: - GG -> (GroundedStar, GroundedStar) - GD -> (GroundedStar, Delta) - DD -> (Delta, Delta)

VeraGridEngine.Templates.Rms.voltage_source_template module

VeraGridEngine.Templates.Rms.voltage_source_template.VoltageSourceBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

Build an RMS voltage-source template with P/Q capability limits.

Control logic: - Q within limits -> enforce Vm = Vg0 - Q at limit -> enforce Q = clamp(Q, Qmin_G, Qmax_G) - P within limits -> enforce Va = Ag0 - P at limit -> enforce P = clamp(P, Pmin_G, Pmax_G)

VeraGridEngine.Templates.Rms.vsc_ac2ac module

VeraGridEngine.Templates.Rms.vsc_ac2ac.VscAc2acModel(vfactory: VarFactory, name: str = 'VscAc2acModel') RmsModelTemplate[source]

VSC AC-to-DC Converter Model based on equations (18.9), (18.10), and (18.11)

Parameters:
  • vfactory – Variable factory for creating symbolic variables

  • name – Name of the model

Returns:

RmsModelTemplate containing the VSC AC2AC model

VeraGridEngine.Templates.Rms.vsc_gfl module

VeraGridEngine.Templates.Rms.vsc_gfl_dclinked module

VeraGridEngine.Templates.Rms.vsc_gfl_dclinked.build_trafo_vsc(vf: VarFactory, trafo: Transformer2W, name: str = '')[source]
VeraGridEngine.Templates.Rms.vsc_gfl_dclinked.build_vsc_rms(vfactory: VarFactory, name: str = '')[source]

Build power control loop model for Grid Following Converter. Supports multiple control modes via ConverterControlType. from bus is DC to bus is AC

VeraGridEngine.Templates.Rms.vsc_gfl_dclinked.build_vsc_transformer_control(vf: VarFactory, Vm: Var, vdc: Var, name: str = '')[source]
VeraGridEngine.Templates.Rms.vsc_gfl_dclinked.parse_windings_connection(conn: WindingsConnection) tuple[WindingType, WindingType][source]

Parse a WindingsConnection enum into (conn_f, conn_t) WindingType values.

WindingsConnection values are two-character strings: - G: GroundedStar - S: NeutralStar (ungrounded star) - D: Delta

Examples: - GG -> (GroundedStar, GroundedStar) - GD -> (GroundedStar, Delta) - DD -> (Delta, Delta)

VeraGridEngine.Templates.Rms.vsc_gfm module

VeraGridEngine.Templates.Rms.vsc_gfm.VscGfmBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

VSC GFM (Grid Forming) model template builder.

VeraGridEngine.Templates.Rms.vsc_gfm.VscGfmLossBuild(vfactory: VarFactory, name: str = '', current_power_inputs: List[Var] | None = None, reconstruct_filter_voltage: bool = False) RmsModelTemplate[source]

VSC GFM model builder for explicit AC filter-network validations.

This maps the VSC active powers through the converter loss equation, exposes controlled/filter/grid AC node voltages separately, and does not expose a DC-side reactive power mapping.

VeraGridEngine.Templates.Rms.vsc_gfm.build_gfm_converter_model(vfactory: VarFactory, inputs: List[Var], multilinear: bool = False, voltage_inputs: List[Var] | None = None, power_inputs: List[Var] | None = None, current_power_inputs: List[Var] | None = None, reconstruct_filter_voltage: bool = False)[source]

Build Grid Forming Converter model (Droop + voltage + current control) based on the provided conceptual equations.

VeraGridEngine.Templates.Rms.vsc_template module

VeraGridEngine.Templates.Rms.vsc_template.PVCellBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.vsc_template.PVControlBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.vsc_template.PVControlBuild2(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]
VeraGridEngine.Templates.Rms.vsc_template.VSCShuntBuild(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

VSC shunt model with from side the DC bus and to side the AC bus

VeraGridEngine.Templates.Rms.vsc_template.VSCShuntBuild2(vfactory: VarFactory, name: str = '') RmsModelTemplate[source]

VSC shunt model with from side the DC bus and to side the AC bus

VeraGridEngine.Templates.Rms.vsc_template.VscControlledPV(vfactory: VarFactory, name='VscControlledPV') RmsModelTemplate[source]

Module contents