Digital Signal Processing Reference
In-Depth Information
3.21 IDF T VIA DF T
The similarity between the DFT and the IDFT can be used to redefine the IDFT so that only a single
algorithm, the DFT needs to be employed to compute both the DFT and IDFT.
If the DFT is defined as
N
1
1
N
e j 2 πnk/N
X
[
k
]=
x
[
n
]
(3.32)
n
=
0
then it can be shown that the Inverse DFT is
N 1
] )e j 2 πnk/N
[
]=
[
x
n
(X
k
(3.33)
n
=
0
where the symbol * is used to indicate complex conjugation. If the DFT is not scaled by 1 /N (as is true
for MathScript's function ff t ), then Eq. (3.33) (rather than Eq. (3.32)) should be scaled by 1 /N .
Described in words, the steps to take to perform Eq. (3.33) would be to first take the complex
conjugate of the DFT coefficients, then perform the DFT on them, and then take the complex conjugate
of the result.
Example 3.42.
Verify the IDFT-Via-DFT concept with a four-sample complex sequence.
An easy experiment to verify Eq. (3.33) is to run the following code:
idft = (1/4)*conj(fft(conj(fft([1+4*j,2+3*j,3+2*j,4+j]))))
which returns the input complex vector (in brackets as the argument for the innermost FFT) as the value
of the variable idft .
Example 3.43. Compute and display the inverse DFT of a 25% duty cycle rectangle using direct
implementation of the DFT to obtain the DFT coefficients, followed by computation of the IDFT
using the harmonic-by-harmonic method.
Here we outline the necessary computations of the script (not provided, see description immediately
following and exercises below)
LVxInvDF TComputeRect25
The IDFT portion of the script involves generating cosine and sine basis signals of various fre-
quencies k and length N , weighted and phase shifted according to the magnitude and phase of the DFT
bin coefficient for the particular value of k , in this manner:
x
[
0
:
N
1
] k =
X
[
k
]
( cos
[
2 πkn/N
]+
j sin
[
2 πkn/N
]
)
where n is a vector running from 0 to N - 1. For each value of k , a complex multiplication of the DFT
bin value X [ k ]
with the complex basis vector for k is performed. Thinking in polar coordinates, we are
multiplying two complex vectors, each having a magnitude and a phase angle. The product is a complex
Search WWH ::




Custom Search