brick wall filter
DOCX · 120.7 KB
Open DOCX file
Phil's draft section, dated 3.26.05, in the Spectral Theory Book folder. It derives the sinc impulse response of the ideal brick wall filter and uses convolution to define the digital filter. Its example takes cutoff ωc=π and 4x oversampling, with symmetric coefficients giving linear phase. It describes a register-and-adder hardware layout and compares the spectra of 21-tap and 101-tap versions. Equations and Maple plots are partly lost in extraction.
AI-written summary; may contain errors. This description is approximate.
Extracted text (machine-read; may contain errors)
This is the Title PhL 3.26.05
29. Design of a Digital Brick Wall Filter
The ideal brick wall filter has this spectrum,
Recall our box shaped pulse in the time domain (height 1, width τ) and its spectrum
x(t) = [ θ(t + τ/2) - θ(t - τ/2) ] (9.1)
X(ω) = τ sinc(ωτ/2) (9.2)
For this x(t), (1.1) gives the X(ω) shown. If we try X(ω) = [ θ(ω + ωc) - θ(ω - ωc) ] in (1.2), we know the result will be (1/2π) * 2ωc sinc(tωc), just swapping the variables t↔ω and τ/2→ωc. Therefore, we write our brick wall filter B(ω) as shown below, and we associate with its spectrum B(ω) a time-domain sinc pulse b(t),
B(ω) = [ θ(ω + ωc) - θ(ω - ωc) ]
b(t) = (1/π) ωc sinc(ωct) (*)
Recall the Convolution theorem
o(t) = !Syntax Error, I dt' b(t-t')i(t') O(ω) = B(ω) I(ω) (3.6)
where i(t) is the input to a filter and o(t) the output. Using i(t) = δ(t), we get o(t) = b(t), so b(t) is the impulse response of the filter. If we implement a digital filter to approximate (*), we then have
o(tn) = !Syntax Error, I ∆t b(tn - tm) i(tm) where tn = n ∆t . (21.4)
or
on = !Syntax Error, I ∆t bn-m im
If we set the input to a digital unit impulse i(tm) = im = δm,0 then the output is
on = ∆t bn
so Δt bn is the unit impulse response of the filter. Recall the symmetry of the convolution equation, so we can write *** instead as
on = !Syntax Error, I ∆t in-m bm
Example: We assume these parameters, since the resulting filter will be useful later on :
T1 = 1
ω1 = 2π/T1 = 2π
ωc = ω1/2 = π
Δt = T1/4 = 1/4
Maple computes the bm as follows (offset added to avoid divide by zero in handmade sinc function)
The filter has symmetric coefficients b-n =bn so it will exhibit a linear phase response as discussed in section ***.
We can verify the locations of these points on the sinc curve
The digital filter implementation using (**) is just this equation
4on = !Syntax Error, I in-m bm = inb0 + !Syntax Error, I in-m bm + !Syntax Error, I in-m bm
= inb0 + !Syntax Error, I in-m bm + !Syntax Error, I in+m bm // since b-m = bm
= inb0 + !Syntax Error, I [in-m + in+m ] bm
= inb0 + [in-1 + in+1 ] b1 + [in-2 + in+2 ] b2 + .... + [in-10 + in+10 ] b10 .
This equation is implemented in the following piece of hardware,
Notice that the registers on the top march samples left to right, while those on the bottom go right to left. The clock lines are not drawn; all registers are clocked with period Δt = T1/4 = 1/4. The registers (D flip-flips) sometimes appear as boxes containing z-1 as in (****). If a register input is in+1 in the middle of a clock period, that register's output is the previously clocked sample in. Usually the clock is a square wave signal and the registers transfer input to output on the positive clock edges of the square wave. The circled plus signs are adders, while lines marked with an X indicate multiplication by the constant appearing next to the X. All lines indicate busses containing some number of bits used to represent the digital signals, perhaps 8, 10 or 12.
An actual design might be done a bit differently using pipelining registers to avoid the large combinatoric delay built up through the long string of adders at the bottom (if speed is an issue).
Now we wish to compute the bandpass spectrum of this digital filter to see how close it comes to being a "brick wall" with cutoff at ωc. Basically, we want to compute the spectrum of this finite sequence of samples
bm = (1/π) ωc sinc(ωcmΔt) m = -10 to 10, else 0 21 "taps"
We know that if we include terms from m = -∞ to m=+∞, we obtain for the Digital Fourier Transform spectrum B'(ω) an exact brick wall box shaped filter with image boxes going off to the left and right. But for m in the range (-10,10), which makes use of 21 bm coefficients (a 21 "tap" filter), we expect to get only an approximation,
B'(ω) ≡ (T1/4)!Syntax Error, Iyn e-iωnT/4 . (29.3)
Here is a plot of the central peak for a filter of 21 taps (blue) compared with one of 101 taps (red). Notice that the cutoff frequency is at ωc = π.
Here is the same plot with a wider range of ω (called w in the Maple code), showing the two nearest image spectra. Because we have selected Δt = T1/4 = 1/4 (4x oversampling) for this filter, the first image spectrum on the right is centered at 4ω1 = 4(2π) ≈ 25