Summary of Finite Impulse Response (FIR) Filters

FIR Filters Explained: Design, Properties & Examples

Introduction

FIR (Finite Impulse Response) filter design is a fundamental topic in digital signal processing. FIR filters have a finite-duration impulse response, are inherently stable, and can be designed to have exactly linear phase. This material explains core concepts, practical design methods (direct design, windowing), symmetry advantages, implementation, and examples.

Definition: An FIR filter is a discrete-time linear time-invariant system whose impulse response $g[n]$ is nonzero only for a finite set of indices.

1. FIR filter basics

What is an FIR filter?

  • An FIR filter has an impulse response $g[n]$ of finite length $N$, typically nonzero for $n=0,1,\dots,M$ where $M=N-1$.
  • The input-output relation is $$y[n]=\sum_{k=0}^{M} g[k],x[n-k].$$

Definition: The transfer function of an FIR filter is the $Z$-transform of its impulse response: $$G(z)=\sum_{k=0}^{M} g[k] z^{-k}.$$ The denominator is 1 for causal FIR filters.

Moving average as an FIR example

  • A moving average of length $M+1$ has coefficients $g[k]=\frac{1}{M+1}$ for $k=0,\dots,M$ and zero elsewhere.
  • It is a simple low-pass FIR filter with gentle transition band and sidelobes.
💡 Věděli jste?Fun fact: FIR filters are widely used in audio equalization, communication channels, and image processing because linear phase avoids waveform distortion.

2. Symmetry and linear phase

Symmetric and antisymmetric FIR filters

  • Symmetric: $g[n]=g[M-n]$. Symmetric FIR filters have real-valued, even frequency responses and linear phase (constant group delay) in the passband.
  • Antisymmetric: $g[n]=-g[M-n]$. Antisymmetric filters produce purely imaginary frequency responses and piecewise-constant phase (e.g., $ rac{\pi}{2}$ jumps).

Definition: Linear phase means the phase response can be written as $\angle G(e^{j\Omega})=-\Omega \tau + \phi_0$, so group delay $\tau$ is constant across frequency regions.

Effect of shifting (causality)

  • A centered symmetric impulse response around $n=M/2$ is noncausal. To implement causally, shift by $d$ samples so that all indices are nonnegative. Shifting multiplies $G(e^{j\Omega})$ by $e^{-j\Omega d}$, which changes only the phase (adds delay) and preserves amplitude.

3. Direct FIR design (inverse DTFT)

From desired frequency response to impulse response

  • Start with a desired frequency response $\hat{G}(e^{j\Omega})$ (e.g., ideal low-pass with cutoff $\Omega_c$).
  • Use the inverse DTFT to obtain the ideal infinite impulse response: $$\hat{g}[n]=\frac{1}{2\pi}\int_{-\pi}^{\pi} \hat{G}(e^{j\Omega}) e^{j\Omega n} d\Omega.$$
  • For an ideal low-pass with passband $|\Omega|\leq\Omega_c$ and unit gain, the infinite impulse response is a sinc: $$\hat{g}[n]=\frac{\sin\left(\Omega_c n\right)}{\pi n}$$ with $\hat{g}[0]=\frac{\Omega_c}{\pi}$.

Definition: Gibbs phenomenon is the overshoot and oscillation in the reconstructed frequency response near discontinuities when using truncated series or finite windows.

Practical problems and remedies

  1. The ideal impulse response is infinite in length — must truncate to finite $M$.
  2. Truncation causes Gibbs phenomenon — use windowing to control sidelobes and transition width.
  3. Truncation can produce noncausal sequences — shift to make causal.

4. Window method for FIR design

Procedure

  1. Compute ideal infinite impulse response $\hat{g}[n]$ from inverse DTFT.
  2. Multiply by a finite-length window $w[n]$ of length $M+1$ to obtain $g[n]=\hat{g}[n] w[n]$ for $n=0,\dots,M$ (after shifting if needed).
  3. Implement the causal FIR filter using these coefficients.

Common windows and their trade-offs

WindowMain-lobe widthStop-band attenuationTypical use
RectangularNarrowestPoor (~21 dB)Short FIR when sharp transition not critical
HammingModerate~53 dBGeneral purpose
Hann (Hanning)Moderate~44 dBSmooth sidelobes
BlackmanWider~74 dBBetter sidelobe suppression
KaiserAdjusta
Zaregistruj se pro celé shrnutí
FlashcardsKnowledge testSummaryPodcastMindmap
Start for free

Already have an account? Sign in

FIR Filter Design

Klíčové pojmy: FIR filters have finite impulse response and transfer function $G(z)=\sum_{k=0}^{M} g[k] z^{-k}$, Symmetric FIR: $g[n]=g[M-n]$ gives linear phase and constant group delay, Ideal frequency response inverse DTFT yields infinite impulse response, e.g. low-pass: $\hat{g}[n]=\frac{\sin(\Omega_c n)}{\pi n}$, Truncation of ideal impulse response introduces Gibbs phenomenon; apply windows to reduce sidelobes, Common windows: Rectangular (narrow main lobe, low attenuation), Hamming (moderate), Blackman (wide main lobe, high attenuation), Kaiser (tunable), Shift truncated symmetric impulse response to make filter causal; shift multiplies response by $e^{-j\Omega d}$ affecting phase only, Exploit symmetry to halve multiplications: combine paired samples $x[n-k]+x[n-(M-k)]$, Moving average is an FIR low-pass with $g[k]=1/(M+1)$, simple smoothing but poor selectivity, FIR implementation uses $M+1$ multiplies and $M$ adds unless symmetry reduces multiplications, Filter length $M$ controls transition width: larger $M$ gives sharper transition but higher computational cost

## Introduction FIR (Finite Impulse Response) filter design is a fundamental topic in digital signal processing. FIR filters have a finite-duration impulse response, are inherently stable, and can be designed to have exactly linear phase. This material explains core concepts, practical design methods (direct design, windowing), symmetry advantages, implementation, and examples. > Definition: An FIR filter is a discrete-time linear time-invariant system whose impulse response $g[n]$ is nonzero only for a finite set of indices. ## 1. FIR filter basics ### What is an FIR filter? - An FIR filter has an impulse response $g[n]$ of finite length $N$, typically nonzero for $n=0,1,\dots,M$ where $M=N-1$. - The input-output relation is $$y[n]=\sum_{k=0}^{M} g[k]\,x[n-k].$$ > Definition: The transfer function of an FIR filter is the $Z$-transform of its impulse response: $$G(z)=\sum_{k=0}^{M} g[k] z^{-k}.$$ The denominator is 1 for causal FIR filters. ### Moving average as an FIR example - A moving average of length $M+1$ has coefficients $g[k]=\frac{1}{M+1}$ for $k=0,\dots,M$ and zero elsewhere. - It is a simple low-pass FIR filter with gentle transition band and sidelobes. Fun fact: FIR filters are widely used in audio equalization, communication channels, and image processing because linear phase avoids waveform distortion. ## 2. Symmetry and linear phase ### Symmetric and antisymmetric FIR filters - **Symmetric**: $g[n]=g[M-n]$. Symmetric FIR filters have real-valued, even frequency responses and linear phase (constant group delay) in the passband. - **Antisymmetric**: $g[n]=-g[M-n]$. Antisymmetric filters produce purely imaginary frequency responses and piecewise-constant phase (e.g., $ rac{\pi}{2}$ jumps). > Definition: Linear phase means the phase response can be written as $\angle G(e^{j\Omega})=-\Omega \tau + \phi_0$, so group delay $\tau$ is constant across frequency regions. ### Effect of shifting (causality) - A centered symmetric impulse response around $n=M/2$ is noncausal. To implement causally, shift by $d$ samples so that all indices are nonnegative. Shifting multiplies $G(e^{j\Omega})$ by $e^{-j\Omega d}$, which changes only the phase (adds delay) and preserves amplitude. ## 3. Direct FIR design (inverse DTFT) ### From desired frequency response to impulse response - Start with a desired frequency response $\hat{G}(e^{j\Omega})$ (e.g., ideal low-pass with cutoff $\Omega_c$). - Use the inverse DTFT to obtain the ideal infinite impulse response: $$\hat{g}[n]=\frac{1}{2\pi}\int_{-\pi}^{\pi} \hat{G}(e^{j\Omega}) e^{j\Omega n} d\Omega.$$ - For an ideal low-pass with passband $|\Omega|\leq\Omega_c$ and unit gain, the infinite impulse response is a sinc: $$\hat{g}[n]=\frac{\sin\left(\Omega_c n\right)}{\pi n}$$ with $\hat{g}[0]=\frac{\Omega_c}{\pi}$. > Definition: Gibbs phenomenon is the overshoot and oscillation in the reconstructed frequency response near discontinuities when using truncated series or finite windows. ### Practical problems and remedies 1. The ideal impulse response is infinite in length — must truncate to finite $M$. 2. Truncation causes Gibbs phenomenon — use windowing to control sidelobes and transition width. 3. Truncation can produce noncausal sequences — shift to make causal. ## 4. Window method for FIR design ### Procedure 1. Compute ideal infinite impulse response $\hat{g}[n]$ from inverse DTFT. 2. Multiply by a finite-length window $w[n]$ of length $M+1$ to obtain $g[n]=\hat{g}[n] w[n]$ for $n=0,\dots,M$ (after shifting if needed). 3. Implement the causal FIR filter using these coefficients. ### Common windows and their trade-offs | Window | Main-lobe width | Stop-band attenuation | Typical use | |---|---:|---:|---| | Rectangular | Narrowest | Poor (~21 dB) | Short FIR when sharp transition not critical | | Hamming | Moderate | ~53 dB | General purpose | | Hann (Hanning) | Moderate | ~44 dB | Smooth sidelobes | | Blackman | Wider | ~74 dB | Better sidelobe suppression | | Kaiser | Adjusta