pvlib.ivtools.fit_sde_sandia

pvlib.ivtools.fit_sde_sandia(voltage, current, v_oc=None, i_sc=None, v_mp_i_mp=None, vlim=0.2, ilim=0.1)[source]

Fits the single diode equation (SDE) to an IV curve.

Parameters:
  • voltage (ndarray) – 1D array of float type containing voltage at each point on the IV curve, increasing from 0 to v_oc inclusive [V]
  • current (ndarray) – 1D array of float type containing current at each point on the IV curve, from i_sc to 0 inclusive [A]
  • v_oc (float, default None) – Open circuit voltage [V]. If not provided, v_oc is taken as the last point in the voltage array.
  • i_sc (float, default None) – Short circuit current [A]. If not provided, i_sc is taken as the first point in the current array.
  • v_mp_i_mp (tuple of float, default None) – Voltage, current at maximum power point in units of [V], [A]. If not provided, the maximum power point is found at the maximum of voltage times current.
  • vlim (float, default 0.2) – Defines portion of IV curve where the exponential term in the single diode equation can be neglected, i.e. voltage <= vlim x v_oc [V]
  • ilim (float, default 0.1) – Defines portion of the IV curve where the exponential term in the single diode equation is signficant, approximately defined by current < (1 - ilim) x i_sc [A]
Returns:

  • photocurrent (float) – photocurrent [A]
  • saturation_current (float) – dark (saturation) current [A]
  • resistance_shunt (float) – shunt (parallel) resistance, in ohms
  • resistance_series (float) – series resistance, in ohms
  • nNsVth (float) – product of thermal voltage Vth [V], diode ideality factor n, and number of series cells Ns

Raises:

RuntimeError – If parameter extraction is not successful.

Notes

Inputs voltage, current, v_oc, i_sc and v_mp_i_mp are assumed to be from a single IV curve at constant irradiance and cell temperature.

fit_single_diode_sandia() obtains values for the five parameters for the single diode equation [1]:

\[I = I_{L} - I_{0} (\exp \frac{V + I R_{s}}{nNsVth} - 1) - \frac{V + I R_{s}}{R_{sh}}\]

See pvsystem.singlediode() for definition of the parameters.

The extraction method [2] proceeds in six steps.

  1. In the single diode equation, replace \(R_{sh} = 1/G_{p}\) and re-arrange
\[I = \frac{I_{L}}{1 + G_{p} R_{s}} - \frac{G_{p} V}{1 + G_{p} R_{s}} - \frac{I_{0}}{1 + G_{p} R_{s}} (\exp(\frac{V + I R_{s}}{nNsVth}) - 1)\]
  1. The linear portion of the IV curve is defined as \(V \le vlim \times v_oc\). Over this portion of the IV curve,
\[\frac{I_{0}}{1 + G_{p} R_{s}} (\exp(\frac{V + I R_{s}}{nNsVth}) - 1) \approx 0\]
  1. Fit the linear portion of the IV curve with a line.
\[\begin{split}I &\approx \frac{I_{L}}{1 + G_{p} R_{s}} - \frac{G_{p} V}{1 + G_{p} R_{s}} \\ &= \beta_{0} + \beta_{1} V\end{split}\]
  1. The exponential portion of the IV curve is defined by \(\beta_{0} + \beta_{1} \times V - I > ilim \times i_sc\). Over this portion of the curve, \(exp((V + IRs)/nNsVth) >> 1\) so that
\[\exp(\frac{V + I R_{s}}{nNsVth}) - 1 \approx \exp(\frac{V + I R_{s}}{nNsVth})\]
  1. Fit the exponential portion of the IV curve.
\[\begin{split}\log(\beta_{0} - \beta_{1} V - I) &\approx \log(\frac{I_{0}}{1 + G_{p} R_{s}} + \frac{V}{nNsVth} + \frac{I R_{s}}{nNsVth} \\ &= \beta_{2} + beta_{3} V + \beta_{4} I\end{split}\]
  1. Calculate values for IL, I0, Rs, Rsh, and nNsVth from the regression coefficents \(\beta_{0}, \beta_{1}, \beta_{3}\) and \(\beta_{4}\).

References

[1]S.R. Wenham, M.A. Green, M.E. Watt, “Applied Photovoltaics” ISBN 0 86758 909 4
[2]C. B. Jones, C. W. Hansen, Single Diode Parameter Extraction from In-Field Photovoltaic I-V Curves on a Single Board Computer, 46th IEEE Photovoltaic Specialist Conference, Chicago, IL, 2019