Aging-aware battery control via convex optimization
This page was written by an AI model to give a high-level overview of the paper. Please check the paper for detail: SpringerLink.
A battery attached to the grid or to a computation center has a job that plays out over hours or days: buy energy when it is cheap and sell it when it is expensive (energy arbitrage), or absorb the swings of a fluctuating load so that the power drawn from the grid changes smoothly (load smoothing). Both jobs get better the more the battery is charged and discharged. But every cycle wears the battery out, and its lifetime, the time until its capacity falls below a set fraction (such as 80% or 90%) of the original, is measured in months and years. The paper asks how to control a battery so that it trades these two objectives off optimally.
Prior work on aging-aware scheduling, as the paper reviews it, mostly uses mixed-integer linear programs (MILPs), which are NP-hard and can take time exponential in the number of variables; dynamic programming, which becomes expensive over long horizons and fine-grained charge levels; or rule-based heuristics, which capture broad trends but not the aging physics. Detailed electrochemical aging models, meanwhile, are hard to use in real time.
The key idea is to make battery aging a convex cost. The paper starts from an existing semi-empirical aging model for lithium iron phosphate (LiFePO4) cells, which gives the rate at which capacity is lost as a nonlinear function of the current, the charge level, the accumulated charge throughput and temperature. Two observations make it tractable. First, the terms that depend on the battery's history (capacity and accumulated throughput) change only over months, so over a planning window of a day they can be treated as constants. Second, a first-order Taylor expansion of what remains turns the aging rate into a coefficient times the absolute value of the current, |b|. That term is convex, so adding it to any convex task objective keeps the whole problem convex.
The controller is model predictive control (MPC): every period it solves a small convex problem that plans the battery's power over the next H periods, minimizing the task cost plus γ times the approximate aging cost, then applies only the first step and re-plans. The weight γ sets the trade-off. Sweeping γ and simulating until the battery reaches end of life traces out how task performance falls as lifetime rises. The problems are written in CVXPY and solved with the Clarabel solver; each arbitrage subproblem solves in milliseconds.
All results are simulations. The approximate aging model predicts lifetimes within a few percent of the full model (5.70 vs 5.60 years at 2 cycles per day, 2.85 vs 2.75 at 4). For arbitrage on 2012 ERCOT day-ahead prices, with prices assumed known 24 hours ahead, lifetimes range from 6 to 22 years as γ varies; average hourly revenue falls as lifetime grows, total revenue rises, and at a 20% interest rate the net present value of revenue peaks at a lifetime of around 10 years. For smoothing a simulated LLM-training load, the RMS change between periods drops from 10.29 kW without a battery to 0.44 kW with an 11-year lifetime (about 23 times smoother) and 6.20 kW with a 22-year lifetime (about 1.7 times).
Key takeaways
- Battery tasks such as arbitrage and load smoothing improve with more cycling, and more cycling shortens battery life; the two objectives live on time scales of hours and of years.
- The paper takes an existing semi-empirical LiFePO4 aging model, holds its slowly changing terms fixed over a planning window, and linearizes the rest, giving an aging cost proportional to
|b|, which is convex. - With that cost, each control step is a small convex problem solved by MPC; a single weight γ sets the trade-off between the task and lifetime.
- The approximation predicts lifetimes within a few percent of the full model (5.70 vs 5.60 years and 2.85 vs 2.75 years for the two test profiles).
- In simulation, arbitrage revenue per hour falls as lifetime grows, and at a 20% interest rate the revenue's net present value peaks near a 10-year lifetime; load smoothing goes from about 23 times smoother (11-year life) to about 1.7 times (22-year life).
From a nonlinear aging model to a convex MPC controller
How a cell ages, how the paper turns aging into a convex cost, and what happens when that cost is used for arbitrage and load smoothing.
1 · Battery basics: charge, capacity, C-rate, lifetime
The paper models a single cell first and then scales up. A cell's charge q̃t (in ampere-hours, Ah) lies between 0 and its capacity Q̃t, where 0 and Q̃t mean the bottom and top of the cell's useful range. Time is split into periods of δ hours, the current b̃t is constant within a period (positive means discharging), and the charge evolves as q̃t+1 = q̃t − δ·b̃t. The current is limited by the C-rate: |b̃t| ≤ C·Q̃1, so a maximum C-rate of 0.33 per hour means a full charge or discharge takes about 3 hours.
As the cell is used, its capacity shrinks. The paper tracks the normalized capacity loss lt = (Q̃1 − Q̃t)/Q̃1 and the aging rate ρt = (lt+1 − lt)/δ, the loss per hour. Lifetime is the time at which capacity first drops below a fixed fraction of its initial value, such as 90% (80% is also common). Typical aging rates are on the order of 10−6 to 10−5 per hour, which the paper says corresponds to lifetimes from about 2 to 20 years.
A multi-cell battery of N cells is modeled as perfectly balanced (every cell has the same current, charge and capacity) with a constant 3.3 V cell voltage, so battery power, charge and capacity in watts and watt-hours are just 3.3·N times the cell quantities. The battery's maximum C-rate equals the cell's.
2 · The cell aging model
Aging is usually split into calendar aging (while the cell rests) and cycle aging (while it is charged and discharged); both are sensitive to temperature, current and state of charge. Of the three families of models the paper reviews (electrochemical, empirical and semi-empirical), it adopts a semi-empirical one: the model of Suri and Onori (2016) for a 2.5 Ah, 3.3 V LiFePO4-graphite cell of the kind used in hybrid electric vehicles. Written in the paper's notation, its aging rate (Eq. 1) is
| Factor | What it captures | Constants |
|---|---|---|
| Accumulated throughput (Σ|b̃|δ)z−1 | All the charge that has passed through the cell so far, in Ah, raised to a power law | z = 0.60 |
| Current |b̃t| | Aging happens in proportion to how much charge moves this period | none |
| Charge level α·q̃/Q̃ + β | A fuller cell ages faster; q̃/Q̃ is the charge as a fraction of capacity | α = 28.966, β = 74.112 |
| Arrhenius term exp(...) | Temperature dependence, plus faster aging at a higher instantaneous C-rate |b̃|/Q̃ | Ea = 31500 J/mol, Rg = 8.314 J/(mol·K), η = 152.5; T in kelvin |
Because dΣ|b̃|δ/dt = |b̃| (this summary's arithmetic), the first two factors together are the time derivative of (Σ|b̃|δ)z: capacity loss grows roughly like accumulated throughput to the power 0.6, so each additional ampere-hour costs a little less capacity than the one before (inference from Eq. 1). The paper notes that its method applies to any cell aging model, and its convexification is tailored to models with an Arrhenius term like this one.
3 · Separating fast and slow quantities
The paper calls b̃t and q̃t short-term quantities: they can change a lot from one period to the next. Capacity Q̃t and accumulated throughput are long-term quantities: they change appreciably only over months (for throughput, after the first few months), so over a few days they are nearly constant. Grouping the long-term parts into three coefficients gives Eq. 2:
with μt = β·exp(−Ea/(RgT))·z·(Σ|b̃|δ)z−1, νt = α/(β·Q̃t) and λt = η/(Rg·T·Q̃t). All three are known at time t and treated as constants over a planning window. What remains depends only on the current and the charge level. It is still not convex as a joint function of the two: it multiplies a term in |b̃| by a term in q̃ (inference).
4 · The convex approximation
The paper takes a first-order Taylor expansion of Eq. 2 in |b̃t| and q̃t around |b̃t| = 0 and q̃t = Q̃t/2 (an idle, half-full cell). The result, Eq. 3, is
The aging rate becomes a slowly changing coefficient times the absolute current. An absolute value is convex, so this term can be added to any convex task objective. In effect each unit of charge moved through the battery is charged a price that the controller refreshes as the battery ages (inference). The paper acknowledges that the approximation "seems crude", but states that at the battery's recommended C-rates and in these applications it accurately represents the full model.
To check, the paper simulates a grid-scale battery with a maximum C-rate of 0.33 per hour under two fixed profiles that fully charge and discharge it at constant current, 2 or 4 times a day, and compares capacity loss under the exact model (Eq. 2) and the approximation (Eq. 3):
| Cycles per day | Lifetime, exact model | Lifetime, approximation | Difference (this summary's arithmetic) |
|---|---|---|---|
| 2 | 5.60 years | 5.70 years | +1.8% |
| 4 | 2.75 years | 2.85 years | +3.6% |
5 · Convex optimization and model predictive control
A convex optimization problem minimizes a convex function subject to constraints that define a convex set; any local minimum is a global one, and such problems can be solved reliably and efficiently (general knowledge). The paper contrasts this with the MILPs common in aging-aware scheduling, which are NP-hard, and with dynamic programming, which is exact for its model but costly over long horizons. The problems here are written in CVXPY, a Python modeling language for convex optimization, and solved by Clarabel, an interior-point solver.
Model predictive control (also called receding-horizon control) uses a convex problem as a policy:
- At period t, read the current state: the battery's charge qt, its capacity Qt, and the aging coefficient μt(1 + νtQt/2), all held constant over the horizon.
- Plan the battery's power for the next H periods by solving the convex problem with known prices or a forecast.
- Apply only the first planned power. Discard the rest of the plan.
- One period later, with new data, re-plan from scratch.
6 · Task 1: energy arbitrage
The battery sells to the grid at price pt (USD/MWh) and receives pt·bt·δ in period t; negative payments mean it buys. A greedy, aging-unaware policy discharges as much as possible at high prices and charges as much as possible at low ones, which cycles the battery aggressively. The MPC problem at period t is
subject to qτ = qτ−1 − δbτ−1, |bτ| ≤ C·Qt, 0 ≤ qτ ≤ Qt
γ > 0 trades revenue against aging, and η > 0 (a different symbol use from the Arrhenius constant above) penalizes ending the horizon far from half capacity, which keeps each plan from emptying the battery just because the horizon ends (inference).
- Prices. Hourly day-ahead locational marginal prices for the ERCOT (Electric Reliability Council of Texas) North Hub, January 1 to December 31, 2012: 8784 points with a mean of 27.58 USD/MWh, a standard deviation of 39.36 and a maximum of 1524.42. The two major peaks fall in summer; winter days show morning and afternoon peaks, summer days one early-afternoon peak.
- Multi-year runs. The 2012 data is repeated for every simulated year (dropping February 29 in non-leap years) to remove year-to-year variation, such as the roughly 9000 USD/MWh spike during the February 2021 winter storm.
- Perfect price foresight. The controller is assumed to know the next H prices. The paper notes that in practice ERCOT publishes day-ahead prices around 1:00 PM for the next day, so some hours would need a forecaster.
- Settings. δ = 1 hour, H = 24, η = 1 (results were not sensitive to η). The simulation runs until the battery reaches end of life, for a range of γ.
7 · Arbitrage results
As γ varies, battery lifetime ranges from 6 to 22 years. Average hourly revenue falls as lifetime grows, from about 7.0 USD/hour at the shortest lifetime to about 5.3 USD/hour at the longest (read from the paper's Figure 5, approximate), while total revenue over the battery's life rises with lifetime. Because longer life always means more total revenue, the paper evaluates the net present value (NPV) of revenue, NPV(i) = Στ pτbτδ / (1+i)τ, which discounts future revenue at the cost of capital i.
| Interest rate i | NPV versus lifetime (paper's Figure 6) |
|---|---|
| 0% | Rises steadily with lifetime, to about 1.0 million USD at about 22 years (read from the figure) |
| 10% | Rises up to roughly 10 to 12 years, then stays nearly flat (read from the figure) |
| 20% | Maximized at a lifetime of around 10 years (stated in the text) |
At the operating-pattern level, for a battery with an 8.75-year lifetime, discharging coincides with high prices and charging with low ones. In summer the battery discharges almost every day around noon and charges in the early morning; in winter it is idle most of the time and cycles only a few times a week.
8 · Task 2: smoothing a computation-center load
A load wt (for example a computation center) runs in parallel with the battery, giving a combined power zt. The goal is for z to change slowly, measured by the RMS difference between successive periods, D = ((1/(T−1))·Σt (zt+1 − zt)2)1/2; smaller is better. The MPC problem replaces the revenue term with the squared change (zτ − zτ−1)2, keeps the same aging and end-of-horizon terms, uses the load forecast ŵτ|t for future periods, and adds z ≥ 0.
- Battery. N = 15000 cells, 123.75 kWh initial capacity (the paper compares this to 9 residential batteries of 13.5 kWh), maximum C-rate 0.3 per hour, so a full charge or discharge takes about 3 hours.
- Load. Simulated data modeled on an LLM training job in the MIT Supercloud dataset: three power states of 5, 20 and 35 kW in 20-minute periods, with transitions drawn from a Markov chain whose matrix is taken roughly from that dataset. Its long-run state probabilities are 0.40, 0.38 and 0.22, for an average load of 17.25 kW. The paper generates 25 years of data (657000 points) starting January 1, 2018.
- Forecast. The conditional mean given the current state, computed from powers of the transition matrix. The forecasts converge to the steady state after about 2 hours.
- Settings. δ = 1/3 hour, a 6-hour horizon (18 periods, this summary's arithmetic), η = 0.5 (results were not sensitive to η), simulated until end of life for a range of γ.
9 · Load-smoothing results
A shorter allowed lifetime lets the controller cycle harder and smooth more. In the paper's daily profiles (Figure 11), the 11-year controller turns the load's jumps between 5, 20 and 35 kW into slow ramps, while the 15-year controller follows the load more closely and only rounds off its edges.
10 · Assumptions and limits the paper states
- Simulation only. Both tasks are simulated: arbitrage on one year of real prices repeated, load smoothing on a synthetic Markov-chain load. Repeating 2012 removes the year-to-year price variation real deployments see.
- Known future. Arbitrage assumes the next 24 hourly prices are known; in practice ERCOT's day-ahead prices arrive around 1:00 PM, so a forecaster would be needed for some hours. MPC itself uses a single forecast and does not model uncertainty; the paper points to robust, stochastic and multi-forecast variants in its related work.
- Model scope. One cell chemistry and aging model (LiFePO4-graphite, Suri and Onori 2016), balanced cells and a constant cell voltage. The method is presented as applicable to other semi-empirical models, especially those with an Arrhenius term.
- Approximation range. The Taylor expansion is justified for the battery's recommended C-rates and these applications; the paper checks it on two fixed charging profiles.
The code and data are open source at the cvxgrp GitHub repository.
FAQ
Q·Why would a computer systems lab work on battery control?▾
One of the two tasks is smoothing the power drawn by a computation center. The paper's load is modeled on a large language model training job, whose power jumps between a few discrete levels, and it reviews prior work on batteries in datacenter uninterruptible power supplies and standalone battery banks. Smoothing such a load with a battery is a compute-infrastructure problem as much as a power-systems one.
Q·Why not just use a rule such as "never discharge below 20%"?▾
The paper reviews such heuristics and finds that they capture broad trends through simple functions but do not represent aging as a physics-based or semi-empirical model does. A rule also does not say how much task value is lost for how much lifetime gained; the γ sweep makes that trade-off explicit.
Q·Why insist on convexity instead of using a MILP or dynamic programming?▾
The paper notes that MILPs, common in aging-aware scheduling, are NP-hard and their solve time can grow exponentially with the number of variables, and that exact dynamic programming becomes expensive as the number of time steps or the granularity of the charge level grows. A convex problem of this size is solved quickly and reliably: each arbitrage subproblem takes on the order of milliseconds. The paper lists the convex aging approximation, and the efficient MPC it enables, among its main contributions.
Q·How good is a linear approximation of an exponential aging law?▾
On the paper's test, close: for full charge-discharge cycles at constant current, the approximation predicts 5.70 years against 5.60 for the full model at 2 cycles per day, and 2.85 against 2.75 at 4 cycles per day, a slight overestimate of lifetime in both cases (this summary's reading of Table 1). The paper attributes the accuracy to the battery's recommended C-rates; at such low currents the exponential term in the current stays close to 1 (inference). It presents the approximation as tailored to Arrhenius-type models.
Q·If the coefficients are frozen, how does the controller react as the battery ages?▾
They are frozen only within one plan. At every period the controller reads the current capacity Qt and recomputes μt and νt from the accumulated throughput, so the aging price on |b| and the power and charge limits track the battery's condition. The assumption is that these quantities barely change over the planning horizon (one day or six hours), which the paper argues holds because they change appreciably only over months.
Q·What does γ mean, and how would an operator choose it?▾
γ is a weight on the aging cost relative to the task cost; the paper does not assign it a unit price. Each value of γ yields a lifetime and a task performance, so sweeping it traces the trade-off curve. For arbitrage, the paper then picks a point using net present value: with revenue discounted at the cost of capital, the best lifetime at a 20% interest rate is around 10 years.
Q·Why does a higher interest rate favor a shorter battery life?▾
Cycling harder earns more per hour now and less in total. Discounting makes revenue in later years worth less today, so at a high interest rate the extra revenue from a long life counts for little, and a moderately aggressive policy maximizes NPV (general reasoning about discounting, consistent with the paper's Figure 6). At 0% interest NPV equals total revenue, which keeps rising with lifetime.
Q·Does the controller need to know future prices or loads?▾
It needs a forecast. For arbitrage the paper assumes the next 24 hourly prices are known exactly, and notes that ERCOT's day-ahead prices are published around 1:00 PM for the next day, so in practice some hours would need a forecaster. For load smoothing it uses a simple conditional-mean forecast from the Markov model of the load. MPC plans with a single forecast and does not model its uncertainty.
Q·Where do calendar aging and temperature come in?▾
The paper's related work distinguishes calendar aging (at rest) from cycle aging (during use) and notes that both are sensitive to temperature, especially above 30 °C. In the model it adopts, temperature enters through the Arrhenius term, and the current |b̃t| multiplies the whole aging rate, so a cell carrying no current does not age in this model (inference from Eq. 1).
Q·Does the method only work for LiFePO4 cells?▾
The numbers do: the model and its constants are for a 2.5 Ah, 3.3 V LiFePO4-graphite cell. The paper states that its methods can be used with other cell aging models, and that its convexification applies to a variety of semi-empirical models, being tailored to those that represent aging with an Arrhenius term.
Q·Is the computation-center load real?▾
No. It is simulated from a three-state Markov chain (5, 20 and 35 kW) whose transition probabilities are taken roughly from a published LLM-training trace in the MIT Supercloud dataset, generating 25 years of 20-minute periods. Prices for arbitrage, by contrast, are real ERCOT 2012 data, repeated for every simulated year.
Q·What does the evaluation not show?▾
It is entirely simulated, with aging computed from the model rather than measured on hardware. It does not include price forecasting error, year-to-year price variation, or a load trace replayed directly (the load is synthetic). The approximation is validated on two fixed charging profiles. These are the boundaries the paper itself describes in its data and setup sections.
Q·Can I reproduce the results?▾
The paper states that all data and code are public at the cvxgrp GitHub repository. The problems are written in CVXPY and solved with Clarabel.