Bidder#

Market participating resources (e.g., generators, IESs) submit energy bids (a.k.a., bid curves) to the day-ahead and real-time markets for each trading time period to communicate their flexibility and marginal costs. As shown in the figure below, an energy bid is a piecewise constant function described by several energy offer price ($/MWh) and operating level (MW) pairs. Bid curves from each resource are inputs (i.e., parameters) in the market-clearing optimization problems solved by production cost models. Currently, the Bidder formulates a two-stage stochastic program to calculate the optimized time-varying bid curves for thermal generators. In this stochastic program, each uncertain price scenario has a corresponding power output. As shown in the figure, each of these uncertain price and power output pairs formulates a segment in the bidding curves.

Here we present a stochastic bidding model for a renewable integrated energy system (wind generator + polymer electrolyte membrane (PEM) electrolyzer).

Day-Ahead Bidding Problem for Wind + PEM IES#

The objective function is the expected profit, which equals the revenue subtract the cost. We want to consider the revenue from the electricity market and the hydrogen market.

\[\max \quad \sum_{s \in S, t \in T^{DA}}\omega_{s}[{(\pi_{t,s}^{DA}P_{t,s}^{DA} + \pi_{t,s}^{RT}(P_{t,s}^{RT}-P_{t,s}^{DA}))\Delta t + Pr^{H}m_{t,s}^{H}- c_{t,s}}] - C_{fix}\]

s.t.

\[P_{t,s}^{DA} \leq P_{t,s}^{RT} \quad \forall t, s \quad \quad (1)\]
\[P_{t,s} = P^{RT}_{t,s} \quad \forall t, s \quad \quad (2)\]
\[(\pi_{t,s'}^{DA} - \pi_{t,s}^{DA})(P_{t,s'}^{DA} - P_{t,s}^{DA}) \geq 0 \quad \forall s \in S, \forall s' \in S \backslash s, \forall t \in T^{DA} \quad \quad (3)\]
\[P_{t,s}^{DA} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (4)\]
\[P_{t,s}^{RT} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (5)\]
\[P_{t,s}^{wind} \leq f_{t} P_{max}^{wind} \quad \forall t, s \quad \quad (6)\]
\[P_{t,s}^{DA} + P_{t,s}^{PEM} \leq P_{t, s}^{wind} \quad \forall t, s \quad \quad (7)\]
\[P_{t,s}^{PEM} \leq P_{max}^{PEM} \quad \forall t, s \quad \quad (8)\]
\[m_{t,s}^{H} = P_{t,s}^{PEM}C_{H}\Delta t \quad \forall t, s \quad \quad (9)\]
\[c_{t,s} = C^{op} P_{t,s}^{PEM}\quad \forall t, s \quad \quad (10)\]
\[C_{fix} = C_{fix}^{wind}P_{max}^{wind} + C_{fix}^{PEM}P_{max}^{PEM} \quad \quad (11)\]

Equation (1) requires the day-ahead offering power is less or equal to the real-time offering power in order to avoid underbidding. Equation (2) states that the RT offering power is the same as the IES power output to the grid. In the bidding mode, the market rules require the offering power is non-decreasing (convex) with its marginal cost in an energy bid. This rule is represented by equation (3). Equation (4) to (9) are process model constraints. Equation (10) calculates the operation costs for IES and equation (11) calculate the fixed cost for IES.

Parameters

\(\omega_{s}\): Frequency of each scenario.

\(\pi^{DA}_{t,s}\): Day-ahead LMP forecasting from forecaster at hour t for scenario s, $/MWh.

\(\pi^{RT}_{t,s}\): Real-time LMP forecasting from forecaster at hour t for scenario s, $/MWh.

\(Pr^{H}\): Market price for hydrogen, $/kg.

\(P_{max}^{PEM}\): PEM max capacity, MW.

\(f_{t}\): Wind power generation capacity factor at hour t, MW/MW.

\(P_{max}^{wind}\): Wind generator max capacity, MW.

\(C^{op}\): PEM operation cost coefficient, $/MW.

\(C_{fix}^{wind}\): Wind generator fixed cost coefficient, $/MW.

\(C_{fix}^{PEM}\): PEM fixed cost coefficient, $/MW.

\(C_{H}\): Electricity to hydrogen conversion rate, kg/MWh.

Variables

\(P_{t,s}\): IES power output to the grid at hour t in scenario s, MW.

\(P_{t,s}^{DA}\): Day-ahead offering power at hour t in scenario s, MW.

\(P_{t,s}^{RT}\): Real-time offering power at hour t in scenario s, MW.

\(P_{t,s}^{wind}\): Wind power generation at hour t in scenario s, MW.

\(P_{t,s}^{PEM}\): Power delivered to PEM at hour t in scenario s, MW.

\(m_{t,s}^{H}\): Hydrogen production mass at hour t in scenario s, kg.

\(c_{t,s}\): IES operational cost at hour t in scenario s, $.

Real-time Bidding Problem for Wind+PEM IES#

\[\max \quad \sum_{t \in T_{DA}}\hat{\pi}_{t}^{DA}\hat{P}_{t}^{DA}\Delta t + \sum_{t\in T_{RT}, s\in S}\omega_{s}[\pi_{t,s}^{RT}(P_{t,s}^{RT} -\hat{P}_{t}^{DA})\Delta t + Pr^{H}m_{t,s}^{H} - c_{t,s} - \omega_{t}^{RT} P_{t,s}^{underbid}] - C_{fix}\]

s.t.

\[\hat{P}^{DA}_{t} \leq P_{t,s}^{RT} + P_{t,s}^{underbid} \quad \forall t, s \quad \quad (12)\]
\[P_{t,s}^{RT} = P_{t,s} \quad \forall t, s \quad \quad (13)\]
\[(\pi_{t,s'}^{RT} - \pi_{t,s}^{RT})(P_{t,s'}^{RT} - P_{t,s}^{RT}) \geq 0 \quad \forall s \in S, \forall s' \in S \backslash s, \forall t \in T^{RT} \quad \quad (14)\]
\[P_{t,s}^{RT} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (15)\]
\[P_{t,s}^{wind} \leq f_{t}P_{wind}^{max} \quad \forall t, s \quad \quad (16)\]
\[P_{t,s}^{RT} + P_{t,s}^{PEM} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (17)\]
\[P_{t,s}^{PEM} \leq P_{max}^{PEM} \quad \forall t, s \quad \quad (18)\]
\[m_{t,s}^{H} = P_{t,s}^{PEM}C_{H}\Delta t \quad \forall t, s \quad \quad (19)\]
\[c_{t,s} = C^{op} P_{t,s}^{PEM}\quad \forall t, s \quad \quad (20)\]
\[C_{fix} = C_{fix}^{wind}P_{max}^{wind} + C_{fix}^{PEM}P_{max}^{PEM} \quad \quad (21)\]

Before the actual operations, electricity markets allow the resources to submit real-time energy bids to correct deviations from the day-ahead market. At this time, both day-ahead LMP \(\hat{\pi}_{t}^{DA}\) and day-ahead dispatch level \(\hat{P}_{t}^{DA}\) have been realized as a result of the day-ahead market clearing. In real-time market, due to the forecaster error and some other reasons, the real-time offering power may not realize promises that generator owner makes in the day-ahead market. We call this ‘underbidding’ and underbiding energy will be penaltized by the ISO. To prevent the underbidding and loss of revenue, we add a relaxed lower bound for the real-time offering power with a slack variable \(P_{t,s}^{underbid}\) for underbidding in equation (12) and penalized in the objective function.

Parameters

\(\omega_{s}\): Frequency of each scenario.

\(\omega_{t}^{RT}\): Penalty for underbidding at real-time at hour t, $/MWh.

\(\hat{\pi}_{t}^{DA}\): Realized day-ahead energy LMP signals at hour t, $/MWh.

\(\hat{P}_{t}^{DA}\): Realized day-ahead dispatch level at hour t, $/MWH.

\(\pi^{RT}_{t,s}\): Real-time LMP forecasting from forecaster at hour t for scenario s, $/MWh.

\(Pr^{H}\): Market price for hydrogen, $/kg.

\(P^{PEM}_{max}\): PEM max capacity, MW.

\(f_{t}\): Wind power generation capacity factor at hour t, MW/MW.

\(P_{max}^{wind}\): Wind generator max capacity, MW.

\(C^{op}\): PEM operation cost coefficient, $/MW.

\(C_{fix}^{wind}\): Wind generator fixed cost coefficient, $/MW.

\(C_{fix}^{PEM}\): PEM fixed cost coefficient, $/MW.

\(C_{H}\): Electricity to hydrogen conversion rate, kg/MWh.

Variables

\(P_{t,s}\): IES power output to the grid at hour t in scenario s, MW.

\(P_{t,s}^{underbid}\): The amount of underbidding power in real-time at hour t in scenario s, MW.

\(P_{t,s}^{RT}\): Real-time offering power at hour t in scenario s, MW.

\(P_{t,s}^{wind}\): Wind power generation at hour t in scenario s, MW.

\(P_{t,s}^{PEM}\): Power delivered to PEM at hour t in scenario s, MW.

\(m_{t,s}^{H}\): Hydrogen production mass at hour t in scenario s, kg.

\(c_{t,s}\): IES operational cost at hour t in scenario s, $.

Some wind, battery, PEM models and the double-loop simulation example can be found in Dispatches GitHub repository.

https://dispatches.readthedocs.io/en/main/models/renewables/index.html

Alternative text

class idaes.apps.grid_integration.bidder.Bidder(bidding_model_object, day_ahead_horizon, real_time_horizon, n_scenario, solver, forecaster, real_time_underbid_penalty=10000)[source]#

Wrap a model object to bid into the market using stochastic programming.

class idaes.apps.grid_integration.bidder.SelfScheduler(bidding_model_object, day_ahead_horizon, real_time_horizon, n_scenario, solver, forecaster, real_time_underbid_penalty=10000, fixed_to_schedule=False)[source]#

Wrap a model object to self schedule into the market using stochastic programming.

PEMParametrizedBidder#

The PEMParametrizedBidder bids the renewable-PEM IES at a constant price. The logic of PEMParametrizedBidder is to reserve a part of the renewable generation to co-prodcue the hydrogen. The reserved power can be sold at the marginal cost of the hydrogen price.

class idaes.apps.grid_integration.bidder.PEMParametrizedBidder(bidding_model_object, day_ahead_horizon, real_time_horizon, solver, forecaster, renewable_mw, pem_marginal_cost, pem_mw, real_time_bidding_only=False)[source]#

Renewable (PV or Wind) + PEM bidder that uses parameterized bid curves.

compute_day_ahead_bids(date, hour=0)[source]#

DA Bid: from 0 MW to (Wind Resource - PEM capacity) MW, bid $0/MWh. from (Wind Resource - PEM capacity) MW to Wind Resource MW, bid ‘pem_marginal_cost’

If Wind resource at some time is less than PEM capacity, then reduce to available resource

Parameters:
  • date (str) – str, the date we bid into.

  • hour – int, the hour we bid into.

Returns:

dictionary,

the obtained bids. Keys are time step t, example as following: bids = {t: {gen: {p_cost: float, p_max: float, p_min: float, startup_capacity: float, shutdown_capacity: float}}}

Return type:

full_bids

compute_real_time_bids(date, hour, realized_day_ahead_dispatches, realized_day_ahead_prices)[source]#

RT Bid: from 0 MW to (Wind Resource - PEM capacity) MW, bid $0/MWh. from (Wind Resource - PEM capacity) MW to Wind Resource MW, bid ‘pem_marginal_cost’

Parameters:
  • date – str, the date we bid into

  • hour – int, the hour we bid into

Returns:

dictionary,

the obtained bids. Keys are time step t, example as following: bids = {t: {gen: {p_cost: float, p_max: float, p_min: float, startup_capacity: float, shutdown_capacity: float}}}

Return type:

full_bids