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_ocinclusive. [V]
- current (ndarray) – 1D array of float type containing current at each point on the IV curve, from - i_scto 0 inclusive. [A]
- v_oc (float, optional) – Open circuit voltage. If not provided, - v_ocis taken as the last point in the- voltagearray. [V]
- i_sc (float, optional) – Short circuit current. If not provided, - i_scis taken as the first point in the- currentarray. [A]
- v_mp_i_mp (tuple of float, optional) – Voltage, current at maximum power point. If not provided, the maximum power point is found at the maximum of - voltagetimes- 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<=- vlimx- 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_scand- v_mp_i_mpare 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. - 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)\]- 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\]- 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}}{1 + G_{p}R_{s}} V \\ &= \beta_{0} + \beta_{1} V\end{split}\]- 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}})\]- 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}\]- Calculate values for - IL, I0, Rs, Rsh,and- nNsVthfrom the regression coefficents \(\beta_{0}, \beta_{1}, \beta_{3}\) and \(\beta_{4}\).
 - References 
