Back to Calculator Index
There don't seem to be any good AC circuit simulators on the web right now. There are some excellent transient simulators: Falstad Circuit Simulator has been around practically forever (since 2005-ish!), is easy to use, and does a very simple fixed-timestep solution. Or, there are fully featured SPICE simulators, such as NGSPICE Online (netlist input), which uses an NGSPICE backend; or PartSim, which has easy-to-use schematic capture, and all sorts of input and output formats. (Being web or cloud based, I wouldn't recommend the latter (and ones like it) for professional work, but they're excellent for amateurs and students.) And there are plenty of offline simulators, free or commercial.
However, there is one thing that none of these can do (at least, that I have seen): an AC Analysis with real time component value adjustment. In the past, I've worked around this by building an Excel spreadsheet (which is real time, but custom, and janky, because let's face it, Excel), or by doing hundreds of parameter sweep analyses in SPICE (tedious!).
So this is my motivation, and here is the result: a simulation environment that gives real-time adjustment, with sliders for component values. I must make some simplifications for now, though: complete schematic entry would be ridiculous (I don't want to take the time to write that, or borrow someone else's), and dangerously general, anyway (I would need to write a matrix solver—which I'm game for, honestly, but not all at once). Alternately, netlist entry could be used (at some expense to usability, for those who don't know netlist syntax), but that's still a lot of text parsing. So, for now, I will use a simplified ladder structure. This is sufficient for working with two-port filters. Consider these TODOs. (Send donations if you'd like to see these features sooner... :) )
This tool is most similar to Filter Design and Analysis from AADE. (Sadly, the creator passed away; the link is to the last archived website before his illness began.)
AADE's tool lets you build a ladder network from "dipoles": "rungs" in the ladder that are selected from a palette of standard networks. Unfortunately, it has the same drawback as every other simulator: it's a tweak-and-plot flow, not a "real time" flow.
I took AADE as a starting point for network design. Looking at the palette of suggested networks, most are a series-parallel combination of a few reactive components; which also specify Q factor, so there's a hidden resistance element to them all as well.
A few of these are redundant (parallel L and C for example), and a few are much more complex (tapped coils, delta networks) so that I think I won't support them as basic networks; that leaves pretty good, general coverage using a 3x3 series-parallel array like this:
Each element can be disabled when not needed (or set to an inconsequential value), providing flexibility without too much congestion.
Tapped coils or transformers would be too useful to pass up, so those are provided as a separate option.
The interface is graphically oriented, and intended to be intuitive (wave your cursor over the work area and see what pops up). Hover tooltips are provided on most features, to describe what they do. Numerical inputs are provided for precision and readout, and adjustable by click-and-drag action, or typing in a number. Compatibility: requires IE 11 or better. Tested in Chrome 87.
The source and load amplitudes are normalized to 1V, 1Ω, 1A, whatever. In an AC analysis, all voltages and currents are proportional to the source (it's a linear circuit), so any other level can be solved for, simply by multiplying by a ratio.
The source and load are selectable from two types of equivalents: Thevenin and Norton. The Thevenin source has series resistance and inductance, while the Norton source has parallel resistance and capacitance. This detail allows easier simulation of common situations like amplifiers driving networks directly; an open-collector output for example typically has a capacitive characteristic.
There are a few types of "branch" (or ladder "rungs", or "dipoles") available: Series, Shunt, and Transformer. (TODO: add more!) Add a branch by clicking the golden ► or ◄ bubble, on the right side of the source diagram, the left side of the load, or either side of an existing branch. Remove a branch by clicking the red 'X' at the top center of the branch diagram.
A series branch is a two-terminal impedance that connects between two non-GND nodes, linking the nodes together. Nine (RLC) components are provided, allowing limited series-parallel networks to be created. Any components that aren't needed should be set to zero or Infinity
A shunt branch is a two-terminal impedance, where one of those terminals is GND.
The Transformer is a tapped coil, in a step-up or step-down configuration, that allows arbitrary impedance matching ratios. (Note the tapped coil can be realized with two separate windings on a transformer, thus allowing isolation.)
To build a typical filter, alternate between series and parallel branches, enable one component (inductor or capacitor) in each, and enter the values from a filter calculator (or tweak them til your heart's content!). If you need an impedance matching stage (this implies you're willing to wind a wideband pulse transformer for the job), add a Transformer branch as well.
Very sharp (narrow) bandpass filters can end up with very unfavorable values, in a typical synthesized design. To address this, use two transformation methods: 1. use a transformer to convert the source and load impedances (from whatever nominal system impedances they are, e.g., 50Ω) up to a fairly high impedance (usually around 1kΩ, depending on resonator design); 2. transform the series L+C branches into parallel LC tanks. The filter is now composed of only parallel (shunt) LC resonators. Couple them together with series capacitors, or tapped inductors. All the resonators will be tuned to the center frequency, and the coupling coefficients set the bandwidth as a percentage of center frequency.
Impedance conversion can also be done with capacitor dividers, if the Q is high enough to allow it. Use two or three branches to construct these.
Source superposition is used to calculate the filter properties. To test forward properties (input reflectance / matching, insertion loss), the source is turned on, the load is set to zero, and the voltage or current at each source/load junction is calculated. To test reverse properties (output reflectance / matching), the source is set to zero and the load is turned on. (Remember, in a real circuit with imperfect matching, the load will reflect power back to the filter, which will reflect some back to the load, and so forth, distorting the frequency reponse: the filter is only correct when the load is matched!)
Filters have three parameters: source reflectance, load reflectance, and transmission (or insertion loss). (The transmission factor is equal in both directions: source to load or load to source, because these networks are reciprocal. Non-reciprocal circuits include amplifiers and certain parametric circuits, which are not simulated here.) When tabulated as reflectance/transmittance parameters, you obtain the scattering matrix (s-parameters). When tabluated as impedances, you get the impedance or admittance (= 1 / impedance) matrix. When tabulated as voltage and current ratios (gains), you get h-parameters (or something like it). These are all equivalent descriptions, and which one you choose depends on what you need the values for.
There are many filter prototypes out there. You must choose the one appropriate for your situation. Most calculators use only the most common kind: double terminated, equal source and load resistance, and a selection of synthesized types (Butterworth, Chebyshev, etc.). For a more complete listing of important filter types, see Zverev's Handbook of Filter Synthesis. These include filters with naturally mismatched source and load impedances, filters with peaking built in to accommodate lossy inductors or capacitors, and more types of filter responses (besides the big three, there are also Elliptical, Gaussian, linear phase equiripple, etc.).
Add to that, there are many types of matching circuits, and many ways to address practical aspects of designing, building and tuning them. (A very basic, and practical, introduction can be found in RDH4, geared towards the narrowband, tunable filters you're likely to need in radios.)
Between all of these options, you have a tremendous amount of freedom to choose the best possible filter for your application.
Back to Calculator Index