-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renewable + PEM Parameterized Bidder #1407
Merged
Merged
Changes from 26 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
fd8a16d
improve the PEM parameterized bidder
Xinhe-Chen ac96407
improve pem bidder and add some tests
Xinhe-Chen a9db27d
update the logic and fix bugs
Xinhe-Chen 681e2b5
Merge branch 'main' into param_bidder
Xinhe-Chen 7477b28
change the test file names
Xinhe-Chen 3d59d6b
Merge branch 'main' of https://github.com/IDAES/idaes-pse into param_…
Xinhe-Chen 880fe69
Merge branch 'param_bidder' of https://github.com/Xinhe-Chen/idaes-ps…
Xinhe-Chen f30b2b5
use black
Xinhe-Chen 351bde0
update tests
Xinhe-Chen 9e779ae
Merge branch 'main' into param_bidder
Xinhe-Chen f6ac3e0
update tests
Xinhe-Chen 5d9a205
update black and test
Xinhe-Chen 0011b8f
add more tests
Xinhe-Chen aed28b8
move the docs to this branch
Xinhe-Chen fba6171
update docs
Xinhe-Chen 92e4b5e
update the docs and code comments
Xinhe-Chen a0c11be
updates
Xinhe-Chen 4639ecc
fix doc typos
Xinhe-Chen a034650
Merge branch 'main' into param_bidder
adowling2 59cc8b0
update the comments for tests
Xinhe-Chen 9d9cc43
Merge branch 'param_bidder' of https://github.com/Xinhe-Chen/idaes-ps…
Xinhe-Chen 531de16
Merge branch 'main' into param_bidder
Xinhe-Chen 31b454c
fix typos and update bidder tests use real numbers
Xinhe-Chen b2551a1
use black to format codes
Xinhe-Chen da5f155
Merge branch 'main' into param_bidder
Xinhe-Chen 365c72d
Merge branch 'main' into param_bidder
Xinhe-Chen 25048f5
add/change comments as Alex suggests
Xinhe-Chen 0e13af6
update docs
Xinhe-Chen 4db3cac
use black to format codes
Xinhe-Chen a157a58
fix typos
Xinhe-Chen a4e9b49
fix typos
Xinhe-Chen 31f6e46
minor change
Xinhe-Chen cbb7244
use logger
Xinhe-Chen e347b24
Merge branch 'main' into param_bidder
Xinhe-Chen 1e2b0a0
Merge branch 'main' into param_bidder
ksbeattie 58b2827
Merge branch 'main' into param_bidder
Xinhe-Chen eaf075f
use idaeslogger
Xinhe-Chen c22317a
update for site-packages installation
Xinhe-Chen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,155 @@ uncertain price scenario has a corresponding power output. As shown in the figur | |
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 + PEM). | ||
|
||
|
||
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. | ||
|
||
.. math:: \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. | ||
|
||
.. math:: P_{t,s}^{DA} \leq P_{t,s}^{RT} \quad \forall t, s \quad \quad (1) | ||
.. math:: P_{t,s} = P^{RT}_{t,s} \quad \forall t, s \quad \quad (2) | ||
.. math:: (\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) | ||
.. math:: P_{t,s}^{DA} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (4) | ||
.. math:: P_{t,s}^{RT} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (5) | ||
.. math:: P_{t,s}^{wind} \leq f_{t} P_{max}^{wind} \quad \forall t, s \quad \quad (6) | ||
.. math:: P_{t,s}^{DA} + P_{t,s}^{PEM} \leq P_{t, s}^{wind} \quad \forall t, s \quad \quad (7) | ||
.. math:: P_{t,s}^{PEM} \leq P_{max}^{PEM} \quad \forall t, s \quad \quad (8) | ||
.. math:: m_{t,s}^{H} = P_{t,s}^{PEM}C_{H}\Delta t \quad \forall t, s \quad \quad (9) | ||
.. math:: c_{t,s} = C^{op} P_{t,s}^{PEM}\quad \forall t, s \quad \quad (10) | ||
.. math:: 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 equation (9) are process model constraints. Equation (10) calculates the operation costs for IES | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Equations (4) to (9) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
and equation (11) calculate the fixed cost for IES. | ||
|
||
**Parameters** | ||
|
||
:math:`\omega_{s}`: Frequency of each scenario. | ||
|
||
:math:`\pi^{DA}_{t,s}`: Day-ahead LMP forecasting from forecaster at hour t for scenario s, \$/MWh. | ||
|
||
:math:`\pi^{RT}_{t,s}`: Real-time LMP forecasting from forecaster at hour t for scenario s, \$/MWh. | ||
|
||
:math:`Pr^{H}`: Market price for hydrogen, \$/kg. | ||
|
||
:math:`P_{max}^{PEM}`: PEM max capacity, MW. | ||
|
||
:math:`f_{t}`: Wind power generation capacity factor at hour t, MW/MW. | ||
|
||
:math:`P_{max}^{wind}`: Wind generator max capacity, MW. | ||
|
||
:math:`C^{op}`: PEM operation cost coefficient, \$/MW. | ||
|
||
:math:`C_{fix}^{wind}`: Wind generator fixed cost coefficient, \$/MW. | ||
|
||
:math:`C_{fix}^{PEM}`: PEM fixed cost coefficient, \$/MW. | ||
|
||
:math:`C_{H}`: Electricity to hydrogen conversion rate, kg/MWh. | ||
|
||
|
||
**Variables** | ||
|
||
:math:`P_{t,s}`: IES power output to the grid at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{DA}`: Day-ahead offering power at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{RT}`: Real-time offering power at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{wind}`: Wind power generation at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{PEM}`: Power delivered to PEM at hour t in scenario s, MW. | ||
|
||
:math:`m_{t,s}^{H}`: Hydrogen production mass at hour t in scenario s, kg. | ||
|
||
:math:`c_{t,s}`: IES operational cost at hour t in scenario s, \$. | ||
|
||
|
||
Real-time Bidding Problem for Wind+PEM IES | ||
------------------------------------------ | ||
|
||
.. math:: \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. | ||
|
||
.. math:: \hat{P}^{DA}_{t} \leq P_{t,s}^{RT} + P_{t,s}^{underbid} \quad \forall t, s \quad \quad (12) | ||
.. math:: P_{t,s}^{RT} = P_{t,s} \quad \forall t, s \quad \quad (13) | ||
.. math:: (\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) | ||
.. math:: P_{t,s}^{RT} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (15) | ||
.. math:: P_{t,s}^{wind} \leq f_{t}P_{wind}^{max} \quad \forall t, s \quad \quad (16) | ||
.. math:: P_{t,s}^{RT} + P_{t,s}^{PEM} \leq P_{t,s}^{wind} \quad \forall t, s \quad \quad (17) | ||
.. math:: P_{t,s}^{PEM} \leq P_{max}^{PEM} \quad \forall t, s \quad \quad (18) | ||
.. math:: m_{t,s}^{H} = P_{t,s}^{PEM}C_{H}\Delta t \quad \forall t, s \quad \quad (19) | ||
.. math:: c_{t,s} = C^{op} P_{t,s}^{PEM}\quad \forall t, s \quad \quad (20) | ||
.. math:: 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 :math:`\hat{\pi}_{t}^{DA}` | ||
and day-ahead dispatch level :math:`\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 :math:`P_{t,s}^{underbid}` for underbidding in equation (12) and penalized in the objective function. | ||
|
||
**Parameters** | ||
|
||
:math:`\omega_{s}`: Frequency of each scenario. | ||
|
||
:math:`\omega_{t}^{RT}`: Penalty for underbidding at real-time at hour t, \$/MWh. | ||
|
||
:math:`\hat{\pi}_{t}^{DA}`: Realized day-ahead energy LMP signals at hour t, \$/MWh. | ||
|
||
:math:`\hat{P}_{t}^{DA}`: Realized day-ahead dispatch level at hour t, \$/MWH. | ||
|
||
:math:`\pi^{RT}_{t,s}`: Real-time LMP forecasting from forecaster at hour t for scenario s, \$/MWh. | ||
|
||
:math:`Pr^{H}`: Market price for hydrogen, \$/kg. | ||
|
||
:math:`P^{PEM}_{max}`: PEM max capacity, MW. | ||
|
||
:math:`f_{t}`: Wind power generation capacity factor at hour t, MW/MW. | ||
|
||
:math:`P_{max}^{wind}`: Wind generator max capacity, MW. | ||
|
||
:math:`C^{op}`: PEM operation cost coefficient, \$/MW. | ||
|
||
:math:`C_{fix}^{wind}`: Wind generator fixed cost coefficient, \$/MW. | ||
|
||
:math:`C_{fix}^{PEM}`: PEM fixed cost coefficient, \$/MW. | ||
|
||
:math:`C_{H}`: Electricity to hydrogen conversion rate, kg/MWh. | ||
|
||
**Variables** | ||
|
||
:math:`P_{t,s}`: IES power output to the grid at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{underbid}`: The amount of underbidding power in real-time at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{RT}`: Real-time offering power at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{wind}`: Wind power generation at hour t in scenario s, MW. | ||
|
||
:math:`P_{t,s}^{PEM}`: Power delivered to PEM at hour t in scenario s, MW. | ||
|
||
:math:`m_{t,s}^{H}`: Hydrogen production mass at hour t in scenario s, kg. | ||
|
||
:math:`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 | ||
|
||
.. |example_bid| image:: images/example_bid.png | ||
:width: 800 | ||
:alt: Alternative text | ||
|
@@ -27,3 +176,13 @@ bidding curves. | |
|
||
.. autoclass:: SelfScheduler | ||
:members: | ||
|
||
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. | ||
|
||
.. autoclass:: PEMParametrizedBidder | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wind should be lowercase, make sure you define PEM on first use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is addressed.