# PSCAD validation case Test24: grid-following converter, OMIB.
#
# Transcription of the PSID test system (OMIB_DARCO_PSR.raw +
# psid_test_gfoll_inverter): ideal source at bus 1 (X_th = 5e-6), the
# grid-following converter at bus 2 on its 2.75 MVA base, one line r = 0,
# x = 0.075. The chain is the literature-standard current-injecting one:
# PLL frame (ReducedPLL), PI power outers (PLLPowerPI / QPowerPI,
# omega_f = 0.132*2*pi*50 on both power filters), current-mode inner
# (CurrentPI with voltage feed-forward), grid-following LCL parameter set.
# The reference trajectory was produced by PSCAD (upstream/Test24_p.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.

GridFollowing, idx = "GFL1", bus = "2", Sn = 2.75, Kpp = 2, Kip = 30, Kpq = 2, Kiq = 30, omega_f = 41.46902302738527, Kpc = 0.37, Kic = 0.7, Kffc = 1, Kpll_p = 2, Kpll_i = 20, omega_lp = 414.6902302738527, Rf = 0.016, Lf = 0.009, Cf = 2.5, Lt = 0.002, Rt = 0.003

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"
