# PSCAD validation case Test08: virtual-synchronous-machine converter, OMIB.
#
# Transcription of the PSID test system (OMIB_DARCO_PSR.raw + the VSM
# DynamicInverter of test_case_VirtualSynchMachine): ideal source at bus 1
# (X_th = 5e-6), the D'Arco VSM converter at bus 2 on its 2.75 MVA base, one
# line r = 0, x = 0.075. The converter: virtual inertia angle source
# (angle = VSM, Ta = 2, Kd = 400, Kw = 20, damping against the Kaura PLL),
# reactive droop with its own filter corner (omega_f_q = 1000; the VSM
# consumes unfiltered power so the P-side filter has no state), active
# damping ON (inner = CascadedDamped). The reference trajectory was produced
# by PSCAD (upstream/Test08_omega.csv, via the PSID benchmark set); a PSID
# reference for the full three-level check is generated by ../generate.jl.
#
# Any edit here must be mirrored in ../generate.jl and the references
# regenerated.

GridForming, idx = "VSM1", bus = "2", Sn = 2.75, angle = "VSM", Ta = 2, Kd = 400, Kw = 20, pll = "Kaura", Kpll_p = 0.084, Kpll_i = 4.69, omega_lp = 500, Kq = 0.2, omega_f = 1000, omega_f_q = 1000, inner = "CascadedDamped", Kad = 0.2, omega_ad = 50, Vref = 1.0, Rf = 0.003, Lf = 0.08, Cf = 0.074, Kpv = 0.59, Kiv = 736, Kffv = 0, Kpc = 1.27, Kic = 14.3, Kffc = 0, Rv = 0, Lv = 0.2, Lt = 0.2, Rt = 0.01

StaticInfiniteBus, bus = "1", r = 0, x = 0.000005

Line, bus_i = "1", bus_j = "2", r = 0, x = 0.075, g = 0, b = 0, trafo = 1

BusInit, bus = "1", p = 0, v = 1.00001, type = "slack"
BusInit, bus = "2", p = -1.375, v = 1.00, type = "PV"
