Digital Signal Processing Reference
In-Depth Information
1
2
π
π
e
−
jω
2
)e
jω
0
dω
x
[
0
]=
(
1
+
−
π
and
π
1
2
π
e
−
jω
2
)e
jω
1
dω
x
[
1
]=
(
1
+
−
π
and
π
1
2
π
e
−
jω
2
)e
jω
2
dω
x
[
2
]=
(
1
+
−
π
The formula for
x
[
0
]
reduces to
π
2
π
(
π
π
1
2
π
1
e
−
jω
2
)dω
e
−
jω
2
dω)
(
1
+
=
dω
+
−
π
−
π
−
π
which is
π
1
2
π
(ω
π
−
e
−
jω
2
dω)
|
+
=
1
+
0
=
1
π
−
π
where we note that
π
2
π
if
n
=
0
e
±
jωn
dω
=
0
if
n
=±
1
,
±
2
...
−
π
For
x
[
1
]
we get
π
π
1
2
π
1
2
π
e
−
jω
2
)e
jω
1
dω
(e
jω
1
e
−
jω
1
)dω
x
[
1
]=
(
1
+
=
+
=
0
−
π
−
π
with the exception of the sign of the complex
exponential, which does not affect the outcome. The reconstructed sequence is therefore [1,0,1], as
expected.
The formula for
x
[
2
]
is the same as that for
x
[
0
]
Example 1.5.
Using numerical integration, approximate the IDTFT that was determined analytically
in the previous example.
Let's reformulate the code to obtain the DTFT from -pi to +pi, and to use a much finer sample
spacing (this will improve the approximation to the true, continuous spectrum DTFT), and then perform
the IDTFT one sample at a time in accordance with Eq. (1.2):
N=10ˆ3; dw = 2*pi/N; w = -pi:dw:pi*(1-2/N);
DTF T = 1+exp(-j*2*w);
x0 = (1/(2*pi))*sum(DTF T.*exp(j*w*0)*dw)
x1 = (1/(2*pi))*sum(DTF T.*exp(j*w*1)*dw)
x2 = (1/(2*pi))*sum(DTF T.*exp(j*w*2)*dw)
Running the preceding code yields the following answer, which rounds to the original sequence,
[1,0,1]: