BACKUP_FREQUENCY_REGULATION
Combined mode: frequency regulation in normal operation, switching to backup when the grid fails.
| Mode string | BACKUP_FREQUENCY_REGULATION |
| Dispatcher | control_step_backup via mode_involves_backup (no dedicated elif branch) |
| Config block | functions.Backup_Frequency_Regulation |
| Status | Composition stub — not fully implemented |
Purpose
Intended to run frequency regulation while grid-tied and fall back to backup on grid loss.
What actually runs today
Same situation as BACKUP_PEAK_SHAVING:
- ✅ The PQ ↔ VF grid-mode governor runs from
control_step_backup(subject tofunctions.Backup.grid_mode_switch.enabled). - ❌ The fast frequency-regulation process is not started —
ems_main.pyonly startsems_frequency_regulation_direct_modbus_v4.pywhenmode == EMS_OP_FREQUENCY_REGULATIONexactly. This combined mode does not match, sofreq_reg.stop()is called. - ❌ No
elifbranch exists, so it falls through to"[EMS] ... not implemented in ems_main.py yet". - ❌ The
frequency_regulation_refindirection is never dereferenced.
Configuration
functions.Backup_Frequency_Regulation
| Key | Live value | Meaning |
|---|---|---|
enabled |
false |
Documented master switch; not read by any code path. |
priority_rule |
backup_over_frequency_regulation |
Documented precedence. |
frequency_regulation_ref |
Peak_Shaving |
Names the config block to delegate to. Not resolved. |
Likely bug:
frequency_regulation_refpoints at"Peak_Shaving". It almost certainly should be"Frequency_Regulation".
Safety
Effectively governed by functions.Backup.grid_mode_switch.enabled, false by default — selecting
this mode currently produces no actuation.
TODO to complete this mode
- Fix
frequency_regulation_refto referenceFrequency_Regulation. - Start/stop the fast controller for this mode, not only for
FREQUENCY_REGULATION. - Switch to backup power behaviour on grid loss (see backup.md).
- Honour
enabledandpriority_rule.