The basic idea
So far, we’ve looked at individual arbitrage opportunities.
We know that a battery needs to consider:
- the charging price
- the selling price
- round-trip efficiency
- battery-use costs
- its available energy
- its power limits
- its SOC
But a real BESS doesn’t operate one trade at a time.
Electricity prices change continuously.
A battery may have several opportunities to charge and discharge throughout the day, but its energy capacity is limited.
That creates a different question:
Given electricity prices over the next 24 hours, when should the battery charge and discharge?
This is the beginning of battery dispatch optimization.
1. Start with our battery
We’ll continue using the same: 100 MW / 200 MWh BESS
For this simplified example, assume:
- Maximum charge power = 100 MW
- Maximum discharge power = 100 MW
- Energy capacity = 200 MWh
- Starting SOC = 50%
- Round-trip efficiency = 90%
- Battery-use cost = ignored initially
Starting stored energy is:
So the battery begins the day with 100 MWh available.
2. Give the battery a price signal
Suppose tomorrow’s electricity prices look like this:
| Hour | Electricity price |
|---|---|
| 00:00 | $50/MWh |
| 01:00 | $40/MWh |
| 02:00 | $30/MWh |
| 03:00 | $25/MWh |
| 04:00 | $30/MWh |
| 05:00 | $45/MWh |
| 06:00 | $60/MWh |
| 07:00 | $70/MWh |
| 08:00 | $65/MWh |
| 09:00 | $55/MWh |
| 10:00 | $45/MWh |
| 11:00 | $40/MWh |
| 12:00 | $35/MWh |
| 13:00 | $30/MWh |
| 14:00 | $35/MWh |
| 15:00 | $50/MWh |
| 16:00 | $75/MWh |
| 17:00 | $100/MWh |
| 18:00 | $140/MWh |
| 19:00 | $160/MWh |
| 20:00 | $130/MWh |
| 21:00 | $90/MWh |
| 22:00 | $70/MWh |
| 23:00 | $55/MWh |
At first glance, the answer seems obvious:
Charge at the lowest prices and discharge at the highest prices.
But the battery can’t simply buy all the cheap electricity and sell all the expensive electricity.
Its capacity is limited.
3. The battery can’t charge indefinitely
Our battery can store a maximum of:
It starts with:
So it has room for only:
of additional energy.
At a maximum charging rate of 100 MW, it could fill that available space in one hour.
Suppose it charges 100 MWh at the lowest price:
$25/MWh at 03:00.
The energy cost is:
The battery is now full, at least under our simplified treatment of efficiency.
But that decision matters. By filling the battery at 03:00, we have used its available storage capacity.
We can’t also charge another 100 MWh at 13:00 when electricity is $30/MWh unless we’ve discharged some energy first.
4. The battery can’t discharge everything at once
The battery contains:
But its maximum discharge power is:
So even though it has 200 MWh available, it cannot deliver all of it during one hour.
At maximum power:
So it would take two hours to discharge 200 MWh.
This is the power constraint we established earlier.
The battery therefore has to manage both:
How much energy it has
and
how quickly it can move that energy.
5. Now look at the evening prices
The highest prices occur at:
18:00 → $140/MWh
19:00 → $160/MWh
Suppose the battery has 200 MWh available.
It could discharge:
100 MWh at 18:00
and:
100 MWh at 19:00
giving:
and:
Total revenue:
This is already more interesting than simply saying:
“Sell when the price is highest.”
The battery has to decide how much to sell at each hour.
6. What if there is an even better opportunity later?
Suppose the battery knows that at 19:00 the price will be:
while at 18:00 it is:
Should it discharge 100 MWh at 18:00?
Maybe.
But doing so leaves less energy for 19:00.
The battery could instead preserve some energy for the higher price.
For example:
18:00: discharge 50 MWh
19:00: discharge 100 MWh
Now the battery has preserved another 50 MWh for the higher-priced period.
The value of that decision depends on what happens before, during and after those hours.
This is the beginning of intertemporal optimization:
A decision made now changes the choices available later.
7. This is why the highest price isn’t always the whole answer
Imagine the battery has two possible strategies.
Strategy A
Discharge: 100 MWh at $140/MWh
and: 100 MWh at $160/MWh.
Revenue:
Strategy B
Discharge:50 MWh at $140/MWh
and: 100 MWh at $160/MWh.
Revenue from these two hours:
Strategy A produces more revenue if the battery already has 200 MWh available and there is no more valuable opportunity being sacrificed.
But now suppose the battery could use that preserved 50 MWh at 21:00 for a different market opportunity worth $200/MWh.
Suddenly the decision changes.
So, “What’s the highest price?” is oversimplification. The battery is essentially asking:
“What is the highest-value use of each available MWh over the entire decision horizon?”
That’s the deeper problem.
8. SOC links every decision together
This is where the SOC concept becomes particularly important.
Suppose the battery starts with 100 MWh.
If it discharges:
then its stored energy becomes:
Its SOC becomes:
That means the decision at one hour changes the starting point for the next hour.
Similarly, charging increases future available energy.
So we can think of the battery as moving through a sequence:
The decision at time affects what is possible at time .
9. Now we can describe the dispatch problem
For every hour, the battery needs to determine:
- Should I charge? If electricity is sufficiently cheap.
- Should I discharge? If electricity is sufficiently valuable.
- How much? Subject to its power and energy constraints.
- Should I wait? Because a better opportunity may appear later.
All of these decisions affect the battery’s future SOC.
So instead of one calculation, we now have a sequence of linked decisions.
10. From intuition to an optimization problem
We can express the objective in a simplified way as:
subject to constraints such as:
and the SOC must evolve according to the energy entering and leaving the battery.
We’re not solving the optimization yet. The important thing is understanding what the optimization is trying to decide.
The mental model
We’ve now seen how the different pieces of a BESS fit together:
- Power and energy determine what the battery can physically do.
- State of charge determines how much energy is available at any given time.
- Efficiency determines how much energy is lost when the battery charges and discharges.
- Degradation gives battery usage an economic cost.
- And arbitrage turns these physical constraints into an economic decision.
The next step is to bring these pieces together over time.
Battery arbitrage isn’t simply about finding the biggest price spread. It’s about allocating a finite, state-dependent asset across time.
That’s the intuition underneath battery optimization.
The next question
How would we actually tell the battery which decisions to make?
That’s where the basic structure of an optimization problem comes in:
objective function → decision variables → constraints.