Ohmforge AC Sweep (Bode plot)
Frequency response of a circuit: Bode magnitude/phase, −3 dB corner and unity gain.
Try an example: RC low-pass (fc ≈ 1.59 kHz) · Inverting op-amp, gain −10
How it works
Linearises the circuit at its DC operating point and solves the complex MNA equations across a logarithmic frequency sweep. Returns magnitude in dB and unwrapped phase of an output node (optionally relative to an input node), the peak gain, lower/upper −3 dB frequencies, the unity-gain frequency, a Bode chart and CSV.
- The DC operating point is solved first; every nonlinear device is replaced by its small-signal conductances at that point (diode gd, BJT gm/gπ/go, MOSFET gm/gds, op-amp output slope).
- Capacitors become admittances jωC, inductors impedances jωL in their branch equations, coupled inductors jωM; the complex system is solved by dense LU with partial pivoting at every frequency.
- Magnitude is 20·log10|H|, phase is unwrapped to be continuous. The −3 dB points are found 3.01 dB below the peak by logarithmic interpolation; unity gain is the 0 dB crossing.
Teaching-grade simulation: device models are simplified (Ebers–Moll BJT, level-1 MOSFET, behavioural op-amps and 555) and part ratings are typical values. Verify real designs on the bench and against manufacturer data before building anything connected to mains voltage.
Sources
- SPICE: A Computer Program to Simulate Semiconductor Circuits (L. W. Nagel, UC Berkeley ERL-M520, 1975) (University of California, Berkeley)
- The Modified Nodal Approach to Network Analysis (Ho, Ruehli, Brennan, IEEE Trans. Circuits and Systems, 1975) (IEEE)
- ngspice User Manual (device models, convergence options, source syntax) (ngspice project)
For scripts and AI agents
- JSON API:
POST https://ohmforgeacsweep.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://ohmforgeacsweep.usefulweb.site/mcp· tool nameohmforge_ac_sweep
Example request
curl -s -X POST https://ohmforgeacsweep.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"netlist":"* RC low-pass, fc = 1/(2*pi*1k*100n) = 1591.5 Hz\nV1 in 0 DC 0 AC 1\nR1 in out 1k\nC1 out 0 100n\n.ac dec 20 10 1meg","output":"out","input":"V1"}'Related tools
- Ohmforge DC Operating Point – SPICE netlist in, node voltages, branch currents, power and overload warnings out.
- Ohmforge Transient Simulation – Simulate a circuit over time: waveforms, Vpp/RMS/frequency, CSV and a chart.