Project notebook
BatteryBuddy
A data-driven platform that models half-hourly electricity usage, dynamic tariffs, and home battery behaviour to determine the optimal strategy for minimising household energy costs.
Project brief
What this project is doing
BatteryBuddy is a personal project exploring how software can help households reduce electricity costs by optimising the interaction between time-of-use energy tariffs and home battery storage. The UK electricity market is rapidly shifting toward half-hourly pricing, where the cost of electricity varies throughout the day based on wholesale market conditions. At the same time, residential battery installations are increasing as households adopt solar and look for ways to manage energy costs. Despite this shift, there are very few tools that allow consumers to accurately analyse the economic impact of different tariffs or battery strategies using their real usage data. BatteryBuddy addresses this problem by modelling electricity consumption, tariffs, and battery behaviour at the half-hour settlement period level used by the UK electricity system. The platform evaluates how electricity usage would be priced under different tariffs and simulates how a battery could shift consumption to minimise cost.
Core Idea
At its simplest, electricity cost is:
cost = consumption × tariff
BatteryBuddy expands this calculation into a constrained optimisation problem. By modelling the battery’s state of charge, power limits, and round-trip efficiency, the system can determine when it is optimal to charge the battery and when to discharge it in order to reduce the total cost of electricity.
This allows BatteryBuddy to answer questions such as:
• Which tariff would have been cheapest for a household’s historical usage?
• How much money could a battery save under different tariff structures?
• What battery size produces the best return on investment?
• How should a battery operate across the day to minimise electricity costs?
Data Model
The platform operates on the 48 half-hour settlement periods per day used by the UK electricity market. For each period the system stores and evaluates: • electricity consumption (kWh) • tariff price (p/kWh) • battery state and charge/discharge decisions
This approach aligns with industry data sources such as the balancing mechanism and market reporting services operated by Elexon, and the regulatory framework overseen by Ofgem.
Technical Approach
BatteryBuddy is designed as a data-driven optimisation platform with several key technical components: • Time-series data storage for half-hourly consumption and tariff data (PostgreSQL / TimescaleDB) • Energy tariff ingestion from supplier and market datasets • Battery optimisation engine using linear programming, with potential evolution toward model predictive control • Simulation layer for comparing tariffs and battery configurations • Web interface for scenario exploration and visualisation
The optimisation component is particularly interesting: rather than performing simple heuristics (e.g., “charge when cheap”), the system calculates the mathematically optimal battery schedule across the full time horizon.
Why This Project Matters
BatteryBuddy sits at the intersection of several structural changes in the energy market: • increasing adoption of dynamic tariffs • rapid growth of residential batteries • expansion of half-hourly smart meter data • demand for consumer-level energy optimisation tools
These trends create opportunities for software platforms that can translate complex market signals into actionable decisions for households.
What It Demonstrates
BatteryBuddy is also intended as a portfolio project demonstrating capabilities relevant to energy and climate-tech startups: • energy market data modelling • optimisation and control algorithms • time-series data architecture • real-world infrastructure integration • translating complex technical systems into user-facing tools
The project reflects an interest in building software that interacts with physical infrastructure and markets, particularly in the context of the energy transition.
Longer Term Vision
While BatteryBuddy currently focuses on tariff comparison and battery optimisation, the broader opportunity is a platform that helps households actively participate in a more dynamic electricity system — automatically responding to price signals, renewable generation, and grid conditions. The long-term question behind the project is simple: If electricity prices change every 30 minutes, why shouldn’t our homes respond automatically?
Related posts
Tagged posts for BatteryBuddy
0 posts
No posts have been tagged for this project yet. New notes will appear here as the work progresses.