12.5-kVA, RFPSC-GFM

12.5-kVA, RFPSC-GFM#

This example simulates a 12.5-kVA grid-forming (GFM) converter using reference-feedforward power-synchronization control (RFPSC). The converter is connected to a weak grid. The converter and grid models are the same as in 12.5-kVA, DO-GFM.

from motulator.grid import control, model, utils

Compute base values based on the nominal values.

nom = utils.NominalValues(U=400, I=18, f=50, P=12.5e3)
base = utils.BaseValues.from_nominal(nom)

Configure the system model.

Configure the control system.

# Control configuration parameters
cfg = control.PowerSynchronizationControllerCfg(
    u_nom=base.u, w_nom=base.w, i_max=1.3 * base.i, R=0.05 * base.Z, R_a=0.2 * base.Z
)
inner_ctrl = control.PowerSynchronizationController(cfg)
ctrl = control.GridConverterControlSystem(inner_ctrl)

Set the references for converter output voltage magnitude and active power.

# Converter output voltage magnitude reference
ctrl.set_ac_voltage_ref(base.u)

# Active power reference
ctrl.set_power_ref(
    lambda t: ((t > 0.2) / 3 + (t > 0.5) / 3 + (t > 0.8) / 3 - (t > 1.2)) * nom.P
)

Create the simulation object, simulate, and plot the results in per-unit values.

  • plot 13kva rfpsc gfm
  • plot 13kva rfpsc gfm

Total running time of the script: (0 minutes 3.257 seconds)

Gallery generated by Sphinx-Gallery