A resonator is a digital equivalent of a tuned circuit. There are three varieties: The phase response of the bandpass resonator approximates to +pi/2 at frequencies below the centre and -pi/2 at frequencies above the centre, and is exactly zero at the centre. The bandstop and allpass resonators both have approximately zero phase shift except at the centre frequency, at which the phase shift is nominally ±pi; however in the case of the bandstop resonator, since the gain is zero at the centre frequency, the phase shift at that frequency is not defined.

In both respects (magnitude and phase) the resonator behaves like a ``real'' analogue tuned circuit.

If you want a narrow bandpass or bandstop filter, a resonator is often more efficient and better behaved than a traditional (e.g. Butterworth) filter.


All types of resonator are designed directly in the z-plane. The bilinear transform is not used here. A bandpass resonator is constructed first; if you asked for one of the other types, the bandpass resonator is transformed accordingly.

The number of poles is fixed at 2, initially at z = r exp ±j theta, where r is close to 1. Two zeros are added at z = ±1, to ensure zero response at d.c. and h.f.

The presence of the conjugate poles affects the response slightly: the ``correct'' pole positions are not exactly where you would expect them to be. Consequently, the initial pole positions are next refined iteratively, to place the peak as close as possible to where you said you wanted it.

If you asked for a bandstop or allpass resonator, the zeros at z = ±1 are then removed. For a bandstop design, new zeros are added on the unit circle at z = exp ±j theta, where theta is the unrefined initial value of theta. This gives a zero response at the precise centre frequency. For an allpass design, zeros are added at (1/r) exp ±j theta, where theta this time is the refined value, to balance the existing poles.

Select filter type:
We need to know the sample rate (in samples per second).
Sample rate:

Enter centre frequency, in Hz:

Enter the Q (quality factor) of the filter. Values in the range 10 .. 1000 are typical.
Quality factor:

By default, the frequency response graph has a linear magnitude scale. If that is what you want, leave the following box blank. If you want a logarithmic magnitude scale in dB, enter the lower limit of the magnitude scale in dB here (e.g. -80).
Lower limit (dB), or blank for linear scale:

Submit form:

Reset form:

Tony Fisher /