Calculator Inputs
Enter coefficients from highest power to constant term. Example: 1, 10, 1000.
Example Data Table
Example model: H(s) = 1000 / (s² + 10s + 1000), sampled on a logarithmic sweep from 1 Hz to 1000 Hz.
| Frequency (Hz) | Angular frequency (rad/s) | Magnitude | Magnitude (dB) | Phase (deg) |
|---|---|---|---|---|
| 1.000000 | 6.283185 | 1.0389e+0 | 0.3313 | -3.7426 |
| 3.162278 | 19.869177 | 1.5699e+0 | 3.9173 | -18.1750 |
| 10.000000 | 62.831853 | 3.3178e-1 | -9.5830 | -167.9677 |
| 31.622777 | 198.691765 | 2.5954e-2 | -31.7159 | -177.0440 |
| 100.000000 | 628.318531 | 2.5391e-3 | -51.9063 | -179.0859 |
| 316.227766 | 1,986.917653 | 2.5336e-4 | -71.9251 | -179.7116 |
| 1,000.000000 | 6,283.185307 | 2.5331e-5 | -91.9270 | -179.9088 |
Formula Used
The calculator evaluates the transfer function at complex frequency points along the imaginary axis. The model used is:
H(jω) = K × N(jω) / D(jω) × e-jωT
Where K is gain, N(jω) is the numerator polynomial, D(jω) is the denominator polynomial, and T is time delay.
- Angular frequency: ω = 2πf when you enter frequency in hertz.
- Magnitude: |H(jω)| = √(Re² + Im²)
- Magnitude in decibels: 20 log10(|H(jω)|)
- Phase: ∠H(jω) = atan2(Im, Re) in degrees
- Phase margin: 180° + phase at 0 dB crossover
- Gain margin: negative of magnitude at the -180° phase crossover, expressed in dB
- -3 dB bandwidth: frequency span between the two crossings below the peak minus three decibels
The stability margins assume the transfer function represents an open-loop model in a negative-feedback system.
How to Use This Calculator
- Enter numerator coefficients from highest power to constant term.
- Enter denominator coefficients in the same order.
- Set the gain multiplier and optional transport delay.
- Choose the frequency start, end, point count, and unit.
- Select logarithmic or linear sweep behavior.
- Choose whether magnitude appears in dB or linear form.
- Enable phase unwrap if you want smoother phase curves.
- Press Plot Frequency Response to calculate the response.
- Review the summary cards, graphs, and data table.
- Use CSV or PDF export to save the results.
Frequently Asked Questions
1. What coefficient order should I use?
Enter coefficients from the highest power down to the constant term. For example, s² + 10s + 1000 becomes 1, 10, 1000. The same rule applies to the numerator.
2. Should I choose hertz or rad/s?
Choose hertz when your specifications are in cycles per second. Choose rad/s when your control or signal-processing equations already use angular frequency. The calculator converts hertz to angular frequency internally.
3. When is logarithmic sweep better?
Use a logarithmic sweep for wide frequency spans and Bode style analysis. It allocates points across decades more evenly, making resonances, cutoff regions, and long tails easier to inspect.
4. What does phase unwrap do?
Phase unwrap reduces sudden ±180° jumps by adding or subtracting full turns where needed. It does not change the actual system behavior. It only makes the phase curve easier to read.
5. Why are gain and phase margins sometimes unavailable?
Margins need specific crossover points. If the magnitude never crosses 0 dB, or phase never reaches -180°, the related margin cannot be computed from the sampled range. Expanding the frequency span can help.
6. How is the -3 dB bandwidth found?
The script finds the peak magnitude, subtracts three decibels, and searches for the left and right crossings around that peak. Their frequency difference is reported as the approximate bandwidth.
7. Can I model transport delay?
Yes. Enter the delay in seconds. The calculator applies the factor e-jωT. Delay does not change magnitude, but it shifts phase and can reduce phase margin.
8. What should I do if the plot looks wrong?
Check coefficient order first, then confirm the chosen unit and sweep range. If poles sit near sampled points, expand the range or increase resolution. A wrong denominator sign is another common issue.