pvanalytics.features.clipping.threshold#

pvanalytics.features.clipping.threshold(ac_power, slope_max=0.0035, power_min=0.75, power_quantile=0.995, freq=None)#

Detect clipping based on a maximum power threshold.

This is a two-step process. First a clipping threshold is identified, then any values in ac_power greater than or equal to that threshold are flagged.

The clipping threshold is determined by computing a ‘daily power curve’ which is the power_quantile quantile of all values in ac_power at each minute of the day. This gives a rough estimate of the maximum power produced at each minute of the day.

The daily power curve is normalized by its maximum and the minutes of the day are identified where the normalized curve’s slope is less than slope_max. If there is a continuous period of time spanning at least one hour where the slope is less than slope_max and the value of the normalized daily power curve is greater than power_min times the median of the normalized daily power curve then the data has clipping in it. If no sufficiently long period with both a low slope and high power exists then there is no clipping in the data. The average of the daily power curve (not normalized) during the longest period that satisfies the criteria above is the clipping threshold.

Parameters
  • ac_power (Series) – DatetimeIndexed series of AC power data.

  • slope_max (float, default 0.0035) – Maximum absolute value of slope of AC power quantile for clipping to be indicated. The default value has been derived empirically to prevent false positives for tracking PV systems.

  • power_min (float, default 0.75) – The power during periods with slope less than slope_max must be greater than power_min times the median normalized daytime power.

  • power_quantile (float, default 0.995) – Quantile used to calculate the daily power curve.

  • freq (string, default None) – A pandas string offset giving the frequency of data in ac_power. If None then the frequency is inferred from the series index.

Returns

True when ac_power is greater than or equal to the clipping threshold.

Return type

Series

Notes

This function is based on the pvfleets_qa_analysis project.