rdtools.analysis_chains.TrendAnalysis

class rdtools.analysis_chains.TrendAnalysis(pv, poa_global=None, temperature_cell=None, temperature_ambient=None, gamma_pdc=None, aggregation_freq='D', pv_input='power', windspeed=0, power_expected=None, temperature_model=None, power_dc_rated=None, interp_freq=None, max_timedelta=None)

Class for end-to-end degradation and soiling analysis using sensor_analysis() or clearsky_analysis()

Parameters:
  • pv (pandas.Series) -- Right-labeled time series PV energy or power. If energy, should not be cumulative, but only for preceding time step.

  • poa_global (pandas.Series) -- Right-labeled time series measured plane of array irradiance in W/m^2

  • temperature_cell (pandas.Series) -- Right-labeled time series of cell temperature in Celsius. In practice, back of module temperature works as a good approximation.

  • temperature_ambient (pandas.Series) -- Right-labeled time Series of ambient temperature in Celsius

  • gamma_pdc (float) -- Fractional PV power temperature coefficient

  • aggregation_freq (str or pandas.tseries.offsets.DateOffset) -- Pandas frequency specification with which to aggregate normalized PV data for analysis. For more information, see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects

  • pv_input (str) -- 'power' or 'energy' to specify type of input used for pv parameter

  • windspeed (numeric) -- Right-labeled Pandas Time Series or single numeric value indicating wind speed in m/s for use in calculating cell temperature from ambient default value of 0 neglects the wind in this calculation

  • power_expected (pandas.Series) -- Right-labeled time series of expected PV power. (Note: Expected energy is not supported.)

  • temperature_model (str or dict) -- Model parameters for pvlib.temperature.sapm_cell(). Used in calculating cell temperature from ambient. If string, must be a valid entry for sapm model in pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS. If dict, must have keys 'a', 'b', 'deltaT'. See pvlib.temperature.sapm_cell() documentation for details.

  • power_dc_rated (float) -- Nameplate DC rating of PV array in Watts. If omitted, pv output will be internally normalized in the normalization step based on it's 95th percentile (see TrendAnalysis._pvwatts_norm() source).

  • interp_freq (str or pandas.tseries.offsets.DateOffset) -- Pandas frequency specification used to interpolate the input PV power or energy. We recommend using the natural frequency of the data, rather than up or down sampling. Analysis requires regular time series. For more information see https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects

  • max_timedelta (pandas.Timedelta) -- The maximum gap in the data to be interpolated/integrated across when interpolating or calculating energy from power

(not all attributes documented here)
filter_params

Parameters to be passed to rdtools.filtering functions. Keys are the names of the rdtools.filtering functions. Values are dicts of parameters to be passed to those functions. Allowed keys are normalized_filter`*, `poa_filter`*, `tcell_filter`*, `clip_filter`*, `hour_angle_filter, clearsky_filter`* (only used in a clear sky analysis), and `sensor_clearsky_filter (only used in a sensor analysis). (* indicates a filter included by default). To invoke clearsky_filter for a sensor analysis, use the special key sensor_clearsky_filter. Also has a special key ad_hoc_filter, the associated value is a boolean mask joined with the rest of the filters. Defaults to empty dicts for each function as described above, in which case those functions use default parameter values, ad_hoc_filter defaults to None. See examples for more information.

Type:

dict

filter_params_aggregated

parameters to be passed to rdtools.filtering functions that specifically handle aggregated data (daily filters, etc). Keys are the names of rdtools.filtering functions. Allowed keys are two_way_window_filter`*, `insolation_filter, hampel_filter, and directional_tukey_filter (* indicates filters included by default). Values are dicts of parameters to be passed to those functions (empty dict calls the funtion with its default parameters). Also has a special key ad_hoc_filter; this filter is a boolean mask joined with the rest of the filters. filter_params_aggregated defaults to an empty dict for two_way_window_filter, in which case the filter is run with its default parameter values. ad_hoc_filter defaults to None. See examples for more information.

Type:

dict

results

Nested dict used to store the results of methods ending with _analysis

Type:

dict

__init__(pv, poa_global=None, temperature_cell=None, temperature_ambient=None, gamma_pdc=None, aggregation_freq='D', pv_input='power', windspeed=0, power_expected=None, temperature_model=None, power_dc_rated=None, interp_freq=None, max_timedelta=None)

Methods

__init__(pv[, poa_global, temperature_cell, ...])

clearsky_analysis([analyses, yoy_kwargs, ...])

Perform entire clear-sky-based analysis workflow.

plot_degradation_summary(case, **kwargs)

Return a figure of a scatter plot and a histogram summarizing degradation rate analysis.

plot_degradation_timeseries(case[, rolling_days])

Plot resampled time series of degradation trend with time

plot_pv_vs_irradiance(case[, alpha])

Plot PV energy vs irradiance, useful in diagnosing things like timezone problems or transposition errors.

plot_soiling_interval(case, **kwargs)

Return a figure visualizing the valid soiling intervals used in stochastic rate and recovery soiling analysis.

plot_soiling_monte_carlo(case, **kwargs)

Return a figure visualizing the Monte Carlo of soiling profiles used in stochastic rate and recovery soiling analysis.

plot_soiling_rate_histogram(case, **kwargs)

Return a histogram of soiling rates found in the stochastic rate and recovery soiling analysis

sensor_analysis([analyses, yoy_kwargs, ...])

Perform entire sensor-based analysis workflow.

set_clearsky([pvlib_location, pv_azimuth, ...])

Initialize values for a clearsky analysis which requires configuration of location and orientation details.