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 , 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 -transforms. In continuous time, the frequency response is . In discrete time, it is . 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 , the frequency response is
If the input is a complex exponential
then the output is
This eigenfunction property follows from convolution:
For a discrete-time LTI system,
If
then
Magnitude response is
Phase response is
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,
or
Thus filtering can be understood as pointwise spectral multiplication. If is zero over a frequency interval, components in that interval are removed. If has magnitude greater than one, those components are amplified.
Ideal continuous-time lowpass response:
Its impulse response is proportional to a sinc:
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
In the time domain this corresponds to
For discrete-time FIR filters, the frequency response is a finite sum:
For recursive IIR filters described by
the system function is
The frequency response is 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 type | Passes | Rejects | Ideal response sketch |
|---|---|---|---|
| Lowpass | DC and low frequencies | high frequencies | |
| Highpass | high frequencies | DC and low frequencies | |
| Bandpass | middle band | low and high bands | |
| Bandstop / notch | low and high bands | middle band | remove around |
| Allpass | all magnitudes | none by magnitude | changes 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
Find and the magnitude response.
Method:
- Use the CTFT pair
- Here
and the impulse response has scale .
- Therefore
- Multiply numerator and denominator by :
- The magnitude is
- At ,
- At ,
which is the usual dB cutoff point.
Checked answer:
The system passes low frequencies and attenuates high frequencies.
Worked example 2: notch frequency from FIR zeros
Problem: Consider the discrete-time FIR filter
Show that it has notches at .
Method:
- The impulse response is
- The frequency response is
- Factor the expression using zeros at :
- Evaluate on the unit circle, :
Equivalently,
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.
- At :
Use :
Simplify:
- At , the same conjugate-symmetry argument gives
Checked answer: The filter has exact notches at . Its zeros lie on the unit circle at and .
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 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 in rad/s with discrete-time cutoff in rad/sample.