Skip to content

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.py registers a numbered test 8: "Grid Synchronization Test", configured via diagnostic_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

  1. Disambiguate the name — is this the existing Grid Synchronization Test, or a new operational mode? This changes everything else.
  2. Trigger conditions — at startup only, after every grid-loss recovery, periodically, or on operator command?
  3. Synchronisation criteria — voltage, frequency and phase-angle thresholds for declaring sync, and the observation window before it is declared good.
  4. Action on success/failure — which PCS grid mode to apply (PQ/VF), and what to do if sync never establishes.
  5. 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.