Window design: reference sheet
ELEC6218 · Lecture 7
1 Reading the specification
Figure 7.5.a. Tolerance scheme: passband ripple \(\delta_p\) (or \(A_p\) dB), stopband ripple \(\delta_s\) (or \(A_s\) dB), edges \(f_p\), \(f_s\); normalised frequency \(f=F/F_s\).
Decibels and linear tolerances
$$ \delta_p=\frac{\gamma-1}{\gamma+1},\ \ \gamma=10^{A_p/20},\qquad \delta_s=10^{-A_s/20} $$
(7.18)
$$ A_p=20\log_{10}\!\Big(\frac{1+\delta_p}{1-\delta_p}\Big),\qquad A_s=20\log_{10}\!\Big(\frac{1+\delta_p}{\delta_s}\Big) $$
(7.19)
Cutoff and transition width
$$ f_c=\tfrac{1}{2}(f_p+f_s),\qquad \Delta f=f_s-f_p $$
(7.20)
$$ \omega_c=2\pi f_c,\qquad \Delta\omega=2\pi\Delta f $$
(7.21)
Design targets
$$ \delta=\min(\delta_p,\delta_s),\qquad A=-20\log_{10}\delta,\qquad \Delta\omega=\min(\Delta\omega_1,\Delta\omega_2,\dots) $$
(7.22)
One window serves every band, so it must meet the tightest ripple and the narrowest transition.
2 Fixed windows
| Window | Side lobe (dB) | Mainlobe \(\Delta\omega\) | \(K\) | \(A_p\) (dB) | \(A_s\) (dB) |
|---|
| Rectangular | −13 | \(4\pi/L\) | 4 | 0.75 | 21 |
| Bartlett | −25 | \(8\pi/L\) | 8 | 0.45 | 26 |
| Hann | −31 | \(8\pi/L\) | 8 | 0.055 | 44 |
| Hamming | −41 | \(8\pi/L\) | 8 | 0.019 | 53 |
| Blackman | −57 | \(12\pi/L\) | 12 | 0.0017 | 74 |
Choose the first window whose \(A_s\) reaches \(A\); every later row costs a longer filter. \(L=M+1\) is the number of taps.
$$ L\approx\frac{K\pi}{\Delta\omega},\qquad M=L-1\qquad\text{(round }L\text{ up)} $$
(7.15)
3 Kaiser window
$$ w_K[n]=\frac{I_0\!\Big(\beta\sqrt{1-(2n/M-1)^2}\Big)}{I_0(\beta)},\qquad 0\le n\le M $$
(7.16)
$$ \beta\approx\begin{cases}0.1102\,(A-8.7),&A>50\\0.5842\,(A-21)^{0.4}+0.07886\,(A-21),&21\le A\le50\\0,&A<21\end{cases} $$
(7.17)
$$ M\approx\frac{A-8}{2.285\,\Delta\omega}\qquad\text{(round up)},\qquad L=M+1 $$
4 The recipes
Fixed window (Figure 7.5.b)
Amplitude specs
1\(A_p\quad A_s\)
\(\delta_p\quad \delta_s\)
see Figure 7.5.a
\(\delta=\min(\delta_p,\delta_s)\)
\(A=-20\log_{10}\delta\)
Window shape
2from Table 7.4
gives \(K\)
Compute impulse response
6\(h[n]=w[n]\dfrac{\sin\big(\omega_c(n-M/2)\big)}{\pi(n-M/2)}\)
adjust length:
I, II, III, IV
Frequency specs
3\(f_p\quad f_s\)
\(f_c\quad \Delta f\)
\(\Delta f=\min(\Delta f_1,\Delta f_2,\dots)\)
see Figure 7.5.a
\(L=\dfrac{K\pi}{\Delta\omega}\)
Window length
4\(L\)
order \(M=L-1\)
Kaiser window (Figure 7.5.c)
Amplitude specs
1\(A_p\quad A_s\)
\(\delta_p\quad \delta_s\)
see Figure 7.5.a
\(\delta=\min(\delta_p,\delta_s)\)
\(A=-20\log_{10}\delta\)
Shape parameter
2\(\beta\) from Eq. (7.17)
continuous in \(A\)
Compute impulse response
6\(h[n]=w[n]\dfrac{\sin\big(\omega_c(n-M/2)\big)}{\pi(n-M/2)}\)
Compute window
5\(w_K[n]\), Eq. (7.16)
adjust length:
I, II, III, IV
Frequency specs
3\(f_p\quad f_s\)
\(f_c\quad \Delta f\)
\(\Delta f=\min(\Delta f_1,\Delta f_2,\dots)\)
see Figure 7.5.a
\(M\approx\dfrac{A-8}{2.285\,\Delta\omega}\)
Window length
4\(L\)
order \(M=L-1\)