Skip to content

5. Generation of guideline curves

Peter Jan Randewijk edited this page Mar 19, 2026 · 20 revisions

5.0 Introduction

From MTB 2.0, the plotter.py script has the ability to generate "guideline" curves for selected test cases. This can be enabled by setting,

genGuide = True

in the plotter's config.ini file.

Caution

The generation of these "guideline" curves analytically calculates what the expected output waveforms or "signal(s)" should look like, depending on PSCAD simulation results stored in the .psout file. This requires some substantial post processing of the .psout result file and may add substantial time to "plot" all the results, depending on the speed of the CPU and number of processors available.

Currently two general-purpose guideline function are defined,

  • guideLPF - to filter a signal using a simple, first-order, low-pass filter
  • guideDelay - to delay a signal by a predefined delay time

Important

The low-pass filtering and delays give a more "realist" responses to the analytically calculated "guidline" curves and are more "guesstimates" of what typical responses would be in terms of rise-times and delays.

Furthermore, eight dedicated guideline function are defined,

  • guidePramp - which uses a simplistic linear approximation of active power ramps, and is called when the Case Name contains ("P_step" OR "PQ/Pn") AND NOT "Pavail"
  • guidePramp2 - which is a more sophisticated approximation of active power ramping making use of difference equations, especially when the active power is limited by (say) low irradiation or low wind speed, and called when the Case Name contains "Pref-change" OR "Pavail_step" OR "Pavail_variation"
  • guideLFSMPramp - which is called when the Case Name contains "(L)FSM" and produces a Fast Frequency Response (FFR) guideline output for step responses, as well as a slower active power ramped response, when the frequency returns to 50 Hz making use of difference equations that also take into account limited power available
  • guideLFSM - which is called by guideLFSMPramp to create an LPF filtered "ideal" FFR response
  • guideFSM - which is called by guideLFSM if **Pmode == "FSM" OR "LFSM+FSM"
  • guideQU - which is called when the Qmode == "Q(U)" OR Qmode equals "Default" AND Qdefault == "Q(U)"
  • guideQpf - which is called when the Qmode == "PF" OR Qmode equals "Default" AND Qdefault == "PF"
  • guideFFC - which is called when the Case Name contains "FRT" OR "Fault" OR "support"

5.1 Guide Functions

The functions to calculate these "guide" signal overlays, are defined in the file, guide_functions.py. They are:

5.1.1 guidePramp

Calculates the "guide" or rather the maximum rates of change of active power output (P_pu_PoC_Ramp) in both an up and down direction for a change in the active power reference for power-generating modules based on RfG (EU) 2016/631, 15.6 (e) NC 2025 (Version 5)

e.g. Rank 11: RfG_P_step_up_0.0_0.5, Figure Ppoc for an upward regulation in active power image

or Rank 14: RfG_P_step_down_1.0_0.7, Figure Ppoc for a downward regulation in active power image

5.1.2 guidePramp2

This function is very similar to the guideRamp, but makes use of difference equations to calculated the maximum rates of change. Thus each P_pu_PoC_Ramp data point is dependent on the previous data point, allthough this is much slower than the linear approximation used for guideRamp, it also takes into account the available active power at each data point. This allows active power ramping to be evaluated for a dynamic, varying power available signal.

e.g. Rank 109: RfG_Pavail_step_P_step_up_05_10, Figure Ppoc, image

Note

For the example above, the EMT result limits at the wrong Pavail value, while both the EMT and the RMS active power ramping responses fail at 40 s, when Pavail is set to 1.0 pu.

5.1.3 guideLFSM

Calculates the "guide" value of the power delivered (P_pu_PoC) given the change in frequency (pll_f_hz) from 50 Hz,

image

according to RfG (EU) 2016/631, 13.2 (a-d) and the LFSM-O and LFSM-U droop values specified in NC 2025 (Version 5) for either DK1 or DK2.

e.g. Rank 19: RfG_LFSM-OU_step1, Figure Ppoc image

Note

This guide function wil produce both a Fast Frequency Response (FFR) output, P_pu_LFSM_FFR, for fast acting LFSM controllers, as well as a P_pu_LFSM_Ramp for slower LFSM controllers. The grid code requires the active power output to follow the maximum power ramping rates when the system frequency is restored to 50 Hz.

5.1.4 guideFSM

If Pmode == FSM or LFSM+FSM, the guideLFSM function calls this function to implement the "guide" FSM droop, s, according to RfG (EU) 2016/631, 15.2 (d) and NC 2025 (Version 5)

e.g. Rank 17: ION_RfG_FSM_step1-Plot-Ppoc image

Note

For this example, the FSM droop value supplied by plant owner in the documentation, didn't match the FSM droop value implemented in the RMS and EMT models.

5.1.5 guideQU

This function calculates the "guide" value of the reactive power required (Q_pu_PoC) for voltage control mode based on RfG (EU) 2016/631, 21.3 (d) NC 2025 (Version 5)

The "guide" reactive power output required to control the voltage at the PoC/Terminals, is calculated as follows:

  • First, the difference in voltage between the setpoint and the measure positive sequence voltage is calculated

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

  • Then the change in reactive power is calculated, based on the voltage droop/slope value, $s$

$$\Delta Q = \frac{100 \times \Delta u}{U_{\text{ref}}} \times \frac{Q_{\text{nom}}}{s}$$

  • Finally, the upper and lower boundaries of the reactive power required, is limited to the nominal reactive power value

$$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

For now:

  • The positive sequence voltage is measured at the PoC
  • The initial reactive power reference, $Q_{\text{ref}} = 0.00 \text{~pu}$
  • And the nominal reactive power, $Q_{\text{nom}} = 0.33 \text{~pu}$

image


e.g. Rank 38: RfG_Ucontrol_Scmin image

Note

The "guide" output above have large overshoots and can thus technically not be classified as the "ideal guide response" as it uses a hard coded LPF to filter the output response, and is not tuned for a specific minimum SCR value. Response overshoot are to be limited to < 20%.

5.1.6 guideQpf

This function calculates the "guide" reactive power output (Q_pu_PoC) based on the active power output (P_pu_PoC) and the power factor reference (mtb_s_qref) when Qmode == PF, according to RfG (EU) 2016/631, 21.3 (d) NC 2025 (Version 5)

e.g. Rank 55: RfG_Qpf_PFref-change image

and Rank 56: RfG_Qpf_Pref-change image

image

5.1.7 guideFFC

This function calculates the "guide" fast fault currunt (FFC) contribution (iq_ffc) based on the positive sequence voltage magnitude (fft_pos_Vmag_pu), as described in RfG (EU) 2016/631, 20.2 (b) NC 2025 (Version 5) for DK1 and DK2


DK1 DK2
image image

e.g. Rank 67: ION_RfG_Fault_3_0-Plot-Ireactive and experimental ION_RfG_Fault_3_0-Plot-Iactive Rank_67-ION_RfG_Fault_3_0-Plot-Ireactive Rank_67-ION_RfG_Fault_3_0-Plot-Iactive

Note

The active current above during the fault is just experimental, and estimates the current available to provide frequency support during the fault and is not part of the grid codes.

Clone this wiki locally