pvanalytics.system.infer_orientation_fit_pvwatts

pvanalytics.system.infer_orientation_fit_pvwatts(power_ac, ghi, dhi, dni, solar_zenith, solar_azimuth, temperature=25, wind_speed=0, temperature_coefficient=-0.004, temperature_model_parameters=None)

Get the tilt and azimuth that give PVWatts output that most closely fits the data in power_ac.

Input data power_ac, ghi, dhi, dni should reflect clear-sky conditions.

Uses non-linear least squares to optimize over four free variables to find the values that result in the best fit between power modeled using PVWatts and power_ac. The four free variables are

  • surface tilt

  • surface azimuth

  • the DC capacity of the system

  • the DC input limit of the inverter.

Of these four parameters, only tilt and azimuth are returned. While, DC capacity and the DC input limit are calculated, their values may not be accurate. While its value is not returned, because the DC input limit is used as a free variable for the optimization process, this function can operate on power_ac data that includes inverter clipping.

All parameters passed as a Series must have the same index and must not contain any undefined values (i.e. NaNs). If any input contains NaNs a ValueError is raised.

Parameters
  • power_ac (Series) – AC power from the system in clear sky conditions.

  • ghi (Series) – Clear sky GHI with same index as power_ac. [W/m^2]

  • dhi (Series) – Clear sky DHI with same index as power_ac. [W/m^2]

  • dni (Series) – Clear sky DNI with same index as power_ac. [W/m^2]

  • solar_zenith (Series) – Solar zenith. [degrees]

  • solar_azimuth (Series) – Solar azimuth. [degrees]

  • temperature (float or Series, default 25) – Air temperature at which to model the hypothetical system. If a float then a constant temperature is used. If a Series, must have the same index as power_ac. [C]

  • wind_speed (float or Series, default 0) – Wind speed. If a float then a constant wind speed is used. If a Series, must have the same index as power_ac. [m/s]

  • temperature_model_parameters (dict, optional) – Parameters fot the cell temperature model. If not specified pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS['sapm'][ 'open_rack_glass_glass'] is used. See pvlib.temperature.sapm_cell() for more information.

Returns

  • surface_tilt (float) – Tilt of the array. [degrees]

  • surface_azimuth (float) – Azimuth of the array. [degrees]

  • r_squared (float) – \(r^2\) value for the fit at the returned orientation.

Raises

ValueError – If any input passed as a Series contains undefined values (i.e. NaNs).