Digital Signal Processing Reference
In-Depth Information
signal (it uses fft, but dft would also work assuming that the above program is
present).
>> fft([6, 4, 9, 0, 1, 5, 2, 7])
ans =
Columns 1 through 4
34.0000 9.2426 - 1.3431i -4.0000 - 2.0000i 0.7574 +12.6569i
Columns 5 through 8
2.0000
0.7574 -12.6569i -4.0000 + 2.0000i 9.2426 + 1.3431i
Table 6.1 shows a matrix where we calculate the Fourier transform of the example
signal. The rows correspond to n and we see the values from the example signal
running down each of the columns (m). Observe how each row has a corresponding
signal sample (time-domain data), while the sum of each column results in the DFT
of the signal (frequency domain data). If we were to nd the sum of magnitudes along
each row (i.e., sum(abs(Matrix(r,:)))), we would get the time-domain sample
multiplied by the number of points (N). Every e
j value has a magnitude of 1;
these values are complex vectors of unit magnitude. This 2D matrix comes from the
expression for the DFT, e
j , where = 2nm=N, and N = 8 (our sample size).
The values of 2nm=N for a single column run from 0 to 2m(N1)=N. Variable m
also runs from 0 to (N1). The inverse DFT, which we will cover soon, essentially
multiplies table entries by an e +j vector, cancelling out the original complex vectors
and giving us back the time-domain data.
How to add the values of complex exponentials together may not be obvious. We
can always convert these to Cartesian coordinates (of the form a + jb) rst. Table
6.2 shows another way of looking at this data, with the rectangular form of the DFT
equation. We can easily verify that the sum of a column equals the DFT results
given by MATLAB, since we add the real parts and imaginary parts separately.
Each column results in a single frequency-domain point. That is, for each output
X[m], the frequencies used to nd X[m] are 2m(0)=N, 2m(1)=N, ..., 2m(N
1)=N. The number of frequencies used depends entirely upon how many points
we have, which is determined by our sampling frequency. Therefore, the analysis
frequencies are given by the following relation:
Search WWH ::




Custom Search