{
  "capability_id": "electrical.rf.cascaded_nf",
  "tool_id": "cascaded-nf",
  "engine": "cascaded-nf",
  "calculation_version": "1.1.1",
  "generated_at": "2026-09-21T16:00:36.021Z",
  "engine_build": "2026-09-12",
  "test_count": 22,
  "passed": 22,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 5,
      "passed": 5
    },
    "boundary": {
      "total": 10,
      "passed": 10
    },
    "property": {
      "total": 7,
      "passed": 7
    }
  },
  "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-12",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-09-12",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/electric/cascaded-nf",
  "api": "https://www.calculatorx.com/api/v1/calc/cascaded-nf",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.rf.cascaded_nf.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.rf.cascaded_nf.output.json",
  "assumptions": [
    "Matched stages",
    "Gi denotes available power gain",
    "NF and gain inputs are dB and are converted to linear factors internally",
    "Classical Friis cascade assumptions apply",
    "For a matched passive two-port at T0 ≈ 290 K, NF_dB = L_dB ≈ −G_dB"
  ],
  "limitations": [
    "Mismatch effects are not modeled",
    "Image-noise / special mixer sideband behavior is not modeled",
    "REST/MCP arrays NF_dB[]/G_dB[] are limited to 64 stages (TOO_MANY_STAGES); field encoding NF1…NF8 is limited to 8",
    "Field encoding and array encoding are mutually exclusive (MIXED_INPUT_ENCODING); field stages must be contiguous from stage 1 (NONCONTIGUOUS_STAGES)",
    "When 10^(G_tot_dB/10) overflows IEEE-754 binary64, G_tot_lin is null and LINEAR_GAIN_OVERFLOW is returned; G_tot_dB remains finite"
  ],
  "boundary_conditions": [
    "Missing stage pair → NEEDS_TWO_INPUTS / MISSING_REQUIRED_INPUT",
    "NF_dB[] and G_dB[] length mismatch → ARRAY_LENGTH_MISMATCH",
    "Non-finite NF/G or linear G≤0 (including gain underflow to 0) → INVALID_NUMBER",
    "NF_dB[]/G_dB[] longer than 64 → TOO_MANY_STAGES",
    "NF1,G1,… mixed with NF_dB[]/G_dB[] → MIXED_INPUT_ENCODING",
    "Field stages with a gap (e.g. NF1+NF3, no NF2) → NONCONTIGUOUS_STAGES",
    "Linear G_tot overflow → G_tot_lin null + LINEAR_GAIN_OVERFLOW; G_tot_dB remains finite"
  ],
  "sources": [
    {
      "title": "Friis, H. T., “Noise Figures of Radio Receivers,” Proceedings of the IRE, Vol. 32, No. 7, pp. 419–422, July 1944",
      "section": "Cascade formula",
      "url": "https://ieeexplore.ieee.org/document/1695024",
      "supports": "F = F1 + (F2−1)/G1 + (F3−1)/(G1 G2) + … with Fi, Gi as linear power ratios (available gain)",
      "kind": "reference",
      "accessed": "2026-09-11",
      "publisher": "IRE / IEEE",
      "published": "1944-07",
      "doi": "https://doi.org/10.1109/JRPROC.1944.232049"
    },
    {
      "title": "Pozar, D. M., Microwave Engineering, 4th ed., Wiley, 2012",
      "section": "Ch. 10 Noise and Nonlinear Distortion, §10.2 Noise Figure of a Cascaded System, p. 504",
      "supports": "Matched Friis cascade in the linear domain; available gain; cascade order",
      "kind": "reference",
      "accessed": "2026-09-11",
      "publisher": "Wiley",
      "published": "2012"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:e499a69bf70cfd80b7dcd608cb849f615e1d54165b1f749836d2a276208a9ac0",
  "tests": [
    {
      "id": "two-stage",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "NF1": 1,
        "G1": 10,
        "NF2": 3,
        "G2": 20
      },
      "expect": {
        "NF_tot_dB": 1.3304418347850302,
        "G_tot_dB": 30
      },
      "expectWarning": null,
      "actual": {
        "n": 2,
        "NF_dB": [
          1,
          3
        ],
        "G_dB": [
          10,
          20
        ],
        "F_tot": 1.3584516432910552,
        "NF_tot_dB": 1.3304418347850302,
        "G_tot_dB": 30,
        "G_tot_lin": 1000
      },
      "tol": 1e-12
    },
    {
      "id": "three-stage-arrays",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "NF_dB": [
          1,
          8,
          3
        ],
        "G_dB": [
          15,
          10,
          20
        ]
      },
      "expect": {
        "n": 3,
        "NF_tot_dB": 1.5532879789003458,
        "G_tot_dB": 45
      },
      "expectWarning": null,
      "actual": {
        "n": 3,
        "NF_dB": [
          1,
          8,
          3
        ],
        "G_dB": [
          15,
          10,
          20
        ],
        "F_tot": 1.4299761624740048,
        "NF_tot_dB": 1.5532879789003458,
        "G_tot_dB": 45,
        "G_tot_lin": 31622.776601683792
      },
      "tol": 1e-12
    },
    {
      "id": "five-stage",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "NF_dB": [
          1,
          2,
          4,
          6,
          8
        ],
        "G_dB": [
          12,
          10,
          8,
          6,
          4
        ]
      },
      "expect": {
        "n": 5,
        "NF_tot_dB": 1.1716645959227783,
        "G_tot_dB": 40
      },
      "expectWarning": null,
      "actual": {
        "n": 5,
        "NF_dB": [
          1,
          2,
          4,
          6,
          8
        ],
        "G_dB": [
          12,
          10,
          8,
          6,
          4
        ],
        "F_tot": 1.3096838120808023,
        "NF_tot_dB": 1.1716645959227783,
        "G_tot_dB": 40,
        "G_tot_lin": 10000
      },
      "tol": 1e-12
    },
    {
      "id": "single-stage",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "NF1": 2.5,
        "G1": 12
      },
      "expect": {
        "n": 1,
        "NF_tot_dB": 2.5,
        "G_tot_dB": 12
      },
      "expectWarning": null,
      "actual": {
        "n": 1,
        "NF_dB": [
          2.5
        ],
        "G_dB": [
          12
        ],
        "F_tot": 1.7782794100389228,
        "NF_tot_dB": 2.4999999999999996,
        "G_tot_dB": 12,
        "G_tot_lin": 15.848931924611133
      },
      "tol": 1e-12
    },
    {
      "id": "cable-before-lna",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "NF1": 3,
        "G1": -3,
        "NF2": 1,
        "G2": 15
      },
      "expect": {
        "NF_tot_dB": 4,
        "G_tot_dB": 12
      },
      "expectWarning": null,
      "actual": {
        "n": 2,
        "NF_dB": [
          3,
          1
        ],
        "G_dB": [
          -3,
          15
        ],
        "F_tot": 2.51188643150958,
        "NF_tot_dB": 4,
        "G_tot_dB": 12,
        "G_tot_lin": 15.848931924611133
      },
      "tol": 1e-12
    },
    {
      "id": "half-stage",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 1
      },
      "expectError": "NEEDS_TWO_INPUTS",
      "code": "NEEDS_TWO_INPUTS",
      "error": "NF1 and G1 must both be provided"
    },
    {
      "id": "empty",
      "ok": true,
      "kind": "boundary",
      "inputs": {},
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "need at least one stage (NF1,G1 or arrays)"
    },
    {
      "id": "array-mismatch",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF_dB": [
          1,
          3
        ],
        "G_dB": [
          10
        ]
      },
      "expectError": "ARRAY_LENGTH_MISMATCH",
      "code": "ARRAY_LENGTH_MISMATCH",
      "error": "NF_dB and G_dB must have the same length"
    },
    {
      "id": "high-g1-linear-overflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 1,
        "G1": 4000,
        "NF2": 3,
        "G2": 20
      },
      "expect": {
        "G_tot_dB": 4020,
        "G_tot_lin": null
      },
      "expectWarning": "LINEAR_GAIN_OVERFLOW",
      "expectWarningSeverity": "warning",
      "actual": {
        "n": 2,
        "NF_dB": [
          1,
          3
        ],
        "G_dB": [
          4000,
          20
        ],
        "F_tot": 1.2589254117941673,
        "NF_tot_dB": 1.0000000000000002,
        "G_tot_dB": 4020,
        "G_tot_lin": null,
        "warnings": [
          {
            "code": "LINEAR_GAIN_OVERFLOW",
            "severity": "warning",
            "detail": "G_tot_dB=4020 is finite, but linear total available gain 10^(G_tot_dB/10) exceeds IEEE-754 binary64. G_tot_lin is null.",
            "suggestion": "Use G_tot_dB for total available gain when G_tot_lin is null."
          }
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "too-many-stages",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF_dB": [
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1
        ],
        "G_dB": [
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10
        ]
      },
      "expectError": "TOO_MANY_STAGES",
      "code": "TOO_MANY_STAGES",
      "error": "NF_dB/G_dB support at most 64 stages"
    },
    {
      "id": "mixed-encoding",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 1,
        "G1": 10,
        "NF_dB": [
          3,
          4
        ],
        "G_dB": [
          15,
          20
        ]
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Use either NF1,G1,… or NF_dB[]+G_dB[], not both"
    },
    {
      "id": "noncontiguous-fields",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 1,
        "G1": 10,
        "NF3": 3,
        "G3": 20
      },
      "expectError": "NONCONTIGUOUS_STAGES",
      "code": "NONCONTIGUOUS_STAGES",
      "error": "Field stages must be contiguous from stage 1"
    },
    {
      "id": "boundary-zero-g",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 2,
        "G1": 0,
        "NF2": 3,
        "G2": 10
      },
      "expect": {
        "NF_tot_dB": 4.116458819258205,
        "G_tot_dB": 10
      },
      "expectWarning": null,
      "actual": {
        "n": 2,
        "NF_dB": [
          2,
          3
        ],
        "G_dB": [
          0,
          10
        ],
        "F_tot": 2.580155507429993,
        "NF_tot_dB": 4.116458819258205,
        "G_tot_dB": 10,
        "G_tot_lin": 10
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-nan",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": "n/a",
        "G1": 10
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "NF1 must be a finite number"
    },
    {
      "id": "boundary-gain-underflow",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "NF1": 1,
        "G1": -4000,
        "NF2": 3,
        "G2": 20
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "stage gain must be finite (linear G>0)"
    },
    {
      "id": "property-gain",
      "ok": true,
      "kind": "property",
      "detail": "Gtot 30",
      "expect": 30,
      "actual": 30
    },
    {
      "id": "property-nf-lt",
      "ok": true,
      "kind": "property",
      "detail": "1 < NF_tot_dB && NF_tot_dB < 3",
      "expect": true,
      "actual": true,
      "predicate": "1 < NF_tot_dB && NF_tot_dB < 3",
      "observed": 1.3304418347850302
    },
    {
      "id": "property-more-G1",
      "ok": true,
      "kind": "property",
      "detail": "higher G1 lowers NFtot",
      "expect": true,
      "actual": true
    },
    {
      "id": "property-n1-equals-nf1",
      "ok": true,
      "kind": "property",
      "detail": "n=1 → NF_tot = NF1",
      "expect": true,
      "actual": true
    },
    {
      "id": "property-order-matters",
      "ok": true,
      "kind": "property",
      "detail": "swapping stages changes NF",
      "expect": true,
      "actual": true
    },
    {
      "id": "property-last-G-independent",
      "ok": true,
      "kind": "property",
      "detail": "last-stage G changes Gtot not NF",
      "expect": true,
      "actual": true
    },
    {
      "id": "property-linear-gain-overflow",
      "ok": true,
      "kind": "property",
      "detail": "G_tot_lin null + LINEAR_GAIN_OVERFLOW when linear gain overflows",
      "expect": true,
      "actual": true,
      "predicate": "G_tot_lin === null && warnings includes LINEAR_GAIN_OVERFLOW",
      "observed": 4020
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 22,
      "total": 22,
      "golden": 5,
      "boundary": 10,
      "property": 7
    },
    "contract_checks": {
      "passed": 6,
      "total": 6
    }
  },
  "evidence_core_generated_at": "2026-09-12T08:53:19.298Z",
  "rendered_at": "2026-09-21T16:00:36.021Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.1.1",
    "artifacts": {
      "engine": "1.1.1",
      "page": "1.1.1",
      "capability": "1.1.1",
      "evidence": "1.1.1",
      "input_schema": "1.1.1",
      "output_schema": "1.1.1",
      "mcp_contract": "1.1.1"
    },
    "digests": {
      "input_schema_sha256": "bfb7a1226de15f901673da5b7e001c641f416e175640fe463850a6d56761ae1d",
      "output_schema_sha256": "7df2c407d15f6a571ccf19a4e5ad5c0eeeed041efe0b9fcb75ba77483d71de62",
      "evidence_sha256": "1c89ad6e85a7a8df48c6d283d8db6f7086e465f56e21d951f662cbf1e4166ff0",
      "evidence_core_sha256": "1c89ad6e85a7a8df48c6d283d8db6f7086e465f56e21d951f662cbf1e4166ff0",
      "capability_sha256": "a43dc06ea6f8655b32a206e3b131439dd0398d098f5fa37cc0c619243d84001f",
      "engine_sha256": "925bd3b9c373f747a10f30cedc6352b3f419cf91144ae6744c9c9adcd703033c",
      "mcp_contract_sha256": "2bb4bbc15ea3f9842a9a464e07efcc692dc31f3e830dee8553f3d7c4e81238d3"
    },
    "contract_checks": {
      "total": 6,
      "passed": 6,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.1.1"
        },
        {
          "id": "schema-output-required-declared",
          "status": "pass"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        },
        {
          "id": "rest-success-payload-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
