How does storage move energy through time?
Charge with midday sun, discharge at sunset
9 June 2025 in Prairie Town: the price of one more MWh in each hour, and the best battery schedule
With JavaScript on, you schedule the battery yourself, then ask a solver for the best schedule.
Real shapes. Demand, wind and solar follow the hourly shapes of 9 June 2025 on the Southwest Power Pool grid (EIA-930), scaled to the town as in lesson 0.
Illustrative. Prairie Town, its plants, prices and battery. The nuclear plant runs flat; this lesson leaves out the combined-cycle's ramp limit.
What you just did, as diagrams
- Power and energy
- A 25 MW, 100 MWh battery charges or discharges at up to 25 MW and holds up to 100 MWh: four hours flat out.
- Round-trip efficiency
- This battery returns 80% of what goes in; the rest becomes heat.
- State of charge
- The energy stored at the end of each hour; it links each hour to the next.
- Value
- The battery's value is what it saves the town: $7,240 on this day with the best schedule.
- Decisions
- For each hour: how much the battery charges and discharges, and how much it then holds.
- Goal
- The lowest running cost for the town's day.
- Rules
- At most 25 MW in or out; 0 to 100 MWh stored; 80% of what goes in is stored; supply equals demand every hour.
| Battery | Saving that day | Per MWh of storage |
|---|---|---|
| 1 hour, 25 MWh | $2,500 | $100 |
| 2 hours, 50 MWh | $5,000 | $100 |
| 4 hours, 100 MWh | $7,240 | $72 |
| 8 hours, 200 MWh | $7,336 | $37 |
Go deeper · AnalystPrices, losses and the break-even spread
- Break-even. A MWh stored at price \(p_\text{in}\) comes back as 0.8 MWh, so it pays only if the selling price beats \(p_\text{in}/0.8\): buy at $40, sell above $50.
- Spilled sun. It costs $0, so storing it always passes that test.
- One more MWh. Each hour’s price is the cost of one more MWh. A 25 MW battery is more than that: at 08:00 only 3 MW of sun is spilled, so full-power charging takes 22 MW from gas at $40.
- The real saving. So this lesson counts what the town actually saves. Your best full-power schedule saves $6,360; the solver saves $7,240 by charging at part power, matching each hour’s spill.
Go deeper · ModelerThe battery's day as a linear program
Decisions for each hour \(t\): charging, discharging and the state of charge, with the gas plants and spill as in lesson 0.
| Symbol | Meaning | Unit |
|---|---|---|
| \(t\) | the hour, 0 to 23 (1 MW for one hour = 1 MWh) | – |
| \(p_{\mathrm{cc},t}\), \(p_{\mathrm{pk},t}\) | combined-cycle and peaker output | MW |
| \(s_t\) | spilled wind and sun | MW |
| \(c_t\), \(d_t\) | battery charging and discharging | MW |
| \(e_t\) | energy stored at the end of hour \(t\) | MWh |
| \(g_t\) | the gap: demand minus nuclear, wind and sun | MW |
| \(w_t\), \(\sigma_t\) | wind and sun output | MW |
\[\min \sum_t \big(40\,p_{\mathrm{cc},t} + 100\,p_{\mathrm{pk},t}\big)\]
Rules for every hour, top to bottom: balance, state of charge, power, energy, the gas plants’ sizes and spill.
\[ \begin{gathered} p_{\mathrm{cc},t} + p_{\mathrm{pk},t} - s_t + d_t - c_t = g_t\\ e_t = e_{t-1} + 0.8\,c_t - d_t, \quad e_{-1} = 0\\ 0 \le c_t,\ d_t \le 25\\ 0 \le e_t \le 100\\ 0 \le p_{\mathrm{cc},t} \le 150, \quad 0 \le p_{\mathrm{pk},t} \le 100\\ 0 \le s_t \le w_t + \sigma_t \end{gathered} \]
- Over time. The state-of-charge rule is the only one linking one hour to the next; it makes storage a problem over time.
- Losses. Here the whole loss sits on charging; many models split it, \(\sqrt{0.8}\) each way.
- Left out of the goal. The nuclear plant’s $24,000 for the day is the same in every plan.
- Always an answer. The page’s code also allows unserved demand at $3,000/MWh, so the model always has a solution; on this day none is needed.
- Next. Lesson 10 writes such a model down and lesson 11 checks a solver’s answer. M3 (capacity expansion) chooses the battery’s size too, and A8 compares how long a store should last.
Go deeperWhat this lesson leaves out
- One day only. A battery's yearly value needs every day of the year, including days with no spilled sun (M3 checks a plan on every hour of a year).
- Perfect foresight: the solver knows the whole day in advance. Real operators schedule with forecasts that miss (lesson 4).
- The cost of building the battery and of its wear, which would set a minimum spread worth cycling for (lesson 7).
- The combined-cycle's ramp limit from lesson 0, and any limit on the wires.
Check yourself
Myth or fact? “A battery's MWh rating tells you its maximum power.”
- Myth
- Fact
Answer
Myth. The MWh say how much it holds; a separate MW rating says how fast. Prairie Town's 100 MWh battery delivers at most 25 MW, for four hours.
Myth or fact? “A battery adds energy to the grid.”
- Myth
- Fact
Answer
Myth. It moves energy in time and loses some on the way: this one returns 80% of what goes in.
Myth or fact? “Buying at $40/MWh and selling at $45/MWh pays for this battery.”
- Myth
- Fact
Answer
Myth. 1 MWh bought for $40 returns 0.8 MWh, worth $36 at $45. It needs a selling price above $50.
A 50 MW, 200 MWh battery with 80% round trip charges 100 MWh at $20/MWh and later sells all it stored at $60/MWh. What does it earn?
- $4,000
- $2,800
- $4,800
- $2,000
Answer
$2,800: it stores 80 MWh and sells them for 80 × $60 = $4,800, minus the $2,000 it paid.
On 9 June 2025, going from a 4-hour to an 8-hour battery (both 25 MW) raises Prairie Town's saving by how much?
- It doubles
- About half again
- Only $96
- Nothing at all
Answer
Only $96 ($7,240 to $7,336): it stores the last 3 MWh of spilled sun and returns 2.4 MWh at $40. The peaker's last 5 MWh remain, since both discharge at most 25 MW.
Numbers, sources and what’s next
Numbers to remember
| Number | What it means | Source |
|---|---|---|
| 82% | Average monthly round-trip efficiency of U.S. utility-scale batteries in 2019 (pumped storage: 79%). | EIA, Today in Energy · published 12 Feb 2021; data for 2019 |
| 43.6 GW | U.S. operational utility-scale battery storage capacity at the end of 2025; nearly 52 GW by the end of June 2026. | EIA, Today in Energy · published 7 Aug 2026 |
| 4 to 8 hours | Batteries of this duration are typically cycled once a day to shift electricity from low-demand to high-demand times. | EIA, Today in Energy · published 25 Mar 2022; data through 2020 |
| $7,240 | What the best schedule of Prairie Town's 25 MW, 100 MWh battery saves on 9 June 2025, against $80,460 for the day without it. | This lesson's model (illustrative) |
Next on the starter path
In the real world
U.S. utility-scale battery capacity reached 43.6 GW at the end of 2025. Batteries of four to eight hours typically cycle once a day, from low-demand to high-demand hours: the pattern the solver found here (EIA).
Case file CF6 (average and marginal emission factors, and when moving electricity use to cleaner hours lowers CO₂).
Sources and further reading
- EIA (2021). Utility-scale batteries and pumped storage return about 80% of the electricity they store. Today in Energy.
- EIA (2022). Duration of utility-scale batteries depends on how they're used. Today in Energy.
- EIA (2026). Battery storage capacity averaged 70% growth over the last three years. Today in Energy.
- EIA. Hourly Electric Grid Monitor (Form EIA-930): the Southwest Power Pool data behind Prairie Town's day.
- Earlier lessons: lesson 1 (power and energy), lesson 2 (the duck curve), lesson 8 (the price of one more MWh).
Spotted an error, or stuck? Write to hlli@ksu.edu. Corrections are made in place and dated here.
Text licensed CC BY 4.0, code MIT: teachers and students may reuse and adapt it, with credit to Honglin Li.