Invntr
Source

All instruments

allan_deviation

Overlapping Allan deviation of a rate (frequency) or phase time series at logarithmically spaced averaging times: white-noise, bias-instability, random-walk and drift regions from a non-negative power-law fit, the random-walk coefficient, the minimum and its averaging time, the log-log slope; curve as csv. Takes measured samples or synthesises a seeded series.

Field
Measurement and data
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.2 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replayallan_deviation 0.1.0 · files 890200da5b1d…6f5d
  1. r0001linear rate drift y = a t (a = 0.004 /s, tau0 = 0.5 s): ADEV = a tau / sqrt 2 exactly (IEEE Std 952 ramp term), R = a, slope +1; closed form, rel 1e-9passed

    adev_at_query0.0282843 ± 2.8e-110.0282843lockedunder 0.01 % of the tolerance used
    adev_tau00.00141421 ± 1.4e-120.00141421lockedunder 0.01 % of the tolerance used
    drift_rate0.004 ± 4e-120.004lockedunder 0.01 % of the tolerance used
    loglog_slope1 ± 1e-091lockedunder 0.01 % of the tolerance used
  2. r0002constant signal 3.25: every Allan deviation is 0 by definition (differences of equal averages); exactpassed

    adev_tau00 ± 1e-150lockedunder 0.01 % of the tolerance used
    adev_max0 ± 1e-150lockedunder 0.01 % of the tolerance used
    minimum_location= flat_zeroflat_zerolockedexact match
  3. r0003alternating +1,-1 (20 samples, tau0 = 1 s), by hand from the definition: m-averages are +-1/m (odd m) or 0 (even m), so ADEV(m tau0) = sqrt2/m for odd m, 0 for even m; ADEV(1 s) = sqrt 2, ADEV(3 s) = sqrt2/3, ADEV(2 s) = 0; exact, rel 1e-9passed

    adev_tau01.41421 ± 1.4e-091.41421lockedunder 0.01 % of the tolerance used
    adev_at_query0.471405 ± 4.7e-100.471405lockedunder 0.01 % of the tolerance used
    adev_min0 ± 1e-150lockedunder 0.01 % of the tolerance used
    tau_at_min_s2 ± 1e-122lockedunder 0.01 % of the tolerance used
  4. r0004phase input x = t^2/2 (rate y = t, a = 1 /s), 11 samples: second difference of x is a tau^2, so ADEV = tau / sqrt 2 exactly; ADEV(1 s) = 0.7071068, ADEV(4 s) = 2.8284271, R = 1; closed form, rel 1e-9passed

    adev_tau00.707107 ± 7.1e-100.707107lockedunder 0.01 % of the tolerance used
    adev_at_query2.82843 ± 2.8e-092.82843lockedunder 0.01 % of the tolerance used
    drift_rate1 ± 1e-091lockedunder 0.01 % of the tolerance used
  5. r0005white rate noise s = 2, 1e5 samples, seed 7: AVAR = s^2 tau0/tau, so ADEV(tau0) = s = 2, slope -1/2, N = s sqrt(tau0) = 2; statistical: rel 1.5 % on ADEV(tau0) is ~5 sigma of its 0.32 % sampling error, slope +-0.03 and N 2 % cover the fit's pooled sampling errorpassed

    adev_tau02 ± 0.031.99723locked9.2 % of the tolerance used
    loglog_slope-0.5 ± 0.03-0.500532locked1.8 % of the tolerance used
    white_noise_coefficient2 ± 0.041.99613locked9.7 % of the tolerance used
  6. r0006rate random walk, step sd q = 0.01 per sample, 1e5 samples, seed 11: exact discrete AVAR = q^2 (2m^2+1)/(6m) (worked from the definition), so ADEV(1 s) = q/sqrt2 = 0.00707107, ADEV(10 s) = q sqrt(201/60) = 0.0183030, K = q/sqrt(tau0) = 0.01; statistical: 1.5 % / 3 % are ~5 sigma of the 0.22 % / 0.7 % sampling errors, K 5 % because the fit pools long-tau points with errors of several %passed

    adev_tau00.00707107 ± 0.000110.00706147locked9 % of the tolerance used
    adev_at_query0.018303 ± 0.000550.0183102locked1.3 % of the tolerance used
    random_walk_coefficient0.01 ± 0.00050.00998714locked2.6 % of the tolerance used
6 of 6 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
kindfrequencyfrequency: the samples are a rate (gyro deg/s, fractional frequency, sensor reading); phase: the samples are its time integral (time error, angle), in unit times seconds.
values[]Equally spaced samples, oldest first. Leave empty and set synth_n to synthesise a series instead.
sample_interval_ss1.0Time between samples (tau0).
unit1Unit of the rate samples (deg/s, Hz, 1 for fractional frequency). Every deviation is reported in it.
points_per_decade110Averaging times per decade (logarithmic spacing, whole multiples of tau0).
max_tau_fraction10.2Longest averaging time as a share of the record (0.5 is the estimator's limit; past 0.2 the points are very uncertain).
tau_query_ssOptional: one averaging time to read the deviation at (snapped to a whole number of samples).
synth_n10Number of synthetic rate samples (0: use values).
synth_white_sd1.0Synthetic: standard deviation of the white noise per sample.
synth_walk_step_sd0.0Synthetic: standard deviation of each random-walk step (one step per sample).
synth_drift_per_sample0.0Synthetic: linear drift of the rate, per sample.
synth_offset0.0Synthetic: constant offset (does not change the deviation).
seed11Synthetic: generator seed (xoshiro256**); the same seed gives the same series.

Readings

NameUnitMeaning
sourcevalues or synthetic
kind
unitthe unit every deviation is in
sample_count1
record_length_ss
tau_count1
tau_min_ss
tau_max_ss
adev_tau0Allan deviation at one sample interval
adev_minsmallest Allan deviation on the curve
tau_at_min_ss
adev_min_rel_error11-sigma relative sampling error of adev_min
adev_max
adev_at_query
query_tau_ss
minimum_locationinterior, shortest_tau, longest_tau, single_tau or flat_zero
minimum_resolvedan interior minimum with a fall before and a rise after it beyond 2 sigma
loglog_slope1weighted slope of log ADEV against log tau over the whole curve
white_noise_coefficientNo unit the kernel can check (unit s^0.5 is not a whole power). N (angle/velocity random walk), unit s^0.5; reported as the white term's ADEV at tau = 1 s
bias_instabilityB, the flicker floor is 0.664 B
random_walk_coefficientNo unit the kernel can check (unit s^-0.5 is not a whole power). K (rate random walk), unit s^-0.5; reported as its number in the unit of the samples
drift_rateNo unit declared (unit/s cannot be formed from a free-text unit). R (rate ramp), unit/s; reported as its number in the unit of the samples
regionsper noise term: slope, whether it dominates anywhere, coefficient (true dimension in coefficient_unit), the averaging times where it dominates
curve
warnings

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call