Demand Response Optimization for Battery Energy Storage (Stage 2) - #808
Demand Response Optimization for Battery Energy Storage (Stage 2)#808abhineet-gupta wants to merge 11 commits into
Conversation
96a279f to
bb33d74
Compare
johnjasa
left a comment
There was a problem hiding this comment.
This is great, thanks for the follow-on PR, @abhineet-gupta! I love how you updated the code, examples, tests, and docs. Really slick stuff with some good solver generalizations as well.
I've left some questions and suggestions, nothing huge but I do think some of the clarifications will be useful for users approaching this code.
vijay092
left a comment
There was a problem hiding this comment.
Thank you for working on this! I had some minor comments.
|
|
||
| **Given:** | ||
| - $\lambda_t$ := `supervisory_signal`: price, demand, or price $\times$ demand time series at timestep $t$ | ||
| - $\lambda_t$ := `lmp_signal`: electricity price time series at timestep $t$ |
There was a problem hiding this comment.
I'd call this a supervisory signal, since it could be either LMP or demand- essentially any external signal that the battery needs to respond to.
There was a problem hiding this comment.
This controller needs both LMP and demand signals as inputs at the same time, hence the distinction.
|
|
||
| $$ | ||
| \max_{u_t, v_t,p_{d,t}, p_{c,t}} \quad \gamma \cdot \Delta t \sum_{t \in \mathcal{T}} p_{d,t} | ||
| \min_{u_{gt,t},u_{coop,t},v_t,p^d_{gt,t},p^d_{coop,t},pc_t,\text{SOC}_t,p_{gt2coop,t}} \quad |
There was a problem hiding this comment.
Could you confirm if the units are uniform in the first and second term? Incentive is $ / kwh and LMP is $/MWh?
There was a problem hiding this comment.
The optimization setup expects $/kWh for both. I will double check the input data in example to ensure that they follow the convention.
|
|
||
| # Incentive revenue is earned for every kWh discharged. | ||
| # Power transmitted to CoOp | ||
| m.p_tocoop = pyomo.Var( |
There was a problem hiding this comment.
p_tocoop is unbounded above which might cause issues later on. Good to add an upper bound.
There was a problem hiding this comment.
That's a good point. There would be a practical upper bound (based on interconnections etc). However, there is no theoretical upper bound (we can potentially model as large a G&T and CoOp under this framework as we like). Not sure how to pick a reasonable upper bound here.
| with subtests.test("Discharge never above max_charge_rate"): | ||
| assert np.all(discharge <= 1.0 + 1e-4) | ||
|
|
||
| with subtests.test("SOC at t=0 equal to init_soc_fraction"): |
There was a problem hiding this comment.
SOC at t = 0 is calculated after the first iteration is complete. So this test is only valid if battery doesn't discharge at the first step. Previously, that wasn't possible because the battery could only discharge during peak window but now it can also discharge at the first step.
…imizedStorageController
|
@johnjasa, |
Demand Response Optimization for Battery Energy Storage (Stage 2)
This PR is a continuation of PR 679.
It adds a Pyomo optimization based controller for the BESS system.
The controller optimizes the battery dispatch to minimize the Co-Op's expenditure while allowing demand response capabilities based on G&T requirements during peak window.
Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Do you agree with the terminology used in describing this approach in documentation.
Implementation feedback:
Is this the correct way to add highs solver for pyomo to github workflow. It has already been added to
environment.yml.Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 4: Related Issues
Section 5: Impacted Areas of the Software
Section 5.1: New Files
Section 5.2: Modified Files
h2integrate/control/control_strategies/storage/plm_optimized_storage_controller.pyPeakLoadManagementOptimizedStorageControllerSection 6: Additional Supporting Information
Section 7: Test Results, if applicable
Section 8 (Optional): New Model Checklist
docs/developer_guide/coding_guidelines.mdattrsclass to define theConfigto load in attributes for the modelBaseConfigorCostModelBaseConfiginitialize()method,setup()method,compute()methodCostModelBaseClasssupported_models.pycreate_financial_modelinh2integrate_model.pytest_all_examples.pydocs/user_guide/model_overview.mddocs/section<model_name>.mdis added to the_toc.ymlgenerate_class_hierarchy.pyto update the class hierarchy diagram indocs/developer_guide/class_structure.md