Skip to content
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

Feat/inverter availability #131

Merged
merged 86 commits into from Oct 1, 2020
Merged

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar commented Nov 22, 2019

Code for inverter availability calculations. Two main functions:

  • is_online, to detect when inverters are offline
  • downtime_losses, to estimate lost production

Detecting offline inverters should be easy, except communication outages make it tricky. The code assumes that meter-level data is reliable and never has comms outages but is mostly robust to inverter comms outages. I believe the only thing it will fail at (assuming good meter data) is when some inverters are truly offline and some are only non-communicative. In that case the code says that they're all offline.

For lost production, the preferred method is inter-inverter comparison -- examining how inverters have performed relative to each other in the past and assuming the same relative performance can be used to calculate lost production when some inverters are offline. If all inverters are determined to be offline, an expected_power signal provided by the user is used to determine lost energy. If there is no expected power data for the outage (eg the entire system is offline, so there's no weather data), a user-provided 12x24 typical production profile is used instead.

Documentation links:


Edit for anyone reading this -- the above info is mostly about the original implementation and is largely out of date.

  • Code changes are covered by tests
  • New functions added to __init__.py
  • API.rst is up to date, along with other sphinx docs pages
  • Example notebooks are rerun and differences in results scrutinized
  • Updated changelog (waiting for Feat/monthly soiling metrics #193 to get merged with the whatsnew file)

@kandersolar kandersolar marked this pull request as draft August 11, 2020 18:09
@kandersolar
Copy link
Member Author

Picking this PR up again to implement the methods in Anderson & Blumenthal "Overcoming communications outages in inverter downtime analysis", PVSC 47

@kandersolar
Copy link
Member Author

why they get rotated on the left plots but not the right

It's the difference between series.plot(ax=ax) and ax.plot(series). Pandas has a default set of matplotlib formatting params it uses when you do series.plot(ax=ax). The function now uses pandas plotting everywhere so that the formatting is applied consistently: https://github.com/NREL/rdtools/blob/feat/inverter_availability/docs/system_availability_example.ipynb

@mdeceglie
Copy link
Collaborator

mdeceglie commented Sep 23, 2020

@kanderso-nrel I suggest adding the reference for your work on the availability algorithm on the overview docs page

@kandersolar
Copy link
Member Author

@kanderso-nrel I suggest adding the reference for your work on the availability algorithm on the overview docs page

Done (despite brain fart of "soiling" in the commit message). I also took the liberty of adding one for the degradation section.

Copy link
Collaborator

@mdeceglie mdeceglie left a comment

Choose a reason for hiding this comment

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

I think this is looking good. Here are a couple suggestions.

rdtools/availability.py Outdated Show resolved Hide resolved
rdtools/availability.py Outdated Show resolved Hide resolved
rdtools/availability.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mdeceglie mdeceglie left a comment

Choose a reason for hiding this comment

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

LGTM Thanks for putting this together @kanderso-nrel !

@mdeceglie
Copy link
Collaborator

Should we use double backticks in the tables describing dataframes?

@kandersolar
Copy link
Member Author

@mdeceglie I added an "other uses" section in the notebook with an example like we discussed in the meeting earlier today, of running the entire thing at the inverter level instead of at the system level: https://rdtools--131.org.readthedocs.build/en/131/system_availability_example.html#Other-use-cases

The other option (omitting the cumulative energy data) would require some more in-depth changes to get working, so I think we should leave it as a possible future improvement.

Also made a small change to how the outage bounds are reported; the end of the outage was previously being reported as the timestamp of the first non-outage value rather than the last outage value. This was introducing a small error into the calculated actual energy during the outage, because it was including that single interval of energy after the outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants