Control Frequency
control_frequencyCompute Bode magnitude and phase, gain/phase/delay margins, bandwidth, and resonant peak for continuous or discrete SISO transfer functions, with closed-loop pole-count stability checks.
Instructions
Frequency response of a SISO transfer function (coefficient lists in descending powers or polynomial text; continuous, or domain='discrete' + sample_time). Returns Bode data (magnitude dB, unwrapped phase deg) on a log grid as a CSV artifact, DC gain, gain and phase margins with crossover frequencies, delay margin, -3 dB bandwidth and resonant peak. With closed_loop_check (default) it treats the input as an OPEN loop L with unity negative feedback and counts the closed-loop poles exactly; it states when the margins disagree with the pole count (conditionally stable or open-loop unstable loops), in which case trust the pole count.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"numerator": "<numerator>",
"denominator": "<denominator>"
},
"name": "control_frequency"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | 'continuous' (variable s, default) or 'discrete' (variable z; needs 'sample_time') | continuous |
| points | No | Number of table points, 10 to 20000 (default 300) | |
| numerator | Yes | Numerator polynomial: JSON list of coefficients in DESCENDING powers, e.g. '[1, 3]' for s+3, or text such as 's + 3'. | |
| denominator | Yes | Denominator polynomial, same formats, e.g. '[1, 3, 2]' or 's^2 + 3 s + 2'. The leading coefficient must not be 0. Order at most 40, coefficients 1e-12..1e12 in magnitude. | |
| sample_time | No | Sample time with unit, e.g. '0.1 s'. Only with domain='discrete'; refused for a continuous model. | |
| frequency_max | No | Highest table frequency in rad/s; 0 = automatic (discrete: up to the Nyquist frequency pi/T) | |
| frequency_min | No | Lowest table frequency in rad/s; 0 = automatic from the poles and zeros | |
| closed_loop_check | No | Treat the input as an open loop L and check unity-negative-feedback stability by counting characteristic-polynomial roots (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |