Energy & utilities — 2024
Teaching household batteries when to buy and when to sell
Forecasting and optimisation pipelines that control home batteries against day-ahead market prices, solar production and household load.
Stack
The problem
A household with solar panels and a battery is a small trading operation that nobody is running. Electricity prices move hourly on the day-ahead market, solar production depends on weather, and consumption depends on the family. Charge at the wrong hour and the battery costs money instead of saving it.
What was built
A pipeline stack, each stage independently testable, in Kedro:
- Modelling — production and consumption models per household, because a south-facing roof in Groningen is not a north-facing roof in Rotterdam.
- Forecasting — day-ahead production and load forecasts feeding the controller.
- Arbitrage — the optimiser: given day-ahead prices, current grid balance, forecast production and load, and the battery’s state of charge, produce a charge/discharge schedule that minimises the bill inside the battery’s physical limits (power, capacity, depth of discharge) and the inverter’s.
- Self-consumption — a second strategy, optimising for using your own generation rather than for price.
What made it work
Not the model choice. It was treating data quality as a first-class pipeline stage — validating expected columns, types and ranges before anything downstream consumed them — and keeping the optimiser’s constraints explicit and testable. A battery controller that occasionally proposes a physically impossible schedule is not a research curiosity, it is a warranty claim.