-
Notifications
You must be signed in to change notification settings - Fork 21
5. Quickstart Guide Curve Generation
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 = TrueCaution
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.
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
|
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.
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.
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:
where
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.
Example: Rank 14: RfG_P_step_down_1.0_0.7, Figure Ppoc for downward active power regulation.
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
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.
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
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.
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
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:
The required reactive power change is calculated from the Q(U) droop value
The output is limited to the nominal reactive power range:
Note
In the current guide implementation, the positive-sequence voltage is measured at the PoC, the initial reactive power reference is
Example: Rank 40: RfG_Ucontrol_Scmax
Example: Rank 38: RfG_Ucontrol_Scmin
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.
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:
The result is clipped to +/-0.33 pu.
Example: Rank 55: RfG_Qpf_PFref-change
Example: Rank 56: RfG_Qpf_Pref-change
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:
If Upos <= 0.5, the FFC contribution is limited to 1.0 + Iq0.
| DK1 | DK2 |
|---|---|
![]() |
![]() |
Example: Rank 70: RfG_Fault_3_0
Example: Rank 71: RfG_Fault_3_20
Example: Rank 72: RfG_Fault_3_40
Example: Rank 73: RfG_Fault_3_60
Example: Rank 88: RfG_Voltage-support
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:
-
guideSIPSdecodes the SIPS bitfield and applies the active power ceiling. - SIPS reductions are applied immediately.
- 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). -
genGuideResultsfilters the resulting reference with an approximately 1 Hz low-pass filter and plots it asP_pu_PoC.
This guide curve represents a fast response with no intentional delay.
Example: Rank 58: RfG_SIPS_QU
Note
For the example above, the EMT result limits are wrong and fails at 45 s, whilst there are no RMS output.
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:
- Decode the SIPS bitfield and determine the active power ceiling.
- Limit the ceiling by
MTB\mtb_s_pref_pu. - Delay the resulting target by
Tdseconds usingguideDelay. - When a new SIPS reduction appears, calculate a linear down-ramp rate so the response reaches the new target over
t_ramp - Tdseconds. - Continue the down-ramp until the delayed target is reached.
- 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)
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.
For further questions or help, please check if the README or the Quickstart Guides contains the answer.
Otherwise, please contact the Energinet simulation model team: simuleringsmodeller@energinet.dk

