Skip to main content

Frequency Response and Filtering

Frequency response describes how an LTI system changes sinusoidal or complex exponential components. If the input contains a component at frequency ω\omega, the output contains the same frequency multiplied by a complex number. The magnitude of that number is the gain, and its angle is the phase shift. Filtering is the design or use of frequency response to pass desired components and suppress undesired ones.

This page connects Fourier transforms, Laplace transforms, and zz-transforms. In continuous time, the frequency response is H(jω)H(j\omega). In discrete time, it is H(ejΩ)H(e^{j\Omega}). In both cases, it is obtained from the impulse response of an LTI system and used through multiplication in the frequency domain.

Definitions

For a continuous-time LTI system with impulse response h(t)h(t), the frequency response is

H(jω)=h(t)ejωtdt.H(j\omega)=\int_{-\infty}^{\infty}h(t)e^{-j\omega t}\,dt.

If the input is a complex exponential

x(t)=ejωt,x(t)=e^{j\omega t},

then the output is

y(t)=H(jω)ejωt.y(t)=H(j\omega)e^{j\omega t}.

This eigenfunction property follows from convolution:

y(t)=h(τ)ejω(tτ)dτ=ejωth(τ)ejωτdτ=H(jω)ejωt.\begin{aligned} y(t) &=\int_{-\infty}^{\infty}h(\tau)e^{j\omega(t-\tau)}\,d\tau\\ &=e^{j\omega t}\int_{-\infty}^{\infty}h(\tau)e^{-j\omega\tau}\,d\tau\\ &=H(j\omega)e^{j\omega t}. \end{aligned}

For a discrete-time LTI system,

H(ejΩ)=n=h[n]ejΩn.H(e^{j\Omega})=\sum_{n=-\infty}^{\infty}h[n]e^{-j\Omega n}.

If

x[n]=ejΩn,x[n]=e^{j\Omega n},

then

y[n]=H(ejΩ)ejΩn.y[n]=H(e^{j\Omega})e^{j\Omega n}.

Magnitude response is

H(jω)orH(ejΩ).|H(j\omega)| \quad \text{or} \quad |H(e^{j\Omega})|.

Phase response is

H(jω)orH(ejΩ).\angle H(j\omega) \quad \text{or} \quad \angle H(e^{j\Omega}).

A lowpass filter passes low frequencies and attenuates high frequencies. A highpass filter does the reverse. A bandpass filter passes a middle band. A bandstop or notch filter suppresses a middle band while passing lower and higher frequencies.

The cutoff frequency is a boundary between passband and stopband. For practical filters, passband ripple, stopband attenuation, and transition width replace the impossible ideal brick-wall response.

Key results

For an LTI system,

Y(jω)=H(jω)X(jω)Y(j\omega)=H(j\omega)X(j\omega)

or

Y(ejΩ)=H(ejΩ)X(ejΩ).Y(e^{j\Omega})=H(e^{j\Omega})X(e^{j\Omega}).

Thus filtering can be understood as pointwise spectral multiplication. If HH is zero over a frequency interval, components in that interval are removed. If HH has magnitude greater than one, those components are amplified.

Ideal continuous-time lowpass response:

HLP(jω)={1,ωωc,0,ω>ωc.H_{\text{LP}}(j\omega)= \begin{cases} 1, & |\omega|\le \omega_c,\\ 0, & |\omega|>\omega_c. \end{cases}

Its impulse response is proportional to a sinc:

hLP(t)=sin(ωct)πt.h_{\text{LP}}(t)=\frac{\sin(\omega_c t)}{\pi t}.

This impulse response extends infinitely in both time directions, so the ideal lowpass filter is noncausal and not directly realizable without delay and approximation.

An ideal highpass filter can be formed as

HHP(jω)=1HLP(jω).H_{\text{HP}}(j\omega)=1-H_{\text{LP}}(j\omega).

In the time domain this corresponds to

hHP(t)=δ(t)hLP(t).h_{\text{HP}}(t)=\delta(t)-h_{\text{LP}}(t).

For discrete-time FIR filters, the frequency response is a finite sum:

H(ejΩ)=k=0MbkejΩk.H(e^{j\Omega})=\sum_{k=0}^{M}b_k e^{-j\Omega k}.

For recursive IIR filters described by

y[n]+k=1Naky[nk]=k=0Mbkx[nk],y[n]+\sum_{k=1}^{N}a_k y[n-k]=\sum_{k=0}^{M}b_k x[n-k],

the system function is

H(z)=k=0Mbkzk1+k=1Nakzk.H(z)=\frac{\sum_{k=0}^{M}b_k z^{-k}}{1+\sum_{k=1}^{N}a_k z^{-k}}.

The frequency response is H(ejΩ)H(e^{j\Omega}) if the unit circle is in the ROC. Poles near the unit circle create peaks in the magnitude response; zeros on the unit circle create exact notches.

Filter specifications usually separate passband, transition band, and stopband. In the passband, the filter should preserve desired components within an allowed ripple. In the stopband, the filter should attenuate undesired components by a specified amount. The transition band is the frequency interval where the response moves from passband to stopband. Narrow transition bands require longer FIR filters or higher-order IIR filters.

Phase matters when waveform shape matters. A linear-phase filter delays all frequency components by the same group delay, preserving the shape of broadband pulses apart from delay and magnitude shaping. Nonlinear phase can smear transients even when the magnitude response looks acceptable. This is why audio, communications, and measurement systems often specify both magnitude and phase behavior.

Ideal filters are useful reference models, but realizable filters trade sharpness, delay, ripple, and stability. A causal approximation to an ideal lowpass response cannot have both finite delay and a perfectly sharp cutoff.

Visual

Filter typePassesRejectsIdeal response sketch
LowpassDC and low frequencieshigh frequenciesωωc\vert \omega\vert \le \omega_c
Highpasshigh frequenciesDC and low frequenciesωωc\vert \omega\vert \ge \omega_c
Bandpassmiddle bandlow and high bandsω1ωω2\omega_1\le \vert \omega\vert \le \omega_2
Bandstop / notchlow and high bandsmiddle bandremove around ω0\omega_0
Allpassall magnitudesnone by magnitudechanges phase only
Magnitude sketches

lowpass: highpass: bandpass: notch:

____ ____ ____ ___ ___
| | | | | | | | | |
_| |___ ___| | ____| |__ | |__| |__
w w w w

Worked example 1: RC lowpass frequency response

Problem: A first-order continuous-time lowpass system has impulse response

h(t)=1RCet/(RC)u(t).h(t)=\frac{1}{RC}e^{-t/(RC)}u(t).

Find H(jω)H(j\omega) and the magnitude response.

Method:

  1. Use the CTFT pair
eatu(t)1a+jω,a>0.e^{-a t}u(t)\leftrightarrow \frac{1}{a+j\omega}, \qquad a>0.
  1. Here
a=1RCa=\frac{1}{RC}

and the impulse response has scale 1/(RC)1/(RC).

  1. Therefore
H(jω)=1RC11RC+jω.H(j\omega)=\frac{1}{RC}\frac{1}{\frac{1}{RC}+j\omega}.
  1. Multiply numerator and denominator by RCRC:
H(jω)=11+jωRC.H(j\omega)=\frac{1}{1+j\omega RC}.
  1. The magnitude is
H(jω)=11+(ωRC)2.|H(j\omega)|=\frac{1}{\sqrt{1+(\omega RC)^2}}.
  1. At ω=0\omega=0,
H(j0)=1.|H(j0)|=1.
  1. At ω=1/(RC)\omega=1/(RC),
H(jω)=12,|H(j\omega)|=\frac{1}{\sqrt{2}},

which is the usual 3-3 dB cutoff point.

Checked answer:

H(jω)=11+jωRC,H(jω)=11+(ωRC)2.H(j\omega)=\frac{1}{1+j\omega RC}, \qquad |H(j\omega)|=\frac{1}{\sqrt{1+(\omega RC)^2}}.

The system passes low frequencies and attenuates high frequencies.

Worked example 2: notch frequency from FIR zeros

Problem: Consider the discrete-time FIR filter

y[n]=x[n]2cos(Ω0)x[n1]+x[n2].y[n]=x[n]-2\cos(\Omega_0)x[n-1]+x[n-2].

Show that it has notches at Ω=±Ω0\Omega=\pm\Omega_0.

Method:

  1. The impulse response is
h[n]=δ[n]2cos(Ω0)δ[n1]+δ[n2].h[n]=\delta[n]-2\cos(\Omega_0)\delta[n-1]+\delta[n-2].
  1. The frequency response is
H(ejΩ)=12cos(Ω0)ejΩ+ej2Ω.H(e^{j\Omega})=1-2\cos(\Omega_0)e^{-j\Omega}+e^{-j2\Omega}.
  1. Factor the expression using zeros at e±jΩ0e^{\pm j\Omega_0}:
H(z)=12cos(Ω0)z1+z2=(1ejΩ0z1)(1ejΩ0z1).H(z)=1-2\cos(\Omega_0)z^{-1}+z^{-2} =\left(1-e^{j\Omega_0}z^{-1}\right)\left(1-e^{-j\Omega_0}z^{-1}\right).
  1. Evaluate on the unit circle, z=ejΩz=e^{j\Omega}:
H(ejΩ)=(1ejΩ0ejΩ)(1ejΩ0ejΩ).H(e^{j\Omega}) =\left(1-e^{j\Omega_0}e^{-j\Omega}\right) \left(1-e^{-j\Omega_0}e^{-j\Omega}\right).

Equivalently,

H(ejΩ)=(1ej(ΩΩ0))(1ej(Ω+Ω0))H(e^{j\Omega}) =\left(1-e^{-j(\Omega-\Omega_0)}\right) \left(1-e^{-j(\Omega+\Omega_0)}\right)

This product shows that the response is zero when either factor is zero. The direct substitution below checks the cancellation without relying only on the factorization.

  1. At Ω=Ω0\Omega=\Omega_0:
H(ejΩ0)=12cos(Ω0)ejΩ0+ej2Ω0.H(e^{j\Omega_0}) =1-2\cos(\Omega_0)e^{-j\Omega_0}+e^{-j2\Omega_0}.

Use 2cos(Ω0)=ejΩ0+ejΩ02\cos(\Omega_0)=e^{j\Omega_0}+e^{-j\Omega_0}:

H(ejΩ0)=1(ejΩ0+ejΩ0)ejΩ0+ej2Ω0.H(e^{j\Omega_0}) =1-(e^{j\Omega_0}+e^{-j\Omega_0})e^{-j\Omega_0}+e^{-j2\Omega_0}.

Simplify:

H(ejΩ0)=1(1+ej2Ω0)+ej2Ω0=0.H(e^{j\Omega_0}) =1-(1+e^{-j2\Omega_0})+e^{-j2\Omega_0}=0.
  1. At Ω=Ω0\Omega=-\Omega_0, the same conjugate-symmetry argument gives
H(ejΩ0)=0.H(e^{-j\Omega_0})=0.

Checked answer: The filter has exact notches at Ω=±Ω0\Omega=\pm\Omega_0. Its zeros lie on the unit circle at z=ejΩ0z=e^{j\Omega_0} and z=ejΩ0z=e^{-j\Omega_0}.

Code

import numpy as np
import matplotlib.pyplot as plt

Omega0 = 0.35 * np.pi
Omega = np.linspace(-np.pi, np.pi, 2000)

H_notch = 1 - 2 * np.cos(Omega0) * np.exp(-1j * Omega) + np.exp(-2j * Omega)
RC = 0.01
omega = np.linspace(0, 800, 1000)
H_rc = 1 / (1 + 1j * omega * RC)

fig, ax = plt.subplots(1, 2, figsize=(10, 3))
ax[0].plot(omega, np.abs(H_rc))
ax[0].set_title("RC lowpass magnitude")
ax[0].grid(True)

ax[1].plot(Omega, np.abs(H_notch))
ax[1].axvline(Omega0, color="r", linestyle="--")
ax[1].axvline(-Omega0, color="r", linestyle="--")
ax[1].set_title("FIR notch magnitude")
ax[1].grid(True)
plt.tight_layout()
plt.show()

Common pitfalls

  • Calling a filter ideal without noticing whether its impulse response is causal or finite-duration.
  • Ignoring phase response. Two systems can have similar magnitude responses but different waveform distortion.
  • Evaluating H(z)H(z) on the unit circle when the unit circle is outside the ROC.
  • Assuming poles near the unit circle are always bad. They can be useful for resonance, but they reduce stability margin in causal IIR filters.
  • Mixing continuous-time cutoff ωc\omega_c in rad/s with discrete-time cutoff Ωc\Omega_c in rad/sample.

Connections