|
| 1 | +.. _singlediode: |
| 2 | + |
| 3 | +Single Diode Model |
| 4 | +================== |
| 5 | + |
| 6 | +This section reviews the solutions to the single diode model used in |
| 7 | +pvlib-python to generate an IV curve of a PV module. |
| 8 | + |
| 9 | +pvlib-python supports two ways to solve the single diode model, by passing the |
| 10 | +a ``method`` keyword to the :func:`pvlib.pvsystem.singlediode` function: |
| 11 | + |
| 12 | +1. Lambert W-Function |
| 13 | +2. Bishop's Algorithm |
| 14 | + |
| 15 | +Lambert W-Function |
| 16 | +------------------ |
| 17 | +When ``method='lambertw'``, the Lambert W-Function is used as previously shown |
| 18 | +by Jain and Kapoor [1]. The following algorithm can be found on |
| 19 | +`Wikipedia: Theory of Solar Cells |
| 20 | +<https://en.wikipedia.org/wiki/Theory_of_solar_cells>`_ given the basic single |
| 21 | +diode model equation. |
| 22 | + |
| 23 | +.. math:: |
| 24 | +
|
| 25 | + I = I_L - I_0 \left(\exp \left(\frac{\left(V + I R_s \right)}{n Ns V_{th}} \right) - 1 \right) |
| 26 | + - \frac{\left(V + I R_s \right)}{R_{sh}} |
| 27 | +
|
| 28 | +Lambert W-function is the inverse of the function |
| 29 | +:math:`f \left( w \right) = w \exp \left( w \right)` or |
| 30 | +:math:`w = f^{-1} \left( w \exp \left( w \right) \right)` also given as |
| 31 | +:math:`w = W \left( w \exp \left( w \right) \right)`. Rearranging the single |
| 32 | +diode equation above with a Lambert W-function yields the following. |
| 33 | + |
| 34 | +.. math:: |
| 35 | +
|
| 36 | + z = \frac{R_s I_0}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}} \right)} \exp \left( |
| 37 | + \frac{R_s \left( I_L + I_0 \right) + V}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}}\right)} |
| 38 | + \right) |
| 39 | +
|
| 40 | +The the module current can be solved using the Lambert W-function. |
| 41 | + |
| 42 | +.. math:: |
| 43 | +
|
| 44 | + I = \frac{I_L + I_0 - \frac{V}{R_{sh}}}{1 + \frac{R_s}{R_{sh}}} |
| 45 | + - \frac{n Ns V_{th}}{R_s} W(z) |
| 46 | +
|
| 47 | +
|
| 48 | +Bishop's Algorithm |
| 49 | +------------------ |
| 50 | +The function :func:`pvlib.singlediode.bishop88` uses an explicit solution [2] |
| 51 | +that finds points on the IV curve by first solving for pairs :math:`(V_d, I)` |
| 52 | +where :math:`V_d` is the diode voltage :math:`V_d = V + I*Rs`. Then the voltage |
| 53 | +is backed out from :math:`V_d`. Points with specific voltage, such as open |
| 54 | +circuit, are located using the bisection search method, ``brentq``, bounded |
| 55 | +by a zero diode voltage and an estimate of open circuit voltage given by |
| 56 | + |
| 57 | +.. math:: |
| 58 | +
|
| 59 | + V_{oc, est} = n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right) |
| 60 | +
|
| 61 | +We know that :math:`V_d = 0` corresponds to a voltage less than zero, and |
| 62 | +we can also show that when :math:`V_d = V_{oc, est}`, the resulting |
| 63 | +current is also negative, meaning that the corresponding voltage must be |
| 64 | +in the 4th quadrant and therefore greater than the open circuit voltage |
| 65 | +(see proof below). Therefore the entire forward-bias 1st quadrant IV-curve |
| 66 | +is bounded, and a bisection search within these points will always find |
| 67 | +desired condition. |
| 68 | + |
| 69 | +.. math:: |
| 70 | +
|
| 71 | + I = I_L - I_0 \left(\exp \left(\frac{V_{oc, est}}{n Ns V_{th}} \right) - 1 \right) |
| 72 | + - \frac{V_{oc, est}}{R_{sh}} \newline |
| 73 | +
|
| 74 | + I = I_L - I_0 \left(\exp \left(\frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{n Ns V_{th}} \right) - 1 \right) |
| 75 | + - \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline |
| 76 | +
|
| 77 | + I = I_L - I_0 \left(\exp \left(\log \left(\frac{I_L}{I_0} + 1 \right) \right) - 1 \right) |
| 78 | + - \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline |
| 79 | +
|
| 80 | + I = I_L - I_0 \left(\frac{I_L}{I_0} + 1 - 1 \right) |
| 81 | + - \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline |
| 82 | +
|
| 83 | + I = I_L - I_0 \left(\frac{I_L}{I_0} \right) |
| 84 | + - \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline |
| 85 | +
|
| 86 | + I = I_L - I_L - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline |
| 87 | +
|
| 88 | + I = - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} |
| 89 | +
|
| 90 | +References |
| 91 | +---------- |
| 92 | +[1] A. Jain, A. Kapoor, "Exact analytical solutions of the |
| 93 | +parameters of real solar cells using Lambert W-function", Solar |
| 94 | +Energy Materials and Solar Cells, 81 (2004) 269-277. |
| 95 | + |
| 96 | +[2] "Computer simulation of the effects of electrical mismatches in |
| 97 | +photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988) |
| 98 | +https://doi.org/10.1016/0379-6787(88)90059-2 |
0 commit comments