Speak to our team+44 20 3769 7682+1 325 244 5212
WORK · GRID AI · CONTROL SYSTEMS

A forecasting agent that acts, not just predicts.

Most energy-forecasting AI shows a pretty dashboard. The operator still has to act. We built a forecasting agent for a regional utility that closes the loop — minute-ahead forecasts trigger constrained control actions within safety envelopes, and every action is reversible within two ticks.

Client
Regional European utility · NDA
Industry
Energy · Control Systems
Year
2025
Type
Closed-Loop AI
Forecast horizon
15min ahead
Control tick
5sec
Envelope breaches
0
Renewable curtailment
−34%
Peak-shave savings
8.6%
001 · The situation

A grid running on open-loop forecasts.

The utility's forecast models were accurate — they just weren't connected to anything. Operators still adjusted manually, with lag, from a dashboard. Meanwhile the renewable mix kept climbing and the control loop kept getting harder. We built a closed-loop forecaster + controller that acts inside a safety envelope the ops team defines.

01

AI actuating physical infrastructure.

A wrong action on a grid isn't a customer complaint — it's a blackout. Every control step had to be bounded, reversible, and operator-overridable.

02

Open-loop forecasts weren't enough.

Forecasts were accurate. They weren't connected to anything. Renewable volatility outpaced human reaction time. Demand response needed sub-minute action.

03

Operator trust was the hardest gate.

The ops room had to accept this running on real electrons. That meant explainability, envelopes, and a manual override that's always on top.

002 · The shift

Close the loop. Keep the operator on top.

The industry convinced itself for years that AI couldn't touch a control loop. We took that as a design brief, not a limit — and built everything that had to be true for the ops room to say yes.

How the grid ran on open-loop
01
Sensors report
SCADA · 15s tick
02
Dashboard updates
Operator watches
03
Forecast prints
Open-loop · pretty
04
Operator clicks
5–15 min later
05
Grid responds
Reactive, not predictive
Result: 5–15 minute operator lag between forecast and action. Renewable curtailment set conservatively. Peak-shaving capped by human reaction time.
How the closed-loop agent works
01
Sense 15k points
SCADA · weather · market · DR
02
MPC forecasts ahead
15min horizon, 5s tick
03
Envelope + reversibility
Safety by construction
04
Actuate
Battery · curtail · DR signals
05
Verify next tick
Digital twin compares
Result: 5-second tick. Curtailment down 34%. Peak-shave 8.6%. Zero envelope breaches. Operator override fired on less than 0.1% of actions.
003 · System architecture

Forecast. Decide. Act. Every five seconds.

The Forecasting & Control tier is the brain. The Safety & Actuation tier is the reason the ops room trusts it. The digital twin is the reason operators signed off on v1 — every change gets proven in the shadow before touching electrons.

01

Sensors & Markets

15,000 SCADA points, per-substation weather, day-ahead market schedules, and opt-in demand-response states — sampled every tick. This is the world as the controller sees it.

SCADA Telemetry
15k sensors
Weather Feed
Per-substation
Day-Ahead Market
Prices · Schedules
Demand Response
Opt-in homes
02

Forecasting & Control

Temporal Fusion Transformer for load/solar/wind forecasts. Kalman filter keeps the live grid state. MPC controller optimizes actions over a 15-minute horizon. Economic optimizer balances cost and carbon.

Load Forecast
Transformer
Grid State
Kalman filter
MPC Controller
Model-predictive
Economic Optimizer
Cost · Carbon
03

Safety & Actuation

Envelope guard bounds every action. Reversibility check confirms any step can be undone within two ticks. Dispatch service writes to batteries, curtailment, or DR signals. Operator override sits on top of all of it.

Envelope Guard
Safety-first
Reversibility Check
Undo within 2 ticks
Battery Dispatch
Charge/discharge
Operator Override
Always-on
04

Data & Twin

TimescaleDB for the time-series spine. MLflow for model versioning and runs. Kafka for the event bus. A digital twin runs in shadow mode — every model update is tested there before reaching production.

TimescaleDB
Time-series
MLflow
Models + runs
Action Ledger
Per-tick audit
Digital Twin
Shadow env
004 · Anatomy of a tick

Five seconds from sensor to actuation.

A real five-second control tick. A real MPC proposal. A real envelope check that made the action smaller, and a real reversibility check that confirmed it could be undone. Every step is logged. Every step is replayable in the twin.

01
SENSE · T=0
Grid state · 14:02:05

Load: rising 3.2% above forecast. Solar: 220 MW, falling as cloud bank crosses eastern substations. Battery SoC: 62%. Market: $94/MWh ahead of next clearing. DR opt-in 2,400 homes available.

Full world state in one typed snapshot. 15,000 points resolved into the fields the controller actually uses.
02
DECIDE · MPC
proposal = mpc.optimize({
  horizon: 15,               // minutes
  objective: cost + carbon,
  actions: {
    battery_dispatch: -18 MW,
    curtailment:       0 MW,
    dr_signal:       1200 homes,
  },
});

envelope.bound(proposal);
// battery_dispatch capped: -15 MW
// (envelope max: ±20 MW · ramp: 5 MW/tick)

reversibility.check(proposal);
// pass · undoable within 2 ticks
The envelope shrank the battery command from −18 to −15 MW because of the ramp constraint. The agent accepted the bound — by design.
03
ACTUATE · VERIFY
Battery−15 MW · discharge
Curtailment0
DR signal1,200 homes
OperatorNo override
Twin Δ+0.4 MW · within tolerance
Tick ledgertk_405211
Next tick at T+5s reads the outcome. Digital twin compares to prediction. Any drift > tolerance triggers a model review — not a rollback.
005 · End-to-end flow

A control tick from sensor to actuation.

Six steps. Five seconds. The envelope and reversibility checks are the steps that made the ops room say yes — and the digital twin is what keeps them saying yes after each model update.

  1. 01

    Sense

    5S TICK

    15,000 SCADA points, weather, market, and DR opt-in states sampled every tick.

  2. 02

    Forecast

    15MIN AHEAD

    Load, solar, wind, and grid-state models emit a distribution 15 minutes ahead.

  3. 03

    Optimize

    MPC

    MPC + economic optimizer proposes actions that minimize cost and carbon under physics constraints.

  4. 04

    Envelope Check

    SAFE-BY-DESIGN

    Every proposed action is bounded by a safety envelope and checked for reversibility within two ticks.

  5. 05

    Actuate

    OVERRIDABLE

    Battery, curtailment, and DR signals dispatched. Operator override can halt at any moment.

  6. 06

    Verify

    CLOSED-LOOP

    Next tick reads the outcome. Digital twin compares to prediction; drift flagged for the model team.

006 · Capabilities

Six capabilities. Every one earned operator trust.

The envelope guard is what convinced the ops room. The digital twin is what convinced the engineering team. The per-action explainer is what convinced the regulator. All three shipped on day one.

01

MPC Controller

Optimize the next 15 minutes. Every 5 seconds.

Model-predictive control optimizes actions across a 15-minute horizon, respecting physics constraints. Rolling horizon, rolling tick — the grid stays a step ahead.

MPC solverRolling horizonPhysics-constrained
02

Envelope Guard

The agent cannot leave the bounds.

Every action is bounded by a human-defined safety envelope — ramp rates, absolute limits, substation-specific constraints. The agent cannot take a step outside it.

Per-substation limitsRamp constraintsHard reject
03

Reversibility Check

If it was wrong, we can undo it.

Before actuation, the controller confirms the action can be undone within two ticks if wrong. No action passes the gate if it would lock the grid into a harder state.

Undo simulation2-tick horizonPer-action proof
04

Digital Twin

Every change tested before it hits electrons.

A shadow environment mirrors the grid. Every model update and envelope change is tested against a week of real data in the twin before reaching production.

Shadow envReplay harnessDrift tolerance
05

Per-Action Explainer

Every dispatched action has a written reason.

Every action has a rationale — what forecast drove it, what alternatives were considered, why the envelope shrank the command. Ops room reads it; regulator may read it.

Counterfactual traceEnvelope noteRegulator-ready
06

Operator Override

The halt button is always on top.

The ops room always has a halt button. Overrides are logged with the operator's rationale and fed back into training — so the agent learns when humans disagreed.

Always-on haltPer-override auditTraining feedback
007 · Outcomes

Six months of closed-loop operation. Zero envelope breaches.

Measured across six months of production on the regional grid. The override rate is the metric the ops team watches — under 0.1% means the agent and the humans are converging, not drifting.

Envelope breaches
0
safety-first by design
Curtailment reduction
−34%
less renewable waste
Peak-shave savings
8.6%
of peak demand
Control tick
5s
sensor → action
Operator overrides
<0.1%
of agent actions
008 · The stack

What we built it with.

Rust for the controller — memory-safe, deterministic, no GC pauses in a 5-second tick. Python for the models. TimescaleDB for the grid timeline. On-prem compute with AWS Outposts for model updates. The SCADA bridge is where physics meets software.

01

Models

  • Temporal Fusion Transformer
  • Kalman filter
  • MPC solver
02

Frontend

  • React
  • Next.js
  • Grafana panels
03

Backend

  • Rust (controller)
  • Python (models)
  • gRPC
04

Data

  • TimescaleDB
  • Parquet
  • MLflow
  • Kafka
05

Infra & Bridges

  • On-prem + AWS Outposts
  • SCADA bridge
  • Digital twin sim
009 · OUTCOME
We were told for years that AI couldn't touch our control loop. It's been six months, zero envelope breaches, and our renewable waste is down by a third. This is what ops AI looks like when it's built seriously.
— Head of Grid Operations, regional European utility (NDA)

The forecasting agent isn't a demo — it's in the control loop, running every five seconds, saving real money on real electrons. Safety-first, reversibility-aware, operator-overridable. A template for AI in critical infrastructure.

Build with us

Want a case study with your name on it?
Let's start the conversation.

Tell us what you're trying to build. We'll be honest about what's hard, what's worth it, and whether we're the right partner for the job.

30-minute call·Written audit within 5 days·No slide deck