pvlib.pvsystem.singlediode

pvlib.pvsystem.singlediode(module, photocurrent, saturation_current, resistance_series, resistance_shunt, nNsVth)[source]

Solve the single-diode model to obtain a photovoltaic IV curve.

Singlediode solves the single diode equation [1]

\[I = IL - I0*[exp((V+I*Rs)/(nNsVth))-1] - (V + I*Rs)/Rsh\]

for I and V when given IL, I0, Rs, Rsh, and nNsVth (nNsVth = n*Ns*Vth) which are described later. Returns a DataFrame which contains the 5 points on the I-V curve specified in SAND2004-3535 [3]. If all IL, I0, Rs, Rsh, and nNsVth are scalar, a single curve will be returned, if any are Series (of the same length), multiple IV curves will be calculated.

The input parameters can be calculated using calcparams_desoto from meteorological data.

Parameters:

module : DataFrame

A DataFrame defining the SAPM performance parameters.

photocurrent : float or Series

Light-generated current (photocurrent) in amperes under desired IV curve conditions. Often abbreviated I_L.

saturation_current : float or Series

Diode saturation current in amperes under desired IV curve conditions. Often abbreviated I_0.

resistance_series : float or Series

Series resistance in ohms under desired IV curve conditions. Often abbreviated Rs.

resistance_shunt : float or Series

Shunt resistance in ohms under desired IV curve conditions. Often abbreviated Rsh.

nNsVth : float or Series

The product of three components. 1) The usual diode ideal factor (n), 2) the number of cells in series (Ns), and 3) the cell thermal voltage under the desired IV curve conditions (Vth). The thermal voltage of the cell (in volts) may be calculated as k*temp_cell/q, where k is Boltzmann’s constant (J/K), temp_cell is the temperature of the p-n junction in Kelvin, and q is the charge of an electron (coulombs).

Returns:

If photocurrent is a Series, a DataFrame with the following

columns. All columns have the same number of rows as the largest

input DataFrame.

If photocurrent is a scalar, a dict with the following keys.

  • i_sc - short circuit current in amperes.
  • v_oc - open circuit voltage in volts.
  • i_mp - current at maximum power point in amperes.
  • v_mp - voltage at maximum power point in volts.
  • p_mp - power at maximum power point in watts.
  • i_x - current, in amperes, at v = 0.5*v_oc.
  • i_xx - current, in amperes, at V = 0.5*(v_oc+v_mp).

Notes

The solution employed to solve the implicit diode equation utilizes the Lambert W function to obtain an explicit function of V=f(i) and I=f(V) as shown in [2].

References

[1] S.R. Wenham, M.A. Green, M.E. Watt, “Applied Photovoltaics” ISBN 0 86758 909 4

[2] A. Jain, A. Kapoor, “Exact analytical solutions of the parameters of real solar cells using Lambert W-function”, Solar Energy Materials and Solar Cells, 81 (2004) 269-277.

[3] D. King et al, “Sandia Photovoltaic Array Performance Model”, SAND2004-3535, Sandia National Laboratories, Albuquerque, NM