Back to resources

April 21, 2026

Optimization Formulations for Battery and Renewable Bidding

energy marketsoptimizationbattery storagerenewablesstochastic programming

The core problem

A battery or renewable plant participating in an electricity market must convert uncertain future prices into an intertemporal operating policy: a plan for when to charge, discharge, or produce, and what bids to submit. A stylized scenario-based objective for a battery maximizes E_s[Pi(x, lambda_s)] minus a risk penalty rho * CVaR_alpha(-Pi) minus a degradation cost C_deg(x), where x is the decision vector, lambda_s is the price in scenario s, and Pi is profit. The constraints are what make this a distinct problem class: state-of-charge dynamics (the battery's stored energy evolves with charging and discharging), charging and discharging power limits, round-trip efficiency, interconnection limits (the maximum power the grid connection allows), reserve awards, bid-curve rules, and market-specific obligations.

For a renewable asset, uncertainty enters through available production rather than only through price. The relevant constraints include curtailment (deliberately producing less than the available resource) and imbalance settlement (penalties for deviating from a committed schedule). Co-located renewable-plus-storage assets add shared interconnection limits and rules about which sources may charge the battery.

Deterministic rolling-horizon LP/MILP

The workhorse formulation is a linear program (LP) or mixed-integer linear program (MILP) solved over a future horizon against a single forecast path. The operator implements only the first interval's decision, then updates forecasts and re-solves. Rolling the horizon forward captures new information without requiring an explicit model of uncertainty.

What it buys: transparency and speed. The model is easy to audit, solves quickly, and can carry full market-rule constraints. What it costs: a point forecast can induce brittle schedules. If the forecast is wrong in a correlated way (prices spike an hour earlier than expected, say), the schedule has no built-in hedge. The recommended production baseline in this family is a rolling deterministic LP with a conservative terminal state-of-charge target, a throughput-based degradation charge, and full market-rule constraints.

Stochastic programming

Stochastic programming optimizes against a discrete set of scenarios for prices, renewable output, and load, weighting each by its probability. Two-stage models separate the bid-submission decision (made before uncertainty resolves) from recourse decisions (made after). Multistage models allow decisions at every stage to adapt to what has been observed so far.

What it buys: schedules and bids that hedge across outcomes rather than betting on one path. The value of the stochastic solution relative to a deterministic baseline is itself a standard evaluation metric. What it costs: scenario generation and calibration are real data-engineering work, and problem size grows with the scenario count, so scenario reduction is often needed. A known failure mode is generating price scenarios independently by hour, which destroys the intertemporal correlation that storage arbitrage actually monetizes.

Model predictive control

Model predictive control (MPC) is best understood as a deployment pattern rather than a separate mathematical family: repeatedly forecast, optimize, act, and replan. The inner optimization can be a deterministic LP, a stochastic program, or something else. MPC naturally absorbs telemetry (measured state of charge, actual output) and forecast updates, which makes it the natural wrapper for real-time and near-real-time operation.

CVaR and risk measures

Expected profit alone ignores tail risk. Conditional value-at-risk (CVaR) at level alpha is the expected loss in the worst alpha fraction of outcomes; a mean-CVaR objective trades some expected profit for protection against bad tails. In scenario-based models, CVaR admits linear reformulations, so risk aversion does not have to break the LP structure.

This matters for bidding specifically. An optimizer that outputs a dispatch schedule is not yet a bidder: markets typically require monotone, segmented quantity-price curves, and the curve should encode opportunity cost and risk across possible clearing prices. Recent battery work shows that a mean-CVaR stepwise bid-curve formulation can admit an exact LP reformulation even when a direct formulation appears mixed-integer. Operationally, exact and explainable solves are fast enough for repeated scenario analysis.

Robust and distributionally robust optimization

Robust optimization (RO) protects against every realization inside an uncertainty set of possible values, optimizing worst-case performance. Distributionally robust optimization (DRO) protects against a set of probability distributions, often built around empirical data using Wasserstein distance (a metric on distributions) or moment constraints. Both trade expected value for resilience to model error: they are less sensitive to a miscalibrated scenario model, at the cost of conservatism and, for DRO, heavier formulations.

Dynamic programming and SDDP

For hydro and long-duration storage, the value of stored energy spans many periods, and dynamic programming over a state of charge is the natural frame. Exact dynamic programming becomes infeasible as state dimensionality grows; approximate dynamic programming and stochastic dual dynamic programming (SDDP) build value-function approximations instead.

Comparison of formulation families

FamilyBuys youCostsMaturity
Rolling deterministic LP/MILPTransparency, speed, full market rulesBrittle under forecast errorProduction baseline
Stochastic programming (two-stage, multistage)Hedged bids across scenariosScenario calibration, size, reduction neededProduction frontier when scenarios are calibrated
MPCAbsorbs telemetry and forecast updatesOnly as good as the inner modelStandard deployment pattern
Mean-CVaR objectivesTail-risk control, LP-compatibleRequires scenarios and a risk-aversion choiceProduction frontier, exact LP reformulations exist
RO / DROResilience to model errorConservatism, heavier solvesFrontier
DP / ADP / SDDPLong-horizon inventory valueState dimensionalityEstablished for hydro and long-duration storage

Constraints that matter

For batteries: state-of-charge dynamics with a terminal condition (ignoring terminal state of charge is a classic failure mode, as is allowing simultaneous charge and discharge artifacts), power limits on charging and discharging, efficiency losses, and degradation. Degradation can be modeled at increasing fidelity: a fixed throughput cost per MWh, piecewise-linear depth-of-discharge costs, cycle counting, temperature and C-rate models, or replacement-value and warranty constraints. A simple throughput charge is acceptable for strategy screening but can misvalue high-frequency regulation or aggressive cycling. When the asset sells multiple products (energy, reserves, regulation), these compete for power capacity, state-of-charge headroom and footroom, ramp capability, and performance obligations, so a production model should co-optimize awards and expected activation rather than summing isolated revenue backtests.

For renewables: probabilistic production scenarios, negative prices and tax-credit economics, curtailment and interconnection limits, imbalance penalties, the choice between forecast bidding and optimized bid curves, basis risk between the plant node and the hedging hub, co-located storage charging rules, and capacity or must-offer obligations (rules requiring the asset to offer into the market).

Price-taking and evaluation

Small assets can treat prices as exogenous; large fleets can move dispatch and price in constrained hours. A practical workflow solves a price-taking model first, estimates local price impact, stresses bids in a clearing emulator, and reaches for bilevel or equilibrium tools only where impact is material. Evaluation should rest on realized settlement profit and attribution, CVaR and drawdown, degradation-adjusted margin, state-of-charge feasibility under forecast error, and bid acceptance consistency. Perfect-foresight upper bounds reported as backtests, and backtests on realized prices despite material price impact, are the failure modes to screen for. Reinforcement learning may approximate a policy, but only behind a feasibility projection and an optimizer fallback.

Glossary

  • State of charge (SOC): the energy currently stored in a battery, evolving with charge and discharge decisions.
  • Curtailment: deliberately producing less than the available renewable resource.
  • LP / MILP: linear program / mixed-integer linear program, the standard tractable optimization classes here.
  • Two-stage stochastic program: optimization separating here-and-now decisions from recourse taken after uncertainty resolves.
  • MPC: model predictive control, the forecast-optimize-act-replan loop.
  • CVaR: conditional value-at-risk, the expected loss in the worst alpha fraction of outcomes.
  • RO / DRO: robust and distributionally robust optimization, protecting against sets of values or of distributions.
  • SDDP: stochastic dual dynamic programming, a value-function approximation method for multistage problems.
  • Must-offer obligation: a market rule requiring an asset to submit offers.
  • Basis risk: the price difference between an asset's grid node and the hub where it hedges.