rdtools.availability.AvailabilityAnalysis

class rdtools.availability.AvailabilityAnalysis(power_system, power_subsystem, energy_cumulative, power_expected)

A class to perform system availability and loss analysis.

This class follows the analysis procedure described in 1, and implements two distinct algorithms. One for partial (subsystem) outages and one for system-wide outages. The AvailabilityAnalysis.run() method executes both algorithms and combines their results.

The input timeseries don't need to be in any particular set of units as long as all power and energy units are consistent, with energy units being the hourly-integrated power (e.g., kW and kWh). The units of the analysis outputs will match the inputs.

Parameters
  • power_system (pandas.Series) -- Timeseries total system power. In the typical case, this is meter power data. Should be a right-labeled interval average (this is what is typically recorded in many DAS).

  • power_subsystem (pandas.DataFrame) -- Timeseries power data, one column per subsystem. In the typical case, this is inverter AC power data. Each column is assumed to represent a subsystem, so no extra columns may be included. The index must match power_system. Should be a right-labeled interval average.

  • energy_cumulative (pandas.Series) -- Timeseries cumulative energy data for the entire system (e.g. meter). These values must be recorded at the device itself (rather than summed by a downstream device like a datalogger or DAS provider) to preserve its integrity across communication interruptions. Units must match power integrated to hourly energy (e.g. if power is in kW then energy must be in kWh).

  • power_expected (pandas.Series) -- Expected system power data with the same index as the measured data. This can be modeled from on-site weather measurements if instruments are well calibrated and there is no risk of data gaps. However, because full system outages often cause weather data to be lost as well, it may be more useful to use data from an independent weather station or satellite-based weather provider. Should be a right-labeled interval average.

results

Rolled-up production, loss, and availability metrics. The index is a datetime index of the period passed to AvailabilityAnalysis.run(). The columns of the dataframe are as follows:

Column Name

Description

'lost_production'

Production loss from outages. Units match the input power units (e.g. if power is given in kW, 'lost_production' will be in kWh).

'actual_production'

System energy production. Same units as 'lost_production'.

'availability'

Energy-weighted system availability as a fraction (0-1).

Type

pandas.DataFrame

loss_system

Estimated timeseries lost power from system outages.

Type

pandas.Series

loss_subsystem

Estimated timeseries lost power from subsystem outages.

Type

pandas.Series

loss_total

Estimated total lost power from outages.

Type

pandas.Series

reporting_mask

Boolean mask indicating whether subsystems appear online or not.

Type

pandas.DataFrame

power_expected_rescaled

Expected power rescaled to better match system power during periods where the system is performing normally.

Type

pandas.Series

energy_expected_rescaled

Interval expected energy calculated from power_expected_rescaled.

Type

pandas.Series

energy_cumulative_corrected

Cumulative system production after filling in data gaps from outages with estimated production.

Type

pandas.Series

error_info

Records about the error between expected power and actual power.

Type

pandas.DataFrame

interp_lower, interp_upper

Functions to estimate the uncertainty interval bounds of expected production based on outage length.

Type

callable

outage_info

Records about each detected system outage, one row per outage. The primary columns of interest are type, which can be either 'real' or 'comms' and reports whether the outage was determined to be a real outage with lost production or just a communications interruption with no production impact; and loss which reports the estimated production loss for the outage. The columns are as follows:

Column Name

Description

'start'

Timestamp of the outage start.

'end'

Timestamp of the outage end.

'duration'

Length of the outage (i.e. outage_info['end'] - outage_info['start'] ).

'intervals'

Total count of data intervals contained in the outage.

'daylight_intervals'

Count of data intervals contained in the outage occurring during the day.

'error_lower'

Lower error bound as a fraction of expected energy.

'error_upper'

Upper error bound as a fraction of expected energy.

'energy_expected'

Total expected production for the outage duration.

'energy_start'

System cumulative production at the outage start.

'energy_end'

System cumulative production at the outage end.

'energy_actual'

System production during the outage (i.e., outage_info['energy_end'] - outage_info['energy_start']).

'ci_lower'

Lower bound for the expected energy confidence interval.

'ci_upper'

Lower bound for the expected energy confidence interval.

'type'

Type of the outage ('real or 'comms').

'loss'

Estimated production loss.

Type

pandas.DataFrame

Notes

This class's ability to detect short-duration outages is limited by the resolution of the system data. For instance, 15-minute averages would not be able to resolve the rapid power cycling of an intermittent inverter. Additionally, the loss at the edges of an outage may be underestimated because of masking by the interval averages.

This class expects outages to be represented in the timeseries by NaN, zero, or very low values. If your DAS does not record data from outages (e.g., a three-hour outage results in three hours of omitted timestamps), you should insert those missing rows before using this analysis.

References

1

Anderson K. and Blumenthal R. "Overcoming communications outages in inverter downtime analysis", 2020 IEEE 47th Photovoltaic Specialists Conference (PVSC).

__init__(power_system, power_subsystem, energy_cumulative, power_expected)

Methods

__init__(power_system, power_subsystem, ...)

plot()

Create a figure summarizing the availability analysis results.

run([low_threshold, relative_sizes, ...])

Run the availability analysis.