Skip to content

Ssc 379 ancillary losses#458

Merged
brtietz merged 16 commits into
developfrom
ssc_379_ancillary_losses
Oct 30, 2020
Merged

Ssc 379 ancillary losses#458
brtietz merged 16 commits into
developfrom
ssc_379_ancillary_losses

Conversation

@brtietz

@brtietz brtietz commented Oct 12, 2020

Copy link
Copy Markdown
Collaborator

Solves #379. Connects battery's loss model to powerflow via a line in dispatch_t::runDispatch. Losses are covered by:

  • PV or the grid when charging or idle
  • The battery when discharging

Losses are applied on the AC side for AC connected batteries, and on the DC side for DC connected batteries. AC batteries will not cover the losses from PV unless they can charge from PV, but DC batteries will always cover the charging/idle losses from PV if PV is being exported to load/the grid.

Automated and custom dispatch have new code that accounts for losses. Front of meter automatic, behind the meter automatic, and manual dispatch all now have tests with losses.

@brtietz brtietz added this to the SAM 2021 Release milestone Oct 12, 2020
@brtietz brtietz requested a review from dguittet October 12, 2020 21:31
@brtietz brtietz linked an issue Oct 12, 2020 that may be closed by this pull request

@dguittet dguittet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great job on a confusing issue. Thanks for all the tests. I think the logic is sound, though I had some questions about dispatching in the comments.

Please also update the var_info table to specify that the number of entries acceptable for the loss schedule is 1 or same as weather file.

Comment thread shared/lib_battery.cpp Outdated
Comment thread shared/lib_battery_dispatch.cpp Outdated
Comment thread shared/lib_battery_dispatch_automatic_btm.cpp
Comment thread shared/lib_battery_powerflow.cpp
Comment thread shared/lib_battery_powerflow.cpp Outdated
Comment thread test/shared_test/lib_battery_dispatch_automatic_fom_test.cpp
Comment thread shared/lib_battery_powerflow.cpp Outdated
Comment thread shared/lib_battery_powerflow.cpp
Comment thread shared/lib_battery_dispatch_automatic_fom.cpp Outdated
Comment thread test/shared_test/lib_battery_dispatch_automatic_btm_test.cpp

@dguittet dguittet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! This looks great! Just one more documentation related thing, could you add a comment in battery_t and/or powerflow to explain which losses are covered by which.

@brtietz brtietz merged commit 98fdc0d into develop Oct 30, 2020
@dguittet dguittet deleted the ssc_379_ancillary_losses branch December 23, 2020 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ancillary losses batt

2 participants