pvpltools.module_efficiency.fit_efficiency_model#

pvpltools.module_efficiency.fit_efficiency_model(irradiance, temperature, eta, model, p0=None, **kwargs)[source]#

Determine the parameters of a module efficiency model by non-linear least-squares fit.

This is a convenience function that calls the scipy curve_fit function with suitable parameters and defaults.

Parameters:
  • irradiance (non-negative numeric, W/m²) – The effective irradiance incident on the PV module.

  • temperature (numeric, °C) – The module operating temperature.

  • eta (numeric) – The efficiency of the module at the specified irradiance and temperature.

  • model (function) – A PV module efficiency function such as adr. It must take irradiance and temperature as the first two arguments and the model-specific parameters as the remaining arguments.

  • p0 (array_like, optional) – Initial guess for the parameters, which may speed up the fit process.

  • kwargs – Optional keyword arguments passed to curve_fit.

Returns:

  • popt (array) – Optimal values for the parameters so that the sum of the squared residuals of model(irradiance, temperature, *popt) - eta is minimized.

  • pcov (2-D array) – The estimated covariance of popt. See curve_fit for details.

Raises:
  • (These errors and warnings are from curve_fit.)

  • ValueError – if either ydata or xdata contain NaNs, or if incompatible options are used.

  • RuntimeError – if the least-squares minimization fails.

  • OptimizeWarning – if covariance of the parameters can not be estimated.

See also

pvpltools.module_efficiency.adr, scipy.optimize.curve_fit

Author

Anton Driesse, PV Performance Labs

Examples using pvpltools.module_efficiency.fit_efficiency_model#

Module efficiency models

Module efficiency models