Holooly Plus Logo

Question 9.2: (a) Using a 10-point DFT, i.e. N=10, show how Eq. (9.45) can......

(a) Using a 10-point DFT, i.e. N = 10, show how Eq. (9.45) can be used to find the real and imaginary parts of the discrete Fourier transform, X_{k}, for k = 3, for the sampled periodic time history shown in Fig. 9.5(a), where the period, T = 0.5 s, is represented by ten values of x_{j}, ( j = 0, 1, 2, . . . , 9), corresponding to t = 0, 0.05, 0.10, . . . , 0.45 s.

X_{k} = \frac{1}{N} \sum\limits_{j=0}^{N-1}{x_{j}e^{-\mathrm{i}(\frac{2\pi jk}{N} )}}                            (9.45)

Note: The test input shown in Fig. 9.5(a) was generated from Eq. (9.3), using the following Fourier coefficients: a_{3} = 0.1;  b_{1} = 1.0;  b_{2} = -0.5;  b_{4} = 0.4; all others being zero. Using Eq. (9.2): \omega _{0}  =  2\pi f_{0}  =  {2\pi}/{T}, and Eq. (9.42): t = jT/N, the discretized values of x(t), that is, x_{j} (j = 0, 1, 2, . . . , 9) were then given by:

x(t) = a_{0} + \sum\limits_{n=1}^{\infty }{[a_{n}\cos n \omega_{0} t + b_{n}\sin n \omega_{0} t ]}                    n = 1, 2, 3, … , \infty                    (9.3) \\ \omega _{0}=2\pi f_{0} = \frac{2\pi}{T}     \mathrm{and}    f_{0}= \frac{1}{T}                    (9.2) \\ t = j\Delta                            (9.42a) \\ t= \frac{jT}{N}              (j = 0, 1, 2, … , N-1)                            (9.42b) \\ x_{j} = 1.0 \sin \frac{2\pi j}{10} – 0.5 \sin \frac{4\pi j}{10} + 0.1 \cos \frac{6\pi j}{10} +0.4 \sin \frac{8\pi j}{10}                     (j = 0, 1, 2, … ,9)                            (A)

(b) Using a simple spreadsheet calculation, evaluate X_{k} for k = 0, 1, 2, . . ., 9, and compare the results with the Fourier coefficients used to derive the discretized values of x_{j}, determined as in the note above. Also show the values of frequency, f, in Hz, corresponding to the values of k.
(c) Discuss the apparently spurious terms generated for values of k greater than N/2 , i.e. k > 5 in this example.

9.5(a)
Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

Part (a)
Figure 9.5, (a), (b) and (c) illustrate a possible, but inefficient, implementation of Eq. (9.45). The sampled values x_{0}, x_{1}, x_{2}, . . . x_{9} are shown at (a) as dots. Since the whole period, from j = 0 to 10, is 0.5 s long, these values are at 0.05 s intervals. Writing Eq. (9.45) in the form:

X_{k} = \frac{1}{N} \sum\limits_{j=0}^{N-1}{x_{j}e^{-\mathrm{i}(\frac{2\pi jk}{N} )}} = \frac{1}{N} \sum\limits_{j=0}^{N-1} \left[x_{j} \cos \left(\frac{2\pi jk}{N}\right) – \mathrm{i}x_{j} \sin \left(\frac{2\pi jk}{N}\right) \right]                    (B)

discretized values of the functions \cos (2\pi jk/N)  \mathrm{and}  -\sin (2\pi jk/N) are shown in Fig. 9.5 at (b) and (c), respectively, for k = 3 in this case.

From Eq. (B), the real part of x_{j}e^{-\mathrm{i}(\frac{2\pi jk}{N} )}, for k = 3, is given by multiplying together corresponding discrete values in Fig. 9.5, at (a) and (b), for all values of j, from 0 to 9, summing the products, and finally multiplying by 1/N. A similar process, multiplying the discrete values in (a) and (c), summing and multiplying by 1/N gives the imaginary part of X_{k}.

These operations are shown in Table 9.1, from which the real and imaginary parts of X_{3} ( i.e. X_{k}  \mathrm{for}  k = 3) are seen to be 0.05 and 0, respectively.

Part (b)
Repeating Table 9.1 for all the other values of k, we can produce Table 9.2, showing the real and imaginary parts of X_{k} for k = 0, 1, 2, . . . , 9. For comparison, the Fourier coefficients used to calculate the original values of x{j} are also shown.

We can convert the discrete values of k to discrete frequencies, f, in hertz, using Eq. (9.43a): f = k/T (k = 0, 1, 2 , . . . , N – 1). Since T = 0.5 s, then f = 2k.

It can be seen from Table 9.2 that the DFT results are, in fact, related to the Fourier coefficients, a_{n}  \mathrm{and}  b_{n}, where the latter exist, as predicted by Eq. (9.47b):

Re(X_{k}) = \frac{a_{n}}{2}     \mathrm{and}      Im(X_{k}) = -\frac{b_{n}}{2}\\

It can also be seen from Table 9.2, however, that the DFT has introduced ‘spurious’ values of X_{k} at values of k greater than 5, or N/2, corresponding to f > 10 Hz. These have been produced by the DFT itself, and have nothing to do with the original input data, which clearly contained no components above n = k = 4. This phenomenon is discussed next.
Part (c)
The spurious values of X_{k} can be explained by Fig. 9.6(a) and (b). These show (as solid lines) the multiplying functions\cos (2\pi jk/N)  \mathrm{and}  -\sin (2\pi jk/N) , respectively, for k = 7. When sampled at j = 0, 1, 2, . . . , 9, however, these become aliased, and the sampled values, joined by a dotted line, are, for the cosine function, Fig. 9.6(a), precisely the same as those shown in Fig. 9.5(b), which were computed for k = 3. The DFT cannot distinguish between the genuine cosine function for k = 3 and the aliased cosine function for k = 7, and so produces the same output.

The ( -sine) function, for k = 7, as shown in Fig. 9.6(b), is similarly aliased, but in this case it will be seen that the sampled version, also joined by a dotted line, is reversed in sign with respect to Figure 9.5(c).

The same effect occurs for all values of k greater than five, in this example, or, in general, for values of k greater than N/2, and the overall effect is that

Re(X_{N – k}) = Re(X_{k})                    Im(X_{N – k}) = – Im(X_{k})

In Table 9.2 it will be noticed that all the DFT results follow this pattern. The effect is intentional, and is simply due to the way the standard complex DFT is defined.

The indicated components at and below k = N/2 are correct, but the coefficients above k = N/2 are spurious, and must not be interpreted as Fourier coefficients at the frequencies indicated. They are there for good reason, however, and the following should be noted:

(1) The IDFT, in the form of Eq. (9.46), needs the ‘spurious’ values of X_{k} in order to reproduce the time series x_{j} correctly.

x_{j} = \sum\limits_{k = 0}^{N – 1}{X_{k} e^{\mathrm{i}\left(\frac{2\pi jk}{N}\right) }}                         (9.46)

(2) As shown in Section 9.1.3, in the two-sided complex Fourier series, the components at negative frequencies are the complex conjugates of those at the corresponding positive frequencies, which is just what the ‘spurious’ components are, except that they appear at values of k that are N points to the right of their correct positions.

It can be seen that the standard DFT deliberately uses aliasing to make it reversible, but it is the cosine and sine multiplying functions that are aliased, not the input data, and nothing is lost in the process. Aliasing of data, as discussed in Section 9.3, is different, and a potentially serious problem.

Table 9.1

Calculation of one Complex Fourier Component, Example 9.2.

x_{j}\left[-\sin (2\pi jk / N)\right] \\ k = 3 N = 10 x_{j}\left[\cos (2\pi jk / N)\right] \\ k = 3 N = 10 -\sin (2\pi jk / N)\\ k = 3 N = 10 \cos (2\pi jk / N)\\ k = 3 N = 10 x_{j} j t
0.0000 0.1000 0 1 0.1000 0 0
-0.3010 -0.0978 -0.9511 -0.3090 0.3165 1 0.05
0.1151 -0.1584 0.5878 -0.8090 0.1958 2 0.10
1.0029 1.3804 0.5878 0.8090 1.7063 3 0.15
-0.8171 0.2655 -0.9511 0.3090 0.8591 4 0.20
0.0000 0.1000 0 -1 -0.1000 5 0.25
-0.7583 -0.2464 0.9511 0.3090 -0.7973 6 0.30
0.9078 -1.2495 -0.5878 0.8090 -1.5445 7 0.35
0.2102 0.2893 -0.5878 -0.8090 -0.3576 8 0.40
-0.3598 0.1169 0.9511 -0.3090 -0.3783 9 0.45
\sum = 0 \\ Im(X_{3}) = 0 \sum = 0.5 \\ Re(X_{3}) = \\ (1/N)0.5 = 0.05
Table 9.2

Complex Fourier Coefficients, Example 9.2.

Fourier coeffs DFT results
b_{n} a_{n} Im(X_{k}) Re(X_{k}) n f(Hz) k
0 0 0 0 0 0
1.0 0 -0.5 0 1 2 1
-0.5 0 0.25 0 2 4 2
0 0.1 0 0.05 3 6 3
0.4 0 -0.2 0 4 8 4
0 0 5 10 5
0.2 0 6 12 6
0 0.05 7 14 7
-0.25 0 8 16 8
0.5 0 9 18 9
9.5
9.6

Related Answered Questions