Grid-side battery storage is paid through several unrelated markets at once: energy and demand charges on the retail side, and regulation or ancillary-service payments on the system side. Each market imposes its own time scale on the asset. Peak shaving is governed by a 15-minute demand window and a monthly billing cycle; frequency regulation is governed by second-by-second AGC commands. A plant that participates in only one of them leaves the other capability idle, and the resulting utilization hours are usually too low to amortize a 100 MW/200 MWh lithium iron phosphate (LFP) installation within a reasonable horizon. The engineering question is therefore not whether storage can perform either service, but how a single energy battery storage asset can commit capacity to both without one service degrading the other or silently consuming cycle life.
Why single-service operation is economically weak
Two mechanisms limit single-service revenue. First, capacity is stranded: a plant bidding its full power into regulation keeps its energy reserve available for AGC tracking but captures no demand-charge reduction, while a plant dedicated to peak shaving sits idle outside the daily peak window. Second, the two services have complementary statistical structure. AGC signals are zero-mean and fast, whereas load peaks are slow and largely predictable. In principle the fast signal can be followed inside the envelope left by a shaving schedule, so that the same megawatt-hour serves two revenue streams.
Joint optimization studies have described this as a superlinear gain, in which the combined value exceeds the sum of the two services optimized separately. The physical argument is that a fast, zero-mean regulation signal breaks a smooth load peak into short excursions, and a battery that removes those excursions can hold the 15-minute average demand below a threshold it could not reach with constant-power shaving alone. The argument is only as good as the controller implementing it, and day-ahead open-loop schedules cannot absorb the joint uncertainty of load forecasts and AGC realizations. Model predictive control addresses this through rolling re-optimization with feedback correction at each step.

Storage dynamics and degradation accounting
The plant model is a discrete energy balance. With $E(t)$ the stored energy, $P_{ch}$ and $P_{dis}$ the charge and discharge powers, $\eta_c$ and $\eta_d$ the corresponding efficiencies, and $\Delta t$ the control period:
$$E(t+1)=E(t)+\left(\eta_{c}P_{ch}(t)-\frac{P_{dis}(t)}{\eta_{d}}\right)\Delta t,\qquad SOC(t)=\frac{E(t)}{E_{rated}}$$
Operation is bounded by $SOC_{min}\le SOC(t)\le SOC_{max}$ and by power limits on each converter direction. These constraints define the power headroom that the regulation bid must respect: the committed reserve cannot exceed the remaining charge or discharge margin at any instant.
Degradation is where single-service strategies are most often mispriced. A linear model treats aging as proportional to throughput energy, which ignores how deeply the battery is cycled. Under regulation duty the battery executes many shallow partial cycles; under peak shaving it executes fewer but deep ones. A throughput model cannot distinguish these two duty histories even when their megawatt-hour totals match. Rainflow cycle counting resolves the difference: the SOC trajectory is decomposed into full and half cycles with associated depth of discharge, so that each extracted cycle $i$ with depth $DOD_i$ is charged a damage weight:
$$C_{age}=\lambda_{cell}E_{rated}\sum_{i=1}^{N_{cyc}}\phi\left(DOD_{i}\right)$$
Here $\lambda_{cell}$ is the per-kWh replacement cost of the battery and $N_{cyc}$ the number of counted cycles. The weighting function $\phi$ is fitted to LFP cycle-life test data, with a shape parameter $k=0.25$ that controls sensitivity to deep cycling. This term enters the dispatch objective directly, so shallow, high-value cycles and deep, low-value ones are no longer interchangeable from the optimizer’s point of view.
The full economic objective combines energy charges, demand charges, regulation revenue and aging cost over the control horizon:
$$\min C=C_{energy}+C_{demand}-R_{reg}+C_{age}$$
Regulation revenue is modeled as a capacity payment net of a tracking penalty, with $\lambda_c$ the capacity price, $C_{bid}$ the bid capacity, $T_{reg}$ the service duration, $\lambda_m$ the penalty coefficient, $P_{bat}$ the battery power and $r(t)$ the normalized AGC signal:
$$R_{reg}=\lambda_{c}C_{bid}T_{reg}-\lambda_{m}\sum_{t}\left|P_{bat}(t)-C_{bid}\,r(t)\right|\Delta t$$
The demand component is evaluated on the average net load over a 15-minute sliding window, since that is the quantity a demand tariff actually bills.
Two-layer MPC architecture
The controller separates the two time scales explicitly, which is what allows a 15-minute billing quantity and a 4-second tracking requirement to be handled by the same asset.
Upper layer — day-ahead economic rolling optimization (15 min). Using load forecasts and a scenario set of AGC realizations over a 24-hour window, the upper layer solves for the demand threshold reference $U^{*}$ and the regulation capacity bid $C_{bid}$. It is re-solved on a rolling basis so that the threshold and bid are revised as forecasts update. Reserve constraints ensure the committed regulation capacity never exceeds the battery’s remaining power margin, and the aging term keeps the optimizer from buying regulation revenue with excessive cycling.
Lower layer — real-time tracking and correction (4 s). The lower layer receives $U^{*}$ and $C_{bid}$ and solves a quadratic program every 4 seconds:
$$\min_{P_{bat}}\ Q\sum_{k=1}^{N_{p}}\left[\max\left(0,\ \hat{P}_{net,k}-U^{*}\right)\right]^{2}+R\sum_{k=1}^{N_{p}}\left(P_{bat,k}-C_{bid}\,r_{k}\right)^{2}$$
The first term is a soft constraint that penalizes predicted peaks above $U^{*}$ over the look-ahead window; the second is the AGC tracking term. The weights are set with $Q\gg R$, which encodes a clear operating priority: track the regulation command closely under normal conditions, and superimpose shaving power only when the predicted load peak approaches the threshold. The storage dynamics, power limits and SOC bounds appear as hard constraints in the same program. The result is a controller that treats demand-limit compliance as a floor and regulation accuracy as the objective, rather than blending the two into a fixed weighted sum.
Case study: 100 MW/200 MWh LFP plant
The configuration examined is a grid-side 100 MW/200 MWh LFP plant in a regional grid, capable of two hours of full-power charge or discharge. Cost and operating parameters follow current Chinese electricity market rules and equipment pricing. The AGC input is historical command data from a regional grid, normalized to $[-1,1]$ with variance $\sigma^{2}\approx0.10$. A typical summer day load profile is simulated and the results scaled to a 30-day month.
Three operating modes are compared. Mode A is pure peak shaving with a constant power threshold and no regulation response. Mode B is pure frequency regulation, bidding maximum capacity with no demand constraint. Mode C is the two-layer MPC strategy described above. The monthly results are summarized below.
| Operating mode | Monthly comprehensive cost (104 CNY) | Demand charge (104 CNY) | Aging cost (104 CNY) | Equivalent cycle life (years) | Cost change relative to Mode C |
|---|---|---|---|---|---|
| A — peak shaving only | 16,003 | 3,325 | — | — | +2.26% |
| B — frequency regulation only | 16,837 | — | 138 | 6.7 | +7.10% |
| C — two-layer MPC | 15,642 | 3,185 | — | 8.0 | — |
Mode C reaches a monthly comprehensive cost of 156.42 million CNY, which is 3.61 million CNY (2.26%) below Mode A and 11.95 million CNY (7.10%) below Mode B. The most instructive result is Mode B: high-frequency cycling pushes its aging cost to 1.38 million CNY and leaves it with the highest total cost of the three, despite bidding the most regulation capacity. At the hundred-megawatt scale, maximizing regulation revenue without a demand-side constraint damages whole-life economics.
Reading the superlinear effect
The demand-charge figures provide the mechanism evidence. Mode C pays 31.85 million CNY in demand charges against 33.25 million CNY for Mode A, a reduction of 1.40 million CNY, even though part of Mode C’s power budget is continuously occupied by regulation tracking. The explanation is statistical rather than structural: the zero-mean AGC signal converts a smooth load peak into short excursions, and removing those excursions lowers the maximum 15-minute average, which is exactly the quantity billed. The 200 MWh energy capacity matters here as well, because it sustains shaving across the full peak window instead of exhausting headroom early.
It is worth separating two claims that are often conflated. The superlinear effect concerns demand-charge reduction, and the 1.40 million CNY gap between Modes C and A supports it. The net cost advantage of joint operation over pure shaving is smaller, at 2.26%, because it is the demand-charge gain plus regulation revenue minus the additional degradation incurred while tracking. A joint strategy that ignores the aging term would report a larger gross revenue and a worse net result, which is precisely the error the rainflow accounting is meant to prevent.
Sensitivity to the demand tariff
Because the demand charge is the channel through which joint operation creates value, the tariff level governs how much of that value is accessible. Sweeping the demand price $\lambda_{peak}$ shows two regimes. Below 25 CNY/(kW·month), shaving has too little reward to shape dispatch, the controller concentrates on regulation, and comprehensive cost savings stay near 1.2%. Above 40 CNY/(kW·month), savings expand steeply and exceed 3.5%. The strategy therefore belongs to regions where demand charges are a large share of operating cost, or to plants whose peak-window load is high and predictable.
Life-cycle effects and control logic
Mode C’s equivalent cycle life is 8.0 years, 19.4% longer than the 6.7 years implied for Mode B. The gain does not come from doing less work but from choosing which work to do. By predicting the SOC trajectory over the look-ahead window, the rolling optimizer can avoid shallow charge-discharge loops that consume cycle life while earning little, and allocate cycling to periods where regulation or shaving value is highest. The added regulation revenue more than covers the incremental aging cost, so lifetime and economics improve together rather than trading off.
These results come from simulation of a single plant using one regional grid’s historical AGC data and a typical summer day load profile extrapolated to monthly figures, not from a field demonstration. Two consequences follow for deployment. The savings are software-derived: no additional power conversion or battery capacity is required, which lowers the barrier to retrofit. But the magnitude is tariff- and signal-specific, and the demand-threshold and bid parameters must be re-estimated for each host grid, market rule set and load shape before the reported percentages can be treated as transferable.
Conclusions
Combining peak shaving and frequency regulation on one energy battery storage asset is fundamentally a multi-time-scale control problem, not a portfolio of independent services. A two-layer MPC structure resolves it: a 15-minute rolling economic layer sets the demand threshold and regulation bid over a 24-hour horizon, and a 4-second quadratic program tracks AGC commands while penalizing any predicted excursion above the threshold, with $Q\gg R$ making the priority order explicit. Rainflow-based aging accounting is a necessary part of that structure, because it prices shallow regulation cycles and deep shaving cycles differently and prevents the optimizer from over-committing the battery. On the 100 MW/200 MWh LFP case, joint operation reduces monthly comprehensive cost by 2.26% relative to pure shaving and 7.10% relative to pure regulation, lowers the demand charge from 33.25 to 31.85 million CNY, and extends equivalent cycle life by 19.4% relative to regulation-only duty. The value scales with the demand tariff, exceeding 3.5% cost savings where demand prices pass 40 CNY/(kW·month).
