pvlib.ivtools.sde.fit_sandia_simple

pvlib.ivtools.sde.fit_sandia_simple(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. If not provided, v_oc is taken as the last point in the voltage array. [V]

  • i_sc (float, default None) – Short circuit current. If not provided, i_sc is taken as the first point in the current array. [A]

  • v_mp_i_mp (tuple of float, default None) – Voltage, current at maximum power point. If not provided, the maximum power point is found at the maximum of voltage times current. [V], [A]

  • 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 significant, approximately defined by current < (1 - ilim) x i_sc. [A]

Returns

  • photocurrent (float) – photocurrent [A]

  • saturation_current (float) – dark (saturation) current [A]

  • resistance_series (float) – series resistance [ohm]

  • resistance_shunt (float) – shunt (parallel) resistance [ohm]

  • nNsVth (float) – product of thermal voltage Vth [V], diode ideality factor n, and number of series cells Ns. [V]

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_sandia_simple() 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 pvlib.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}}{nN_sV_{th}}) - 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}}{nN_sV_{th}}) - 1) \approx 0\]
  1. Fit the linear portion of the IV curve with a line.

\[I &\approx \frac{I_{L}}{1 + G_{p} R_{s}} - \frac{G_{p}}{1 + G_{p}R_{s}} V &= \beta_{0} + \beta_{1} V\]
  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 + IR_s)/{nN_sV_{th}}) \gg 1\) so that

\[\exp(\frac{V + I R_{s}}{nN_sV_{th}}) - 1 \approx \exp(\frac{V + I R_{s}}{nN_sV_{th}})\]
  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}{nN_sV_{th}} + \frac{I R_{s}}{nN_sV_{th}}) \\ &= \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