GRID_SYNC
Synchronise the BESS with the grid.
| Mode string | GRID_SYNC (EMS_OP_GRID_SYNC) |
| Dispatcher | ems_main.py → dispatch stub (logs, does not actuate) |
| Config block | functions.Grid_Sync |
| Status | Registered, awaiting specification |
Current state
Registered and selectable. Reaches an explicit dispatch branch which logs:
[EMS] cycle=<n> mode=GRID_SYNC has no control strategy yet -> no action (see docs/modes/)
No setpoint or mode switch is written. The plant stays as it is.
Why it is a stub
You indicated the details would follow. The mode name also needs disambiguating before implementation, because the codebase already has a diagnostic test with a very similar name:
ems_diagnostic_tests.pyregisters a numbered test8: "Grid Synchronization Test", configured viadiagnostic_test_mode.
So "GRID_SYNC" could mean the existing diagnostic test (in which case it overlaps PAYLOAD_DIAGNOSTIC_TEST), a recurring operational synchronisation of the PCS grid mode, or something else entirely.
Configuration
functions.Grid_Sync — scaffolding only; no key is read by any code yet.
| Key | Live value | Meaning |
|---|---|---|
enabled |
false |
Intended master switch. |
spec_status |
awaiting_specification |
Marks the block as a placeholder. |
priority_rule |
grid_sync_over_grid_modes |
Intended precedence. |
What I need to implement it
- Disambiguate the name — is this the existing Grid Synchronization Test, or a new operational mode? This changes everything else.
- Trigger conditions — at startup only, after every grid-loss recovery, periodically, or on operator command?
- Synchronisation criteria — voltage, frequency and phase-angle thresholds for declaring sync, and the observation window before it is declared good.
- Action on success/failure — which PCS grid mode to apply (PQ/VF), and what to do if sync never establishes.
- Relationship to backup — BACKUP already switches PQ ↔ VF from live grid state.
Confirm how the two interact rather than both trying to own register
0x5066.
Related
- PAYLOAD_DIAGNOSTIC_TEST — runs the numbered test suite including test 8.
- BACKUP — currently owns the PQ/VF grid-mode decision during backup.
- FREQUENCY_REGULATION —
grid_mode: on-grid-only.