RF Network Quality Checks

Check reciprocity, passivity, losslessness, and stability. Test causality for an RF response sampled on a two-sided frequency grid.

Passivity, reciprocity, and causality

The reciprocity check compares S with its transpose. The passivity check compares maximum power gain with one. The losslessness check compares SᴴS with I. Two-port stability has dedicated diagnostics, including the case of zero reverse transmission. For causality, pass the complex response first, followed by the centered, two-sided, strictly increasing, uniform FFT grid. The method compares the energy at negative times with the total energy. The test requires a two-sided grid.

Operation reference

Jump to an operation

quality.reciprocity

A is S. The residual uses forward and reverse transmission for two ports, or the difference from the transpose for a multiport network. Set the threshold with tolerance.

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Square matrix (square_matrix)
Units
Dimensionless
Result
Numerical and diagnostic fields
Purpose
Reciprocity check
gxtxt_api_call("RF_NETWORK_API_v1", "quality.reciprocity", args)
Recorded result · quality.reciprocity

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      2,
      2
    ],
    "real": [
      0.1,
      0.6,
      0.6,
      0.2
    ],
    "imaginary": [
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "empty"
  }
]

Result preview

{
  "pass": true,
  "residual": 0.0
}

quality.passivity

A is S. Check whether the largest eigenvalue of SᴴS exceeds one by more than tolerance. Read maximum_power_gain as well as the Boolean flag.

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Square matrix (square_matrix)
Units
Dimensionless
Result
Numerical and diagnostic fields
Purpose
Passivity check
gxtxt_api_call("RF_NETWORK_API_v1", "quality.passivity", args)
Recorded result · quality.passivity:gain

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      2,
      2
    ],
    "real": [
      0.2,
      1.2,
      1.2,
      0.4
    ],
    "imaginary": [
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "empty"
  }
]

Result preview

{
  "pass": false,
  "maximum_power_gain": 2.2624956747275378,
  "residual": 1.2624956747275378
}

quality.losslessness

A is S. The operation computes the residual SᴴS−I. A passive dissipative network can fail the losslessness test.

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Square matrix (square_matrix)
Units
Dimensionless
Result
Numerical and diagnostic fields
Purpose
Losslessness check
gxtxt_api_call("RF_NETWORK_API_v1", "quality.losslessness", args)
Recorded result · quality.losslessness

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      2,
      2
    ],
    "real": [
      0.1,
      0.6,
      0.6,
      0.2
    ],
    "imaginary": [
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "empty"
  }
]

Result preview

{
  "pass": false,
  "residual": 0.9064766957842878
}

quality.stability

A is a two-port S matrix. Inspect the determinant Delta and the stability factors. Zero reverse transmission is handled as a special case.

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Square matrix (square_matrix)
Units
Dimensionless
Result
Numerical and diagnostic fields
Purpose
Two-port stability check
gxtxt_api_call("RF_NETWORK_API_v1", "quality.stability", args)
Recorded result · quality.stability:unilateral

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      2,
      2
    ],
    "real": [
      0.1,
      0.5,
      0.0,
      0.2
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "empty"
  }
]

Result preview

{
  "rollet_k": Infinity,
  "mu": 5.0,
  "delta_magnitude": 0.020000000000000004,
  "unconditionally_stable": true
}

quality.causality

A is the complex response and B is the centered, uniform, two-sided grid in Hz. Use at least eight bins. The check compares the negative-time energy fraction with tolerance, which defaults to 10⁻³.

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Square matrix (square_matrix)
Units
Dimensionless
Result
Numerical and diagnostic fields
Purpose
Negative-time energy check for a uniformly sampled, two-sided response
gxtxt_api_call("RF_NETWORK_API_v1", "quality.causality", args)
Recorded result · quality.causality:delay-sign--1

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      32,
      1
    ],
    "real": [
      -1.0,
      -0.9807852804032304,
      -0.9238795325112867,
      -0.831469612302545,
      -0.7071067811865475,
      -0.555570233019602,
      -0.3826834323650897,
      -0.19509032201612797,
      2.83276944882399e-16,
      0.19509032201612833
    ],
    "imaginary": [
      -5.66553889764798e-16,
      -0.1950903220161286,
      -0.3826834323650899,
      -0.5555702330196025,
      -0.7071067811865476,
      -0.8314696123025455,
      -0.9238795325112867,
      -0.9807852804032305,
      -1.0,
      -0.9807852804032304
    ]
  },
  {
    "kind": "array",
    "shape": [
      32,
      1
    ],
    "real": [
      -16000000.0,
      -15000000.0,
      -14000000.0,
      -13000000.0,
      -12000000.0,
      -11000000.0,
      -10000000.0,
      -9000000.0,
      -8000000.0,
      -7000000.0
    ]
  },
  {
    "kind": "empty"
  }
]

Result preview

{
  "negative_time_energy_fraction": 1.0,
  "pass": false,
  "method": "two_sided_ifft"
}
Rejected input or attempted run · quality.causality:rejected-one-sided

Download the example script (ZIP).

Example operands preview

[
  {
    "kind": "array",
    "shape": [
      16,
      1
    ],
    "real": [
      0.4990133642141358,
      0.4974755084906501,
      0.4952307128483256,
      0.49228216726460267,
      0.48863406178409674,
      0.48429158056431554,
      0.4792608945086879,
      0.47354915249737217,
      0.467164471228306,
      0.4601159236829352
    ],
    "imaginary": [
      -0.03139525976465669,
      -0.05018085742560744,
      -0.06889514534231904,
      -0.08751152948763802,
      -0.10600355496102731,
      -0.1243449435824274,
      -0.14250963123498805,
      -0.16047180490360474,
      -0.17820593935662538,
      -0.19568683341860119
    ]
  },
  {
    "kind": "array",
    "shape": [
      16,
      1
    ],
    "real": [
      1000000.0,
      1600000.0,
      2200000.0,
      2800000.0,
      3400000.0,
      4000000.0,
      4600000.0,
      5200000.0,
      5800000.0,
      6400000.0
    ]
  },
  {
    "kind": "empty"
  }
]

Result preview

"GXTXT:ScriptBridge:RemoteError: RF_NETWORK_API_v1/quality.causality: causality requires a uniform two-sided FFT frequency grid in ascending centered order"