{
  "capability_id": "electrical.adc.error_budget",
  "tool_id": "adc-error-budget",
  "engine": "adc-error-budget",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T22:03:43.727Z",
  "engine_build": "2026-09-10",
  "test_count": 11,
  "passed": 11,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 3,
      "passed": 3
    },
    "boundary": {
      "total": 6,
      "passed": 6
    },
    "property": {
      "total": 2,
      "passed": 2
    }
  },
  "engine_tested": true,
  "expert_reviewed": true,
  "internally_reviewed": false,
  "review_kind": "expert",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-09-03",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-09-03",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/electric/adc-error-budget",
  "api": "https://www.calculatorx.com/api/v1/calc/adc-error-budget",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.adc.error_budget.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.adc.error_budget.output.json",
  "assumptions": [
    "Gain, offset, INL, and DNL values are already referred to LSB.",
    "RSS assumes contributors can be treated as independent/uncorrelated.",
    "FSR_V represents the full ADC input span.",
    "CalculatorX includes DNL as a separate RSS/worst-case contributor. Some ADC datasheets define TUE using gain, offset, and INL only."
  ],
  "limitations": [
    "Static DC errors only.",
    "Quantization ±0.5 LSB is separate unless included in the INL/DNL terms you enter.",
    "CalculatorX includes DNL as a separate RSS/worst-case contributor. Some ADC datasheets define TUE using gain, offset, and INL only."
  ],
  "boundary_conditions": [
    "n_bits not an integer → VALUE_MUST_BE_INTEGER",
    "n_bits∉1…32 → VALUE_OUT_OF_RANGE",
    "FSR≤0 → VALUE_MUST_BE_POSITIVE",
    "combine not rss|worst_case → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "IEEE Std 1241 — ADC terminology",
      "section": "Gain, offset, INL, DNL",
      "supports": "ADC gain / offset / INL / DNL terminology",
      "kind": "standard"
    },
    {
      "title": "TI SLAA587 — ADC Performance Parameters",
      "section": "Total unadjusted error (TUE)",
      "url": "https://www.ti.com/lit/pdf/slaa587",
      "supports": "RSS Total Unadjusted Error methodology",
      "kind": "reference",
      "accessed": "2026-09-03"
    },
    {
      "title": "Analog Devices — The ABCs of Analog-to-Digital Converters",
      "section": "How ADC errors affect system performance",
      "url": "https://www.analog.com/en/resources/technical-articles/the-abcs-of-analog-to-digital-converters-how-adc-errors-affect-system-performance.html",
      "supports": "RSS / worst-case error-budget interpretation; INL related to accumulated DNL",
      "kind": "reference",
      "accessed": "2026-09-03"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:7223200bb31f9c768edc3b8bcd4d3b69bd7d0eac85a0c46ddb757502c253dfab",
  "tests": [
    {
      "id": "rss-12b",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "gain_err_LSB": 1,
        "offset_err_LSB": 0.5,
        "inl_LSB": 1,
        "dnl_LSB": 0.5,
        "combine": "rss"
      },
      "expect": {
        "err_LSB": 1.5811388300841898,
        "LSB_V": 0.0008056640625
      },
      "expectWarning": null,
      "actual": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "codes": 4096,
        "LSB_V": 0.0008056640625,
        "combine": "rss",
        "gain_err_LSB": 1,
        "offset_err_LSB": 0.5,
        "inl_LSB": 1,
        "dnl_LSB": 0.5,
        "err_LSB": 1.5811388300841898,
        "err_V": 0.0012738667332221254,
        "err_pct_FS": 0.03860202221885229
      },
      "tol": 1e-9
    },
    {
      "id": "wca",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "gain_err_LSB": 1,
        "offset_err_LSB": 0.5,
        "inl_LSB": 1,
        "dnl_LSB": 0.5,
        "combine": "worst_case"
      },
      "expect": {
        "err_LSB": 3
      },
      "expectWarning": null,
      "actual": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "codes": 4096,
        "LSB_V": 0.0008056640625,
        "combine": "worst_case",
        "gain_err_LSB": 1,
        "offset_err_LSB": 0.5,
        "inl_LSB": 1,
        "dnl_LSB": 0.5,
        "err_LSB": 3,
        "err_V": 0.0024169921874999997,
        "err_pct_FS": 0.07324218749999999
      },
      "tol": 1e-12
    },
    {
      "id": "soft-zero-errs",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "n_bits": 10,
        "FSR_V": 5
      },
      "expect": {
        "err_LSB": 0
      },
      "expectWarning": null,
      "actual": {
        "n_bits": 10,
        "FSR_V": 5,
        "codes": 1024,
        "LSB_V": 0.0048828125,
        "combine": "rss",
        "gain_err_LSB": 0,
        "offset_err_LSB": 0,
        "inl_LSB": 0,
        "dnl_LSB": 0,
        "err_LSB": 0,
        "err_V": 0,
        "err_pct_FS": 0
      },
      "tol": 1e-12
    },
    {
      "id": "bad-bits",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 0,
        "FSR_V": 5
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "n_bits must be in 1…32"
    },
    {
      "id": "bad-bits-frac",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 12.5,
        "FSR_V": 5
      },
      "expectError": "VALUE_MUST_BE_INTEGER",
      "code": "VALUE_MUST_BE_INTEGER",
      "error": "n_bits must be an integer"
    },
    {
      "id": "bad-bits-high",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 33,
        "FSR_V": 5
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "n_bits must be in 1…32"
    },
    {
      "id": "bad-combine",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 12,
        "FSR_V": 5,
        "combine": "mode"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "combine must be \"rss\" or \"worst_case\""
    },
    {
      "id": "boundary-adc",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "gain_err_LSB": 1,
        "offset_err_LSB": 0,
        "inl_LSB": 0,
        "dnl_LSB": 0
      },
      "expect": {
        "err_LSB": 1
      },
      "expectWarning": null,
      "actual": {
        "n_bits": 12,
        "FSR_V": 3.3,
        "codes": 4096,
        "LSB_V": 0.0008056640625,
        "combine": "rss",
        "gain_err_LSB": 1,
        "offset_err_LSB": 0,
        "inl_LSB": 0,
        "dnl_LSB": 0,
        "err_LSB": 1,
        "err_V": 0.0008056640625,
        "err_pct_FS": 0.0244140625
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-adc-bad",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "n_bits": 12,
        "FSR_V": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "FSR_V must be greater than zero"
    },
    {
      "id": "property-adc",
      "ok": true,
      "kind": "property",
      "detail": "1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-adc-integer-bits",
      "ok": true,
      "kind": "property",
      "detail": "n_bits contract",
      "expect": "VALUE_MUST_BE_INTEGER",
      "actual": "VALUE_MUST_BE_INTEGER"
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 11,
      "total": 11,
      "golden": 3,
      "boundary": 6,
      "property": 2
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-05T02:35:39.217Z",
  "rendered_at": "2026-09-16T22:03:43.727Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "10e5d92e79e9a2192a81c1c96a7383d4b4eebb8d7dfdb7daa0d93f348e2e321f",
      "output_schema_sha256": "bc2424d86172e14ac883bcf4d96c07f9a749d435f507adbf95b431d27c6877dc",
      "evidence_sha256": "3972d8f951e47e6eff0fe1653cf2636dc44b73c08cc417c1e631c2b3c340b312",
      "evidence_core_sha256": "3972d8f951e47e6eff0fe1653cf2636dc44b73c08cc417c1e631c2b3c340b312",
      "capability_sha256": "e31533dcfbf7fa3d60891793fdbb957a5cd138895455043c253e6551b263225c",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
