The DTFT usually cannot be computed exactly because
the sum in Equation 1 is infinite.
However, the DTFT may be approximately computed
by truncating the sum to a finite window.
Let w(n)w(n) be a rectangular window of length NN:
w
(
n
)
=
1
0
≤
n
≤
N

1
0
else
.
w
(
n
)
=
1
0
≤
n
≤
N

1
0
else
.
(5)Then we may define a truncated signal to be
x
tr
(
n
)
=
w
(
n
)
x
(
n
)
.
x
tr
(
n
)
=
w
(
n
)
x
(
n
)
.
(6)The DTFT of x tr (n)x tr (n) is given by:
X
tr
(
e
j
ω
)
=
∑
n
=

∞
∞
x
tr
(
n
)
e

j
ω
n
=
∑
n
=
0
N

1
x
(
n
)
e

j
ω
n
.
X
tr
(
e
j
ω
)
=
∑
n
=

∞
∞
x
tr
(
n
)
e

j
ω
n
=
∑
n
=
0
N

1
x
(
n
)
e

j
ω
n
.
(7)We would like to compute X(ejω)X(ejω), but as with
filter design, the truncation window distorts
the desired frequency characteristics;
X(ejω)X(ejω) and X tr (ejω)X tr (ejω)
are generally not equal.
To understand the relation between these two DTFT's,
we need to convolve in the frequency domain (as we did
in designing filters with the truncation
technique):
X
tr
(
e
j
ω
)
=
1
2
π
∫

π
π
X
(
e
j
σ
)
W
(
e
j
(
ω

σ
)
)
d
σ
X
tr
(
e
j
ω
)
=
1
2
π
∫

π
π
X
(
e
j
σ
)
W
(
e
j
(
ω

σ
)
)
d
σ
(8)where W(ejω)W(ejω) is the DTFT of w(n)w(n).
Equation 8 is the periodic convolution of X(ejω)X(ejω)
and W(ejω)W(ejω).
Hence the true DTFT, X(ejω)X(ejω),
is smoothed via convolution with W(ejω)W(ejω)
to produce the truncated DTFT, X tr (ejω)X tr (ejω).
We can calculate W(ejω)W(ejω):
W
(
e
j
ω
)
=
∑
n
=

∞
∞
w
(
n
)
e

j
ω
n
=
∑
n
=
0
N

1
e

j
ω
n
=
1

e

j
ω
N
1

e

j
ω
,
for
ω
≠
0
,
±
2
π
,
...
N
,
for
ω
=
0
,
±
2
π
,
...
W
(
e
j
ω
)
=
∑
n
=

∞
∞
w
(
n
)
e

j
ω
n
=
∑
n
=
0
N

1
e

j
ω
n
=
1

e

j
ω
N
1

e

j
ω
,
for
ω
≠
0
,
±
2
π
,
...
N
,
for
ω
=
0
,
±
2
π
,
...
(9)For ω≠0,±2π,...ω≠0,±2π,..., we have:
W
(
e
j
ω
)
=
e

j
ω
N
/
2
e

j
ω
/
2
e
j
ω
N
/
2

e

j
ω
N
/
2
e
j
ω
/
2

e

j
ω
/
2
=
e

j
ω
(
N

1
)
/
2
sin
(
ω
N
/
2
)
sin
(
ω
/
2
)
.
W
(
e
j
ω
)
=
e

j
ω
N
/
2
e

j
ω
/
2
e
j
ω
N
/
2

e

j
ω
N
/
2
e
j
ω
/
2

e

j
ω
/
2
=
e

j
ω
(
N

1
)
/
2
sin
(
ω
N
/
2
)
sin
(
ω
/
2
)
.
(10)Notice that the magnitude of this function
is similar to sinc(ωN/2)sinc(ωN/2)
except that it is periodic in ωω with period 2π2π.