Source: https://guthlabs.ai/docs/instruments/bode-plot-generator-generic-transfer-function/mechanism/

instrument mechanism / verified-clean

# Bode Plot Generator (generic transfer function) mechanism

The inspectable method record for Bode Plot Generator (generic transfer function), kept separate from implementation and qualification.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Model scope

The core equations are correct under the stated assumptions, but the specification is not sufficiently precise for an unconditional PASS. Exact review items are: frequency input units and conversion, coefficient ordering and polynomial variable, phase units, phase wrapping/unwrapping, and behavior at zeros and poles.

- The stated formulas are standard only when the polynomial variable is s and the frequency substitution is s=jω with ω in rad/s. The spec does not state whether the frequency-range input is in Hz or rad/s, nor whether the implementation performs ω=2πf.

- Polynomial coefficient ordering is unspecified; vectors below assume descending powers of s.

- phase=arg(H) is ambiguous at zeros/poles and does not specify principal phase versus unwrapped phase, radians versus degrees, or phase-continuity behavior across the sweep.

- The implementation should explicitly handle denominator zeros on the sweep, numerator zeros, and H=0; magnitude may be -∞ dB and phase may be undefined.

- The output description says phase plot but does not define phase units or whether phase wrapping is applied.

## Units and conventions

- Inputs below use real polynomial coefficients in descending powers of s, with H(s)=N(s)/D(s).

- Frequency inputs below are in Hz and are converted by ω=2πf rad/s before evaluating H(jω).

- Magnitude is 20 log10(|H(jω)|) in dB.

- Phase is the principal complex argument arg(H(jω)) in radians, in the interval (-π,π].

- For a production Bode plot, frequency samples should be strictly positive on a logarithmic axis unless zero-frequency handling is explicitly implemented.

## Inspectable vector

One of 4 source-bound review vectors:

````
{
  "inputs": {
    "numerator_coefficients": [
      1
    ],
    "denominator_coefficients": [
      1,
      1
    ],
    "frequency_hz": [
      0.15915494309189535,
      0.3183098861837907
    ]
  },
  "expected_outputs": {
    "canonical_exact": "H(s)=1/(s+1); H(jω)=1/(1+jω); |H(jω)|=1/sqrt(1+ω^2); magnitude_dB=20log10(1/sqrt(1+ω^2)); phase=-atan(ω)",
    "samples": [
      {
        "frequency_hz": 0.15915494309189535,
        "omega_rad_s": 1,
        "magnitude_db": "-10log10(2)",
        "magnitude_db_numeric": -3.010299956639812,
        "phase_rad": "-π/4",
        "phase_rad_numeric": -0.7853981633974483
      },
      {
        "frequency_hz": 0.3183098861837907,
        "omega_rad_s": 2,
        "magnitude_db": "-10log10(5)",
        "magnitude_db_numeric": -6.989700043360188,
        "phase_rad": "-atan(2)",
        "phase_rad_numeric": -1.1071487177940904
      }
    ],
    "spot_checks": [
      {
        "at": {
          "frequency_hz": 0.15915494309189535,
          "omega_rad_s": 1,
          "quantity": "magnitude_db"
        },
        "input_side": -3.010299956639812,
        "answer_side": -3.010299956639812
      },
      {
        "at": {
          "frequency_hz": 0.15915494309189535,
          "omega_rad_s": 1,
          "quantity": "phase_rad"
        },
        "input_side": -0.7853981633974483,
        "answer_side": -0.7853981633974483
      },
      {
        "at": {
          "frequency_hz": 0.3183098861837907,
          "omega_rad_s": 2,
          "quantity": "magnitude_db"
        },
        "input_side": -6.989700043360188,
        "answer_side": -6.989700043360188
      },
      {
        "at": {
          "frequency_hz": 0.3183098861837907,
          "omega_rad_s": 2,
          "quantity": "phase_rad"
        },
        "input_side": -1.1071487177940904,
        "answer_side": -1.1071487177940904
      }
    ]
  },
  "reference_data": {
    "system": "first-order unity-gain low-pass",
    "expected_behavior": "-3.010299956639812 dB and -45 degrees at the pole frequency ω=1 rad/s",
    "phase_degrees_at_omega_1": -45
  },
  "working": "At f=1/(2π) Hz, ω=2πf=1. Then H(j)=1/(1+j). Multiply by the conjugate: H=(1-j)/2, so |H|=1/sqrt(2), magnitude=20log10(1/sqrt(2))=-10log10(2)=-3.010299956639812 dB, and phase=arg(1-j)=-π/4=-0.7853981633974483 rad. At f=2/(2π) Hz, ω=2. Then |H|=1/sqrt(1+2^2)=1/sqrt(5), magnitude=-10log10(5)=-6.989700043360188 dB, and phase=-atan(2)=-1.1071487177940904 rad."
}
````

## Failure boundary

**BREAK_CLAIMED** · SELF_FLAGGED

The specification exposes several unsafe edges: zero frequency creates an undefined logarithmic plot coordinate, a j-axis pole causes division by zero, a transfer-function zero creates a phase/magnitude branch singularity, and Hz versus rad/s interpretation produces materially different results. The instrument should validate these cases and make frequency and phase conventions explicit.

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/bode-plot-generator-generic-transfer-function/>)[03**Implementation**](<https://guthlabs.ai/docs/instruments/bode-plot-generator-generic-transfer-function/implementation/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/bode-plot-generator-generic-transfer-function/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche8/tranche8-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
