One-Diode Model: Fitting a Solar Cell's J-V Curve
The current of a solar cell follows the one-diode model – an implicit equation that has to be solved at every voltage. Fitting it to a measured J-V curve gives the diode factor, the saturation current density and the series and shunt resistances – here is how.
Setup
Upload your data and then plot the data. Like that Sci-Eval knows the column for the current density and voltage. To learn more, check the guided tour:
Take the tourThe physics
On Sci-eval the function for the 1-diode-model is stored as follows.
This is an implicit function as \(J_{diode}\) is on both sides of the equation. Implicit functions are written such that they equate to 0. More common in textbooks the equation is written as
which represents a diode (in parallel) with an intrinsic shunt resistance \(R_{sh}\) and an intrinsic series resistance \(r_s\). \(J_{diode}\) is the current density of the diode, \(J_{0}\) the saturation current density, \(A\) the diode ideality factor, \(J_{ph}\) the photo current density, \(T\) the temperature,\(V\) the applied voltage, \(q\) the elemental charge and \(k_B\) the Boltzmann constant. Fitting can be tricky as
- the function is implicit and therefore needs to be solved numerically for each iteration step.
- it is an exponential function and therefore can easily vary over several orders of magnitude.
Fitting the data
The 1-diode-equation equation varies over several orders of magnitude. Therefore, it is advised to fit the data on a logarithmic scale. Otherwise the data points with the largest current-densities have orders of magnitude stronger influence on the residuals as the smallest current-densities. On the top of the page for the 1-diode-model the scale can be choosen to be 'log' or 'log-abs'. Here we choose 'log-abs' (see Figure 1). We take the absolute values so that it is possible to calculate the logarithm of negative current densities (e.g. in reverse bias).
For the log-abs scale the summed squared residuals are minimized given as follows:
In addition, an automatic filter is added for the dependent variable (see Figure 2). This filter (or in general all filters, if you add one manually) are applied for the measured data but as well for the fitted data during the least-squares minimization. In particular, values outside the filters are clamped to the filter edges. This prevents uncontrolled residuals due to divergent values caused by taking the logarithm of very small current densities. The auto-filter (when choosing the log-abs scale), takes the smallest value from the absolute uploaded (measured) data.
Dark J-V curve
In order to fit your data, you have to define starting parameters (Figure 3). The parameters need to be a reasonable choice as the algorithm searches for the local minimum of the minimized sum of squared residuals. In addition, you can choose which parameters you want to keep constant (equal to the initial guess) during fitting, by unticking the 'do fit?' checkbox. Here, we fit a JV curve measured in the dark at 300 K. Hence, we set \(J_{ph}\) to 0 and \(T\) to 300 K and untick 'do fit?'.
Upper and lower bounds can also be set to the parameters, so that these are confined during the fitting. We dont want to fit unreasonable resistances and therefore we set the lower bounds to zero (Figure 3). For the 1-diode-model also bounds for other paremters can be set, however, the fit is generally rather robust for these parameters. Finally, we tick 'fit log?' for \(J_0\). In that case the parameter is varied on the log-scale, which is selected as \(J_0\) can vary over several orders of magnitude.
Illuminated J-V curve
For illuminated curves, the procedure is very similar compared to the fitting of a dark J-V curve. For \(J_{ph}\) 'do fit' is checked and a reasonable start value needs to be entered. Especially for illuminated curves it is important to have the auto-filter on the log-abs scale mentioned above. The reason is that the modelled/fitted curve has a varying \(V_{OC}\) and it can happen that it coincides with a measurement voltage point. In that case the evaluated/fitted current density would diverge and consequently the residual as well.
Results
On the bottom of the fitting-page the task results are displayed. Clicking on a finished task opens the results (see Figure 4). It shows the fitted parameters, the results table with the measured and fitted JV curve, and the fitting statistics. The used y-scale is written back into the fitting statistics. Parameters can be copied and pasted on top of the fitting-page as reasonable starting parameters - potentially for another fit of another JV curve.
Figure 5 and Figure 6 show the fitted parameters for the linear and the logarithmic scale, respectively.
Figure 7 shows the comparison of both fits. In this example, both curves represent a decent fit. However, a difference can be seen for small voltages (and therefore small current densities) around 0.2 V. This regime is controlled by the shunt resistance and to a lesser extent by the diode factor. Due to the small current densities, this part of the curve does not have a significant influence on the residuals on the linear scale, which is the reason for a stronger deviation (red curve). On the log-abs scale, residuals for small and large current densities are weighted similar, enforcing a better fit in that part of the curve compared to the linear scale. As a consequence, the slightly larger diode factor (and smaller shunt resistance) predicted by the log-abs fit can be trusted (compare Figure 5 and Figure 6).
Fitted with
More examples
Damped pendulum
Find the damping time of a swinging pendulum from its amplitude decay.