Skip to content

Stochastic error

Stochastic error is the deviation introduced by tracing a finite number of rays in the Monte Carlo optical solver: fewer rays shorten runtime but increase noise in per‑cell absorption and inflate cell‑to‑cell mismatch; more rays reduce these effects but lengthen solve time and can trigger a >15 min timeout. The goal is to select rays per solar angle that achieve the target module power / mismatch accuracy (e.g. ≤0.1%) without exceeding practical time limits—too few rays randomise the spatial absorption pattern, too many yield diminishing returns and risk failure.

SunSolve automatically sets the rays per solar angle based on simulation size; users should be aware of this auto‑selection and check results for indications of insufficient ray count.

The magnitude of this stochastic error is demonstrated in the figures below which plot the impact of a varied number of rays on the STC performance of a single panel. In this example the panel contains 144 half-cut cells arranged in two parallel strings with a nominal output power of 440 W at STC. Each ray condition has been run five times.

Average STC module power, module current (Isc) and mismatch loss of a 144 half-cell module at STC for various numbers of rays, shown with mismatch (cell connected into module circuit during solving) and no mismatch (cells solved independently). Error in module power calculated relative to solution with 1x108 rays. Note that the no mismatch case is the average current and the sum of the per cell power. Each point represents the average of five runs, shown in detail below.

The major impact of running a low number of rays is to introduce a power loss due to cell-to-cell mismatch. When calculated as a sum of cell powers (i.e. when mismatch is neglected) the module power is already within an error of 0.03% for any value of rays run. Once the mismatch is included then it is necessary to run ~2 x 106 rays to reduce that error to 0.1%.

Example 144 half-cell module electrical outputs at STC for various numbers of rays, shown with mismatch (cell connected into module circuit during solving) and no mismatch (cells solved independently). Note that the no mismatch case is the average current and the sum of the power and voltage.

The next figure plots the distribution in per cell light generated current as a function of the number of rays run. Also shown are the module heat maps for three cases showing the spatial distribution of each cells light generated current relative to the average of the panel. Initially there is a broad distribution in per cell current with a random distribution spatially across the module. For the end case (1 x 108 rays) the distribution is determined by the position of the cells relative to reflective white space (i.e., around the outer edge and through the middle).

Light generated current in each cell of the 144 half-cell modules shown as a function of the number of rays run during ray tracing.

Some other points worth noting:

  • The use of solar arcs results in up to three results being combined. If the weighting is uniform, then the distribution of current within the panels is furthered averaged out. The effect of this is that the error in module power determined above is effectively a lower limit.

  • The above figures relate to an illuminated module with no spacing around it. Once positioned within a unit-system the overall density of cells within the scene should be considered. Open ground around the panels will be fast to ray trace (as the ground will reflect some of the incoming light in a single bounce) but will reduce the overall number of rays falling on a panel.

  • Where shading of the panels occurs (e.g. from the system structure, row-to-row shading) a distribution in non-uniform cell irradiance may be introduced that is far greater than the stochastic errors described above. In this case the shaded pattern will dominate the cell-to-cell mismatch.

  • Crystalline silicon panels contain bypass diodes that limit the overall impact of cell-to-cell mismatch on the output power. If technology with no bypass diodes is simulated (e.g. First Solar CdTe panels) then the impact of running less rays will be more severe.

  • The physical size of the cells will determine how many rays are absorbed. Technologies with larger numbers od very small cell areas (e.g. First Solar CdTe panels) will require more rays.

  • The simulation assumes that all cells are identical. In reality there is likely to be a distribution of cell performance within the module. This distribution will have a similar effect on module output as the stochastic error from the ray tracing.