Given a desired frequency response, the frequency sampling
design method designs a filter with a frequency response
exactly equal to the desired response at a
particular set of frequencies
ω
k
ω
k
.
Procedure
∀k,k=o1…N-1:
H
d
ω
k
=∑n=0M-1hnⅇ-ⅈ
ω
k
n
k
k
o
1
…
N
1
H
d
ω
k
n
M
1
0
h
n
ω
k
n
(1)
Note:
Desired Response must incluce linear phase shift (if linear
phase is desired)
Problem 1
What is
H
d
ω
H
d
ω
for an ideal lowpass filter, cotoff at
ω
c
ω
c
?
[
Click for Solution 1 ]
Solution 1
ⅇ-ⅈωM-12if-
ω
c
≤ω≤
ω
c
0if-π≤ω<-
ω
c
∨
ω
c
<ω≤π
ω
M
1
2
ω
c
ω
ω
c
0
ω
ω
c
ω
c
ω
[
Hide Solution 1 ]
Note:
This set of linear equations can be written in matrix form
H
d
ω
k
=∑n=0M-1hnⅇ-ⅈ
ω
k
n
H
d
ω
k
n
M
1
0
h
n
ω
k
n
(2)
H
d
ω
0
H
d
ω
1
⋮
H
d
ω
N
-
1
=ⅇ-ⅈ
ω
0
0ⅇ-ⅈ
ω
0
1…ⅇ-ⅈ
ω
0
M-1ⅇ-ⅈ
ω
1
0ⅇ-ⅈ
ω
1
1…ⅇ-ⅈ
ω
1
M-1⋮⋮⋮⋮ⅇ-ⅈ
ω
M
-
1
0ⅇ-ⅈ
ω
M
-
1
1…ⅇ-ⅈ
ω
M
-
1
M-1h0h1⋮hM-1
H
d
ω
0
H
d
ω
1
⋮
H
d
ω
N
-
1
ω
0
0
ω
0
1
…
ω
0
M
1
ω
1
0
ω
1
1
…
ω
1
M
1
⋮
⋮
⋮
⋮
ω
M
-
1
0
ω
M
-
1
1
…
ω
M
-
1
M
1
h
0
h
1
⋮
h
M
1
(3)
or
Hd=Wh
H
d
W
h
So
h=W-1Hd
h
W
H
d
(4)
Note:
W
W
is a square matrix for
N=M
N
M
, and invertible as long as
ω
i
≠
ω
j
+2πl
ω
i
ω
j
2
l
,
i≠j
i
j
Important Special Case
What if the frequencies are equally spaced between
00 and
2π
2
, i.e.
ω
k
=2πkM+α
ω
k
2
k
M
α
Then
H
d
ω
k
=∑n=0M-1hnⅇ-ⅈ2πknMⅇ-ⅈαn=∑n=0M-1hnⅇ-ⅈαnⅇ-ⅈ2πknM=
DFT!
H
d
ω
k
n
M
1
0
h
n
2
k
n
M
α
n
n
M
1
0
h
n
α
n
2
k
n
M
DFT!
so
hnⅇ-ⅈαn=1M∑k=0M-1
H
d
ω
k
ⅇ+ⅈ2πnkM
h
n
α
n
1
M
k
M
1
0
H
d
ω
k
2
n
k
M
or
hn=ⅇⅈαnM∑k=0M-1
H
d
ω
k
ⅇⅈ2πnkM=ⅇⅈαnIDFT
H
d
ω
k
h
n
α
n
M
k
M
1
0
H
d
ω
k
2
n
k
M
α
n
IDFT
H
d
ω
k
Important Special Case #2
hn
h
n
symmetric, linear phase, and has real coefficients. Since
hn=h-1
h
n
h
M
n
1
, there are only
M2
M
2
degrees of freedom, and only
M2
M
2
linear equations are required.
H
ω
k
=∑n=0M-1hnⅇ-ⅈ
ω
k
n=∑n=0M2-1hnⅇ-ⅈ
ω
k
n+ⅇ-ⅈ
ω
k
M-n-1if
M even
∑n=0M-32+hnⅇ-ⅈ
ω
k
n+ⅇ-ⅈ
ω
k
M-n-1hM-12ⅇ-ⅈ
ω
k
M-12if
M odd
=ⅇ-ⅈ
ω
k
M-122∑n=0M2-1hncos
ω
k
M-12-nif
M even
ⅇ-ⅈ
ω
k
M-122∑n=0M-32hncos
ω
k
M-12-n+hM-12if
M odd
H
ω
k
n
M
1
0
h
n
ω
k
n
n
M
2
1
0
h
n
ω
k
n
ω
k
M
n
1
M even
n
M
3
2
0
h
n
ω
k
n
ω
k
M
n
1
h
M
1
2
ω
k
M
1
2
M odd
ω
k
M
1
2
2
n
M
2
1
0
h
n
ω
k
M
1
2
n
M even
ω
k
M
1
2
2
n
M
3
2
0
h
n
ω
k
M
1
2
n
h
M
1
2
M odd
(5)
Removing linear phase from both sides yields
A
ω
k
=2∑n=0M2-1hncos
ω
k
M-12-nif
M even
2∑n=0M-32hncos
ω
k
M-12-n+hM-12if
M odd
A
ω
k
2
n
M
2
1
0
h
n
ω
k
M
1
2
n
M even
2
n
M
3
2
0
h
n
ω
k
M
1
2
n
h
M
1
2
M odd
Due to symmetry of response for real coefficients, only
M2
M
2
ω
k
ω
k
on
ω∈0π
ω
0
need be specified, with the frequencies
-
ω
k
ω
k
thereby being implicitly defined also. Thus we have
M2
M
2
real-valued
simultaneous linear equations to solve for
hn
h
n
.
Special Case 2a
hn
h
n
symmetric, odd length, linear phase, real coefficients, and
ω
k
ω
k
equally spaced:
∀k,0≤k≤M-1:
ω
k
=nπkM
k
0
k
M
1
ω
k
n
k
M
hn=IDFT
H
d
ω
k
=1M∑k=0M-1A
ω
k
ⅇ-ⅈ2πkMM-12ⅇⅈ2πnkM=1M∑k=0M-1Akⅇⅈ2πkMn-M-12
h
n
IDFT
H
d
ω
k
1
M
k
M
1
0
A
ω
k
2
k
M
M
1
2
2
n
k
M
1
M
k
M
1
0
A
k
2
k
M
n
M
1
2
(6)
To yield real coefficients,
Aω
A
ω
mus be symmetric
Aω=A-ω⇒Ak=AM-k
A
ω
A
ω
A
k
A
M
k
hn=1MA0+∑k=1M-12Akⅇⅈ2πkMn-M-12+ⅇ-ⅈ2πkn-M-12=1MA0+2∑k=1M-12Akcos2πkMn-M-12=1MA0+2∑k=1M-12Ak-1kcos2πkMn+12
h
n
1
M
A
0
k
M
1
2
1
A
k
2
k
M
n
M
1
2
2
k
n
M
1
2
1
M
A
0
2
k
M
1
2
1
A
k
2
k
M
n
M
1
2
1
M
A
0
2
k
M
1
2
1
A
k
1
k
2
k
M
n
1
2
(7)
Simlar equations exist for even lengths, anti-symmetric, and
α=12
α
1
2
filter forms.
Comments on frequency-sampled design
This method is simple conceptually and very efficient for
equally spaced samples, since
hn
h
n
can be computed using the IDFT.
Hω
H
ω
for a frequency sampled design goes
exactly through the sample points, but it
may be very far off from the desired response for
ω≠
ω
k
ω
ω
k
. This is the main problem with frequency sampled
design.
Possible solution to this problem: specify more frequency
samples than degrees of freedom, and minimize the total error
in the frequency response at all of these samples.
Extended frequency sample design
For the samples
H
ω
k
H
ω
k
where
0≤k≤M-1
0
k
M
1
and
N>M
N
M
, find
hn
h
n
,
where
0≤n≤M-1
0
n
M
1
minimizing
∥
H
d
ω
k
-H
ω
k
∥
H
d
ω
k
H
ω
k
For
∥l∥∞
l
norm, this becomes a linear programming problem
(standard packages availble!)
Here we will consider the
∥l∥2
2
l
norm.
To minimize the
∥l∥2
2
l
norm; that is,
∑n=0N-1|
H
d
ω
k
-H
ω
k
|
n
N
1
0
H
d
ω
k
H
ω
k
, we have an overdetermined set of linear equations:
ⅇ-ⅈ
ω
0
0…ⅇ-ⅈ
ω
0
M-1⋮⋮⋮ⅇ-ⅈ
ω
N
-
1
0…ⅇ-ⅈ
ω
N
-
1
M-1h=
H
d
ω
0
H
d
ω
1
⋮
H
d
ω
N
-
1
ω
0
0
…
ω
0
M
1
⋮
⋮
⋮
ω
N
-
1
0
…
ω
N
-
1
M
1
h
H
d
ω
0
H
d
ω
1
⋮
H
d
ω
N
-
1
or
Wh=Hd
W
h
H
d
The minimum error norm solution is well known to be
h=W¯W-1W¯Hd
h
W
W
W
H
d
;
W¯W-1W¯
W
W
W
is well known as the pseudo-inverse matrix.
Note:
Extended frequency sampled design discourages radical
behavior of the frequency response between samples for
sufficiently closely spaced samples. However, the actual
frequency response may no longer pass exactly through
any of the
H
d
ω
k
H
d
ω
k
.