Skip to content

5. Quickstart Guide Curve Generation

Peter Jan Randewijk edited this page Sep 7, 2026 · 9 revisions

5. Quickstart Guide Curve Generation

5.1 Introduction

From MTB 2.0, plotter.py can generate analytical guide curves for selected test cases. Guide curves are enabled in the plotter's config.ini file:

genGuide = True

Caution

Guide curve generation analytically calculates expected output waveforms from MTB-generated references and PSCAD simulation results stored in the .psout file. This requires additional post-processing and can add considerable plotting time, depending on CPU speed, result file size, and the number of parallel processes used.

The guide curves are intended as practical reference overlays. Low-pass filtering and delays are used to make the calculated responses look more like realistic controller responses, but the guide curves are still approximations and should not be treated as an exact model of a plant controller.

5.2 How Guide Curves Are Selected

Guide curves are generated by guide_functions.py. The main entry point is genGuideResults, which decides which guide signals to calculate based on the case name, Q control mode, test settings, and available PSCAD result signals.

Case or setting condition Guide signal(s) Main helper function(s)
Case name containsP_step or PQ/Pn, but not Pavail P_pu_PoC_Ramp guidePramp
Case name containsPref-change, Pavail_step, or Pavail_variation P_pu_PoC_Ramp guidePramp2
Case name containsFSM, RoCoF, Freq, or freqStep P_pu_LFSM_FFR, P_pu_LFSM_Ramp, and sometimes P_pu_LFSM_Ramp_2s guideLFSM, guideFSM, guideLFSMRamp, guideDelay, guideLPF
Case name containsSIPS P_pu_PoC and P_pu_PoC_1s guideSIPS, guideSIPS2, guideLPF
Case is not SIPS, Fault, or LVFRT P_pu_PoC Direct copy ofMTB\mtb_s_pref_pu
Qmode isQ, or Qmode is Default and default Q mode is Q Q_pu_Q_Ctrl guideLPF
Qmode isQ(U), or Qmode is Default and default Q mode is Q(U) Q_pu_QU_Ctrl guideQU, guideLPF
Qmode isPF, or Qmode is Default and default Q mode is PF Q_pu_Qpf_Ctrl guideQpf, guideLPF
Case name containsFRT, Fault, or support Iq_pu_FFC guideFFC, guideLPF

5.3 General Guide Helpers

5.3.1 guideLPF

Applies a simple first-order low-pass filter to a guide signal. The helper is used to give analytically calculated guide curves a more realistic response shape.

The filter is configured from a cut-off frequency fc and sampling frequency fs.

5.3.2 guideDelay

Applies a fixed signal delay of Td seconds using the simulation sampling time Ts. Samples before the delayed signal becomes available are held at the initial value.

This helper is used for delayed frequency response and delayed SIPS guide curves.

5.4 Dedicated Guide Functions

5.4.1 guidePramp

Calculates the guide curve for the maximum rate of change of active power output, P_pu_PoC_Ramp, after a step in active power reference. It is used for cases where the case name contains P_step or PQ/Pn, but not Pavail.

The ramp rate is limited to:

$$ m = \min(0.2, 60/P_n) $$

where $m$ is in pu/min before conversion to pu/s, and $P_n$ is the nominal plant power in MW.

This guide is based on a linear approximation of active power ramping for power-generating modules according to RfG (EU) 2016/631, Article 15.6 (e), and the Energinet NC RfG requirements.

Example: Rank 11: RfG_P_step_up_0.0_0.5, Figure Ppoc for upward active power regulation.

Rank_11-RfG_P_step_up_0 0_0 5-Plot-Ppoc

Example: Rank 14: RfG_P_step_down_1.0_0.7, Figure Ppoc for downward active power regulation.

Rank_14-RfG_P_step_down_1 0_0 7-Plot-Ppoc

5.4.2 guidePramp2

Calculates P_pu_PoC_Ramp using a sample-by-sample difference equation instead of the simple linear approximation used by guidePramp. It is used for cases where the case name contains Pref-change, Pavail_step, or Pavail_variation.

The active power reference is clipped to the available active power signal, MTB\mtb_s_pavail_pu, before ramping. This makes the function suitable for cases where available power changes dynamically, for example due to reduced irradiation or wind speed.

Example: Rank 109: RfG_Pavail_step_P_step_up_05_10, Figure Ppoc

Rank_109-RfG_Pavail_step_P_step_up_05_10-Plot-Ppoc

5.4.3 guideLFSMRamp

Calculates the ramp-limited LFSM active power guide signal, P_pu_LFSM_Ramp. It combines the LFSM/FSM active power response with the normal active power ramp-rate limit when frequency returns close to the nominal frequency.

The function uses a hysteresis band around 50 Hz:

Threshold Meaning
fLower = 0.020 Hz Below this deviation from 50 Hz, ramping is active
fUpper = 0.040 Hz Above this deviation from 50 Hz, LFSM is active

When ramping is active, the output follows the active power reference at the same ramp-rate limit used by guidePramp2. When LFSM is active, the output is calculated by guideLFSM.

5.4.4 guideLFSM

Calculates the LFSM-O or LFSM-U guide value for active power based on the measured frequency pll_f_hz.

The DK1 and DK2 LFSM thresholds, see Energinet NC RfG are selected from the test settings:

Area LFSM-O threshold LFSM-U threshold Droop
DK1 50.2 Hz 49.8 Hz 5%
DK2 50.5 Hz 49.5 Hz 4%

If FSM is enabled through Pmode == LFSM+FSM, guideLFSM first calls guideFSM and then applies the LFSM limit.

Example: Rank 19: RfG_LFSM-OU_step1, Figure Ppoc

Rank_19-RfG_LFSM-OU_step1-Plot-F Rank_19-RfG_LFSM-OU_step1-Plot-Ppoc

Note

LFSM cases can produce both P_pu_LFSM_FFR for fast-acting LFSM controllers and P_pu_LFSM_Ramp for slower ramp-limited response when the system frequency returns to 50 Hz.

5.4.5 guideFSM

Calculates the FSM droop response used by guideLFSM when Pmode == LFSM+FSM. The FSM droop and deadband are read from the test settings.

The function applies the configured FSM droop around 50 Hz and clamps the result to +/-10% of the reference active power.

Example: Rank 17: ION_RfG_FSM_step1-Plot-Ppoc

Rank_17-RfG_FSM_step1-Plot-F Rank_17-RfG_FSM_step1-Plot-Ppoc

5.4.6 guideQU

Calculates the guide reactive power required for voltage control mode, Q_pu_QU_Inst, before low-pass filtering to Q_pu_QU_Ctrl. It is used when Qmode == Q(U), or when Qmode == Default and the default Q mode is Q(U).

The voltage error is calculated as:

$$ \Delta U = U_{\text{ref}} - U_{\text{pos}} $$

The required reactive power change is calculated from the Q(U) droop value $s$:

$$ \Delta Q = \frac{100 \cdot \Delta U}{U_{\text{ref}}} \cdot \frac{Q_{\text{nom}}}{s} $$

The output is limited to the nominal reactive power range:

$$ Q_{\text{new}} = \begin{cases} +Q_{\text{nom}} & \text{if } Q_{\text{ref}} + \Delta Q > Q_{\text{nom}} \\ -Q_{\text{nom}} & \text{if } Q_{\text{ref}} + \Delta Q < -Q_{\text{nom}} \\ Q_{\text{ref}} + \Delta Q & \text{otherwise} \end{cases} $$

Note

In the current guide implementation, the positive-sequence voltage is measured at the PoC, the initial reactive power reference is $Q_{\text{ref}} = 0.00$ pu, and $Q_{\text{nom}} = 0.33$ pu.

image


Example: Rank 40: RfG_Ucontrol_Scmax

Rank_40-RfG_Ucontrol_Scmax-Plot-Vpg Rank_40-RfG_Ucontrol_Scmax-Plot-Qpoc

Example: Rank 38: RfG_Ucontrol_Scmin

Rank_38-RfG_Ucontrol_Scmin-Plot-Vpg Rank_38-RfG_Ucontrol_Scmin-Plot-Qpoc

Note

The guide output above has large overshoots and should not be treated as an ideal guide response. It uses a hard-coded low-pass filter and is not tuned for a specific minimum SCR value. Response overshoot should be limited to less than 20%. In the plots above it is interesting to note that although the equivalent Thévening voltage of the grid is stepped, it is difficult to observe at the PoC due to the fact that the injection of reactive power has an immediate supporting effect on the PoC voltage. The PoC voltage is thus observed as have pulses, exacerbating the reactive power overshoot.

5.4.7 guideQpf

Calculates the guide reactive power output for power factor control mode, Q_pu_Qpf_Inst, before low-pass filtering to Q_pu_Qpf_Ctrl. It is used when Qmode == PF, or when Qmode == Default and the default Q mode is PF.

The function calculates reactive power from active power and the power factor reference:

$$ Q = P \cdot \tan(\arccos(PF_{\text{ref}})) $$

The result is clipped to +/-0.33 pu.

Example: Rank 55: RfG_Qpf_PFref-change

Rank_55-RfG_Qpf_PFref-change-Plot-Qpoc

Example: Rank 56: RfG_Qpf_Pref-change

Rank_56-RfG_Qpf_Pref-change-Plot-Ppoc
Rank_56-RfG_Qpf_Pref-change-Plot-Qpoc

5.4.8 guideFFC

Calculates the fast fault current (FFC) guide contribution, Iq_pu_FFC, based on the positive-sequence voltage magnitude MTB\fft_pos_Vmag_pu and the pre-fault reactive current Iq0.

The FFC voltage threshold depends on the area (DK1 or DK2) and whether the plant is connected to a DSO network, see Energinet NC RfG:

Condition FRT threshold Slopem Offsetc
DK2 or DSO 0.90 pu 1 / 0.4 2.25
DK1 TSO 0.85 pu 1 / 0.35 2.42857

If the positive-sequence voltage is below the FRT threshold and above 0.5 pu, the additional reactive current is calculated as:

$$ I_{q,FFC} = -m \cdot U_{pos} + c + I_{q0} $$

If Upos <= 0.5, the FFC contribution is limited to 1.0 + Iq0.


DK1 DK2
image image

Example: Rank 70: RfG_Fault_3_0

Rank_70-RfG_Fault_3_0-Plot-Ireactive

Example: Rank 71: RfG_Fault_3_20

Rank_71-RfG_Fault_3_20-Plot-Ireactive

Example: Rank 72: RfG_Fault_3_40

Rank_72-RfG_Fault_3_40-Plot-Ireactive

Example: Rank 73: RfG_Fault_3_60

Rank_73-RfG_Fault_3_60-Plot-Ireactive

Example: Rank 88: RfG_Voltage-support

Rank_88-RfG_Voltage-support-Plot-Ireactive

5.4.9 guideSIPS

Decodes the MTB SIPS generation bitfield signal, MTB\mtb_s_sips_g, and returns the commanded active power ceiling. The result is used as P_pu_PoC_SIPS_ref before a low-pass filter creates the plotted P_pu_PoC guide curve.

The default SIPS step mapping as per Energinet NC RfG are:

SIPS bit Active power ceiling
0 Reserved
1 0.70 pu
2 0.50 pu
3 0.40 pu
4 0.25 pu
5 0.00 pu

If multiple SIPS steps are active at the same time, the function applies the strongest reduction, i.e. the lowest active power ceiling. The active power ceiling is also limited by the current active power reference, MTB\mtb_s_pref_pu.

For the fast SIPS guide curve:

  1. guideSIPS decodes the SIPS bitfield and applies the active power ceiling.
  2. SIPS reductions are applied immediately.
  3. SIPS release is ramped up using the same active power ramp-rate limit as the active power ramping guide: min(0.2 pu/min, 60 MW/min).
  4. genGuideResults filters the resulting reference with an approximately 1 Hz low-pass filter and plots it as P_pu_PoC.

This guide curve represents a fast response with no intentional delay.

Example: Rank 58: RfG_SIPS_QU

Rank_58-RfG_SIPS_QU-Plot-Ppoc

Note

For the example above, the EMT result limits are wrong and fails at 45 s, whilst there are no RMS output.

5.4.10 guideSIPS2

Calculates the delayed SIPS guide curve, plotted as P_pu_PoC_1s. It uses the same SIPS bitfield decoding and step mapping as guideSIPS, but changes the dynamic response for reductions.

By default, guideSIPS2 applies:

Parameter Default Meaning
Td 1.0 s Delay before responding to SIPS reductions
t_ramp 10.0 s Total target response time used for the delayed down-ramp calculation

The delayed SIPS response is calculated as follows:

  1. Decode the SIPS bitfield and determine the active power ceiling.
  2. Limit the ceiling by MTB\mtb_s_pref_pu.
  3. Delay the resulting target by Td seconds using guideDelay.
  4. When a new SIPS reduction appears, calculate a linear down-ramp rate so the response reaches the new target over t_ramp - Td seconds.
  5. Continue the down-ramp until the delayed target is reached.
  6. When SIPS is released, ramp active power back up using min(0.2 pu/min, 60 MW/min).

guideSIPS2 is useful for comparing model behaviour against a delayed response requirement where the response should not be instantaneous, but should ramp linearly after the delay has elapsed.

Example: Rank 58: RfG_SIPS_QU (shown both the fast and delayed and linear ramped response)

Rank_58-RfG_SIPS_QU-Plot-Ppoc_2

Note

For the example above, the EMT SIPS limits are wrong and the simulations fails at 45 s. Furthermore, there are no RMS output for this case.