Skip to content
Product

Modifier distributions

Unlisted

This page documents the mathematics that SunSolve Power evaluates in the browser for the Modifiers tab. When modifiers are configured as a population of cells, the interface previews the resulting open-circuit voltage (Voc) and fill-factor (FF) distributions live, without a server round-trip, using a self-contained two-diode equivalent-circuit solve.

The preview is an approximation intended for interactive feedback. The authoritative electrical result is always produced by the backend solver described in Equivalent circuit model; the equations here cover only the client-side preview and the calibration that feeds it.

Throughout, current densities are written J (A/cm²), the two ideality factors are m1 and m2, and the specific resistances are Rs and Rsh (Ω·cm²). The physical constants are the elementary charge q, the Boltzmann constant k, and a nominal cell temperature Tc=25 ∘C.

Every modifier stores a fractional multiplier rather than an absolute value. A multiplier of 1 leaves a parameter unchanged; the Modifiers input page describes the user-facing convention.

The preview scales seven equivalent-circuit quantities per cell: JL, J01, m1, J02, m2, Rs and Rsh. For a cell, each parameter’s effective value is its base value multiplied by the product of every multiplier that targets that cell for that parameter:

Xcell=Xbase∏ksX,k

where X is one of the seven parameters and sX,k is the multiplier contributed by the k-th source (a targeted adjuster, or one draw from a distribution). Because the combination is a product, the multipliers are commutative: the order in which they are applied does not change the result.

Modifiers can be authored on a wider set of parameters than the preview understands. The enhanced-recombination diode (J0H, mH, RH) and every reverse-breakdown parameter are sampled alongside the rest and sent to the backend, but the preview’s two-diode solve has nowhere to put them and treats their multipliers as 1. A configuration that modifies only those parameters therefore leaves the previewed Voc and FF distributions unchanged while still changing the backend result.

Distribution types and random sampling

Section link: Distribution types and random sampling

In population mode each parameter multiplier is a random variable. The preview draws one sample of each enabled parameter for every cell in a pooled population, then forward-solves that cell. The pool holds one cell per cell in the module, or 512 cells, whichever is larger, so that a small module still yields a legible histogram.

Deterministic random numbers

Section link: Deterministic random numbers

All randomness comes from a small, seeded pseudo-random number generator (mulberry32) that returns a uniform variate u∈[0,1). The generator is fully deterministic: identical inputs always reproduce the same preview.

Each parameter stream is seeded independently so that different parameters and circuits do not correlate. For circuit index c and parameter index p the seed is mixed from a fixed base seed S0:

seed(c,p)=(S0+(c+1) a+(p+1) b) mod 232,a=0x9e3779b9,  b=0x85ebca6b

A single standard-normal variate z (mean 0, standard deviation 1) is obtained from two uniforms with the Box–Muller transform:

z=−2ln⁡u1 cos⁡ ⁣(2πu2)

with u1 floored away from exactly 0 so the logarithm is always finite.

Drawing a multiplier from each distribution kind

Section link: Drawing a multiplier from each distribution kind

A parameter field may use any of four distribution kinds. In each case the sampled multiplier m is:

Fixed — a constant, with no randomness:

m=v

Top-hat (uniform between a lower and upper bound):

m=mmin⁡+u (mmax⁡−mmin⁡),u∼Uniform[0,1)

Its equivalent mean and standard deviation, used during calibration, are:

μ=12(mmin⁡+mmax⁡),σ=mmax⁡−mmin⁡12

Gaussian (normal, parameterised by mean μ and standard deviation σ):

m=μ+σz

Lognormal (parameterised by its own arithmetic mean μ and standard deviation σ). The arithmetic moments are first converted to the underlying normal’s log-space parameters:

σln⁡2=ln⁡ ⁣(1+σ2μ2),μln⁡=ln⁡ ⁣(μ2σ2+μ2)

and the sample is then drawn in log space:

m=exp⁡ ⁣(μln⁡+σln⁡ z)

The lognormal is used for the diode saturation currents because they enter the diode equation through an exponential; a plain Gaussian there would place probability mass at physically impossible negative multipliers. For the Gaussian and lognormal kinds an optional lower and upper bound clamps each sample after it is drawn.

The equivalent-circuit preview solve

Section link: The equivalent-circuit preview solve

For each sampled cell the preview evaluates a two-diode equivalent circuit (a subset of the full multi-diode model in Equivalent circuit model, without the enhanced-recombination diode or reverse-bias breakdown).

The thermal voltage for a diode of ideality factor mi is:

Vt,i=mi k (Tc+273.15)q

The cell current density J at an applied voltage V satisfies the implicit two-diode relation, where Vj=V+JRs is the junction voltage:

J=JL−J01 ⁣(eVj/Vt1−1)−J02 ⁣(eVj/Vt2−1)−VjRsh

This equation is solved for J at a given voltage by an iterative root-find. Two quantities are then derived per cell.

Open-circuit voltage is the voltage at which the current vanishes:

J(Voc)=0

It is located with a bracketed root-find over the interval V∈[0,  Vt1ln⁡(JL/J01+1)], which is guaranteed to contain Voc.

Fill factor needs the maximum-power point, which is found by changing variables. Taking the junction voltage Vj as the independent variable rather than the terminal voltage makes the current explicit, because Rs then appears only in the terminal relation V=Vj−JRs and not on the right-hand side:

J(Vj)=JL−J01 ⁣(eVj/Vt1−1)−J02 ⁣(eVj/Vt2−1)−VjRsh

The power density is then P(Vj)=(Vj−JRs)J, and its derivative dP/dVj is available in closed form. The maximum is bracketed by construction: at Vj=0 the cell sits past short circuit at negative terminal voltage and the slope is positive, while at Vj=Voc the current has fallen to zero and the slope is negative. Bisecting the slope over Vj∈[0,  Voc] therefore converges on the peak, and the fill factor follows from the power there:

FF=Pmax⁡Voc JL

Because power is flat to first order at its peak, each halving of the bracket quarters the error in FF; the preview stops after 18 halvings, by which point the residual error is far below the displayed precision. Locating the peak this way is both more accurate and cheaper than sweeping terminal voltage on a fixed grid, since a coarse grid can only ever underestimate a smooth maximum.

The sampled Voc and FF values across the cell population form the two preview histograms. A sampled cell whose multipliers drive it outside the physical range — a non-positive JL, J01, Rsh, m1 or m2, a negative Rs, or a solve that returns no finite Voc or FF — is discarded rather than plotted, and the interface reports how many cells were rejected.

Deriving equivalent-circuit distributions from Voc and FF

Section link: Deriving equivalent-circuit distributions from Voc and FF

Users typically know the spread of Voc and FF they want to model rather than the spread of the underlying diode parameters. The derive from Voc/FF option lets them specify target Voc and FF distributions (as multipliers over the circuit’s own nominal values) and calibrates two equivalent-circuit parameters to reproduce them. The target pair is either J01 with J02, or J01 with Rs.

The nominal Voc and FF are the values the preview solve produces with both derived multipliers held at 1. Every other parameter contributes its authored point value at this step rather than the mean of its distribution, so the nominal pair describes one specific cell rather than the centre of the population. The absolute target moments are the nominal values scaled by the authored multiplier moments:

μVtarget=Vocnom μVmult,σVtarget=Vocnom σVmult

and likewise for FF.

J01 does not have to be searched for. At open circuit no current flows, so Rs drops out of the junction voltage and the two-diode relation reduces to a current balance in which J01 is the only unknown:

JL=J01 ⁣(eVoc/Vt1−1)+J02 ⁣(eVoc/Vt2−1)+VocRsh J01=JL−J02 ⁣(eVoc/Vt2−1)−Voc/RsheVoc/Vt1−1

Keeping the circuit’s own J02 in this step is essential: a single-diode inversion would attribute the second diode’s share of the recombination to J01 and inflate it.

The second parameter is then recovered from the target mean FF:

  • For the J01–J02 target, Voc and FF both depend on J02, so the two are coupled. The closed form above resolves that coupling without iteration: it makes J01 an exact function of J02 along the constant-Voc curve, leaving a one-dimensional root-find on J02 alone. FF is monotonic in J02 along that curve, so bisection settles it. The search runs on log⁡10J02, because J02 ranges over decades and a linear bracket would resolve small values far more coarsely than large ones.
  • For the J01–Rs target there is no coupling, because Rs has no effect on Voc (at open circuit no current flows through it). A single pass suffices: J01 from Voc, then Rs from FF by bisection.

Each solved value is divided by the base value to become the derived multiplier, so a target equal to the circuit’s nominal Voc and FF returns multipliers of 1.

Targets the circuit cannot reach

Section link: Targets the circuit cannot reach

The constant-Voc curve has two ends, and they bound what the cell can produce. Raising J02 to

J02max⁡=JL−Voc/RsheVoc/Vt2−1

drives J01 to zero: beyond it the second diode alone would exceed the photocurrent. It is therefore the largest J02 the open-circuit balance can carry, and it gives the lowest reachable FF, while J02=0 gives the highest. A target FF outside that span returns the nearer end, flagged as a boundary fit and reported with the FF that end actually achieves. Because the search is bracketed, it always terminates with an answer.

The J01–Rs target instead searches Rs between 0 and 50 Ω⋅cm2, and a target FF outside the span those ends produce abandons the calibration rather than clamping to it. The calibration also declines to run when the parameter it would derive is switched off in the circuit, because a multiplier over a base of zero cannot express any value.

The spread of each derived multiplier is found by a first-order (delta-method) propagation of the target variances. Both derived multipliers influence Voc and FF, so their variances are solved jointly from a 2×2 system of local sensitivities. Writing s1 for the J01 multiplier and s2 for the second, and differentiating with respect to g1 and g2:

σV2=(∂Voc∂g1) ⁣2 ⁣var⁡(g1)+(∂Voc∂g2) ⁣2 ⁣var⁡(g2) σF2=(∂FF∂g1) ⁣2 ⁣var⁡(g1)+(∂FF∂g2) ⁣2 ⁣var⁡(g2)

Each multiplier is differentiated in the space its own distribution is fitted in, so that the solved variance is the one the fit needs. J01 is always lognormal, so g1=ln⁡s1. The second is g2=ln⁡s2 for the J01–J02 target, where it is lognormal too, and g2=s2 for the J01–Rs target, where it is Gaussian. The partial derivatives are estimated by central finite differences about the solved means. For the J01–Rs target the term ∂Voc/∂g2 is zero, and the system collapses to the simpler case where the Voc spread is carried entirely by J01 and the residual FF spread by Rs. A singular system or a negative solved variance falls back to that triangular form.

Fitting the derived distributions

Section link: Fitting the derived distributions

J01 and J02 are fitted as lognormals (they enter the diode equation exponentially), while Rs is fitted as a Gaussian floored at a tiny positive multiplier (the backend solver rejects Rs=0, and a negative series resistance is unphysical, so an over-wide FF target piles the clamped mass just above zero rather than distorting the distribution). The log-space standard deviation is capped at σln⁡≤2 so that a near-zero local sensitivity cannot inflate the variance without bound.

For the lognormal fits the solved multiplier becomes the distribution’s median, eμln⁡, since that is the value which reproduces the target exactly when the spread is zero. The arithmetic mean that the distribution field stores is then larger by the usual lognormal factor:

μ=eμln⁡+σln⁡2/2

The fitted distributions are written back over the two derived parameters, and the population is then sampled and solved exactly as in the sections above.

Because the spreads come from a linearisation about the solved point, the calibration is exact only for a cell sitting at that point: the median cell reproduces the requested Voc and FF, while the sampled spreads approximate the requested targets and drift as the requested spread widens or the circuit’s response becomes less linear.

Deriving from a measured current-voltage summary

Section link: Deriving from a measured current-voltage summary

Diode parameters can also be derived from a measured Jsc, Voc and FF summary rather than from target multipliers. For a single summary the same coupled (J01,J02) inversion described above is used, falling back to the classic single-diode closed form when that pair cannot be fitted:

J01=Jscexp⁡ ⁣(Voc/Vt1)−1

When the summary is itself given as a distribution, J01 is propagated by Monte Carlo instead: 300 (Jsc,Voc) pairs are drawn from the stated means and standard deviations, the closed form above is evaluated for each, and the mean and standard deviation of the result become the derived J01. J02 then follows from the mean FF, and its spread is taken as half the gap between the J02 values that an FF one standard deviation above and below the mean require. Measured summaries quote Jsc in mA/cm², which is converted to the A/cm² used everywhere else on this page.

The preview also reports a fill-factor ceiling: the highest FF the population could reach with no second-diode recombination. For each sampled cell it re-solves Voc and FF with that cell’s own J02 set to zero, and takes the maximum across the population:

FFceiling=max⁡cellsmax⁡ ⁣(FF,  FF∣J02=0)

Removing the second diode (J02=0) can only raise a cell’s fill factor, but the maximum-power point is located by a finite bisection rather than in closed form, so the computed FF is not guaranteed to be monotone in J02 down to the last digit. Taking the larger of each cell’s own FF and its J02=0 value removes any need to rely on that monotonicity: the ceiling can never fall below the plotted FF, so the population maximum is a strict upper bound on the FF distribution.

Every step above — the seeded generator, the per-parameter seeds, and the numerical solves — is deterministic. The same circuit and the same modifier configuration always reproduce the same preview histograms, which keeps the displayed distributions stable while a user edits unrelated inputs.