Reliability studies: generating the data, and fitting it#

Two different jobs, and this page is about the boundary between them.

Job

Where it belongs

generating life data from physics: degradation over a surface, coupled failure, cascading, Monte Carlo over scenarios

here — a grid simulation, with a receipt

fitting it: Weibull/lognormal MLE, confidence bounds, accelerated life models, growth, RBD and fault trees

a statistics library, such as reliability

This engine is not a replacement for those libraries, and it does not try to be: it has no solvers, no distributions and no tables. What it adds is the part they cannot do — producing the data from a mechanism, reproducibly.

What the engine produces#

A degradation model where each cell ages, fails at a threshold, and accelerates its neighbours (a crack that propagates). It writes two things:

vision run examples/degradation.vis --param N=48 --param steps=400
  -> output/degradation_life.npy    the life of each cell, in steps (48x48 = 2304 values)
  -> output/degradation_failed.csv  the cumulative number of failures, step by step

Measured on a 6 GB card: 2304 cells, 400 steps, 8.2 ms (113 Mpx/s), lives from 142 to 305 steps. The model is deterministic — the same program gives the same lives on every device — so the study can carry a receipt and be re-run by a third party.

Why the mechanism matters#

The coupling between cells is not decoration: it changes the numbers a Weibull fit returns. Fitting the data from four runs of the same model, differing only in the coupling:

coupling

cells that failed

shape β

characteristic life η

0.0 — independent cells

86.8%

4.12

271.7

0.3

100%

4.27

252.5

0.6

100%

5.27

219.4

1.0 — the crack propagates

100%

6.52

189.5

As the coupling grows the characteristic life falls (271.7 → 189.5 steps) and the shape rises (4.12 → 6.52): failures stop being independent and start happening together, which is what a cascading collapse looks like in a Weibull plot. A fitting library can measure that; only a simulation can explain it.

Handing the data over#

import numpy as np
from reliability.Fitters import Fit_Weibull_2P

life = np.load("output/degradation_life.npy").reshape(-1)
steps = 400
failed = life < steps                       # the cells that failed inside the window
survived = life >= steps                    # ... and the ones that did not: right-censored data

fit = Fit_Weibull_2P(failures=life[failed], right_censored=life[survived])
print(fit.alpha, fit.beta, fit.percentiles)

The right-censored cells are the 13% that were still alive at the end of the window in the independent case — dropping them, which is the usual mistake, biases β downwards.

What this engine does not do, on purpose#

  • no maximum-likelihood fitting, no confidence intervals, no goodness of fit;

  • no accelerated life models (Arrhenius, inverse power law), no reliability growth;

  • no RBD, no fault tree, no FMEA worksheets;

  • no tables and no spreadsheets: data enters and leaves as arrays and CSV.

If a study needs those, it needs both tools: this one for the mechanism, that one for the statistics — with the data and the receipt travelling between them.