Abstract
We consider the problem of operating a battery in a grid-connected home to minimize electricity cost, which includes an energy charge and a tiered peak power charge based on the average of the $N$ largest daily peak powers over a month. With perfect foresight of loads and prices, the minimum cost can be found by solving a mixed-integer linear program (MILP), which provides a lower bound on achievable cost. We propose a model predictive control (MPC) policy that uses simple forecasts of prices and loads and solves a small MILP at each time step. Numerical experiments on data from a home in Trondheim, Norway, show that the MPC policy achieves a cost within $1.7\%$ of the prescient bound.
Introduction
As power grids face increasing stress from peak demand, utilities are moving away from flat rates toward dynamic pricing. This includes Time-of-Use (TOU) tariffs and "demand charges"—fees based on a consumer's highest power draw during a billing cycle. This paper specifically addresses a complex tariff structure recently introduced in Norway, where the peak power charge is calculated from the average of the $N$ largest hourly usage values on different days over a month, quantized into fixed "tiers."
Managing a home battery to minimize costs under these rules is difficult because tiered pricing is non-convex, making standard optimization techniques computationally expensive for simple home hardware. We propose an efficient Model Predictive Control (MPC) strategy that simplifies this non-convex optimization problem into a series of easily solvable linear programs.
System Model
The home energy system consists of three primary components: the utility grid, a local energy storage system (battery), and the household load. The goal is to manage the power flows between these components to minimize the total cost of electricity.
As shown in the figure above, the system must balance the load $l_t$ at each time step $t$ using power from the grid $p_t$ and the battery discharge $d_t$, while also accounting for battery charging $c_t$. The state of the battery and the resulting grid draw determine the monthly costs under the tiered tariff structure.
Methodology
We developed two primary models to solve this optimization problem:
- The Prescient Problem: A theoretical "best-case" scenario where future loads and prices are known perfectly. This is formulated as a Mixed-Integer Linear Program (MILP) to provide a performance lower bound.
- Model Predictive Control (MPC): An implementable policy that makes decisions in real-time. Every hour, the system forecasts future loads and prices over a 30-day horizon, solves an optimization problem, and executes the first step.
To ensure the MPC is computationally efficient for low-power home controllers, we utilize an enumeration method. Since the number of pricing tiers is small, we can solve the MPC problem by enumerating possible tiers for the current and next month. This transforms the complex MILP into a handful of simple Linear Programs (LPs) that can be solved in parallel in milliseconds.
Experimental Setup
The study uses real-world data from a home in Trondheim, Norway, spanning from January 1, 2020, to December 31, 2022. Training data (2020–2021) was used to fit forecasting models, while 2022 data served as the evaluation set. Price data was sourced from Nord Pool (day-ahead prices) combined with local Norwegian TOU and tiered peak power tariffs.
Key Results
The MPC policy was compared against a baseline (no storage) and the prescient (perfect foresight) bound. The results demonstrate that the MPC policy is highly effective:
- Baseline Cost: 25,052 NOK/year
- Prescient Bound: 21,204 NOK (15.4% savings)
- MPC Policy: 21,564 NOK (13.9% savings)
The MPC policy was only 1.7% more expensive than the theoretical limit. Furthermore, the enumeration method allowed the MPC problem to solve in approximately 0.07 seconds, making it suitable for real-time deployment.
Conclusion
This research demonstrates that a relatively simple MPC strategy, combined with a clever enumeration of pricing tiers, can effectively manage home energy storage under complex tariff structures. Future work could extend this model to include controllable loads like Electric Vehicles (EVs) or smart HVAC systems, which would provide additional flexibility and potential for further cost reduction.
Summary updated