12.5-kVA, DO-GFM

12.5-kVA, DO-GFM#

This example simulates a 12.5-kVA disturbance-observer-based grid-forming (DO-GFM) converter, connected to a weak grid. The converter output voltage and the active power are directly controlled. Grid synchronization is provided by the disturbance observer. A transparent current controller is included for current limitation. A grid-voltage sag in this weak grid is simulated in 12.5-kVA, DO-GFM, grid-voltage sag.

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.

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

# Converter output voltage magnitude reference
ctrl.set_ac_voltage_ref(base.u)
ctrl.set_power_ref(
    lambda t: ((t > 0.2) / 3 + (t > 0.5) / 3 + (t > 0.8) / 3 - (t > 1.2)) * nom.P
)

# Uncomment line below to simulate operation in rectifier mode
# ctrl.set_power_ref(lambda t: ((t > 0.2) - (t > 0.7) * 2 + (t > 1.2)) * nom.P)

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

  • plot 13kva do gfm
  • plot 13kva do gfm

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

Gallery generated by Sphinx-Gallery