Your Equation

Library / Signal processing and digital filters / DSP-41

Signal processing and digital filters

Complex response from filter coefficients

Frequency response of a digital filter at one angular frequency ω (rad/sample), from up to four numerator and four denominator coefficients in order of increasing delay (set unused ones to zero).

Ref
DSP-41
Rev
v1
Field
Signal processing and digital filters
Result
|H|

The frequency response of a filter with numerator b and denominator a is H(ω) = Σ bₖe^(−iωk)/Σ aₖe^(−iωk), evaluated at the angular frequency ω (rad/sample). The magnitude is the gain and the angle is the phase at that frequency. A stable filter settles to this response for a steady sinusoid.

Frequency response of a digital filter at one angular frequency ω (rad/sample), from up to four numerator and four denominator coefficients in order of increasing delay (set unused ones to zero). The page returns the gain |H|; the real part, imaginary part and phase are in the derived rows.

Calculator

Solve for
−22
−22
−22
−22
0.12
−22
−22
−22
rad/sample
03.142
  • Real part of H0.6923
  • Imaginary part of H−0.6662
  • Phase of H−43.9 °

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Gain () current value 0.9608
a3Denominator coefficient a3Key driver
0.33.86
a0Denominator coefficient a0
0.4593.97
b3Numerator coefficient b3
0.4843.09
b0Numerator coefficient b0
0.4812.54
b1Numerator coefficient b1
0.4812.54
b2Numerator coefficient b2
2.42
ωAngular frequency
1.44e-91.33
a2Denominator coefficient a2
0.321.33
a1Denominator coefficient a1
0.3270.999
  • At 1.047 rad/sample the filter has a gain of 0.9608 (−0.348 dB) and a phase of −43.9°.
  • This is the steady-state gain and phase for a sinusoid at that frequency, assuming the filter is stable.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
a3 Denominator coefficient a3−2 to 2 0.30043.8623.562+0.08 +9.4 %
a0 Denominator coefficient a00.1 to 2 0.45883.9743.515+10%−9.75 %
b3 Numerator coefficient b3−2 to 2 0.48363.0882.605+0.08 −7.88 %
b0 Numerator coefficient b0−2 to 2 0.48072.5422.061+0.08 +8.1 %
b1 Numerator coefficient b1−2 to 2 0.48072.5422.061+0.08 +8.1 %
b2 Numerator coefficient b2−2 to 2 0.96082.4181.457+0.08 +0.426 %
ω Angular frequency0 to 3.142 rad/sample1.436e-91.3331.333+10%−5.82 %
a2 Denominator coefficient a2−2 to 2 0.32031.3311.01+0.08 +6.31 %
a1 Denominator coefficient a1−2 to 2 0.32730.99930.6719+0.08 −2.74 %

Sweep of Angular frequency

Angular frequency (rad/sample)Gain
01.333
0.39271.266
0.78541.097
1.1780.8908
1.5710.686
1.9630.4962
2.3560.3216
2.7490.158
3.1421.436e-9

Sweep one variable

Gain ()Hover, touch, or use the arrow keys on the chart
00.51 00.511.522.53 Angular frequency (rad/sample) now 0.9608

Variables and how each one contributes

|H|

Gain

Result ·

What the equation gives you. Everything else feeds it.

b0

Numerator coefficient b0

· typical −2 to 2

The numerator coefficient b0, for a delay of 0 sample(s). Adds a term b0e^(−iω0) to the numerator. Raising it by 10 % (to 0.55) moves the result by +5.04 %, from 0.9608 to 1.009.

b1

Numerator coefficient b1

· typical −2 to 2

The numerator coefficient b1, for a delay of 1 sample(s). Adds a term b1e^(−iω1) to the numerator. Raising it by 10 % (to 0.55) moves the result by +5.04 %, from 0.9608 to 1.009.

b2

Numerator coefficient b2

· typical −2 to 2

The numerator coefficient b2, for a delay of 2 sample(s). Adds a term b2e^(−iω2) to the numerator. Raising it by 10 % (to 0) moves the result by +0 %, from 0.9608 to 0.9608.

b3

Numerator coefficient b3

· typical −2 to 2

The numerator coefficient b3, for a delay of 3 sample(s). Adds a term b3e^(−iω3) to the numerator. Raising it by 10 % (to 0) moves the result by +0 %, from 0.9608 to 0.9608.

a0

Denominator coefficient a0

· typical 0.1 to 2

The leading denominator coefficient, normally 1. Scales the whole response by 1/a₀ at all frequencies. Raising it by 10 % (to 1.1) moves the result by −9.75 %, from 0.9608 to 0.8671.

a1

Denominator coefficient a1

· typical −2 to 2

The denominator coefficient a1, for a delay of 1 sample(s). Adds a feedback term a1e^(−iω1) and moves the poles. Raising it by 10 % (to −0.275) moves the result by +0.739 %, from 0.9608 to 0.9679.

a2

Denominator coefficient a2

· typical −2 to 2

The denominator coefficient a2, for a delay of 2 sample(s). Adds a feedback term a2e^(−iω2) and moves the poles. Raising it by 10 % (to 0) moves the result by +0 %, from 0.9608 to 0.9608.

a3

Denominator coefficient a3

· typical −2 to 2

The denominator coefficient a3, for a delay of 3 sample(s). Adds a feedback term a3e^(−iω3) and moves the poles. Raising it by 10 % (to 0) moves the result by +0 %, from 0.9608 to 0.9608.

ω

Angular frequency

rad/sample · typical 0 to 3.142

The angular frequency, in rad/sample (0 to π). Moves along the response; π is the Nyquist frequency. Raising it by 10 % (to 1.152) moves the result by −5.82 %, from 0.9608 to 0.9048.

Worked example with the values above

  1. Evaluate at ω = 1.0472 rad/sample with e^(−iωk) = cos ωk − i sin ωk for each coefficient.
  2. H = numerator / denominator = 0.69231 − 0.66617i.
  3. |H| = 0.96077, and the phase is −43.898°.

Assumptions and limits

  • A stable, linear, time-invariant filter at a steady sinusoidal frequency in rad/sample.
  • Phase that is consistently unwrapped, with magnitude not equal to zero at the frequency used.

Common mistakes

  • Using wrapped phase, which jumps by 2π and ruins the delay.
  • Mixing hertz and rad/sample in the delay formulas.
  • Applying the forward–backward result to a single pass or to a record with large end transients.

Statistics and uncertainty

Phase and group delay come from phase differences, so they amplify noise where the magnitude is small and fail at zeros of the response. A secant estimate also carries an error of order Δω² times the third derivative of phase.

Where it is used

  • Evaluating gain, phase and delay of a digital filter at a chosen frequency.
  • Combining sections and predicting zero-phase filtering.

Maths you need

  • Frequency response: H(ω) evaluated on the unit circle
  • Group delay: the negative slope of phase against frequency
  • Phase delay: the negative phase divided by frequency

Related formulas

Practise this formula