-
Notifications
You must be signed in to change notification settings - Fork 103
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
Avoid giving free energy at the end of a grid outage #1278
Conversation
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.
Thanks for flagging! I also realized the max SOC code required the same change, so have updated the test file and the manual tests to deal with that case. |
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.
Thanks for updating the tests. The max SOC seems to work without the "free energy" results now!
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.
It makes sense that the charge in the battery doesn't change unless there's some charging or discharging
The check_SOC() function in capacity_t was written before the grid outage code, and didn't expect the SOC limits to change dynamically during the simulation. Therefore at the end of the grid outage, the check_SOC() function granted the battery some free energy.
Changing the function means that the charge value is only adjusted when the current is adjusted, and the battery doesn't spontaneously gain energy without charging.
Test file here: ssc_1270_test_case (2).zip
Expectation is that the grid outage will end a few hours before the battery recharges above 10% (even though the minimum SOC is 30%.
Fixes #1270