MANUAL
Applies a fixed operator-supplied setpoint directly to the PCS.
| Mode string | MANUAL (EMS_OP_MANUAL) |
| Dispatcher | ems_main.py → control_logic_updated.control_step_manual |
| Config block | functions.Manual_Operation |
| Queue source tag | control_logic (the writer's default) |
| Status | Implemented |
Purpose
The simplest mode: the operator chooses STOP, CHARGE or DISCHARGE and a magnitude. No
telemetry-driven decision, no time windows, no hysteresis — every cycle writes an explicit setpoint.
How it decides
operation_type |
Behaviour |
|---|---|
STOP |
Writes 0 kW to every active PCS and returns. |
CHARGE |
total_set_kw = -abs(power_setpoint_kw) |
DISCHARGE |
total_set_kw = +abs(power_setpoint_kw) |
Any other value ⇒ return (no action). A missing or non-positive power_setpoint_kw ⇒ return.
Configuration
functions.Manual_Operation
| Key | Live value | Meaning |
|---|---|---|
enabled |
false |
Master switch. |
operation_type |
idle |
STOP | CHARGE | DISCHARGE. idle is not a valid action and causes a return. |
power_setpoint_kw |
67 |
Magnitude in kW for charge/discharge. |
ramp_rate_kw_s |
54 |
Recorded only; no ramp limiting is applied. |
soc_limits |
{min: 67, max: 78} |
Can only tighten the general PCS limits (see below). |
soc_recovery_target_pct |
12 |
Recorded only; not used by the control step. |
power_caps_kw |
{charge: null, discharge: 70} |
Plant-level caps; can only tighten the PCS limits. |
mode_priority |
override-all |
Intent: manual outranks other functions. |
telemetry_control |
object | HMI/telemetry metadata; not used in control. |
safety |
object | Trip settings (trip_on_overtemperature, grid_fault_action: PCS_shutdown); metadata consumed elsewhere, not in this control step. |
Limit tightening
Manual limits never loosen the hardware limits. Effective bounds are merged:
eff_min = max(general min_soc_pct, soc_limits.min_soc_pct)
eff_max = min(general max_soc_pct, soc_limits.max_soc_pct)
The per-PCS allocation cap is likewise min(power_limits.max_*_kw, power_caps_kw.*_cap_kw).
Safety
- Returns when
is_external_control_active(), whenenabledis false, or when there are no active PCS. - Uses
_soc_block_reason(soc, eff_min, eff_max, "charge"|"discharge")— direction aware:CHARGEis blocked atmax_soc_pct,DISCHARGEis blocked atmin_soc_pct. SOC-blocked PCS are force-written to0 kWrather than left at their previous setpoint. - Final clamp inside
_pcs_connect_and_set_power_kw.
Caution: this mode writes a setpoint every cycle with no ramping. Large
power_setpoint_kwvalues step the PCS instantly.
Outputs
_pcs_connect_and_set_power_kw(cfg, pcs_id, ±kw) → queue action set_power_kw, source control_logic.