Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

The DTFT of a discrete-time signal is a continuous function of the frequency (\( \omega \)), and hence, the relation between \( x\left( {\text{e}^{{j}\omega } } \right) \) and \( x(n) \) is not a computationally convenient representation. However, it is possible to develop an alternative frequency representation called the discrete Fourier transform (DFT) for finite duration sequences. The DFT is a discrete-time sequence with equal spacing in frequency. We first obtain the discrete-time Fourier series (DTFS) expansion of a periodic sequence. Next, we define the DFT of a finite length sequence and consider its properties in detail. We also show that the DTFS represents the DFT of a finite length sequence. Further, evaluation of linear convolution using the DFT is discussed. Finally, some fast Fourier transform (FFT) algorithms for efficient computation of DFT are described.

4.1 The Discrete-Time Fourier Series

If a sequence x(n) is periodic with period N, then \( x\left( n \right) = x\left( {n + N} \right) \) for all n. In analogy with the Fourier series representation of a continuous periodic signal, we can look for a representation of x(n) in terms of the harmonics corresponding to the fundamental frequency of \( \left( {2\pi /N} \right). \) Hence, we may write x(n) in the form

$$ x\left( n \right) = \mathop \sum \limits_{k} b_{k} \text{e}^{{j}2\pi kn/N} $$
(4.1a)

It can easily be verified from Eq. (4.1a) that x(n) = x(n + N). Also, we know that there are only N distinct values for \( \text{e}^{{j}2\pi kn/N} \) corresponding to k = 0, 1, …, N − 1, these being 1, \( \text{e}^{{j}2\pi n/N} ,\; \ldots , \;\text{e}^{{{j}2\pi k\left( {N - 1} \right)/N}} . \) Hence, we may rewrite Eq. (4.1a) as

$$ x\left( n \right) = \mathop \sum \limits_{k = 0}^{N - 1} a_{k} \text{e}^{{j}2\pi kn/N} $$
(4.1b)

It should be noted that the summation could be taken over any N consecutive values of k. Equation (4.1b) is called the discrete-time Fourier series (DTFS) of the periodic sequence \( x\left( n \right) \) and \( a_{k} \) as the Fourier coefficients. We will now obtain the expression for the Fourier coefficients \( a_{k} \). It can easily be shown that \( \left\{ {\text{e}^{{j}2\pi kn/N} } \right\} \) is an orthogonal sequence satisfying the relation

$$ \sum\limits_{n = 0}^{N - 1} {} \text{e}^{{j}2\pi kn/N} \text{e}^{ - {j}2\pi ln/N} = \left\{ {\begin{array}{*{20}c} 0 & {k \ne l} \\ {N } & {k = l} \\ \end{array} } \right.\quad (0 \le k,\;l \le \left( {N - 1} \right) $$
(4.2)

Now, multiplying both sides of Eq. (4.1b) by \( \text{e}^{ - {j}2\pi ln/N} \) and summing over n between 0 and (N − 1), we get

$$ \begin{aligned} \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)\text{e}^{ - {j}2\pi ln/N} & = \sum\limits_{n = 0}^{N - 1} {\sum\limits_{k = 0}^{N - 1} {} } a_{k} \text{e}^{{j}2\pi kn/N} \text{e}^{ - {j}2\pi ln/N} \\ & = \sum\limits_{k = 0}^{N - 1} {} a_{k} \sum\limits_{n = 0}^{N - 1} {} \text{e}^{{j}2\pi kn/N} \text{e}^{ - {j}2\pi ln/N} \\ & = a_{l} N,{\text{using }}(4.2). \\ \end{aligned} $$

Hence,

$$ a_{k} = \frac{1}{N}\sum\limits_{n = 0}^{N - 1} {} x\left( n \right)\text{e}^{ - {j}2\pi kn/N} ,\quad k = 0, 1, 2,\; \ldots ,\;N - 1 $$
(4.3)

It is common to associate the factor (1/N) with \( x\left( n \right) \) rather than \( a_{k} \). This can be done by denoting \( Na_{k} \) by \( X\left( k \right) \); in such a case, we have

$$ x\left( n \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} X\left( k \right)\text{e}^{{j}2\pi kn/N} $$
(4.4)

where the Fourier coefficients \( X\left( k \right) \) are given by

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)\text{e}^{ - {j}2\pi kn/N} ,\quad k = 0, 1, 2,\; \ldots ,\;N - 1 $$
(4.5)

It is easily seen that \( X\left( {k + N} \right) = X\left( k \right) \) that is, the Fourier coefficient sequence \( X\left( k \right) \), is also periodic of period N. Hence, the spectrum of a signal x(n) that is periodic with period N is also a periodic sequence with the same period. It is also noted that since the Fourier series of a discrete periodic signal is a finite sequence, the series always converges and the Fourier series gives an exact alternate representation of the discrete sequence \( x\left( n \right). \)

4.1.1 Periodic Convolution

In the case of two periodic sequences \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) having the same period N, linear convolution as defined by Eq. (2.38) does not converge. Hence, we define a different form of convolution for periodic signals by the relation

$$ y\left( n \right) = \mathop \sum \limits_{m = 0}^{N - 1} x_{1} \left( m \right)x_{2} \left( {n - m} \right) = \mathop \sum \limits_{m = 0}^{N - 1} x_{1} \left( {n - m} \right)x_{2} \left( m \right) $$
(4.6)

The above convolution is called periodic convolution. It may be observed that \( y\left( n \right) = y\left( {n + N} \right) \), that is, the periodic convolution is itself periodic of period N.

Some important properties of the DTFS are given in Table 4.1. In this table, it is assumed that \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) are periodic sequences having the same period N. The proofs are omitted here, since they are similar to the ones that will be given in Sect. 4.3 for the corresponding properties of the DFT.

Table 4.1 Some important properties of DTFS

Example 4.1

Obtain the DTFS representation of the periodic sequence shown in Fig. 4.1.

Fig. 4.1
figure 1

Periodic sequence with period N = 5

Solution

The sequence is periodic with period N = 5. Using Eq. (4.5), the DTFS coefficients are computed as

$$ X(0) = \sum\limits_{n = 0}^{N - 1} {} x(n)\text{e}^{0} = 0 + 1 + 2 + 3 + 4 = 10 $$
$$ \begin{aligned} X(1) & = \sum\limits_{n = 0}^{4} {} x(n){\text{e}}^{ - {j}2\pi n/5} \\ & = 0 + {\text{e}}^{ - {j}2\pi /5} + 2{\text{e}}^{ - {j}4\pi /5} + 3{\text{e}}^{ - {j}6\pi /5} + 4{\text{e}}^{ - {j}8\pi /5} \\ &= { - } 2. 5 0 0 0 {{ + j 3}} . 4 4 1 0\\ X(2) & = \sum\limits_{n = 0}^{4} {} x(n){\text{e}}^{ - {j}4\pi n/5} \\ &= 0 + {\text{e}}^{ - {j}4\pi /5} + 2{\text{e}}^{ - {j}8\pi /5} + 3{\text{e}}^{ - {j}12\pi /5} + 4{\text{e}}^{ - {j}16\pi /5} \\ &= { - } 2. 5 0 0 0 {{ + j0}} . 8 1 2 3\\ X(3) & = \sum\limits_{n = 0}^{4} {} x(n){\text{e}}^{ - {j}6\pi n/5} \\ &= 0 + {\text{e}}^{ - {j}6\pi /5} + 2{\text{e}}^{ - {j}12\pi /5} + 3{\text{e}}^{ - {j}18\pi /5} + 4{\text{e}}^{ - {j}24\pi /5} \\ &= { - } 2. 5 0 0 0 \;{{ { - }\; j0}} . 8 1 2 3\\ X(4) & = \sum\limits_{n = 0}^{4} {} x(n){\text{e}}^{ - {j}8\pi n/5} \\ &= 0 + {\text{e}}^{ - {j}8\pi /5} + 2{\text{e}}^{ - {j}16\pi /5} + 3{\text{e}}^{ - {j}24\pi /5} + 4{\text{e}}^{ - {j}32\pi /5} \\ &= { - } 2. 5 0 0 0 \;{{ { - } \;j3}} . 4 4 1 0\\ \end{aligned} $$

Hence, from Eq. (4.4), the DTFS for x(n) is given by

$$ \begin{aligned} x(n) & = 2 + (({ - } 2. 5 0 0 0 + {{j3}} . 4 4 1 0 ) / 5){\text{e}}^{{j} - 2\pi n/5} + (({ - } 2. 5 0 0 0 {{ + j0}} . 8 1 2 3 )) / 5{\text{e}}^{{j} - 4\pi n/5} \\ & \quad + (({ - } 2. 5 0 0 0 { } - {{ j0}} . 8 1 2 3 )) / 5{\text{e}}^{{j} - 6\pi n/5} + (({ - } 2. 5 0 0 0 { } - {{ j3}} . 4 4 1 0 )) / 5{\text{e}}^{{j} - 8\pi n/5} \\ \end{aligned} $$

Example 4.2

Find the Fourier coefficients in DTFS representation of the sequence \( x\left( n \right) = \sin \left( {\frac{5\pi }{4}} \right)n \).

Solution

It is clear that the sequence is periodic with period N = 8. We may rewrite \( x\left( n \right) \) in exponential form as

$$ x\left( n \right) = \frac{1}{2j}\text{e}^{{\frac{j2\pi 5n}{8}}} - \frac{1}{2j}\text{e}^{{ - \frac{j2\pi 5n}{8}}} = \frac{1}{2j}\text{e}^{{\frac{j2\pi 5n}{8}}} - \frac{1}{2j}\text{e}^{{\frac{j2\pi 3n}{8}}} $$

Hence, the Fourier coefficients are

$$ X\left( 0 \right) = X\left( 1 \right) = X\left( 2 \right) = 0, \;X\left( 3 \right) = - \frac{1}{2j}, \;X\left( 4 \right) = \frac{1}{2j}, \;X\left( 5 \right) = X\left( 6 \right) = X\left( 7 \right) = 0 $$

4.2 The Discrete Fourier Transform

Consider a finite discrete sequence \( x\left( n \right), 0 \le n \le N - 1 \). It is known from Eq. (2.69) that the DTFT of the sequence \( x\left( n \right) \) is given by

$$ X\left( \omega \right) = \mathop \sum \limits_{n = 0}^{N - 1} x\left( n \right)\text{e}^{ - {j}\omega n} $$

where \( X\left( \omega \right) \) is a continuous function of ω in the range \( - \pi \) to \( \pi \) or 0–2 \( \pi . \) When X (ω) is computed at a finite number of values \( \omega_{k} \) that are uniformly spaced, we have

$$ X\left( {\omega_{k} } \right) = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)\text{e}^{{ - {j}\omega_{k} n}} ,\quad k = 0,1, 2, \; \ldots ,\;M - 1 $$

where \( \omega_{k} = \left( {2\pi k/M} \right) \). The number of frequency samples may take any value; however, it is chosen as equal N, the length of the discrete sequence \( x\left( n \right) \). Rewriting \( X\left( {\omega_{k} } \right) \) as \( X\left( k \right) \), the above equation can be written as

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)\text{e}^{ - {j}2\pi nk/N} ,\quad k = 0,1, 2,\; \ldots ,\;N - 1 $$
(4.7)

Equation (4.7) is called the discrete Fourier transform of the N-point sequence \( x\left( n \right) \). One of the main reasons as to why DFT is used to such a great extent is in view of the existence of fast and efficient algorithms for its computation. These algorithms are called fast Fourier transforms (FFTs). Later, in this chapter we consider two of the FFTs.

Given \( X\left( k \right) \), we now find an expression for \( x\left( n \right) \) in terms of \( X\left( k \right) \). For this purpose, we multiply both sides of Eq. (4.7) by \( e^{j2\pi lk/N} \) to get

$$ X\left( k \right)\text{e}^{{j}2\pi lk/N} = \mathop \sum \limits_{n = 0}^{N - 1} x\left( n \right)\text{e}^{{j}2\pi lk/N} \text{e}^{ - {j}2\pi nk/N} $$

Hence,

$$ \sum\limits_{k = 0}^{N - 1} {X\left( k \right)\text{e}^{{j}2\pi lk/N} } = \sum\limits_{n = 0}^{N - 1} {\sum\limits_{k = 0}^{N - 1} {x\left( n \right)\text{e}^{{j}2\pi lk/N} \text{e}^{ - {j}2\pi nk/N} } } $$
(4.8)

Using Eq. (4.2), we have

$$ \sum\limits_{k = 0}^{N - 1} {x\left( n \right)\text{e}^{{j}2\pi lk/N} \text{e}^{ - {j}2\pi nk/N} } = \left\{ {\begin{array}{*{20}c} 0 & { n \ne l} \\ N & {n = l} \\ \end{array} } \right. $$

Substituting the above in Eq. (4.8), we get

$$ \sum\limits_{k = 0}^{N - 1} {X\left( k \right)\text{e}^{{j}2\pi lk/N} } = Nx\left( l \right) $$

or

$$ x\left( n \right) = \frac{1}{N}\sum\limits_{k = 0}^{N - 1} {X\left( k \right)\text{e}^{{j}2\pi nk/N} } ,\quad n = 0, 1, 2, \; \ldots ,\;N - 1 $$
(4.9)

The above equation is called the inverse discrete Fourier transform (IDFT). It is seen that \( X\left( k \right) \) as defined by Eq. (4.7) is periodic with a period N, since \( X\left( k \right) = X\left( {k + N} \right) \); that is, the IDFT operation results in a periodic sequence of which only the first N values corresponding to one period are evaluated. Also, from Eq. (4.9), we see that \( x\left( n \right) = x\left( {n + N} \right) \). In other words, we are replacing in effect the finite sequence \( x\left( n \right) \) by its periodic extension in all the operations that involve DFT and IDFT. In fact, if we now compare Eqs. (4.4) and (4.5) with Eqs. (4.9) and (4.7), we see that the DFT \( X\left( k \right) \) of a finite sequence of length N can be interpreted as the Fourier coefficient in the DFS expansion of its periodic extension \( \widetilde{x}\left( n \right) \).

If we now define

$$ W_{N} = \text{e}^{ - {j}2\pi /N} $$
(4.10)

then the DFT and IDFT defined in Eqs. (4.7) and (4.9) can be rewritten as

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)W_{N}^{nk} , \quad k = 0, 1, 2, \; \ldots ,\;N - 1 $$
(4.11)

and

$$ x\left( n \right) = \frac{1}{N}\sum\limits_{k = 0}^{N - 1} {X\left( k \right)W_{N}^{ - nk} } ,\quad n = 0, 1, 2, \; \ldots ,\;N - 1 $$
(4.12)

For notational convenience, the above DFT and IDFT equations are denoted as

$$ \begin{aligned} & X\left( k \right) = {\text{DFT}}\left\{ {x\left( n \right)} \right\} \\ & x\left( n \right) = {\text{IDFT}}\left\{ {X\left( k \right)} \right\} \\ \end{aligned} $$

In the DFT expression, \( W_{N}^{nk} \;{\text{for}}\; 0 \le n,\; k \le N - 1 \), are called the twiddle factors of the DFT. The twiddle factors are periodic and define points on the unit circle in the complex plane. Also, they possess some interesting symmetry properties. Some basic properties of \( W_{N} \) are given below.

  1. 1.

    \( W_{N}^{k} = W_{N}^{{\left( {k + N} \right)}} \)

  2. 2.

    \( W_{N}^{N/4} = j \)

  3. 3.

    \( W_{N}^{N/2} = - 1 \)

  4. 4.

    \( W_{N}^{3N/4} = j \)

  5. 5.

    \( W_{N}^{N/N} = 1 \)

  6. 6.

    \( W_{N}^{kN} = 1 \)

  7. 7.

    \( W_{N}^{kN + r} = W_{N}^{r} \)

  8. 8.

    \( W_{N}^{k + N/2} = - W_{N}^{k} \)

  9. 9.

    \( W_{N}^{2k} = W_{N/2}^{k} \)

  10. 10.

    \( W_{N}^{*} = W_{N}^{ - 1} \)

Example 4.3

Find the twiddle factors for an eight-point DFT.

Solution

For N = 8, \( W_{8}^{k} = \text{e}^{ - {j}2\pi k/8} \). Hence, the twiddle factors are:

$$ \begin{aligned} & W_{8}^{0} = 1,W_{8}^{1} = 0.707 - j0.707,W_{8}^{2} = j,W_{8}^{3} = - 0.707 - j0.707 \\ & W_{8}^{4} = - 1,W_{8}^{5} = - W_{8}^{1} , W_{8}^{6} = - W_{8}^{2} , W_{8}^{7} = - W_{8}^{3} ,\,{\text{and}} \\ & W_{8}^{k + N} = W_{8}^{k} . \\ \end{aligned} $$

Example 4.4

Find the DFT of the sequence \( x(n) = \{ 1,0,1,0\} \).

Solution

$$ \begin{aligned} X(k) & = \sum\limits_{n = 0}^{N - 1} {x(n)W_{N}^{nk} } \quad k = 0,1,\; \ldots ,\;N - 1 \\ & = \sum\limits_{n = 0}^{3} {x(n)W_{4}^{kn} } \quad k = 0,1,\; \ldots ,\;3; \\ X(0) & = \sum\limits_{n = 0}^{3} {x(n) = \left\{ {1 + 0 + 1 + 0} \right\} = 2} ; \\ X(1) & = \sum\limits_{n = 0}^{3} {x(n)W_{4}^{n} = \left\{ {1 + 0 - 1 + 0} \right\} = 0} ; \\ X(2) & = \sum\limits_{n = 0}^{3} {x(n)W_{4}^{2n} = \left\{ {1 + 0 + 1 + 0} \right\} = 2} ; \\ X(3) & = \sum\limits_{n = 0}^{3} {x(n)W_{4}^{3n} = \left\{ {1 + 0 - 1 + 0} \right\} = 0} ; \\ \end{aligned} $$

Example 4.5

Determine the eight-point DFT of the sequence \( x(n) = \left\{ {1,1,1,1,0,0,1,1} \right\} \).

Solution

$$ \begin{aligned} X(k) & = \sum\limits_{n = 0}^{N - 1} {x(n)W_{N}^{nk} } \quad k = 0,1,\; \ldots ,\;N - 1. \\ & = \sum\limits_{n = 0}^{8} {x(n)W_{8}^{kn} } \quad k = 0,1,\; \ldots ,\;7. \\ \end{aligned} $$
$$\begin{aligned} X(0) & = \sum\limits_{{n = 0}}^{7} {x(n) = \left\{ {1 + 1 + 1 + 1 + 0 + 0 + 1 + 1} \right\} = 6} ; \\ X(1) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{n} = \left\{ {1 + 0.707 - j0.707 - j - 0.707 - j0.707} \right.} \\ & \left. { \quad \quad \quad \quad \quad \quad \quad + 0 + 0 + j + 0.707 + j0.707} \right\} = 1.707 - j0.707; \\ X(2) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{2n}} = \left\{ {1 - j - 1 + j + 0 + 0 - 1 + j} \right\} = - 1 + j} ; \\ X(3) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{3n}} = \left\{ {1 - 0.707 - j0.707 + j + 0.707 - j0.707} \right.} \\ & \left. {\quad \quad \quad \quad \quad \quad \quad + 0 + 0 - j - 0.707 + j0.707} \right\} = 0.293 - j0.707; \\ X(4) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{4n}} = \left\{ {1 - 1 + 1 - 1 + 0 + 0 + 1 - 1} \right\} = 0} ; \\ X(5) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{5n}} = \left\{ {1 - 0.707 + j0.707 - j + 0.707 + j0.707 + 0} \right.} \\ & \left. { \quad \quad \quad \quad \quad \quad \quad + 0 + j - 0.707 - j0.707} \right\} = 0.293 + j0.707; \\ X(6) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{6n}} = \left\{ {1 + j - 1 - j + 0 + 0 - 1 - j} \right\} = - 1 - j} ; \\ X(7) & = \sum\limits_{{n = 0}}^{7} {x(n)W_{8}^{{7n}} = \left\{ {1 + 0.707 + j0.707 + j - 0.707 + j0.707 + 0} \right.} \\ & \left. { \quad \quad \quad \quad \quad \quad \quad + 0 - j + 0.707 - j0.707} \right\} = 1.707 + j0.707; \\ \end{aligned} $$

Example 4.6

Find the N-point DFT of the signal \( x(n) = b^{n} \).

Solution

$$ \begin{aligned} X(k) & = \sum\limits_{n = 0}^{N - 1} {b^{n} \text{e}^{ - {j}2\pi nk/N} } \\ & = \sum\limits_{n = 0}^{N - 1} {\left( {b\text{e}^{ - {j}2\pi k/N} } \right)^{n} } \\ \end{aligned} $$

Hence,

$$ X(k) = \frac{{1 - b^{N} \text{e}^{ - {j}2\pi k} }}{{1 - b\text{e}^{ - {j}2\pi k/N} }}. $$

Example 4.7

A finite duration sequence of length N is given as

$$ x(n) = \left\{ {\begin{array}{*{20}c} 1 & {0 \le n \le M - 1} \\ 0 & {\text{otherwise}} \\ \end{array} } \right. $$

Determine the N-point DFT of this sequence.

Solution

$$ \begin{aligned} X\left( k \right) & = \sum\limits_{n = 0}^{M - 1} {\text{e}^{ - {j}2\pi kn/N} } \\ & = \frac{{1 - \text{e}^{ - {j}2\pi kM/N} }}{{1 - \text{e}^{ - {j}2\pi k/N} }} = \frac{{{ \sin }\left( {\pi kM/N} \right)}}{{{ \sin }\left( {\pi k/N} \right)}}\text{e}^{{ - {j}2\pi k\left( {M - 1} \right)/N}} ,\quad k = 0,1,\; \ldots ,\;N - 1 \\ \end{aligned} $$

Example 4.8

A finite duration sequence \( x\left( n \right) \) of length eight has the DFT \( X\left( k \right) \) as shown in Fig. 4.2. A new sequence \( y\left( n \right) \) of length 16 is defined by

Fig. 4.2
figure 2

DFT \( X\left( k \right) \) of \( x\left( n \right) \) of Example 4.8

$$ \begin{aligned} y\left( n \right) & = x\left( {\frac{n}{2}} \right)\quad {\text{for }}n{\text{ even}} \\ & = 0\quad \quad {\text{for}}\,n\,{\text{odd}}. \\ \end{aligned} $$

Sketch the DFT \( Y\left( k \right) \) as a function of k.

Solution

The 16-point DFT of y(n) is

$$ \begin{aligned} Y\left( k \right) & = \sum\limits_{n = 0}^{15} {} x\left( n \right)W_{16}^{nk} , \quad 0 \le k \le 15 \\ & = \sum\limits_{n = 0}^{7} {} x\left( n \right)W_{16}^{2nk} \\ \end{aligned} $$

Since \( W_{N}^{2k} = W_{N/2}^{k} \), the above reduces to

$$ Y\left( k \right) = \sum\limits_{n = 0}^{7} {x\left( n \right)W_{8}^{nk} } , \quad 0 \le k \le 15 $$

Thus, the 16-point DFT \( Y\left( k \right) \) contains two copies of the eight-point DFT of \( x\left( n \right) \), and \( Y\left( k \right) \) has a period of 8. The DFT \( Y\left( k \right) \) as a function of k is shown in Fig. 4.3.

Fig. 4.3
figure 3

DFT \( Y\left( k \right) \) of \( y\left( n \right) \) of Example 4.8

4.2.1 Circular Operations on a Finite Length Sequence

  • Circular Shift

Consider a sequence x(n) of length N, \( 0 \le n \le N - 1 \). For such a sequence \( x\left( n \right) = 0 \) for \( n < 0 \) and \( n > N - 1 \). In such a case, if we shift the sequence by an arbitrary integer m, then the shifted sequence is no longer be defined in the range \( 0 \le n \le N - 1 \). In order to make sure that the shifted sequence always stays in the range \( 0 \le n \le N - 1 \), we define what is known as the circular shift, by the relation

$$ x_{c} \left( n \right) = x\left( {n - m} \right)_{N} $$
(4.13a)

where

$$ \left( {n - m} \right)_{N} \;= \left( {n - m} \right)\;{\text{modulo}}\;N $$
(4.13b)

This way, any integer n is related to the \( {\text{modulo}}\,N \) as

$$ n = \left( n \right)_{N} + \gamma N $$
(4.14)

where \( \gamma \) is an integer and \( \left( n \right)_{N} \) is always such that \( 0 \le n \le N - 1 \). Consequently,

$$ x\left( {n - m} \right)_{N} = \left\{ {\begin{array}{*{20}l} {x\left( {n - m} \right) } \hfill & {{\text{if}}\,\;0 \le \left( {n - m} \right) \le N - 1} \hfill \\ {x\left( { \pm N + n - m} \right) } \hfill & {\text{otherwise}} \hfill \\ \end{array} } \right. $$
(4.15)

where \( + N \) is used if \( m > 0 \), and \( - N \) is used if \( m < 0 \).

The circular shift for m = 2 is illustrated in Fig. 4.4.

Fig. 4.4
figure 4

Illustration of circular shift

The sequence \( x_{c} \left( n \right) \) is related to \( x\left( n \right) \) by a circular shift of two samples. The samples of \( x_{c} \left( n \right) \) can be evaluated using \( x_{c} \left( n \right) = x\left( {n - m} \right)_{4} \). Hence,

$$ \begin{aligned} \varvec{x}_{\varvec{c}} (0) & = \varvec{x}( - 2)_{4} = \varvec{x}(2);\;\varvec{x}_{\varvec{c}} (1) = \varvec{x}( - 1)_{4} = \varvec{x}(3); \\ \varvec{x}_{\varvec{c}} (2) & = \varvec{x}(0)_{4} = \varvec{x}(0);\;\varvec{x}_{\varvec{c}} (3) = \varvec{x}(1)_{4} = \varvec{x}(1); \\ \end{aligned} $$
  • Circular Time Reversal

For a length-N sequence x(n), \( 0 \le n \le N - 1 \), the circular time-reversal sequence is also of length-N sequence given by

$$ x\left( { - n} \right)_{N} = x\left( {N - n} \right)_{N} $$
(4.16)
  • Circular Convolution

Consider two sequences x(n) and h(n), each of length N. Then, the circular convolution of x(n) and h(n) is defined as the length-N sequence \( y_{c} \left( n \right) \) given by

$$ y_{c} \left( n \right) = \sum\limits_{m = 0}^{N - 1} {} x\left( m \right) h\left( {n - m} \right)_{N} $$
(4.17)

It is often called as the N-point circular convolution and is denoted by

(4.18)

The circular convolution is also commutative like the linear convolution; that is,

(4.19)

Example 4.9

Find the circular convolution of the three-point sequences \( x\left( n \right) = \left\{ {1,3, - 4} \right\} \) and \( h\left( n \right) = \left\{ { - 2, 1, 2} \right\} \).

Solution

From Eq. (4.17), \( y_{c} \left( n \right) = \sum\nolimits_{m = 0}^{2} {x\left( m \right) h\left( {n - m} \right)_{3} } \).

Hence,

$$ \begin{aligned} y_{c} \left( 0 \right) & = x\left( 0 \right)h\left( 0 \right) + x\left( 1 \right)h\left( { - 1} \right)_{3} + x\left( 2 \right)h\left( { - 2} \right)_{3} \\ & = - 2 + 3h\left( 2 \right) - 4h\left( 1 \right) = - 2 + 6 - 4 = 0 \\ y_{c} \left( 1 \right) & = x\left( 0 \right)h\left( 1 \right) + x\left( 1 \right)h\left( 0 \right) + x\left( 2 \right)h\left( { - 1} \right)_{3} \\ & = 1 + 3h\left( 0 \right) - 4h\left( 2 \right) = 1 - 6 - 8 = - 13 \\ y_{c} \left( 2 \right) & = x\left( 0 \right)h\left( 2 \right) + x\left( 1 \right)h\left( 1 \right) + x\left( 2 \right)h\left( 0 \right) \\ & = 2 + 3 - 8 = - 3 \\ \end{aligned} $$

Thus, \( y_{c} \left( n \right) = \left( {0, - 13, - 3} \right) \).

It can also be verified that \( \sum\nolimits_{m = 0}^{2} {h\left( m \right)x\left( {n - m} \right)_{3} } \) leads to the same result, showing that the circular convolution operation is commutative.

  • Circular Correlation:

Consider two complex-valued sequences \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \), each of length N. Then, the circular correlation of \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) is defined as the N-point sequence

$$ r_{{x_{1} x_{2} }} \left( m \right) = \mathop \sum \limits_{n = 0}^{N - 1} x_{1} \left( n \right)x_{2}^{*} \left( {n - m} \right)_{N} $$
(4.20)

where \( x_{2}^{*} \left( n \right) \) is the complex conjugate of \( x_{2} \left( n \right). \)

4.3 Basic Properties of the Discrete Fourier Transform

In this section, we state and prove some properties of the DFT, which play an important role in digital signal processing applications. We will denote an N-point DFT pair x(n) and X(k) by the following notation

$$ \varvec{x} (\varvec{n})\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{X} (\varvec{k}) $$
  • Linearity:

Consider a sequence \( a_{1} x_{1} \left( n \right) + a_{2} x_{2} \left( n \right) \) that is a linear combination of \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \), each sequence being of length N, where \( a_{1} \) and \( a_{2} \) are arbitrary constants. If the sequences are not of the same length, then the sequence with the lower length is augmented by zeros so that its length is now equal to that of the other sequence. In such a case,

$$ \varvec{a}_{1} \varvec{x}_{1} (\varvec{n}) + \varvec{a}_{2} \varvec{x}_{2} (\varvec{n})\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{a}_{1} \varvec{X}_{1} (\varvec{k}) + \varvec{a}_{2} \varvec{X}_{2} (\varvec{k}) $$
(4.21)

Proof

By the definition of the DFT,

$$ \begin{aligned} {\mathbf{DFT}}(\varvec{a}_{1} \varvec{x}_{1} (\varvec{n}) + \varvec{a}_{2} \varvec{x}_{2} (\varvec{n})) & = \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\left[ {\varvec{a}_{1} \varvec{x}_{1} (\varvec{n}) + \varvec{a}_{2} \varvec{x}_{2} (\varvec{n})} \right]} \varvec{W}_{\varvec{N}}^{{\varvec{kn}}} \\ & = \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\left[ {\varvec{a}_{1} \varvec{x}_{1} (\varvec{n})} \right]} \varvec{W}_{\varvec{N}}^{{\varvec{kn}}} + \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\left[ {\varvec{a}_{2} \varvec{x}_{2} (\varvec{n})} \right]} \varvec{W}_{\varvec{N}}^{{\varvec{kn}}} \\ & = \varvec{a}_{1} \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\varvec{x}_{1} (\varvec{n})} \varvec{W}_{\varvec{N}}^{{\varvec{kn}}} + \varvec{a}_{2} \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\varvec{x}_{2} } (\varvec{n})\varvec{W}_{\varvec{N}}^{{\varvec{kn}}} \\ & = \varvec{a}_{1} \varvec{X}_{1} (\varvec{k}) + \varvec{a}_{2} \varvec{X}_{2} (\varvec{k}) \\ \end{aligned} $$

Hence, we can write

$$ \varvec{a}_{1} \varvec{x}_{1} (\varvec{n}) + \varvec{a}_{2} \varvec{x}_{2} (\varvec{n})\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{a}_{1} \varvec{X}_{1} (\varvec{k}) + \varvec{a}_{2} \varvec{X}_{2} (\varvec{k}) $$
  • Time Reversal of a Sequence:

If x(n) and X(k) are an N-point DFT pair, then

$$ \varvec{x}(\varvec{N} - \varvec{n})\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{X}(\varvec{N} - \varvec{k}) $$
(4.22)

Proof

$$ {\text{DFT}}\{ \varvec{x}(\varvec{N} - \varvec{n})\} = \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\varvec{x}(\varvec{N} - \varvec{n}){\mathbf{e}}^{{ - \varvec{j}2\pi \varvec{kn}/\varvec{N}}} } $$

Changing the index from n to m = N − n in the RHS of the above equation, we can rewrite it as

$$ \begin{aligned} {\text{DFT}}\{ \varvec{x}(\varvec{N} - \varvec{n})\} & = \sum\limits_{{\varvec{m} = 0}}^{{\varvec{N} - 1}} {\varvec{x}(\varvec{m}){\mathbf{e}}^{{ - \varvec{j}2\pi \varvec{k}(\varvec{N} - \varvec{m})/\varvec{N}}} } \\ & = \sum\limits_{{\varvec{m} = 0}}^{{\varvec{N} - 1}} {\varvec{x}(\varvec{m}){\mathbf{e}}^{{\varvec{j}2\pi \varvec{km}/\varvec{N}}} } = \sum\limits_{{\varvec{m} = 0}}^{{\varvec{N} - 1}} {\varvec{x}(\varvec{m}){\mathbf{e}}^{{ - \varvec{j}2\pi \varvec{m}(\varvec{N} - \varvec{k})/\varvec{N}}} } = \varvec{X}(\varvec{N} - \varvec{k}) \\ \end{aligned} $$
  • Circular Time Shifting:

The DFT of a circularly time-shifted sequence \( x\left( {n - m} \right)_{N} \) is given by \( W_{N}^{km} X\left( k \right) \), that is,

$$ \varvec{x}\left[ {(\varvec{n} - \varvec{m})_{\varvec{N}} } \right]\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{W}_{\varvec{N}}^{{\varvec{km}}} \varvec{X}(\varvec{k}) $$
(4.23)

Proof

By the definition of DFT,

$$ \begin{aligned} {\text{DFT}}\left\{ {x\left( {n - m} \right)_{N} } \right\} & = \sum\limits_{n = 0}^{N - 1} {} x\left( {n - m} \right)_{N} W_{N}^{km} \\ & = \sum\limits_{n = 0}^{m - 1\,} {} x\left( {n - m} \right)_{N} W_{N}^{km} + \sum\limits_{n = m}^{N - 1} {} x\left( {n - m} \right)W_{N}^{km} \\ \end{aligned} $$

Since \( x\left( {n - m} \right)_{N} \; = x\left( {N - m + n} \right), \) we can write the above equation as

$$ \begin{aligned} {\text{DFT}}\left\{ {x\left( {n - m} \right)_{N} } \right\} & = \sum\limits_{n = 0}^{m - 1} {} x\left( {N - m + n} \right)\text{e}^{ - {j}2\pi kn/N} + \sum\limits_{l = 0}^{N - 1 - m} {} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m} \right)/N}} \\ & = \mathop \sum \limits_{l = N - m}^{N - 1} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m + N} \right)/N}} + \mathop \sum \limits_{l = 0}^{N - 1 - m} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m} \right)/N}} \\ & = \mathop \sum \limits_{l = N - m}^{N - 1} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m} \right)/N}} + \mathop \sum \limits_{l = 0}^{N - 1 - m} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m} \right)/N}} \\ & = \mathop \sum \limits_{l = 0}^{N - 1} x\left( l \right)\text{e}^{{ - {j}2\pi k\left( {l + m} \right)/N}} = \text{e}^{ - j2\pi km/N} \mathop \sum \limits_{l = 0}^{N - 1} x\left( l \right)\text{e}^{ - {j}2\pi kl/N} \\ & = W_{N}^{km} X\left( k \right) \\ \end{aligned} $$
  • Circular Frequency Shifting:

If x(n) and X(k) are an N-point DFT pair, then

$$ \varvec{W}_{\varvec{N}}^{{ - \varvec{mn}}} \varvec{x}(\varvec{n})\mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{X}\left[ {(\varvec{k} - \varvec{m})_{\varvec{N}} } \right] $$
(4.24)

where \( X\left[ {\left( {k - m} \right)_{N} } \right] \) is a circularly frequency-shifted version of X(k).

Proof

$$ \begin{aligned} {\text{DFT}}\{ W_{N}^{ - mn} x\left( n \right)\} & = \sum\limits_{n = 0}^{N - 1} {} W_{N}^{ - mn} x\left( n \right)W_{N}^{kn} \\ & = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)W_{N}^{{n\left( {k - m} \right)}} = \sum\limits_{n = 0}^{N - 1} {} x\left( n \right)W_{N}^{{n\left( {N + k - m} \right)}} \\ \end{aligned} $$
  • Circular Convolution:

The DFT of the circular convolution of two length-N sequences is the product of their N-point DFTs, i.e.,

(4.25)

Proof

Let \( y_{c} \left( n \right) \) represent the circular convolution of the sequences x1(n) and x2(n), i.e.,

$$ y_{c} \left( n \right) = \mathop \sum \limits_{l = 0}^{N - 1} x_{1} \left( l \right)x_{2} \left( {n - l} \right)_{N} $$

Then, the DFT of \( y_{c} \left( n \right) \) is

$$ Y_{c} \left( k \right) = \sum\limits_{n = 0}^{N - 1} {y_{c} \left( n \right)W_{N}^{kn} } = \sum\limits_{n = 0}^{N - 1} {} \left[ {\sum\limits_{l = 0}^{N - 1} {} x_{1} \left( l \right)x_{2} \left( {n - l} \right)_{N} } \right]W_{N}^{kn} $$

By interchanging the order of the summation, we obtain

$$ Y_{c} \left( k \right) = \mathop \sum \limits_{l = 0}^{N - 1} x_{1} \left( l \right)\left[ {\mathop \sum \limits_{n = 0}^{N - 1} x_{2} \left( {n - l} \right)_{N} } \right]W_{N}^{kn} $$

Substituting \( \left( {n - l} \right) = m \), where m is integer with \( 0 \le m \le N - 1, \) we get

$$ \begin{aligned} Y_{c} \left( k \right) & = \sum\limits_{l = 0}^{N - 1} {} x_{1} \left( l \right)\left[ {\sum\limits_{m = 0}^{N - 1} {} x_{2} \left( m \right)} \right]W_{N}^{{k\left( {l + m } \right)}} = \sum\limits_{l = 0}^{N - 1} {} x_{1} \left( l \right)\left[ {\sum\limits_{m = 0}^{N - 1} {} x_{2} \left( m \right)W_{N}^{km} } \right]W_{N}^{kl} \\ & = \mathop \sum \limits_{l = 0}^{N - 1} x_{1} \left( l \right)\left[ {X_{2} \left( k \right)} \right]W_{N}^{kl} = \left[ {\mathop \sum \limits_{l = 0}^{N - 1} x_{1} \left( l \right)W_{N}^{kl} } \right]\left[ {X_{2} \left( k \right)} \right] \\ & = X_{1} \left( k \right)X_{2} \left( k \right) \\ \end{aligned} $$
  • Circular Correlation:

The DFT of the circular correlation of two complex-valued N-point sequences \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) is given by \( X_{1} \left( k \right)X_{2}^{*} \left( k \right), \) i.e.,

$$ \varvec{r}_{{\varvec{x}_{1} \varvec{x}_{2} }} (\varvec{m}) = \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\varvec{x}_{1} (\varvec{n})\varvec{x}_{2}^{*} \left[ {(\varvec{n} - \varvec{m})} \right]_{N} } \mathop \leftrightarrow \limits_{\varvec{N}}^{\mathbf{DFT}} \varvec{X}_{1} (\varvec{k})\varvec{X}_{2}^{*} (\varvec{k}) $$
(4.26)

Proof

From Eq. (4.20), we know that

$$ r_{{x_{1} x_{2} }} \left( m \right) = \mathop \sum \limits_{n = 0}^{N - 1} x_{1} \left( n \right)x_{2}^{*} \left( {n - m} \right)_{N} = \mathop \sum \limits_{n = 0}^{N - 1} x_{1} \left( n \right)x_{2}^{*} ( - \left( {m - n} \right)_{N} ) $$
(4.27a)

Also, the circular convolution of two sequences \( x_{1} \left( m \right) \) and \( x_{2} \left( m \right) \) is given by

$$ y_{c} \left( m \right) = \mathop \sum \limits_{l = 0}^{N - 1} x_{1} \left( l \right)x_{2} \left( {m - l} \right)_{N} = \mathop \sum \limits_{n = 0}^{N - 1} x_{1} \left( n \right)x_{2} \left( {m - n} \right)_{N} $$
(4.27b)

Comparing Eqs. (4.27a) and (4.27b), we see that \( r_{{x_{1} x_{2} }} \left( m \right) \) can be considered as the circular convolution of \( x_{1} \left( m \right) \) and \( x_{2}^{*} \left( { - m} \right)_{N} \). Hence, \( {\text{DFT}}\left[ {r_{{x_{1} x_{2} }} \left( m \right)} \right] = \left[ {{\text{DFT}}\left\{ {x_{1} \left( m \right)} \right\}} \right]\left[ {{\text{DFT}}\left\{ {x_{2}^{*} \left( { - m} \right)_{N} } \right\}} \right] \). It can be shown that (see Eq. (4.41)) \( {\text{DFT}}\{ x_{2}^{*} \left( { - m} \right)_{N} \} = X_{2}^{*} \left( k \right) \). Thus,

$$ {\text{DFT}}\left[ {r_{{x_{1} x_{2} }} \left( m \right)} \right] = R_{{x_{1} x_{2} }} \left( k \right) = X_{1} \left( k \right) X_{2}^{*} \left( k \right) $$
(4.28)

If \( x_{1} \left( n \right) = x_{2} \left( n \right) = x\left( n \right) \), then

$$ R_{{x_{1} x_{2} }} \left( k \right) = \left| {X\left( k \right)} \right|^{2} $$
(4.29)
  • Parseval’s Theorem:

If \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) are two complex-valued N-point sequences with DFTs \( X_{1} \left( k \right) \) and \( X_{2} \left( k \right) \), then

$$ \sum\limits_{{\varvec{n} = 0}}^{{\varvec{N} - 1}} {\varvec{x}_{1} (\varvec{n})} \varvec{x}_{2}^{*} (\varvec{n}) = \frac{1}{\varvec{N}}\sum\limits_{{\varvec{k} = 0}}^{{\varvec{N} - 1}} {\varvec{X}_{1} (\varvec{k})} \varvec{X}_{2}^{*} (\varvec{k}) $$
(4.30)

Proof

From Eq. (4.28), we have \( R_{{x_{1} x_{2} }} \left( k \right) = X_{1} \left( k \right) X_{2}^{*} \left( k \right) \). Hence,

$$ r_{{x_{1} x_{2} }} \left( m \right) = \frac{1}{N}\sum\limits_{k = 0}^{N - 1} {} X_{1} \left( k \right) X_{2}^{*} \left( k \right)W_{N}^{ - km} $$

Evaluating the above at \( m = 0 \) gives

$$ r_{{x_{1} x_{2} }} \left( 0 \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} X_{1} \left( k \right) X_{2}^{*} \left( k \right) $$

Hence,

$$ \mathop \sum \limits_{n = 0}^{N - 1} x_{1} \left( n \right) x_{2}^{*} \left( n \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} X_{1} \left( k \right) X_{2}^{*} \left( k \right) $$

If \( x_{1} \left( n \right) = x_{2} \left( n \right) = x\left( n \right) \), then we have

$$ \mathop \sum \limits_{n = 0}^{N - 1} \left| {x\left( n \right)} \right|^{2} = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} \left| {X\left( k \right)} \right|^{2} $$
(4.31)

The above expression gives a relationship between the energy in a finite duration sequence to the power in the frequency components.

  • Multiplication of two Sequences:

The DFT of the product of two sequences \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \), each of length N, is given by the circular convolution of their DFTs \( X_{1} \left( k \right) \) and \( X_{2} \left( k \right) \) divided by N, i.e.,

(4.32)

This property is dual of the circular convolution property and is left as an exercise for the student.

The above properties are summarized in Table 4.2.

Table 4.2 Basic properties of the discrete Fourier transform

4.4 Symmetry Relations of DFT

4.4.1 Symmetry Relations of DFT of Complex-Valued Sequences

Consider a complex-valued sequence x(n), which is expressed as

$$ x\left( n \right) = x_{R} \left( n \right) + jx_{I} \left( n \right),\quad \quad 0 \le n \le N - 1 $$
(4.33)

The DFT of x(n) is given by

$$ \begin{aligned} X\left( k \right) & = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)W_{N}^{kn} } = \sum\limits_{n = 0}^{N - 1} {[x_{R} \left( n \right) + jx_{I} \left( n \right)]} \left[ {\cos \frac{2\pi kn}{N} - j\sin \frac{2\pi kn}{N}} \right] \\ & = \sum\limits_{n = 0}^{N - 1} {\left[ {x_{R} \left( n \right)\cos \frac{2\pi kn}{N} + x_{I} \left( n \right)\sin \frac{2\pi kn}{N}} \right]} - j\sum\limits_{n = 0}^{N - 1} {\left[ {x_{R} \left( n \right)\sin \frac{2\pi kn}{N} + x_{I} \left( n \right)\cos \frac{2\pi kn}{N}} \right]} \\ \end{aligned} $$
(4.34)

If

$$ X\left( k \right) = X_{R} \left( k \right) + jX_{I} \left( k \right) $$
(4.35)

then

$$ X_{R} \left( k \right) = \mathop \sum \limits_{n = 0}^{N - 1} \left[ {x_{R} \left( n \right)\cos \frac{2\pi kn}{N} + x_{I} \left( n \right)\sin \frac{2\pi kn}{N}} \right] $$
(4.36a)

and

$$ X_{I} \left( k \right) = - \mathop \sum \limits_{n = 0}^{N - 1} \left[ {x_{R} \left( n \right)\sin \frac{2\pi kn}{N} + x_{I} \left( n \right)\cos \frac{2\pi kn}{N}} \right] $$
(4.36b)

Similarly, we can show that

$$ x_{R} \left( n \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} \left[ {X_{R} \left( k \right)\cos \frac{2\pi kn}{N} - X_{I} \left( {nk} \right)\sin \frac{2\pi kn}{N}} \right] $$
(4.37a)

and

$$ x_{I} \left( n \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} \left[ {X_{R} \left( k \right)\sin \frac{2\pi kn}{N} + X_{I} \left( k \right)\cos \frac{2\pi kn}{N}} \right] $$
(4.37b)

Let us now consider a length-N complex conjugate sequence x*(n). Taking the complex conjugate on both sides of Eq. (4.11), we get

$$ X^{*} \left( k \right) = \left[ {\mathop \sum \limits_{n = 0}^{N - 1} x\left( n \right)\text{e}^{ - {j}2\pi nk/N} } \right]^{*} $$

which can be rewritten as

$$ X^{*} \left( k \right) = \mathop \sum \limits_{n = 0}^{N - 1} x^{*} \left( n \right)\text{e}^{{j}2\pi nk/N} $$
(4.38)

Hence,

$$ \begin{aligned} X^{*} \left( {\left( { - k} \right)_{N} } \right) & = X^{*} \left( {N - k} \right) = \mathop \sum \limits_{n = 0}^{N - 1} x^{*} \left( n \right)\text{e}^{{{j}2\pi n\left( {N - k} \right)/N}} \\ & = \sum\limits_{n = 0}^{N - 1} {x^{*} \left( n \right)\text{e}^{ - {j}2\pi nk/N} } = {\text{DFT}}\{ x^{*} \left( n \right)\} \\ \end{aligned} $$

Therefore,

$$ {\text{DFT}}\{ x^{*} \left( n \right)\} = X^{*} \left( {\left( { - k} \right)_{N} } \right) $$
(4.39)

Now, we find the DFT of \( x^{*} \left( {\left( { - n} \right)_{N} } \right) \) as follows:

$$ \begin{aligned} {\text{DFT}}\left\{ {x^{*} \left( {\left( { - n} \right)_{N} } \right)} \right\} & = \sum\limits_{n = 0}^{N - 1} {x^{*} (\left( { - n} \right)_{N} )\text{e}^{ - {j}2\pi nk/N} } \\ & = \sum\limits_{n = 0}^{N - 1} {x^{*} \left( {N - n} \right)\text{e}^{ - {j}2\pi nk/N} } \\ \end{aligned} $$
(4.40a)

Replacing n by (N − n) in Eq. (4.38), we have

$$ X^{*} \left( k \right) = \mathop \sum \limits_{n = 0}^{N - 1} x^{*} \left( {N - n} \right)\text{e}^{{{j}2\pi \left( {N - n} \right)k/N}} = \mathop \sum \limits_{n = 0}^{N - 1} x^{*} \left( {N - n} \right)\text{e}^{ - {j}2\pi nk/N} $$
(4.40b)

It is seen from Eq. (4.40a) and Eq. (4.40b) that

$$ {\text{DFT}}\left\{ {x^{*} \left( {\left( { - n} \right)_{N} } \right)} \right\} = X^{*} \left( k \right) $$
(4.41)

Since a complex sequence \( x\left( n \right) \) can be decomposed into a sum of its real and imaginary parts as

$$ x\left( n \right) = x_{R} \left( n \right) + jx_{I} \left( n \right) $$
(4.42)

where

$$ x_{R} \left( n \right) = \frac{1}{2}\left[ {x\left( n \right) + x^{*} \left( n \right)} \right] $$
(4.43a)

and

$$ jx_{I} \left( n \right) = \frac{1}{2}\left[ {x\left( n \right) - x^{*} \left( n \right)} \right] $$
(4.43b)

it can be easily shown that the DFTs of the real and imaginary parts of complex sequence are given by

$$ {\text{DFT}}\left\{ {x_{R} \left( n \right)} \right\} = \frac{1}{2}\left[ {X\left( k \right) + X^{*} \left( {\left( { - k} \right)_{N} } \right)} \right] = \frac{1}{2}\left[ {X\left( k \right) + X^{*} \left( {N - k} \right)} \right] $$
(4.44a)

and

$$ {\text{DFT}}\left\{ {jx_{I} \left( n \right)} \right\} = \frac{1}{2}\left[ {X\left( k \right) - X^{*} \left( {\left( { - k} \right)_{N} } \right)} \right] = \frac{1}{2}\left[ {X\left( k \right) - X^{*} \left( {N - k} \right)} \right] $$
(4.44b)

A complex sequence \( x\left( n \right) \) can be represented as the sum of a circular conjugate symmetric sequence \( x_{e} \left( n \right) \) and a circular conjugate antisymmetric sequence \( x_{o} \left( n \right) \):

$$ x\left( n \right) = x_{e} \left( n \right) + x_{o} \left( n \right) $$
(4.45)

where

$$ x_{e} \left( n \right) = \frac{1}{2}\left[ {x\left( n \right) + x^{*} \left( { - n} \right)_{N} } \right] $$
(4.46a)

and

$$ x_{0} \left( n \right) = \frac{1}{2}\left[ {x\left( n \right) - x^{*} \left( { - n} \right)_{N} } \right] $$
(4.46b)

Then, the DFTs of \( x_{e} \left( n \right) \) and \( x_{0} \left( n \right) \) can be easily obtained, using Eq. (4.39), as

$$ {\text{DFT}}\left\{ {x_{e} \left( n \right)} \right\} = \frac{1}{2}\left[ {X\left( k \right) + X^{*} \left( k \right)} \right] = X_{R} \left( k \right) $$
(4.47a)

and

$$ {\text{DFT}}\left\{ {x_{0} \left( n \right)} \right\} = \frac{1}{2}\left[ {X\left( k \right) - X^{*} \left( k \right)} \right] = jX_{I} \left( k \right) $$
(4.47b)

The symmetry properties of the DFT of a complex sequence are summarized in Table 4.3.

Table 4.3 Symmetry properties of DFT of a complex sequence

4.4.2 Symmetry Relations of DFT of Real-Valued Sequences

For a real-valued sequence \( x\left( n \right) \), \( x_{I} \left( n \right) = 0 \). Hence, from Eq. (4.34), we get

$$ X\left( k \right) = \mathop \sum \limits_{n = 0}^{N - 1} \left[ {x\left( n \right)\cos \frac{2\pi kn}{N} - jx\left( n \right)\sin \frac{2\pi kn}{N}} \right] $$

From symmetry,

$$ \begin{aligned} X\left( {\left( { - k} \right)_{N} } \right) & = X\left( {n - k} \right) = \sum\limits_{n = 0}^{N - 1} {\left[ {x\left( n \right)\cos \frac{{2\pi \left( {n - k} \right)n}}{N} - jx\left( n \right)\sin \frac{{2\pi \left( {n - k} \right)n}}{N}} \right]} \\ & = \sum\limits_{n = 0}^{N - 1} {\left[ {x\left( n \right)\cos \frac{2\pi kn}{N} + jx\left( n \right)\sin \frac{2\pi kn}{N}} \right]} = X^{*} \left( k \right) \\ \end{aligned} $$

Hence, we have the symmetry relation

$$ X\left( {n - k} \right) = X\left( {\left( { - k} \right)_{N} } \right) = X^{*} \left( k \right) $$
(4.48)

Also, from Eqs. (4.36a), we have

$$ X_{R} \left( k \right) = \mathop \sum \limits_{n = 0}^{N - 1} \left[ {x\left( n \right)\cos \frac{2\pi kn}{N}} \right] $$

Hence,

$$ X_{R} \left( {\left( { - k} \right)_{N} } \right) = X_{R} \left( {N - k} \right) = \mathop \sum \limits_{n = 0}^{N - 1} \left[ {x\left( n \right)\cos \frac{{2\pi \left( {N - k} \right)n}}{N}} \right] = X_{R} \left( k \right) $$

Thus,

$$ X_{R} \left( k \right) = X_{R} \left( {\left( { - k} \right)_{N} } \right) = X_{R} \left( {N - k} \right) $$
(4.49a)

Similarly, starting with Eqs. (4.36b), we can show that

$$ X_{I} \left( k \right) = - X_{I} \left( {\left( { - k} \right)_{N} } \right) = - X_{I} \left( {N - k} \right) $$
(4.49b)

From the above relations, we see that the magnitude of \( X\left( k \right) \) and \( X\left( {\left( { - k} \right)_{N} } \right) \) is equal and that the phase angle of \( X\left( k \right) \) is negative of that of the phase angle of \( X\left( {\left( { - k} \right)_{N} } \right) \), i.e.,

$$ \left| {\varvec{X}(\varvec{k})} \right| = \left| {\varvec{X}(( - \varvec{k})_{\varvec{N}} )} \right| $$
(4.50a)

and

$$ \angle \varvec{X}(\varvec{k}) = - \angle \varvec{X}(( - \varvec{k})_{\varvec{N}} ) $$
(4.50b)

If \( x\left( n \right) \) is real and even, that is,

$$ x\left( n \right) = x\left( {N - n} \right) \quad \quad 0 \le n \le N - 1 $$
(4.51)

then, from Eq. (4.36a) and Eq. (4.36b), we see that \( X_{I} \left( k \right) = 0 \) and that the N-point DFT reduces to

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {\left[ {x\left( n \right)\cos \frac{2\pi kn}{N}} \right]} = X_{R} \left( k \right)\quad \quad 0 \le k \le N - 1 $$
(4.52a)

Hence, the DFT of a real finite even sequence is itself real and even. Furthermore, the IDFT reduces to

$$ x\left( n \right) = \frac{1}{N}\mathop \sum \limits_{k = 0}^{N - 1} \left[ {X\left( k \right)\cos \frac{2\pi kn}{N}} \right] \quad \quad 0 \le n \le N - 1 $$
(4.52b)

If \( x\left( n \right) \) is real and odd, that is,

$$ x\left( n \right) = - x\left( {N - n} \right) \quad \quad 0 \le n \le N - 1 $$
(4.53)

then, from Eq. (4.35a) and (4.35b), we see that \( X_{R} \left( k \right) = 0 \) and that the N-point DFT reduces to

$$ X\left( k \right) = - j\sum\limits_{n = 0}^{N - 1} {\left[ {x\left( n \right)\sin \frac{2\pi kn}{N}} \right]} = jX_{j} \left( k \right)\quad \quad 0 \le k \le N - 1 $$
(4.54a)

Hence, the DFT of a real finite odd sequence is purely imaginary and odd. Furthermore, the IDFT reduces to

$$ x\left( n \right) = j\frac{1}{N}\sum\limits_{k = 0}^{N - 1} {\left[ {X\left( k \right)\sin \frac{2\pi kn}{N}} \right]} \quad \quad 0 \le n \le N - 1 $$
(4.54b)

The symmetry relations of DFT of a real-valued sequence are summarized in Table 4.4.

Table 4.4 Symmetry relations of DFT of a real-valued sequence

4.4.3 DFTs of Two Real Sequences from a Single N-Point DFT

Equations (4.44a) and (4.44b) can be used to advantage in finding the DFTs of two real sequences of length N. Suppose \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) are two real N-point sequences with DFTs \( X_{1} \left( k \right) \) and \( X_{2} \left( k \right). \) Let us define a complex sequence \( x\left( n \right) \) by

$$ x\left( n \right) = x_{1} \left( n \right) + jx_{2} \left( n \right) $$
(4.55)

Using Eqs. (4.44a) and (4.44b), we may write the DFTs of the two real sequences as

$$ X_{1} \left( k \right) = \frac{1}{2}\left[ {X\left( k \right) + X^{*} \left( {\left( { - k} \right)_{N} } \right)} \right] = \frac{1}{2}\left[ {X\left( k \right) + X^{*} \left( {N - k} \right)} \right] $$
(4.56a)
$$ X_{2} \left( k \right) = \frac{1}{2j}\left[ {X\left( k \right) - X^{*} \left( {\left( { - k} \right)_{N} } \right)} \right] = \frac{1}{2j}\left[ {X\left( k \right) - X^{*} \left( {N - k} \right)} \right] $$
(4.56b)

Example 4.10

Find the DFTs of the sequences \( x_{1} \left( n \right) = \left( {1, 2,0,1} \right) \) and \( x_{2} \left( n \right) = \left( {1,0,1,0} \right) \) using a single four-point DFT.

Solution

$$ x\left( n \right) = x_{1} \left( n \right) + jx_{2} \left( n \right) = \left( {1 + j, 2, j,1} \right) $$

Hence,

$$ X\left( k \right) = x\left( 0 \right) + x\left( 1 \right)W_{4}^{k} + x\left( 2 \right)W_{4}^{2k} + x\left( 3 \right)W_{4}^{3k} , \quad k = 0,1,2,3 $$

Thus,

$$ X\left( k \right) = \left( {4 + 2j,1 - j, - 2 + 2j,1 + j} \right) $$

Hence,

$$ X^{*} \left( {N - k} \right) = \left( {4 - 2j,1 - j, - 2 - 2j,1 + j} \right) $$

Substituting the values of \( X\left( k \right) \) and \( X^{*} \left( {N - k} \right) \) in Eqs. (4.56a) and (4.56b), we get

$$ X_{1} \left( k \right) = \left( {4, 1 - j, - 2, 1 + j} \right)\quad {\text{and}}\quad X_{2} \left( k \right) = \left( {2,0,2,0} \right) $$

4.5 Computation of Circular Convolution

4.5.1 Circulant Matrix Method

The circular convolution defined by Eq. (4.17) can be written in a matrix form as

$$ \left[ {\begin{array}{*{20}c} {y_{c} (0)} \\ {y_{c} (1)} \\ {y_{c} (2)} \\ \vdots \\ {y_{c} (N - 1)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {x(0)} & {x(N - 1)} & {x(N - 2)} & \ldots & {x(1)} \\ {x(1)} & {x(0)} & {x(N - 1)} & \ldots & {x(2)} \\ {x(2)} & {x(1)} & {x(0)} & \ldots & {x(3)} \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ {x(N - 1)} & {x(N - 2)} & {x(N - 3)} & \ldots & {x(0)} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {h(0)} \\ {h(1)} \\ {h(2)} \\ \vdots \\ {h(N - 1)} \\ \end{array} } \right] $$
(4.57)

The (N × N) matrix on the RHS of Eq. (4.57) is called the circular convolution matrix or circulant matrix and denoted by \( C_{x} \). It may be observed that the first column corresponds to the elements of the sequence \( x\left( n \right) \), and the rest of the columns are derived from the previous ones in a very simple way.

Example 4.11

Find the circular convolution of the sequences considered in Example 4.9, namely \( x\left( n \right) = \left( {1,3, - 4,} \right) \) and \( h\left( n \right) = \left( { - 2,1,2} \right). \)

Solution

The circular convolution matrix C x is given by

$$ \left[ {\begin{array}{*{20}c} 1 & { - 4} & 3 \\ 3 & 1 & { - 4} \\ { - 4} & 3 & 1 \\ \end{array} } \right] $$

Then, the circular convolution of \( x\left( n \right) \) and \( h\left( n \right) \) is given by

$$ \left[ {\begin{array}{*{20}c} {y_{c} \left( 0 \right)} \\ {y_{c} \left( 1 \right)} \\ {y_{c} \left( 2 \right)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & { - 4} & 3 \\ 3 & 1 & { - 4} \\ { - 4} & 3 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} { - 2} \\ 1 \\ 2 \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 0 \\ { - 13} \\ {13} \\ \end{array} } \right] $$

Hence, \( y_{c} \left( n \right) = \left( {0, - 13,13} \right). \)

4.5.2 Graphical Method

Evaluation of the circular convolution sum at any sample n consists of the following operations:

  1. (i)

    The sequences \( x\left( n \right) \) and \( h\left( n \right) \) are marked on two concentric circles with one sequence on the inner circle in the clockwise direction and the other on the outer circle in a counter clockwise direction as various points, with equal spacing. For \( n = 0 \), \( y_{c} \left( 0 \right) \) is obtained by multiplying the two sequences point by point and summing the products.

  2. (ii)

    Keeping the outer circle stationary, rotate the inner in counterclockwise direction by one sample, multiply the two sequences point by point, and sum the products. This gives \( y_{c} \left( 1 \right) \).

  3. (iii)

    The procedure is continued to find \( y_{c} \left( n \right) \) for other values of \( n \).

The following example illustrates the above procedure:

Example 4.12

Find the circular convolution of the three-point sequences of Example 4.11 with \( x\left( n \right) = \left( {1,3, - 4} \right) \) and \( h\left( n \right) = \left( { - 2,1,2} \right) \).

Solution

$$ \begin{aligned} y_{c} \left( 0 \right) & = - 2.1 + 2.3 + 1\left( { - 4} \right) = 0 \\ y_{c} \left( 1 \right) & = 1.1 + \left( { - 2} \right)3 + 2\left( { - 4} \right) = - 13 \\ y_{c} \left( 2 \right) & = 2.1 + 1.3 + \left( { - 2} \right)\left( { - 4} \right) = 13 \\ \end{aligned} $$

Hence,

4.5.3 DFT Approach

We may obtain the circular convolution \( y_{c} \left( n \right) \) of two N-point sequences using the relation given by Eq. (4.25). We first compute the DFTs \( X_{1} \left( k \right) \) and \( X_{2} \left( k \right) \) of the two sequences and then multiply them to get \( Y_{c} \left( k \right) = X_{1} \left( k \right)X_{2} \left( k \right) \), the DFT of the circular convolution. We then perform the IDFT on \( Y_{c} \left( k \right) \) to obtain the circular convolution \( y_{c} \left( n \right) \). In the next section, we will see how this approach can be used to evaluate linear convolution of two sequences.

Example 4.13

Obtain the circular convolution of the sequences \( x_{1} \left( n \right) = \left( {1, 2,0,1} \right) \) and \( x_{2} \left( n \right) = \left( {1,0,1,0} \right) \) using the DFT approach.

Solution

We have already found the DFTs for these two sequences in Example 4.10. These are given by

$$ X_{1} \left( k \right) = \left( {4, 1 - j, - 2, 1 + j} \right)\quad {\text{and}}\quad X_{2} \left( k \right) = \left( {2,0,2,0} \right). $$

Hence,

$$ Y_{c} \left( k \right) = \left( {8, 0, - 4, 0} \right). $$

Using Eq. (4.12), we now compute the IDFT of the above to obtain the circular convolution \( y_{c} \left( n \right) \).

$$ \begin{aligned} y_{c} \left( n \right) & = \frac{1}{N}\left[ {Y_{c} \left( 0 \right) + Y_{c} \left( 2 \right)W_{4}^{ - 2n} + Y_{c} \left( 3 \right)W_{4}^{ - 3n} } \right] \\ & = \frac{1}{N}\left[ {8 - 4W_{4}^{ - 2n} } \right] \\ \end{aligned} $$

which gives

$$ y_{c} \left( n \right) = \left( {1, 3, 1, 3} \right) $$

4.6 Linear Convolution Using DFT

Linear convolution is an important operation in signal processing applications since it can be used to obtain the response of a linear filter for arbitrary input, once the impulse response of the filter is known. There are efficient algorithms called fast Fourier transforms, two of which will be discussed in the next section, for practical implementation of an N-point DFT. Hence, it is of importance to find methods to implement the linear convolution using the DFT.

4.6.1 Linear Convolution of Two Finite Length Sequences

Consider two sequences \( x\left( n \right) \) and \( h\left( n \right) \) of lengths L1 and L2, respectively. The linear convolution of these two sequences is a sequence of length L1 + L2−1. Circular convolution cannot be directly used on these two sequences to achieve linear convolution. Now, to obtain linear convolution using circular convolution, we generate two new sequences \( x^{\prime}\left( n \right) \) and \( h^{\prime}\left( n \right) \), each of length L1 + L2−1 = L by padding \( x\left( n \right) \) with (L2  1) zeros and \( h\left( n \right) \) with (L1 − 1) zeros. Thus,

$$ x^{{\prime }} ( {\text{n)}} = [x(0),x(1), \ldots ,x(L_{1} - 1),\underbrace {0, \ldots ,0}_{{L_{2} - 1}}] $$
(4.58)
$$ h^{{\prime }} (n) = [h(0),h(1), \ldots ,h(L_{2} - 1),\underbrace {0, \ldots ,0}_{{L_{1} - 1}}] $$
(4.59)

The linear convolution of \( x^{\prime}\left( n \right) \) and \( h^{\prime}\left( n \right) \) is given by

$$ x^{\prime}\left( n \right)*h^{\prime}\left( n \right) = \mathop \sum \limits_{m = }^{L} x^{\prime}\left( m \right)h^{\prime}\left( {n - m} \right), \quad 0 \le n \le L - 1 $$
(4.60)

The above expression can be thought of as a circular convolution of the two padded sequences \( x^{\prime}\left( n \right) \) and \( h^{\prime}\left( n \right) \); hence, we can use any of the methods described in Sect. 4.5 to evaluate it.

Example 4.14

Find the linear convolution of the sequences \( x\left( n \right) = \left( {1,2,3,1} \right) \) and \( x\left( n \right) = \left( {1,1,1} \right). \)

Solution

The two sequences \( x\left( n \right) \) and \( h\left( n \right) \) are of lengths 4 and 3, respectively. By appropriately padding the two sequences by zeros, we obtain the padded sequences \( x^{\prime}\left( n \right) = \left( {1,2,3,1,0,0} \right) \) and \( h^{\prime}\left( n \right) = (1,1,1,0,0,0), \) each of length L = 6. We may now calculate the circular convolution \( y_{c} \left( n \right) \) of \( x^{\prime}\left( n \right) \) and \( h^{\prime}\left( n \right) \) using the circulant matrix Eq. (4.57)

$$ _{{}} \left[ \begin{aligned} y_{c} (0) \hfill \\ y_{c} (1) \hfill \\ y_{c} (2) \hfill \\ y_{c} (3) \hfill \\ y_{c} (4) \hfill \\ y_{c} (5) \hfill \\ \end{aligned} \right] = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & 1 & 3 & 2 \\ 2 & 1 & 0 & 0 & 1 & 3 \\ 3 & 2 & 1 & 0 & 0 & 1 \\ 1 & 3 & 2 & 1 & 0 & 0 \\ 0 & 1 & 3 & 2 & 1 & 0 \\ 0 & 0 & 1 & 3 & 2 & 1 \\ \end{array} } \right]\left[ \begin{aligned} 1 \hfill \\ 1 \hfill \\ 1 \hfill \\ 0 \hfill \\ 0 \hfill \\ 0 \hfill \\ \end{aligned} \right] = \left[ \begin{aligned}_{1} \hfill \\ 3 \hfill \\ 6 \hfill \\ 6 \hfill \\ 4 \hfill \\ 1 \hfill \\ \end{aligned} \right] $$

Thus, \( y_{c} \left( n \right) = \left( {1,3,6,6,4,1} \right) \), and therefore, the linear convolution

$$ y_{l} \left( n \right) = x\left( n \right)*h\left( n \right) = \left( {1,3,6,6,4,1} \right). $$

Instead of using the circulant matrix, we could have used the DFT approach to find the circular convolution. In this case, we would first find the L = (L1 + L2−1)-point DFTs \( X^{\prime}\left( k \right) \) and \( H^{\prime}\left( k \right) \) of \( x^{\prime}\left( n \right) \) and \( h^{\prime}\left( n \right) \). Then, the L-point IDFT of the product \( X^{\prime}\left( k \right)H^{\prime}\left( k \right) \) would yield the linear convolution of \( x(n) \) and \( h(n) \).

The following MATLAB fragments illustrate as to how to obtain the linear convolution using the DFT:

For the above example,

  • x=[1 2 3 1 0 0]; % sequence \( x(n) \)

  • h=[1 1 1 0 0 0];% sequence \( h(n) \)

  • L=length(x)+length(h)-1;%length of convolution sequence

  • XE=fft(x,L); % DFT of sequence \( x(n) \) with zero padding

  • HE=fft(h,L); % DFT of sequence \( h(n) \) with zero padding

  • yl=ifft(XE.*HE); % linear convolution of sequences \( x(n) \) and \( h(n) \)

  • After execution of the above MATLAB commands, the linear convolution of \( x(n) \) and \( h(n) \) is given by

  • \( y_{l} (n) = x(n) * h(n) \)={1, 3, 6, 6, 4, 1}.

4.6.2 Linear Convolution of a Finite Length Sequence with a Long Duration Sequence

There are two methods for the evaluation of the linear convolution using the DFT, called the overlap-add and the overlap-save, when one sequence is of finite length and the other is of infinite length or much greater than the length of the finite length sequence.

  1. (a)

    Overlap-Add Method

Let \( x\left( n \right) \) be a sequence of long duration and \( h\left( n \right) \) of finite length \( L_{2} \). Let the sequence \( x\left( n \right) \) be divided into a set of subsequences, each having a finite length L, and let each subsequence be padded with L2−1 zeros to make its length equal to L + L2−1. Then, we have

$$ \begin{aligned} & x_{1} (n) = [x(0),x(1), \ldots ,x(L - 1),\underbrace {0, \ldots ,0}_{{L_{2} - 1}}] \\ & x_{2} (n) = [x(L),x(L + 1), \ldots ,x(2L - 1),\underbrace {0, \ldots ,0}_{{L_{2} - 1}}] \\ & x_{3} (n) = [x(2L),x(2L + 1), \ldots ,x(3L - 1),\underbrace {0, \ldots ,0}_{{L_{2} - 1}}] \\ & \cdot \\ & \cdot \\ & x_{m} (n) = [(x((m - 1)L),x((m - 1)L + 1), \ldots ,x(mL - 1),\underbrace {0, \ldots ,0}_{{L_{2} - 1}}] \\ \end{aligned} $$
(4.61)

Also, the sequence \( h\left( n \right) \) is padded with L − 1 zeros to form the sequence \( h^{\prime}\left( n \right) \). Each of the subsequences is now convolved with \( h^{\prime}\left( n \right) \) of length L + L2−1. Since each subsequence is terminated with L2 − 1 zeros, the last L2 − 1 points from each subsequence convolution output are to be overlapped and added to the first L2 − 1 points of the succeeding subsequence convolution output. Hence, this procedure is called the overlap-add method. The following example illustrates this method.

Example 4.15

If the impulse response of a filter is \( h(n) = \left\{ {1,0,1} \right\} \), find its output \( y(n) = x(n) * h(n) \) for the input sequence \( x(n) = \left\{ {3, - 1,0,1,2,1,0,1,2} \right\} \), by using overlap-add method.

Solution

Let each subblock of the data be of length 3. Since L2 = 3, two zeros are added to bring the length of each subblock to 5. Two zeros are added to \( h\left( n \right) \) so that \( h^{\prime}\left( n \right) \) is also of length 5. Hence, the sub sequences are

$$ x_{1} (n) = \left\{ {3, - 1,0,0,0} \right\};\quad x_{2} (n) = \left\{ {1,2,1,0,0} \right\};\quad x_{3} (n) = \left\{ {0,1,2,0,0} \right\}. $$

and

$$ h^{\prime}\left( n \right) = \left\{ {1,0,1,0,0} \right\} $$

Then, the circular convolutions of the subsequences with \( h^{\prime}\left( n \right) \) are given by

Hence, the linear convolution of \( x\left( n \right) \) and \( h\left( n \right) \) is given by

$$ y_{l} \left( n \right) = x\left( n \right)*h\left( n \right) = \left( {3, - 1,3,0,2,2,2,2,2,1,2} \right) $$

The above process is illustrated in Fig. 4.5.

Fig. 4.5
figure 5

a Original signal \( x\left( n \right) \), b subblocks of \( x\left( n \right) \), c circular convolution of the subblocks of \( x\left( n \right) \) and \( h^{\prime}\left( n \right) \), and d linear convolution of \( x\left( n \right) \) and \( h\left( n \right) \)

The above procedure can be implemented by using the MATLAB command fftfilt.

\( {\text{h}} = \left[ {1\,\,0\,\,1\,\,0\,\,0} \right]; \)

\( {\text{x}} = \left[ {3\,\, - 1\,\,0\,\,1\,\,2\,\,1\,\,0\,\,1\,\,2\,\,0\,\,0} \right]; \)

\( {\text{y}} = {\text{fftfilt}}\left( {{\text{h}},{\text{x}}} \right); \)

Thus after the execution of the above MATLAB statements, we get \( y_{l} (n) \) as

$$ y_{l} (n) = \left\{ {3, - 1,3,0,2,2,2,2,2,1,2} \right\}. $$
  1. (b)

    Overlap-Save Method

In this method, the sequence \( x\left( n \right) \) is divided into a set of overlapping subsequences, each having a finite length L + L2−1. Each subsequence contains the last L2 − 1 samples of the previous subsequence, followed by the next L samples of \( x\left( n \right) \). The first L2 − 1 samples of the first subsequence are set to zero. Hence, the subsequences are

$$ \begin{aligned} x_{1} (n) & = [\underbrace {0, \ldots ,0}_{{L_{2} - 1}},x(0),x(1), \ldots ,x(L - 1)] \\ x_{2} (n) & = [\underbrace {{x(L + 1 - L_{2} ), \ldots ,x(L - 1)}}_{{{\text{L}}_{2} \, - {\text{ 1 samples from x}}_{1} ( {\text{n) }}}},\underbrace {x(L + 1), \ldots ,x(2L - 1)}_{{L\;{\text{new}}\,{\text{samples}}}}] \\ x_{3} (n) & = [\underbrace {{x(2L + 1 - L_{2} ), \ldots ,x(2L - 1)}}_{{{\text{L}}_{2} {\text{ - 1 samples from x}}_{ 2} ( {\text{n) }}}},\underbrace {x(2L), \ldots ,x(3L - 1)}_{{L\;{\text{new}}\,{\text{samples}}}}] \\ \end{aligned} $$

and so on. Now, the length of the sequence \( h\left( n \right) \) is increased to L + L2 − 1 by padding it with L − 1 zeros to form the sequence \( h^{\prime}\left( n \right) \). Then, each of the subsequences is convolved with \( h^{\prime}\left( n \right) \). The first L2 − 1 points of the circular convolution of each of the subsequences with \( h^{\prime}\left( n \right) \) do not agree with the linear convolution output of each subsequence with \( h^{\prime}\left( n \right) \) due to aliasing, and the remaining L points are in agreement with the linear convolution output. Hence, the first L2 − 1 points of the circular convolution of each subsequence with \( h^{\prime}\left( n \right) \) output are to be discarded and the remaining L points from each subsequence convolution output are to be abutted to obtain the linear convolution output of \( x\left( n \right) \) and \( h\left( n \right) \). The following example illustrates this method:

Example 4.16

Find the filter output \( y(n) = x(n) * h(n) \) for the input \( x\left( n \right) \) and the impulse response \( h\left( n \right) \) of Example 4.15.

Solution

The subsequences of \( x\left( n \right) \) are

$$ \begin{aligned} x_{1} \left( n \right) = \left\{ {0,0,3, - 1,0} \right\}, \;x_{2} \left( n \right) = \left\{ { - 1,0,1,2,1} \right\}, \hfill \\ x_{3} \left( n \right) = \left\{ {2,1,0,1,2} \right\}, \;x_{4} \left( n \right) = \left\{ {1,2,0,0,0} \right\} \hfill \\ \end{aligned} $$

and

$$ h^{\prime}\left( n \right) = \left\{ {1,0,1,0,0} \right\} $$

Then, the circular convolution of the subsequences with h(n) is given by

Hence, the linear convolution of x(n) and h(n) is given by

$$ y_{l} (n) = \left\{ {3, - 1,3,0,2,2,2,2,2,1,2} \right\} $$

This process is illustrated in Fig. 4.6a, b.

Fig. 4.6
figure 6figure 6

a Original input \( x\left( n \right) \) and subsections of \( x\left( n \right) \) and b circular convolution of subsections of \( x\left( n \right) \) and \( h^{\prime}\left( n \right), \) and the linear convolution of \( x\left( n \right) \) and \( h\left( n \right) \)

4.7 Fast Fourier Transform

It is evident from Eqs. (4.11) that a direct evaluation of each value of \( X\left( k \right) \) requires N complex multiplications and \( \left( {N - 1} \right) \) complex additions. As such, \( N^{2} \) complex multiplications and \( N\left( {N - 1} \right) \) complex additions are necessary for the computation of an N-point DFT. Consequently, for large \( N \), the computational complexity in terms of the arithmetic operations is high in direct evaluation of the DFT. Therefore, a number of efficient algorithms have been developed for the computation of the DFT. These efficient algorithms collectively have become known fast Fourier transforms. The FFT algorithms decompose successively the computation of the discrete Fourier transform of a sequence of length N into smaller and smaller discrete Fourier transforms. The two most basic FFT algorithms are the decimation-in-time and decimation-in frequency [1, 2], and these are considered in the following sections.

4.7.1 Decimation-in-Time FFT Algorithm with Radix-2

The decimation-in-time (DIT) is the process that decomposes the input sequence successively into smaller and smaller subsequences. Here, the radix-2 means the number of output points N can be expressed as a power of 2; that is, \( N = 2^{\nu } \), where ν is an integer. Let the input sequence be decomposed into an even sequence \( g_{1} \left( n \right) \) and an odd sequence \( g_{2} \left( n \right) \) as

$$ g_{1} \left( n \right) = x\left( {2n} \right), \;n = 0,1, \ldots ,\frac{N}{2} - 1 $$
(4.62)
$$ g_{2} \left( n \right) = x\left( {2n} \right), \;n = 0,1, \ldots ,\frac{N}{2} - 1 $$
(4.63)

We know from Eq. (4.11) that

$$ X(k) = \sum\limits_{n = 0}^{N - 1} {x(n)W_{N}^{nk} } ,\quad k = 0,1, \ldots ,N - 1 $$
(4.64)

Substituting Eqs. (4.62) and (4.63) in (4.64), we get

$$ X(k) = \sum\limits_{n = 0}^{(N/2) - 1} {x(2n)W_{N}^{2nk} } + \sum\limits_{n = 0}^{(N/2) - 1} {x(2n + 1)W_{N}^{(2n + 1)k} } $$
(4.65)

Using \( W_{N}^{2} = W_{N/2} \) in Eq. (4.65) yields

$$ X(k) = \sum\limits_{n = 0}^{(N/2) - 1} {x(2n)W_{N/2}^{nk} } + W_{N}^{k} \sum\limits_{n = 0}^{(N/2) - 1} {x(2n + 1)W_{N/2}^{nk} } $$
(4.66)

The RHS may be identified as the sum of two (N/2)-point DFTs, \( G_{1} \left( k \right) \) and \( G_{2} \left( k \right) \) of the even and odd sequences \( g_{1} \left( n \right) \) and \( g_{2} \left( n \right) \):

$$ G_{1} (k) = \sum\limits_{n = 0}^{(N/2) - 1} {g_{1} (n)W_{N/2}^{nk} } $$
(4.67)
$$ G_{2} (k) = \sum\limits_{n = 0}^{(N/2) - 1} {g_{2} (n)W_{N/2}^{nk} } $$
(4.68)

Hence, \( X\left( k \right) \) in Eq. (4.66) can be written as

$$ X(k) = G_{1} (k) + W_{N}^{k} G_{2} (k)\quad k = 0,1, \ldots ,N - 1 $$
(4.69)

Also, since \( G_{1} \left( k \right) \) and \( G_{2} \left( k \right) \) are periodic with a period of (\( N/2) \), \( G_{1} \left( {k + N/2} \right) = G_{1} \left( k \right) \) and \( G_{2} \left( {k + N/2} \right) = G_{2} \left( k \right) \), and the twiddle constant \( W_{N}^{k + N/2} = - W_{N}^{k} \). Hence, Eq. (4.69) can be written as

$$ X(k) = G_{1} (k) + W_{N}^{k} G_{2} (k)\quad \quad k = 0,1, \ldots ,(N/2) - 1 $$
(4.70a)
$$ X(k + N/2) = G_{1} (k) - W_{N}^{k} G_{2} (k)\quad k = 0,1, \ldots ,(N/2) - 1 $$
(4.70b)

Repeating the process for each of the sequences \( g_{1} (n) \) and \( g_{2} (n) \), \( g_{1} (n) \) yields two \( \left( {N/4} \right) \)-point sequences

$$ \begin{aligned} g_{11} (n) & = g_{1} (2n)\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ g_{12} (n) & = g_{1} (2n + 1)\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.71a)

and \( g_{2} (n) \) yields

$$ \begin{aligned} g_{21} (n) & = g_{2} (2n)\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ g_{22} (n) & = g_{2} (2n + 1)\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.71b)

and their DFTs satisfy

$$ \begin{aligned} & G_{1} (k) = G_{11} (k) + W_{N/2}^{k} G_{12} (k)\quad \quad k = 0,1, \ldots ,(N/4) - 1 \\ & G_{1} \left( {k + \frac{N}{4}} \right) = G_{11} (k) - W_{N/2}^{k} G_{12} (k)\quad \quad k = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.72a)
$$ \begin{aligned} & G_{2} (k) = G_{21} (k) + W_{N/2}^{k} G_{22} (k)\quad \quad k = 0,1, \ldots ,(N/4) - 1 \\ & G_{2} \left( {k + \frac{N}{4}} \right) = G_{21} (k) - W_{N/2}^{k} G_{22} (k)\quad \quad k = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.72b)

This process can be continued until we are left with only two-point transforms. For example, for N = 4, Eqs. (4.70a) and (4.70b) become

$$ \begin{aligned} & X(k) = G_{1} (k) + W_{N}^{k} G_{2} (k)\quad \quad \,k = 0,1 \\ & X(k + 2) = G_{1} (k) - W_{N}^{k} G_{2} (k)\quad k = 0,1 \\ \end{aligned} $$
(4.73)

Equation (4.73) can be represented by the flow graph as shown in Fig. 4.7. This is usually referred to as the butterfly diagram for four-point DFT. In the first stage, two 2-point DFTs and, in the second stage, one 4-point DFT are computed.

Fig. 4.7
figure 7

Decomposition of a four-point DFT using DIT

For N = 8, Eqs. (4.70a) and (4.70b) become

$$ \begin{aligned} X(k) & = G_{1} (k) + W_{N}^{k} \,G_{2} (k)\quad \quad k = 0,1,2,3 \\ X(k + 2) & = G_{1} (k) - W_{N}^{k} G_{2} (k)\quad \quad k = 0,1,2,3 \\ \end{aligned} $$
(4.74)

The computation of an eight-point DFT is performed in three stages as shown in Fig. 4.8.

Fig. 4.8
figure 8

Decomposition of an eight-point DFT using DIT

It is observed from the flow graph that in the first stage, four 2-point DFTs, in the second stage, two 4-point DFTs, and finally, in the third stage, one 8-point DFT are computed. Also, the number of complex multiplications carried out at each stage is equal to 4 = N/2, and the number of additions performed is N. Hence, the total number of complex multiplications and additions in computing all the 8 samples is 12 and 24, respectively. Following the same argument, it can be observed that in the general case of \( N = 2^{\nu } \), the number of stages of computation will be \( \nu = \log_{2} N \); hence, the total number of complex multiplications and additions needed in computing all the N DFT samples is \( \left( {N/2} \right)\log_{2} N \), and the number of complex additions is \( N\log_{2} N \).

Example 4.17

Find the four-point FFT of \( x(n) = \left\{ {1,0,1,1} \right\} \) using the decimation-in-time algorithm.

Solution

With N = 4, the two twiddle factors are

$$ W_{4}^{0} = 1\quad {\text{and}}\quad W_{4}^{1} = e^{ - j2\pi /4} = \cos (\pi /2) - j\,\sin (\pi /2) = - j. $$

Since it is a four-point DFT, the DIT flow graph consists of two stages as shown in Fig. 4.9. The outputs of the first and second stages are computed as follows:

Fig. 4.9
figure 9

Decomposition of the four-point DFT of Example 4.17 using the DIT algorithm

  • Stage 1

$$ \begin{aligned} x_{1} (0) & = x(0) + W_{4}^{0} x(2) = 1 + 1 = 2; \\ x_{1} (2) & = x(0) - W_{4}^{0} x(2) = 1 - 1 = 0; \\ x_{1} (1) & = x(1) + W_{4}^{0} x(3) = 0 + 1 = 1; \\ x_{1} (3) & = x(1) - W_{4}^{0} x(3) = 0 - 1 = - 1; \\ \end{aligned} $$

where the sequence \( x_{1} \left( n \right) \) represents the intermediate output after the first stage and becomes the input to the second (final) stage.

  • Stage 2

$$ \begin{aligned} X(0) & = x_{1} (0) + W_{4}^{0} x_{1} (1) = 2 + 1 = 3; \\ X(2) & = x_{1} (0) - W_{4}^{0} x_{1} (1) = 2 - 1 = 1; \\ \end{aligned} $$
$$ \begin{aligned} X(1) & = x_{1} (2) + W_{4}^{1} x_{1} (3) = 1 + ( - j)( - 1) = j; \\ X(3) & = x_{1} (2) - W_{4}^{1} x_{1} (3) = 0 - ( - j)( - 1) = - j; \\ \end{aligned} $$

Example 4.18

Consider an input data string of \( x\left( n \right) = \left( {0,1,2,3} \right) \). Draw the butterfly diagram of the FFT showing the input, intermediate outputs, and the final output to compute the DFT of \( x\left( n \right) \).

Solution

By computing the outputs of the first and second stages as was done in the previous example, the required butterfly diagram is shown in Fig. 4.10.

Fig. 4.10
figure 10

Decomposition of the four-point DFT of Example 4.18 using the DIT algorithm

Example 4.19

Find the eight-point FFT of \( x(n) = \left\{ {1,0,1,1,1,1,1,0} \right\} \) using the DIT algorithm.

Solution

With N = 8, the four twiddle factors are

$$ \begin{aligned} W_{8}^{0} & = 1; \\ W_{8}^{1} & = \text{e}^{ - j2\pi /8} = \cos (\pi /4) - j\,\sin (\pi /4) = 0.707 - j0.707; \\ W_{8}^{2} & = \text{e}^{ - j4\pi /8} = - j; \\ W_{8}^{3} & = \text{e}^{ - j6\pi /8} = - 0.707 - j0.707; \\ \end{aligned} $$

Since it is an eight-point DFT with radix-2, the DIT flow graph consists of three stages as shown in Fig. 4.11. The outputs of the three stages are computed as follows:

Fig. 4.11
figure 11

Decomposition of the eight-point DFT of Example 4.19 using the DIT algorithm

  • Stage 1

$$ \begin{aligned} x_{1} (0) & = x(0) + W_{8}^{0} x(4) = 1 + 1 = 2; \\ x_{1} (4) & = x(0) - W_{8}^{0} x(4) = 1 - 1 = 0; \\ x_{1} (2) & = x(2) + W_{8}^{0} x(6) = 1 + 1 = 2; \\ x_{1} (6) & = x(2) - W_{8}^{0} x(6) = 1 - 1 = 0; \\ x_{1} (1) & = x(1) + W_{8}^{0} x(5) = 0 + 1 = 1; \\ x_{1} (5) & = x(1) - W_{8}^{0} x(5) = 0 - 1 = - 1; \\ x_{1} (3) & = x(3) + W_{8}^{0} x(7) = 1 + 0 = 1; \\ x_{1} (7) & = x(3) - W_{8}^{0} x(7) = 1 - 0 = 1; \\ \end{aligned} $$

where the sequence \( x_{1} \left( n \right) \) represents the intermediate output after the first stage and becomes the input to the second stage.

  • Stage 2

$$ \begin{aligned} x_{2} (0) & = x_{1} (0) + W_{8}^{0} x_{1} (2) = 2 + 2 = 4; \\ x_{2} (4) & = x_{1} (4) + W_{8}^{2} x_{1} (6) = 0 + ( - j)0 = 0; \\ x_{2} (2) & = x_{1} (0) - W_{8}^{0} x_{1} (2) = 2 - 2 = 0; \\ x_{2} (6) & = x_{1} (4) - W_{8}^{2} x_{1} (6) = 0 + ( - j)0 = 0; \\ x_{2} (1) & = x_{1} (1) + W_{8}^{0} x_{1} (3) = 1 + 1 = 2; \\ x_{2} (5) & = x_{1} (5) + W_{8}^{2} x_{1} (7) = - 1 + ( - j) = - 1 - j; \\ x_{2} (3) & = x_{1} (1) - W_{8}^{0} x_{1} (3) = 1 - 1 = 0; \\ x_{2} (7) & = x_{1} (5) - W_{8}^{2} x_{1} (7) = - 1 - ( - j) = - 1 + j; \\ \end{aligned} $$

where the second-stage output sequence \( x_{2} \left( n \right) \) becomes the input sequence to the final stage.

  • Stage 3

$$ \begin{aligned} X(0) & = x_{2} (0) + W_{8}^{0} x_{2} (1) = 4 + 2 = 6; \\ X(1) & = x_{2} (4) + W_{8}^{1} x_{2} (5) = 0 + (0.707 - j0.707)( - 1 - j) = - 1.414; \\ X(2) & = x_{2} (2) + W_{8}^{2} x_{2} (3) = 0 + ( - j)0 = 0; \\ X(3) & = x_{2} (6) + W_{8}^{3} x_{2} (7) = 0 + ( - 0.707 - j0.707)( - 1 + j) = 1.414; \\ X(4) & = x_{2} (0) - W_{8}^{0} x_{2} (1) = 4 - 2 = 2; \\ X(5) & = x_{2} (4) - W_{8}^{1} x_{2} (5) = 0 - (0.707 - j0.707)( - 1 - j) = 1.414; \\ X(6) & = x_{2} (2) - W_{8}^{2} x_{2} (3) = 0 - ( - j)(0) = 0; \\ X(7) & = x_{2} (6) - W_{8}^{3} x_{2} (7) = 0 - ( - 0.707 - j0.707)( - 1 + j) = - 1.414; \\ \end{aligned} $$

Example 4.20

Find the 16-point FFT of the sequence \( x(n) = \left\{ {1,0,1,1,0,1,1,0,1,0,0,1,1,1,1,0} \right\} \) using the DIT algorithm.

Solution

With N = 16, eight twiddle factors need to be calculated; these are

$$ \begin{aligned} W_{16}^{0} & = 1;W_{16}^{1} = e^{ - j2\pi /16} = 0.9238 - j0.3826; \\ W_{16}^{2} & = e^{ - j4\pi /16} = 0.707 - j0.707; \\ W_{16}^{3} & = e^{ - j6\pi /16} = 0.3826 - j0.9238; \\ W_{16}^{4} & = e^{ - j8\pi /16} = 0 - j; \\ W_{16}^{5} & = e^{ - j10\pi /16} = - 0.3826 - j0.9238; \\ W_{16}^{6} & = e^{ - j12\pi /16} = - 0.707 - j0.707; \\ W_{16}^{7} & = e^{ - j14\pi /16} = - 0.9238 - j0.3826. \\ \end{aligned} $$

Since it is a 16-point DFT with radix-2, the DIT flow graph consists of four stages as shown in Fig. 4.12. The outputs of the four stages are computed as follows:

Fig. 4.12
figure 12

Decomposition of the 16-point DFT of Example 4.20 using the DIT algorithm

  • Stage 1

$$ \begin{aligned} x_{1} (0) & = x(0) + W_{16}^{0} x(8) = 1 + 1 = 2; \\ x_{1} (8) & = x(0) - W_{16}^{0} x(8) = 1 - 1 = 0; \\ x_{1} (4) & = x(4) + W_{16}^{0} x(12) = 0 + 1 = 1; \\ x_{1} (12) & = x(4) - W_{16}^{0} x(12) = 0 - 1 = - 1; \\ x_{1} (2) & = x(2) + W_{16}^{0} x(10) = 1 + 0 = 1; \\ x_{1} (10) & = x(2) - W_{16}^{0} x(10) = 1 - 0 = 1; \\ x_{1} (6) & = x(6) + W_{16}^{0} x(14) = 1 + 1 = 2; \\ x_{1} (14) & = x(6) - W_{16}^{0} x(14) = 1 - 1 = 0; \\ x_{1} (1) & = x(1) + W_{16}^{0} x(9) = 0 + 0 = 0; \\ x_{1} (9) & = x(1) - W_{16}^{0} x(9) = 0 - 0 = 0; \\ x_{1} (5) & = x(5) + W_{16}^{0} x(13) = 1 + 1 = 2; \\ x_{1} (13) & = x(5) - W_{16}^{0} x(13) = 1 - 1 = 0; \\ x_{1} (3) & = x(3) + W_{16}^{0} x(11) = 1 + 1 = 2; \\ x_{1} (11) & = x(3) - W_{16}^{0} x(11) = 1 - 1 = 0; \\ x_{1} (7) & = x(7) + W_{16}^{0} x(15) = 0 + 0 = 0; \\ x_{1} (15) & = x(7) - W_{16}^{0} x(15) = 0 - 0 = 0; \\ \end{aligned} $$

where the sequence \( x_{1} \left( n \right) \) represents the intermediate output after the first iteration and becomes the input to the second stage.

  • Stage 2

$$ \begin{aligned} x_{2} (0) & = x_{1} (0) + W_{16}^{0} x_{1} (4) = 2 + 1 = 3; \\ x_{2} (8) & = x_{1} (8) + W_{16}^{4} x_{1} (12) = 0 + ( - j)( - 1) = j; \\ x_{2} (4) & = x_{1} (0) - W_{16}^{0} x_{1} (4) = 2 - 1 = 1; \\ x_{2} (12) & = x_{1} (8) - W_{16}^{4} x_{1} (12) = 0 - ( - j)( - 1) = - j; \\ x_{2} (2) & = x_{1} (2) + W_{16}^{0} x_{1} (6) = 1 + 2 = 3; \\ x_{2} (10) & = x_{1} (10) + W_{16}^{4} x_{1} (14) = 1 - ( - j)0 = 1; \\ x_{2} (6) & = x_{1} (2) - W_{16}^{0} x_{1} (6) = 1 - 2 = - 1; \\ x_{2} (14) & = x_{1} (10) - W_{16}^{4} x_{1} (14) = 1 - ( - j)0 = 1; \\ x_{2} (1) & = x_{1} (1) + W_{16}^{0} x_{1} (5) = 0 + 2 = 2; \\ x_{2} (9) & = x_{1} (9) + W_{16}^{4} x_{1} (13) = 0 + ( - j)0 = 0; \\ x_{2} (5) & = x_{1} (1) - W_{16}^{0} x_{1} (5) = 0 - 2 = - 2; \\ x_{2} (13) & = x_{1} (9) - W_{16}^{4} x_{1} (13) = 0 - ( - j)0 = 0; \\ x_{2} (3) & = x_{1} (3) + W_{16}^{0} x_{1} (7) = 2 + 0 = 2; \\ x_{2} (11) & = x_{1} (11) + W_{16}^{4} x_{1} (15) = 0 + ( - j)0 = 0; \\ x_{2} (7) & = x_{1} (3) - W_{16}^{0} x_{1} (7) = 2 - 0 = 2; \\ x_{2} (15) & = x_{1} (11) - W_{16}^{4} x_{1} (15) = 0 - ( - j)0 = 0; \\ \end{aligned} $$

where the intermediate second-stage output sequence \( x_{2} \left( n \right) \) becomes the input sequence to the next one.

  • Stage 3

$$ \begin{aligned} x_{3} (0) & = x_{2} (0) + W_{16}^{0} x_{2} (2) = 3 + 3 = 6; \\ x_{3} (8) & = x_{2} (8) + W_{16}^{2} x_{2} (10) = j + (0.707 - j0.707)(1) = 0.707 + j0.2929; \\ x_{3} (4) & = x_{2} (4) + W_{16}^{4} x_{2} (6) = 1 + ( - j)( - 1) = 1 + j; \\ x_{3} (12) & = x_{2} (12) + W_{16}^{6} x_{2} (14) = ( - j) + ( - 0.707 - j0.707)(1) = - 0.707 - j1.707; \\ x_{3} (2) & = x_{2} (0) - W_{16}^{0} x_{2} (2) = 3 - 3 = 0; \\ x_{3} (10) & = x_{2} (8) - W_{16}^{2} x_{2} (10) = j - (0.707 - j0.707)(1) = - 0.707 + j1.707; \\ x_{3} (6) & = x_{2} (4) - W_{16}^{4} x_{2} (6) = 1 - ( - j)( - 1) = 1 - j; \\ x_{3} (14) & = x_{2} (12) - W_{16}^{6} x_{2} (14) = ( - j) - ( - 0.707 - j0.707)(1) = 0.707 - j0.2929; \\ x_{3} (1) & = x_{2} (1) + W_{16}^{0} x_{2} (3) = 2 + 2 = 4; \\ x_{3} (9) & = x_{2} (9) + W_{16}^{2} x_{2} (11) = 0 + (0.707 - j0.707)0 = 0; \\ x_{3} (5) & = x_{2} (5) + W_{16}^{4} x_{2} (7) = - 2 + ( - j)2 = - 2 - 2j; \\ x_{3} (13) & = x_{2} (13) + W_{16}^{6} x_{2} (15) = 0 - ( - 0.707 - j0.707)0 = 0; \\ x_{3} (3) & = x_{2} (1) - W_{16}^{0} x_{2} (3) = 2 - 2 = 0; \\ x_{3} (11) & = x_{2} (9) - W_{16}^{2} x_{2} (11) = 0 - (0.707 - j0.707)0 = 0; \\ x_{3} (7) & = x_{2} (5) - W_{16}^{4} x_{2} (7) = - 2 - 0 = -2; \\ x_{3} (15) & = x_{2} (13) - W_{16}^{6} x_{2} (15) = 0 - ( - j)0 = 0; \\ \end{aligned} $$

where the intermediate third-stage output sequence \( x_{3} \left( n \right) \) becomes the input sequence to the final stage.

  • Stage 4

$$ \begin{aligned} X(0) & = x_{3} (0) + W_{16}^{0} x_{3} (1) = 6 + 4 = 10; \\ X(1) & = x_{3} (8) + W_{16}^{1} x_{3} (9) = 0.707 + j0.2929; \\ X(2) & = x_{3} (4) + W_{16}^{2} x_{3} (5) = - 1.8284 + j; \\ X(3) & = x_{3} (12) + W_{16}^{3} x_{3} (13) = - 0.707 - j1.707; \\ X(4) & = x_{3} (2) + W_{16}^{4} x_{3} (3) = 0; \\ X(5) & = x_{3} (10) + W_{16}^{5} x_{3} (11) = - 0.707 + j1.707; \\ X(6) & = x_{3} (6) + W_{16}^{6} x_{3} (7) = 3.8284 - j; \\ X(7) & = x_{3} (14) + W_{16}^{7} x_{3} (15) = 0.707 - j0.2929; \\ X(8) & = x_{3} (0) - W_{16}^{0} x_{3} (1) = 2; \\ X(9) & = x_{3} (8) - W_{16}^{1} x_{3} (9) = 0.7071 + j0.2929; \\ X(10) & = x_{3} (4) - W_{16}^{2} x_{3} (5) = 3.8284 + j; \\ X(11) & = x_{3} (12) - W_{16}^{3} x_{3} (13) = - 0.707 - j1.707; \\ X(12) & = x_{3} (2) - W_{16}^{4} x_{3} (3) = 0; \\ X(13) & = x_{3} (10) - W_{16}^{5} x_{3} (11) = - 0.707 + j1.707; \\ X(14) & = x_{3} (6) - W_{16}^{6} x_{3} (7) = - 1.8284 - j; \\ X(15) & = x_{3} (14) - W_{16}^{7} x_{3} (15) = 0.707 - j0.2929; \\ \end{aligned} $$

4.7.2 In-Place Computation

In the implementation of the DIT FFT algorithm, only one complex array of N storage registers is physically necessary, since the complex numbers resulting from the mth stage can be stored in the same registers that had stored the complex numbers resulting from the (m − 1)th stage, once the output variables of the mth stage have been determined from the output numbers of the (m − 1)th stage. This type of computation is referred to as in-place computation. Thus, for in-place computation in the DIT algorithm in which the DFT samples appear in the natural order (i.e., \( X\left( k \right) \), k = 0, 1, …, N − 1), the input sequence samples are to be stored in index bit-reversed order. If \( x\left( {b_{2} b_{1} b_{0} } \right) \) represents the sample \( x\left( n \right) \) in the index bit-reversed binary form, then the sample \( x\left( {b_{2} b_{1} b_{0} } \right) \) would appear in the location of the sample \( x\left( {b_{0} b_{1} b_{2} } \right) \) of the input sequence to the DIT algorithm. For an eight-point DFT, the bit-reversal process is shown in Table 4.5.

Table 4.5 Bit-reversal process for N = 8

4.7.3 Decimation-in-Frequency FFT Algorithm with Radix-2

The basic idea in the decimation-in-time (DIT) algorithm was to decompose the input sequence successively into smaller and smaller subsequences. In the case of decimation-in-frequency (DIF) algorithm, we decompose the N-point DFT sequence \( X\left( k \right) \) successively into smaller and smaller subsequences. Consider an input sequence x(n), and divide it into two halves. Then, the DFT of x(n) can be written as

$$ X\left( k \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} x\left( n \right)W_{N}^{nk} + \mathop \sum \limits_{n = N/2}^{{\left( {N/2} \right) - 1}} x\left( n \right)W_{N}^{nk} $$
(4.75a)

The above equation can be rewritten as

$$ X\left( k \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} x\left( n \right)W_{N}^{nk} + W_{N}^{kN/2} \mathop \sum \limits_{n = N/2}^{{\left( {N/2} \right) - 1}} x\left( {n + \frac{N}{2}} \right)W_{N}^{nk} $$
(4.75b)

Since \( W_{N}^{Nk/2} = \left( { - 1} \right)^{k} \), Eq. (4.75b) becomes

$$ X\left( k \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} \left[ {x\left( n \right) + \left( { - 1} \right)^{k} x\left( {n + \frac{N}{2}} \right)} \right]W_{N}^{nk} $$
(4.75c)

Now, splitting \( X\left( k \right) \) into even-indexed and odd-indexed samples, Eq. (4.75c) can be written as consisting of two (N/2)-point DFTs for k = 0,1, …, (N/2)−1.

$$ X\left( {2k} \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} \left[ {x\left( n \right) + x\left( {n + \frac{N}{2}} \right)} \right]W_{N/2}^{nk} $$
(4.76a)
$$ X\left( {2k + 1} \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} \left[ {x\left( n \right) - x\left( {n + \frac{N}{2}} \right)} \right]W_{N}^{n} W_{N/2}^{nk} $$
(4.76b)

Let

$$ x_{1} \left( n \right) = x\left( n \right) + x\left( {n + \frac{N}{2}} \right) \quad n = 0,1,2, \ldots ,\left( {\frac{N}{2}} \right) - 1 $$
(4.77a)
$$ x_{2} \left( n \right) = x\left( n \right) - x\left( {n + \frac{N}{2}} \right)W_{N}^{n} \quad n = 0,1,2, \ldots ,\left( {\frac{N}{2}} \right) - 1 $$
(4.77b)

Then, the even- and odd-indexed \( X\left( k \right) \)’s are found from the (N/2)-point transforms of \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) as

$$ X\left( {2k} \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} x_{1} \left( n \right)W_{N/2}^{nk} $$
(4.78a)

and

$$ X\left( {2k + 1} \right) = \mathop \sum \limits_{n = 0}^{{\left( {N/2} \right) - 1}} x_{2} \left( n \right)W_{N/2}^{nk} $$
(4.78b)

Repeating the process for each of the sequences \( x_{1} \left( n \right) \) and \( x_{2} \left( n \right) \) yields the two (N/4)-point sequences

$$ \begin{aligned} x_{11} (n) & = x_{1} (n) + x_{1} (n + \frac{N}{4})\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ x_{12} \left( n \right) & = \left( {x_{1} \left( n \right) - x_{1} \left( {n + \frac{N}{4}} \right)} \right)W_{N}^{2n} \quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.79a)

and \( x_{2} (n) \) yields

$$ \begin{aligned} x_{21} (n) & = x_{2} (n) + x_{2} (n + \frac{N}{4})\quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ x_{22} (n) & = \left( {x_{2} (n) - x_{2} \left({ n + \frac{N}{4}}\right)} \right)W_{N}^{2n} \quad \quad n = 0,1, \ldots ,(N/4) - 1 \\ \end{aligned} $$
(4.79b)

Then, the even- and odd-indexed \( X\left( k \right) \)’s are found from the (N/4)-point transforms of \( x_{11} \left( n \right), x_{12} \left( n \right), x_{21} \left( n \right) \) and \( x_{22} \left( n \right) \) as

$$ \begin{aligned} & X\left( {4k} \right) = \sum\limits_{n = 0}^{{\left( {N/4} \right) - 1}} {} x_{11} \left( n \right)W_{N/4}^{nk} \\ & X\left( {4k + 2} \right) = \sum\limits_{n = 0}^{{\left( {N/4} \right) - 1}} {} x_{12} \left( n \right)W_{N/4}^{nk} \\ & X\left( {4k + 1} \right) = \sum\limits_{n = 0}^{{\left( {N/4} \right) - 1}} {} x_{21} \left( n \right)W_{N/4}^{nk} \\ & X\left( {4k + 3} \right) = \sum\limits_{n = 0}^{{\left( {N/4} \right) - 1}} {} x_{22} \left( n \right)W_{N/4}^{nk} \\ \end{aligned} $$
(4.80)

The process is to be continued until they reduce to two-point transforms.

For example, for N = 4, the two twiddle factors needed are \( W_{4}^{0} = 1 \) and \( W_{4}^{1} = - j \). The DIF flow graph for a four-point DFT contains two stages as shown in Fig. 4.13. The outputs of the two stages are computed as follows:

Fig. 4.13
figure 13

Decomposition of a four-point DFT using the DIF algorithm

  • Stage 1

$$ \begin{aligned} & x_{1} \left( 0 \right) = x\left( 0 \right) + x\left( 2 \right) \\ & x_{1} \left( 1 \right) = x\left( 1 \right) + x\left( 3 \right) \\ & x_{1} \left( 2 \right) = \left[ {x\left( 0 \right) - x\left( 2 \right)} \right]w_{4}^{0} \\ & x_{1} \left( 3 \right) = \left[ {x\left( 1 \right) - x\left( 3 \right)} \right]w_{4}^{1} \\ \end{aligned} $$

where \( x_{1} \left( 0 \right),\;x_{1} \left( 1 \right),\;x_{1} \left( 2 \right) \) and \( x_{1} \left( 3 \right) \) represent the intermediate output sequence after the first stage, which become the input to the second stage.

  • Stage 2

$$ \begin{aligned} X\left( 0 \right) & = x_{1} \left( 0 \right) + x_{1} \left( 1 \right) \\ X\left( 1 \right) & = x_{1} \left( 2 \right) + x_{1} \left( 3 \right) \\ X\left( 2 \right) & = x_{1} \left( 0 \right) - x_{1} \left( 1 \right) \\ X\left( 3 \right) & = x_{1} \left( 2 \right) - x_{1} \left( 3 \right) \\ \end{aligned} $$

For N = 8, the decomposition of an 8-point DFT into two 4-point DFTS with DIF algorithm is shown in Fig. 4.14.

Fig. 4.14
figure 14

Decomposition of an eight-point DFT using the DIF algorithm decimation-in-frequency

Example 4.21

Find the DFT of the sequence \( x\left( n \right) = \left( {1,2,3,4} \right) \) using the DIF algorithm.

Solution

The two twiddle factors needed are \( W_{4}^{0} = 1 \) and \( W_{4}^{1} = - j \).

The DIF flow graph for four-point DFT consists of two stages as shown in Fig. 4.15. The outputs of the two stages are computed as follows:

Fig. 4.15
figure 15

Flow graph for the four-point FFT of Example 4.21 using the DIF algorithm

  • Stage 1

$$ \begin{aligned} & \varvec{x}_{1} (0) = \varvec{x}(0) + \varvec{x}(2) = 4 \\ & \varvec{x}_{1} (1) = \varvec{x}(1) + x(3) = 6 \\ & \varvec{x}_{1} (2) = \left[ {\varvec{x}(0) - \varvec{x}(2)} \right]\varvec{W}_{4}^{0} = - 2 \\ & \varvec{x}_{1} (3) = \left[ {\varvec{x}(1) - \varvec{x}(3)} \right]\varvec{W}_{4}^{1} = 2\varvec{j} \\ \end{aligned} $$

where \( x_{1} \left( 0 \right),\;x_{1} \left( 1 \right),\;x_{1} \left( 2 \right) \) and \( x_{1} \left( 3 \right) \) represent the intermediate output sequence after the first stage, which become the input to the second stage.

  • Stage 2

$$ \begin{aligned} \varvec{X}(0) & = \varvec{x}_{1} (0) + \varvec{x}_{1} (1) = 10 \\ \varvec{X}(2) & = \varvec{x}_{1} (0) - \varvec{x}_{1} (1) = - 2 \\ \varvec{X}(1) & = \varvec{x}_{1} (2) + \varvec{x}_{1} (3) = - 2 + 2\varvec{j} \\ \varvec{X}(3) & = \varvec{x}_{1} (2) - \varvec{x}_{1} (3) = - 2 - 2\varvec{j} \\ \end{aligned} $$

Example 4.22

Find the DFT of a sequence \( x\left( n \right) = \left( {1,1,1,1,1,1,0,0} \right) \) using the DIF algorithm.

Solution

With N = 8, the four twiddle factors needed are

$$ \begin{aligned} \varvec{W}_{8}^{0} & = 1; \\ \varvec{W}_{8}^{1} & = {\mathbf{e}}^{ - {\varvec{j}}2\pi /8} = {\mathbf{e}}^{ - {\varvec{j}}\pi /4} = 0.707 - \varvec{j}0.707; \\ \varvec{W}_{8}^{2} & = {\mathbf{e}}^{ - {\varvec{j}}4\pi /8} = {\mathbf{e}}^{ - {\varvec{j}}\pi /2} = - \varvec{j}; \\ \varvec{W}_{8}^{3} & = {\mathbf{e}}^{ - {\varvec{j}}6\pi /8} = {\mathbf{e}}^{ - {\varvec{j}}3\pi /4} = - 0.707 - \varvec{j}0.707; \\ \end{aligned} $$
  • Stage 1

$$ \begin{aligned} x_{1} (0) & = x(0) + x(4) = 2; \\ x_{1} (1) & = x(1) + x(5) = 2; \\ x_{1} (2) & = x(2) + x(6) = 1; \\ x_{1} (3) & = x(3) + x(7) = 1; \\ x_{1} (4) & = [x(0) - x(4)]W_{8}^{0} = 0; \\ x_{1} (5) & = [x(1) - x(5)]W_{8}^{1} = 0; \\ x_{1} (6) & = [x(2) - x(6)]W_{8}^{2} = - j; \\ x_{1} (7) & = [x(3) - x(7)]W_{8}^{3} = - 0.707 - j0.707; \\ \end{aligned} $$

where \( x_{1} \left( 0 \right),x_{1} \left( 1 \right), \ldots ,x_{1} \left( 7 \right) \) represent the intermediate output sequence after the first stage, which become the input to the second stage.

  • Stage 2

$$ \begin{aligned} x_{2} (0) & = x_{1} (0) + x_{1} (2) = 3; \\ x_{2} (1) & = x_{1} (1) + x_{1} (3) = 3; \\ x_{2} (2) & = [x_{1} (0) - x_{1} (2)]W_{8}^{0} = 1; \\ x_{2} (3) & = [x_{1} (1) - x_{1} (3)]W_{8}^{2} = - j; \\ x_{2} (4) & = x_{1} (4) + x_{1} (6) = - j; \\ x_{2} (5) & = x_{1} (5) + x_{1} (7) = - 0.707 - j0.707; \\ x_{2} (6) & = [x_{1} (4) - x_{1} (6)]W_{8}^{0} = j; \\ x_{2} (7) & = [x_{1} (5) - x_{1} (7)]W_{8}^{2} = 0.707 - j0.707; \\ \end{aligned} $$

where \( x_{2} \left( 0 \right),\;x_{2} \left( 1 \right),\; \ldots ,\;x_{2} \left( 7 \right) \) represent the intermediate output sequence after the second stage, which become the input to the final stage.

  • Stage 3

We now use the notation of X’s to represent the final output sequence. The values \( X\left( 0 \right), \;X\left( 1 \right),\; \ldots ,\;X\left( 7 \right) \) form the output sequence.

$$ \begin{aligned} X(0) & = x_{2} (0) + x_{2} (1) = 6; \\ X(4) & = x_{2} (0) - x_{2} (1) = 0; \\ X(2) & = x_{2} (2) + x_{2} (3) = 1 - j1; \\ X(6) & = x_{2} (2) - x_{2} (3) = 1 + j1; \\ X(1) & = x_{2} (4) + x_{2} (5) = - 0.707 - j1.707; \\ X(5) & = x_{2} (4) - x_{2} (5) = 0.707 - j0.2929; \\ X(3) & = x_{2} (6) + x_{2} (7) = 0.707 + j0.2929; \\ X(7) & = x_{2} (6) - x_{2} (7) = - 0.707 + j1.707; \\ \end{aligned} $$

The DIF flow graph for eight-point DFT consists of three stages as shown in Fig. 4.16. The outputs of the three stages are computed in Fig. 4.16.

Fig. 4.16
figure 16

Flow graph of the eight-point FFT for the Example 4.22 using DIF algorithm

It should be noted that flow graph representing the DIF FFT may be considered as an in-place computation, just as in the case of the DIT FFT. Further, it should be noted that the input sequence \( x\left( n \right) \) is in order, while the output sequence \( X\left( k \right) \) is in bit-reversed order. The number of multiplications and additions for computing an N-point by DIF FFT is the same as in the case of the DIT FFT, namely \( \left( {N/2} \right)\log_{2} N \) and \( N\log_{2} N \), respectively.

It is worth pointing out that the flow graphs of DIT FFT and DIF FFT algorithms are transposes of one another.

4.7.4 Radix-4 DIF FFT Algorithm

If \( N = 2^{2\nu } \), then we can use radix-4 algorithms rather than radix-2 algorithms, and this gives us a reduction in the number of multiplications to be performed. Here, we will consider the radix-4 DIF algorithm. Radix-4 DIT algorithm can be developed in a way similar to that of the radix-2 DIT algorithm.

Consider a sequence \( x\left( n \right) \), and divide it into four parts so that the DFT of \( x\left( n \right) \) can be written as

$$ X(k) = \sum\limits_{n = 0}^{(N/4) - 1} {x(n)W_{N}^{nk} } + \sum\limits_{n = N/4}^{(N/2) - 1} {x(n)W_{N}^{nk} } + \sum\limits_{n = N/2}^{(3N/4) - 1} {x(n)W_{N}^{nk} } + \sum\limits_{n = 3N/4}^{N - 1} {x(n)W_{N}^{nk} } $$
(4.81)

The above equation can be rewritten as

$$ \begin{aligned} X(k) & = \sum\limits_{n = 0}^{(N/4) - 1} {x(n)W_{N}^{nk} + } W^{kN/4} \sum\limits_{n = 0}^{(N/4) - 1} {x(n + N/4)W_{N}^{nk} } \\ & \quad + W^{kN/2} \sum\limits_{n = 0}^{(N/4) - 1} {x(n + N/2)W_{N}^{nk} + } W^{k3N/4} \sum\limits_{n = 0}^{(N/4) - 1} {x(n + 3N/4)W_{N}^{nk} } \\ \end{aligned} $$
(4.82)

Substituting

$$ W_{N}^{kN/4} = e^{ - jk\pi /2} = ( - j)^{k} ;W_{N}^{kN/2} = e^{ - jk\pi } = ( - 1)^{k} ;W_{N}^{3kN/4} = (j)^{k} $$

in the above equation, we get

$$ X\left( k \right) = \mathop \sum \limits_{n = 0}^{{\frac{N}{4} - 1}} \left[ {x\left( n \right) + \left( { - j} \right)^{k} x\left( {n + \frac{N}{4}} \right) + \left( { - 1} \right)^{k} x\left( {n + \frac{N}{2}} \right) + \left( j \right)^{k} x\left( {n + \frac{3N}{4}} \right)} \right]W_{N}^{nk} $$
(4.83)

Since the twiddle factor depends on N, the above relation is not N/4-point DFT. To represent it as an N/4-point DFT, the DFT sequence is divided into four N/4-point subsequences, \( X\left( {4k} \right) \), \( X\left( {4k + 1} \right) \), \( X\left( {4k + 2} \right) \) and \( X\left( {4k + 3} \right) \) for \( k = 0, 1, \ldots \left( {\frac{N}{4} - 1} \right) \). Thus, the DIF FFT with radix-4 can be represented as

$$ X(4k) = \sum\limits_{n = 0}^{(N/4) - 1} {\left[ {x(n) + x(n + N/4) + x(n + N/2) + x(n + 3N/4)} \right]} W_{N/4}^{nk} $$
(4.84)
$$ \varvec{X}(4\varvec{k} + 1) = \sum\limits_{{\varvec{n} = 0}}^{{(\varvec{N}/4) - 1}} {\left[ {\varvec{x}(\varvec{n}) - \varvec{jx}(\varvec{n} + \varvec{N}/4) - \varvec{x}(\varvec{n} + \varvec{N}/2) + \varvec{jx}(\varvec{n} + 3\varvec{N}/4)} \right]} \varvec{W}_{\varvec{N}}^{\varvec{n}} \varvec{W}_{{\varvec{N}/4}}^{{\varvec{nk}}} $$
(4.85)
$$ \varvec{X}(4\varvec{k} + 2) = \sum\limits_{{\varvec{n} = 0}}^{{(\varvec{N}/4) - 1}} {\left[ {\varvec{x}(\varvec{n}) - \varvec{x}(\varvec{n} + \varvec{N}/4) + \varvec{x}(\varvec{n} + \varvec{N}/2) - \varvec{x}(\varvec{n} + 3\varvec{N}/4)} \right]} \varvec{W}_{\varvec{N}}^{{2\varvec{n}}} \varvec{W}_{{\varvec{N}/4}}^{{\varvec{nk}}} $$
(4.86)
$$ X(4k + 3) = \sum\limits_{n = 0}^{(N/4) - 1} {\left[ {x(n) + jx(n + N/4) - x(n + N/2) - jx(n + 3N/4)} \right]} W_{N}^{3n} W_{N/4}^{nk} $$
(4.87)

The following example illustrates a 16-point radix-4 FFT using the DIF procedure.

Example 4.23

Find the DFT of a sequence \( x\left( n \right) = \left\{ {1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1} \right\} \) using the radix-4 DIF algorithm.

Solution

The twiddle factors for 16-point radix-4 FFT are

$$ \begin{aligned} W_{16}^{0} & = 1;W_{16}^{1} = 0.9238 - j0.3826;W_{16}^{2} = 0.707 - j0.707; \\ W_{16}^{3} & = 0.3826 - j0.9238;W_{16}^{4} = 0 - j;W_{16}^{5} = - 0.3826 - j0.9238; \\ W_{16}^{6} & = - 0.707 - j0.707;W_{16}^{7} = - 0.9238 - j0.3826. \\ W_{4}^{0} & = 1;W_{4}^{1} = - j;W_{4}^{2} = - 1;W_{4}^{3} = + j;W_{4}^{4} = 1;W_{4}^{5} = - j; \\ W_{4}^{6} & = - 1;W_{4}^{7} = + j; \\ \end{aligned} $$

The outputs of the two stages are computed as follows:

  • Stage 1

$$ \begin{aligned} x_{1} (0) & = \left[ {x(0) + x(4) + x(8) + x(12)} \right]W_{16}^{0} = 1 + 1 + 0 + 1 = 3; \\ x_{1} (1) & = \left[ {x(1) + x(5) + x(9) + x(13)} \right]W_{16}^{0} = 1 + 0 + 1 + 1 = 3; \\ x_{1} (2) & = \left[ {x(2) + x(6) + x(10) + x(14)} \right]W_{16}^{0} = 0 + 1 + 1 + 1 = 3; \\ x_{1} (3) & = \left[ {x(3) + x(7) + x(11) + x(15)} \right]W_{16}^{0} = 1 + 1 + 1 + 1 = 4; \\ x_{1} (4) & = \left[ {x(0) - jx(4) - x(8) + jx(12)} \right]W_{16}^{0} = 1 - j - 0 + j = 1; \\ x_{1} (5) & = \left[ {x(1) - jx(5) - x(9) + jx(13)} \right]W_{16}^{1} = (1 - 0 - 1 + j)W_{16}^{1} = 0.3826 + j0.9238; \\ x_{1} (6) & = \left[ {x(2) - jx(6) - x(10) + jx(14)} \right]W_{16}^{2} = (0 - j - 1 + j)W_{16}^{2} = - 0.707 + j0.707; \\ x_{1} (7) & = \left[ {x(3) - jx(7) - x(11) + jx(15)} \right]W_{16}^{3} = (1 - j - 1 + j)W_{16}^{3} = 0; \\ x_{1} (8) & = \left[ {x(0) - x(4) + x(8) - x(12)} \right]W_{16}^{0} = 1 - 1 + 0 - 1 = - 1; \\ x_{1} (9) & = \left[ {x(1) - x(5) + x(9) - x(13)} \right]W_{16}^{2} = (1 - 0 + 1 - 1)W_{16}^{2} = 0.707 - j0.707; \\ x_{1} (10) & = \left[ {x(2) - x(6) + x(10) - x(14)} \right]W_{16}^{4} = (0 - 1 + 1 - 1)W_{16}^{4} = j; \\ x_{1} (11) & = \left[ {x(3) - x(7) + x(11) - x(15)} \right]W_{16}^{6} = (1 - 1 + 1 - 1)W_{16}^{6} = 0; \\ x_{1} (12) & = \left[ {x(0) + jx(4) - x(8) - jx(12)} \right]W_{16}^{0} = (1 + j - 0 - j)W_{16}^{0} = 1; \\ x_{1} (13) & = \left[ {x(1) + jx(5) - x(9) - jx(13)} \right]W_{16}^{3} = (1 - 0 - 1 - j)W_{16}^{3} = - 0.9238 - j0.3826; \\ x_{1} (14) & = \left[ {x(2) + jx(6) - x(10) - jx(14)} \right]W_{16}^{6} = (0 + j - 1 - j)W_{16}^{6} = 0.707 + j0.707; \\ x_{1} (15) & = \left[ {x(3) + jx(7) - x(11) - jx(15)} \right]W_{16}^{9} = (1 + j - 1 - j)W_{16}^{9} = (1 + j - 1 - j)W_{16}^{ - 1} = 0; \\ \end{aligned} $$
  • Stage 2

$$ \begin{aligned} X(0) & = \left[ {x_{1} (0) + x_{1} (1) + x_{1} (2) + x_{1} (3)} \right]W_{16}^{0} = 3 + 3 + 3 + 4 = 13; \\ X(1) & = \left[ {x_{1} (4) + x_{1} (5) + x_{1} (6) + x_{1} (7)} \right]W_{16}^{0} = 0.6756 + j1.6310; \\ X(2) & = \left[ {x_{1} (8) + x_{1} (9) + x_{1} (10) + x_{1} (11)} \right]W_{16}^{0} = - 0.2929 + j0.2929; \\ X(3) & = \left[ {x_{1} (12) + x_{1} (13) + x_{1} (14) + x_{1} (15)} \right]W_{16}^{0} = 0.7832 + j0.3244; \\ X(4) & = x_{1} (0) + jx_{1} (1) - x_{1} (2) + jx_{1} (3) = j; \\ X(6) & = x_{1} (8) + jx_{1} (9) - x_{1} (10) + jx_{1} (11) = - 1.7071 - j1.7071; \\ X(7) & = x_{1} (12) + jx_{1} (13) - x_{1} (14) + jx_{1} (15) = - 0.0898 + j0.2168; \\ X(8) & = x_{1} (0) + x_{1} (1) - x_{1} (2) - x_{1} (3) = - 1; \\ X(9) & = x_{1} (4) + x_{1} (5) - x_{1} (6) - x_{1} (7) = - 0.0898 - j0.2168; \\ X(10) & = x_{1} (8) + x_{1} (9) - x_{1} (10) - x_{1} (11) = - 1.7071 + j1.7071; \\ X(11) & = x_{1} (12) + x_{1} (13) - x_{1} (14) - x_{1} (15) = 2.6310 + j1.0898; \\ X(12) & = x_{1} (0) - jx_{1} (1) + x_{1} (2) - jx_{1} (3) = - j; \\ X(13) & = x_{1} (4) - jx_{1} (5) + x_{1} (6) - jx_{1} (7) = 0.7832 - j0.3244; \\ X(14) & = x_{1} (8) - jx_{1} (9) + x_{1} (10) - jx_{1} (11) = - 0.2929 - j0.2929; \\ X(15) & = x_{1} (12) - jx_{1} (13) + x_{1} (14) - jx_{1} (15) = 0.6756 - j1.6310; \\ \end{aligned} $$

The flow graph for the 16-point radix-4 DIF FFT is shown in Fig. 4.17. The (±) j and −1 are not shown in stage 2 for the four-point butterfly of the flow graph.

Fig. 4.17
figure 17

Sixteen-point DFT of Example 4.23 using radix-4 DIF algorithm

4.8 Comparison of Computational Complexity

As mentioned earlier, the number of complex multiplications required in the radix-2 FFT of an N-point sequence is \( \left( {N/2} \right)\log_{2} N \) while the number of complex additions needed is \( N\log_{2} N \).

In the radix-4 FFT of an N-point sequence, there are \( \log_{4} N = \left( {1/2} \right)\log_{2} N \) stages and (N/4) butterflies per stage. Each radix-4 butterfly requires three complex multiplications and eight complex additions. Thus, it requires \( \left( {3N/4} \right)\left( {1/2} \right)\log_{2} N = \left( {3N/8} \right)\log_{2} N \) complex multiplications and \( \left( {8N/4} \right)\left( {1/2} \right)\log_{2} N = N\log_{2} N \) complex additions.

A comparison of the computational complexity in terms of the number of complex multiplications needed to compute the DFT of an N-point sequence directly is compared to that required using radix-2 and radix-4 FFTs as given in Table 4.6.

Table 4.6 Comparison of the computational complexity for direct DFT and FFT

4.9 DFT Computation Using the Goertzel Algorithm and the Chirp Transform

While the fast Fourier transform’s various incarnations have gained considerable popularity, careful selection of an appropriate algorithm for computing the DFT in practice need not be limited to choosing between these so-called fast implementations. In this section, it is focused on two other techniques, namely the Goertzel algorithm and the chirp transform for computing the DFT.

4.9.1 The Goertzel Algorithm

The Goertzel algorithm [3] uses the periodicity of the sequence \( W_{N}^{nk} \) to reduce the computational complexity. From the definition of DFT, it is known that

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)W_{N}^{nk} } , \;W_{N} = e^{{\frac{ - j2\pi }{N} }} $$
(4.88a)

Equation (4.88a) can be rewritten as

$$ X\left( k \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)W_{N}^{{ - k\left( {N - n} \right)}} } ,\;W_{N}^{ - kN} = 1 $$

If a sequence \( y_{k} \left( n \right) \) is defined as

$$ y_{k} \left( n \right) = \mathop \sum \limits_{r = 0}^{N - 1} x\left( r \right)W_{N}^{{ - k\left( {n - r} \right)}} $$
(4.88b)

implying that passing a signal \( x\left( n \right) \) through an LTI filter with impulse response \( h\left( n \right) = W_{N}^{ - nk} u\left( n \right) \) and evaluating the result, \( y_{k} \left( n \right) \) at n = N will give the corresponding N-point DFT coefficient \( X\left( k \right) = y_{k} \left( n \right) \).

Representing the filter by its z-transform, we obtain

$$ \begin{aligned} H_{k} \left( z \right) & = \sum\limits_{n = 0}^{\infty } {} W_{N}^{ - nk} z^{ - n} \\ & = \frac{1}{{1 - W_{N}^{ - k} z^{ - 1} }} \\ \end{aligned} $$
(4.89)

having a pole on the unit circle at the frequency \( \omega_{k} = \frac{2\pi k}{N} \). Hence, the DFT can be computed by passing the block of input data into a parallel bank of N filters each filter having a pole at the frequency of the corresponding DFT. The DFT can be computed by using the following difference equation corresponding to the filter expressed by Eq. (4.89)

$$ y_{k} \left( n \right) = W_{N}^{ - k} y_{k} \left( {n - 1} \right) + x\left( n \right) y_{k} \left( { - 1} \right) = 0. $$
(4.90a)

The inherent complex multiplications and addition in Eq. (4.90a) can be avoided by using the following two-pole filter having complex conjugate pole pairs equivalent to the filtering operation represented by Eq. (4.89).

$$ \begin{aligned} H_{k} \left( z \right) & = \frac{{1 - W_{N}^{k} z^{ - 1} }}{{1 - W_{N}^{k} z^{ - 1} }} \frac{1}{{1 - W_{N}^{ - k} z^{ - 1} }} \\ & = \frac{{1 - W_{N}^{k} z^{ - 1} }}{{1 - \left( {2\cos \frac{2\pi k}{N}} \right)z^{ - 1} + z^{ - 2} }} \\ & = \frac{{Y_{k} \left( z \right)}}{X\left( z \right)} \\ \end{aligned} $$
(4.90b)

where \( = H_{1k} \left( z \right)H_{2k} \left( z \right) \)

$$ \begin{aligned} H_{2k} \left( z \right) & = \frac{{Y_{k} \left( z \right)}}{{v_{k} \left( z \right)}} = 1 - W_{N}^{k} z^{ - 1} \\ H_{1k} \left( z \right) & = \frac{{v_{k} \left( z \right)}}{X\left( z \right)} = \frac{1}{{1 - \left( {2\cos \frac{2\pi k}{N}} \right)z^{ - 1} + z^{ - 2} }} \\ \end{aligned} $$

From \( H_{1k} \left( z \right) \) and \( H_{2k} \left( z \right) \), we obtain the following difference equations

$$ v_{k} \left( n \right) = 2\cos \frac{2\pi k}{N}v_{k} \left( {n - 1} \right) - v_{k} \left( {n - 2} \right) + x\left( n \right) $$
(4.91a)
$$ y_{k} \left( n \right) = v_{k} \left( n \right) - W_{N}^{k} v_{k} \left( {n - 1} \right) $$
(4.91b)

with initial conditions \( v_{k} \left( { - 1} \right) = v_{k} \left( { - 2} \right) = 0 \).

The Goertzel algorithm evaluates X(k) at any M values of k instead of evaluating at all N values of k. Hence, it is more efficient than FFT [4] for computing DFT, when \( M \le \log_{2} \left( N \right) \).

Example 4.24

Considering the sequence \( x\left( n \right) = \left\{ {1,2,1,1} \right\} \), compute DFT coefficient X(1) and the corresponding spectral amplitude at the frequency bin k = 1 using the Goertzel algorithm.

Solution

We have k = 1, N = 4, \( x\left( 0 \right) = 1,\;x\left( 1 \right) = 2,\;x\left( 2 \right) = 1,\;x\left( 3 \right) = 1. \)

$$ 2\cos \frac{2\pi }{4} = 0, W_{4}^{1} = e^{{ - \frac{j2\pi }{4} }} = \cos \frac{\pi }{2} - j\,\sin \frac{\pi }{2} = - j $$

For n = 0, 1, …, 4

$$ \begin{aligned} v_{1} \left( n \right) & = - v_{1} \left( n - 2 \right)+ x( n ) \\ y_{1} \left( n \right) & = v_{1} \left( n \right) + jv_{1} \left( {n - 1} \right) \\ \end{aligned} $$

Then, \( X\left( 1 \right) = y_{1} \left( 4 \right) \quad \left| {X\left( 1 \right)} \right|^{2} = v_{1}^{2} \left( 4 \right) + v_{1}^{2} \left( 3 \right) \)

$$ \begin{aligned} X\left( 1 \right) & = y_{1} \left( 4 \right) = v_{1} \left( 4 \right) + jv_{1} \left( 3 \right) \\ v_{1} \left( 0 \right) & = - v_{1} \left( { - 2} \right) + x\left( 0 \right) = 1 \\ y_{1} \left( 0 \right) & = v_{1} \left( 0 \right) + jv_{1} \left( { - 1} \right) = 1 \\ v_{1} \left( 1 \right) & = - v_{1} \left( { - 1} \right) + x\left( 1 \right) = 2 \\ y_{1} \left( 1 \right) & = v_{1} \left( 1 \right) + jv_{1} \left( 0 \right) = 2 + j1 \\ v_{1} \left( 2 \right) & = - v_{1} \left( 0 \right) + x\left( 2 \right) = 0 \\ y_{1} \left( 2 \right) & = v_{1} \left( 2 \right) + jv_{1} \left( 1 \right) = j2 \\ v_{1} \left( 3 \right) & = - v_{1} \left( 1 \right) + x\left( 3 \right) = - 1 \\ y_{1} \left( 3 \right) & = v_{1} \left( 3 \right) + jv_{1} \left( 2 \right) = - 1 \\ v_{1} \left( 4 \right) & = - v_{1} \left( 2 \right) + x\left( 4 \right) = 0 \\ y_{1} \left( 4 \right) & = v_{1} \left( 4 \right) + jv_{1} \left( 3 \right) = - j \\ X\left( 1 \right) & = y_{1} \left( 4 \right) = - j \\ \left| {X\left( 1 \right)} \right|^{2} & = v_{1}^{2} \left( 4 \right) + v_{1}^{2} \left( 3 \right) = 1 \\ \end{aligned} $$

4.9.2 The Chirp Transform Algorithm

The chirp transform algorithm [5] is also based on expressing DFT as a convolution. As it can be used to compute the Fourier transform of any set of equally spaced samples on the unit circle, it is more flexible than the FFT.

If it is desired to compute the values of the z-transform of x(n) at a set of points {zk}, then,

$$ X\left( {z_{k} } \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)z_{k}^{ - n} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.92a)

Equation (4.92a) can be rewritten as

$$ X\left( {e^{{j\omega_{k} }} } \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)e^{{ - j\omega_{k} n}} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.92b)

where

$$ \omega_{k} = \omega_{0} + k\Delta \omega \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.92c)

Equation (4.92b) can be rewritten as,

$$ X\left( {e^{{j\omega_{k} }} } \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)e^{{ - j\left( {\omega_{0} + k\Delta \omega } \right)n}} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.92d)

For the DFT computation, \( \omega_{0} = 0 , \;\Delta \omega = \frac{2\pi }{N} \) and M = N.

Hence, Eq. (4.92d) becomes

$$ X\left( {e^{{j\omega_{k} }} } \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)e^{{ - j\frac{2\pi }{N}nk}} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.93a)
$$ X\left( {e^{{j\omega_{k} }} } \right) = \sum\limits_{n = 0}^{N - 1} {x\left( n \right)W_{N}^{nk} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.93b)

Using the identity

$$ nk = \frac{1}{2}\left( {n^{2} + k^{2} - \left( {k - n} \right)^{2} } \right)^{{}} $$

Equation (4.93b) can be written as

$$ X\left( {z_{k} } \right) = W_{N}^{{\frac{{k^{2} }}{2}}} \sum\limits_{n = 0}^{N - 1} {g\left( n \right)W_{N}^{{\frac{{ - \left( {k - n} \right)^{2} }}{2}}} } \quad \quad k = 0,1, \ldots ,M - 1 $$
(4.93c)

where

$$ g\left( n \right) = x\left( n \right)W_{N}^{{\frac{{n^{2} }}{2}}} $$

For notation convenience, replacing n by k and k by n in Eq. (4.93c), it can be rewritten as

$$ X\left( {z_{n} } \right) = W_{N}^{{\frac{{n^{2} }}{2}}} \sum\limits_{n = 0}^{N - 1} {g\left( k \right)W_{N}^{{\frac{{ - \left( {n - k} \right)^{2} }}{2}}} } \quad \quad n = 0,1, \ldots ,M - 1 $$
(4.94a)

Equation (4.94a) can also be expressed as

$$ X\left( {e^{{j\omega_{n} }} } \right) = W_{N}^{{\frac{{n^{2} }}{2}}} \sum\limits_{n = 0}^{N - 1} {g\left( k \right)W_{N}^{{\frac{{ - \left( {n - k} \right)^{2} }}{2}}} } \quad \quad n = 0,1, \ldots ,M - 1 $$
(4.94b)

implying that \( X\left( {e^{{j\omega_{n} }} } \right) \) is the convolution of the sequence g(n) with the sequence \( W_{N}^{{\frac{{ - n^{2} }}{2}}} \), premultiplied by the sequence \( W_{N}^{{\frac{{n^{2} }}{2}}} \), and the chirp filter impulse response is

$$ h\left( n \right) = W_{N}^{{\frac{{ - n^{2} }}{2}}} = \cos \frac{{\pi n^{2} }}{N} + j\,\sin \frac{{\pi n^{2} }}{N} $$
(4.95)

Thus, the block diagram of chirp transform system for DFT computation is shown in Fig. 4.18.

Fig. 4.18
figure 18

Block diagram of chirp transform system for DFT computation

4.10 Decimation-in-Time FFT Algorithm for a Composite Number

In the previous sections, we discussed FFT algorithms for radix-2 and radix-4 cases. However, it may not be possible in all cases to choose N to be a power of 2 or 4. We now consider the case where N is a composite number composed of a product of two factors \( n_{1} \) and \( n_{2} \), i.e., \( N = n_{1} n_{2} \), so that we can divide the sequence \( x\left( n \right) \) into \( n_{1} \) subsequences of length \( n_{2} \). Then, \( X\left( K \right) \) can be written as

$$ X(k) = \sum\limits_{n = 0}^{N - 1} {x(n)} W_{N}^{kn} $$
(4.88)
$$ \begin{aligned} & = \sum\limits_{i = 0}^{{n_{2} - 1}} {x(n_{1} i)} W_{N}^{{n_{1} ik}} + \sum\limits_{i = 0}^{{n_{2} - 1}} {x(n_{1} i + 1)} W_{N}^{k} W_{N}^{{n_{1} ik}} + \cdots \\ & \quad + \sum\limits_{i = 0}^{{n_{2} - 1}} {x(n_{1} i + n_{1} - 1)} W_{N}^{{(n_{1} - 1)k}} W_{N}^{{n_{1} ik}} \\ \end{aligned} $$
(4.89)

The above equation can be rewritten as

$$ X(k) = \sum\limits_{j = 0}^{{n_{1} - 1}} {W_{N}^{jk} } \sum\limits_{i = 0}^{{n_{2} - 1}} {x(n_{1} i + j)} W_{N}^{{n_{1} ik}} $$
(4.90)

Define

$$ F_{j} (k) = \sum\limits_{i = 0}^{{n_{2} - 1}} {x(n_{1} i + j)} W_{N}^{{n_{1} ik}} $$
(4.91)

Then, \( X\left( k \right) \) can be expressed in terms of \( n_{1} \) DFTs of sequences of length \( n_{2} \) samples as

$$ X(k) = \sum\limits_{j = 0}^{{n_{1} - 1}} {F_{j} (k)} W_{N}^{jk} $$
(4.92)

For illustration, consider computation of a 12-point DIT FFT (N = 12 = 3.4). The original sequence is divided into three sequences, each of length 4.

First sequence: \( x\left( 0 \right) x\left( 3 \right) x\left( 6 \right) x\left( 9 \right) \); second sequence: \( x\left( 1 \right)x\left( 4 \right)x\left( 7 \right)x\left( {10} \right); \)

Third sequence: \( x\left( 2 \right)x\left( 5 \right) x\left( 8 \right) x\left( {11} \right) \). Then, \( X\left( k \right) \) can be expressed as

$$ \begin{aligned} X(k) & = \sum\limits_{j = 0}^{2} {} W_{12}^{jk} \sum\limits_{i = 0}^{3} {x(3i + j)} W_{12}^{3ik} \\ & = F_{0} (k) + W_{12}^{k} F_{1} (k) + W_{12}^{2k} F_{2} (k) \\ \end{aligned} $$
(4.93)

The flow graph of the 12-point DFT is shown in Fig. 4.19.

Fig. 4.19
figure 19

Flow graph of a 12-point DIT FFT

4.11 The Inverse Discrete Fourier Transform

An FFT algorithm for computing the DFT can be effectively used to compute the inverse DFT. The inverse of an N-point DFT \( X(k) \) is given by

$$ x(n) = \frac{1}{N}\sum\limits_{k = 0}^{N - 1} {X(k)} W_{N}^{ - nk} $$
(4.94)

where \( W = \text{e}^{ - j2\pi /N} \). Multiplying both sides of the above expression by N and taking complex conjugates, we obtain

$$ Nx^{*} (n) = \sum\limits_{k = 0}^{N - 1} {X^{*} (k)} \;W_{N}^{nk} $$
(4.95)

The RHS of Eq. (4.94) is the DFT of the sequence \( X^{*} \left( k \right) \) and can be rewritten as

$$ Nx^{*} (n) = {\text{DFT}}\{ X^{ * } (k)\} $$
(4.96)

Taking the complex conjugate on both sides of Eq. (4.96) and using the FFT for the computation of DFT yield

$$ Nx\left( n \right) = \{ {\text{FFT}}\left\{ {X^{*} \left( k \right)} \right\}]^{*} $$

Hence,

$$ x\left( n \right) = \frac{1}{N}\{ {\text{FFT}}\left\{ {X^{*} \left( k \right)} \right\}]^{*} $$
(4.97)

The following example illustrates the IDFT computation using the DIT FFT algorithm:

Example 4.25

Find the eight-point IDFT using DIT algorithm.

Solution

Let the input be

$$ \begin{aligned} X\left( k \right) & = \;\left\{ {20, - 5.828 - j2.279, 0, - 0.172 - j0.279, 0,} \right. \\ & \quad \left. { - 0.172 + j0.279, 0, - 5.828 + j2.279} \right\} \\ \end{aligned} $$

Hence,

$$ \begin{aligned} X^{*} \left( k \right) = & \;\left\{ {20, - 5.828 + j2.279, 0, - 0.172 + j0.279, 0, } \right. \\ & \quad \left. { - 0.172 - j0.279, 0, - 5.828 - j2.279} \right\} \\ \end{aligned} $$

With N = 8, the four twiddle factors are

$$ \begin{aligned} W_{8}^{0} & = 1;W_{8}^{1} = \text{e}^{ - {j}2\pi /8} = \cos (\pi /4) - j\sin (\pi /4) = 0.707 - j0.707; \\ W_{8}^{2} & = \text{e}^{ - {j}4\pi /8} = - j;W_{8}^{3} = \text{e}^{ - {j}6\pi /8} = - 0.707 - j0.707; \\ \end{aligned} $$

The flow diagram for the eight-point inverse DFT using the DIT algorithm is shown in Fig. 4.20.

Fig. 4.20
figure 20

Eight-point inverse DFT of Example 4.24 using the DIT algorithm

  • Stage 1

$$ \begin{aligned} x_{1} \left( 0 \right) & = X^{*} \left( 0 \right) + W_{8}^{0} X^{*} \left( 4 \right) = 20 + 0 = 20 \\ x_{1} \left( 4 \right) & = X^{*} \left( 0 \right) - W_{8}^{0} X^{*} \left( 4 \right) = 20 - 0 = 20 \\ x_{1} \left( 2 \right) & = X^{*} \left( 2 \right) + W_{8}^{0} X^{*} \left( 6 \right) = 0 + 0 = 0 \\ x_{1} \left( 6 \right) & = X^{*} \left( 2 \right) - W_{8}^{0} X^{*} \left( 4 \right) = 0 - 0 = 0 \\ x_{1} \left( 1 \right) & = X^{*} \left( 1 \right) + W_{8}^{0} X^{*} \left( 5 \right) = - 5.828 + j2.279 - 0.172 - j0.279 = - 6 + j2 \\ x_{1} \left( 5 \right) & = X^{*} \left( 1 \right) - W_{8}^{0} X^{*} \left( 5 \right) = - 5.828 + j2.279 + 0.172 + j0.279 = - 5.656 + j2.558 \\ x_{1} \left( 3 \right) & = X^{*} \left( 3 \right) + W_{8}^{0} X^{*} \left( 7 \right) = - 0.172 + j0.279 - 5.828 - j2.279 = - 6 - j2 \\ x_{1} \left( 7 \right) & = X^{*} \left( 3 \right) - W_{8}^{0} X^{*} \left( 7 \right) = - 0.172 + j0.279 + 5.828 + j2.279 = 5.656 + j2.558 \\ \end{aligned} $$
  • Stage 2

$$ \begin{aligned} x_{2} (0) & = x_{1} (0) + W_{8}^{0} x_{1} (2) = 20 + 0 = 20; \\ x_{2} (4) & = x_{1} (4) + W_{8}^{2} x_{1} (6) = 20 + 0 = 20; \\ x_{2} (2) & = x_{1} (0) - W_{8}^{0} x_{1} (2) = 20; \\ x_{2} (6) & = x_{1} (4) - W_{8}^{2} x_{1} (6) = 20; \\ x_{2} (1) & = x_{1} (1) + W_{8}^{0} x_{1} (3) = - 6 + 2j - 6 - 2j = - 12; \\ x_{2} (5) & = x_{1} (5) + W_{8}^{2} x_{1} (7) = - 5.656 + j2.558 + ( - j)(5.656 + j2.558) = - 3.098 - j3.098; \\ x_{2} (3) & = x_{1} (1) - W_{8}^{0} x_{1} (3) = - 6 + 2j + 6 + 2j = 4j; \\ x_{2} (7) & = x_{1} (5) - W_{8}^{2} x_{1} (7) = - 5.656 + j2.558 + j5.656 - 2.558 = - 8.214 + j8.224; \\ \end{aligned} $$
  • Stage 3

$$ \begin{aligned} x_{3} (0) & = x_{2} (0) + W_{8}^{0} x_{2} (1) = 20 - 12 = 8; \\ x_{3} (1) & = x_{2} (4) + W_{8}^{1} x_{2} (5) = 20 + ( - 3.098 - j3.098)(0.707 - j0.707) = 16.0006; \\ x_{3} (2) & = x_{2} (2) + W_{8}^{2} x_{2} (3) = 20 + ( - j)(4j) = 24; \\ x_{3} (3) & = x_{2} (6) + W_{8}^{3} x_{2} (7) = 20 + ( - 0.707 - j0.707)( - 8.214 + j8.214) = 31.9982; \\ x_{3} (4) & = x_{2} (0) - W_{8}^{0} x_{2} (1) = 20 + 12 = 32; \\ x_{3} (5) & = x_{2} (4) - W_{8}^{1} x_{2} (5) = 20 - ( - 3.098 - j3.098)(0.707 - j0.707) = 23.9994; \\ x_{3} (6) & = x_{2} (2) - W_{8}^{2} x_{2} (3) = 20 - ( - j)(4j) = 16; \\ x_{3} (7) & = x_{2} (6) - W_{8}^{3} x_{2} (7) = 20 - ( - 0.707 - j0.707)( - 8.214 + j8.214) = 8.0018; \\ \end{aligned} $$

Therefore,

$$ 8x^{*} \left( n \right) = \left\{ {8, 16, 24, 32, 32, 24, 16, 8} \right\} $$

Hence,

$$ x\left( n \right) = \left\{ {1, 2, 3, 4, 4, 3, 2, 1} \right\} $$

4.12 Computation of DFT and IDFT Using MATLAB

The built-in MATLAB functions fft(x) and ifft(x) can be used for the computation of the DFT and the IDFT, respectively. The functions use computationally efficient FFT algorithms.

Example 4.26

Consider the input sequence \( x\left( n \right) = \left\{ {1,1,1,1,0,0,1,1} \right\} \) of Example 4.5. Compute the DFT using MATLAB.

Solution

Execution of fft(x) yields the DFT of \( x\left( n \right) \) as

$$ \begin{aligned} & 6.000\quad 1.7071 - 0.7071i - 1.0000 + 1.0000i \quad 0.2929 - 0.7071i\quad 0 \\ & 0.2929 + 0.7071i - 1.0000 - 1.0000i\quad 1.7071 + 0.7071i \\ \end{aligned} $$

which is equivalent to the DFT computed using the definition of DFT as in Example 4.3.

Example 4.27

Consider the input

$$ \begin{aligned} X\left( k \right) = & \;\left\{ {20, - 5.828 - j2.279, 0, - 0.172 - j0.279, 0, } \right. \\ & \quad \left. { - 0.172 + j0.279, 0, - 5.828 + j2.279} \right\} \\ \end{aligned} $$

of Example 4.24. Compute IDFT using MATLAB.

Solution

Execution of ifft(X) yields the IDFT of X as

$$ \begin{array}{*{20}l} {1.0} \hfill & {2.0} \hfill & {3.0} \hfill & {4.0} \hfill & {4.0} \hfill & {3.0} \hfill & {2.0} \hfill & {1.0} \hfill \\ \end{array} $$

which is the same as the result obtained in Example 4.24.

4.13 Application Examples

4.13.1 Detection of Signals Buried in Noise

One of the applications of the DFT-based spectral analysis is to detect the signals buried in noise. For example, consider a noisy signal with K sinusoidal components with unknown frequencies \( f_{1} ,f_{2} , \ldots ,f_{K} \) given by

$$ x\left( n \right) = \mathop \sum \limits_{i = 1}^{K} \frac{{2\pi nf_{i} }}{{F_{T} }} + \eta \left( n \right)\quad0 \le n \le N $$
(4.98)

where \( \eta (n) \) is additive white noise. The unknown frequencies \( f_{1} ,f_{2} , \ldots ,f_{K} \) can be detected by using DFT. For simulation, a signal with two (K = 2) sinusoidal components N = 1024 and the sampling frequency \( F_{\text{T}} = 1000\;{\text{Hz}} \) are assumed. The following MATLAB program is used to generate the noisy signal and to detect the unknown frequencies by applying the DFT on the generated noisy signal.

Program 4.1

Detection of signals buried in noise

  • clear;clc;

  • N = 1024;

  • K=2;

  • x =randn(1,N);% random noise generation

  • \( F_{T} = \)1000; % sampling frequency

  • T = 1/\( F_{T} \); % sampling time period

  • k=1:N;

  • f=(\( F_{T} \)/2)*rand(1,K); %random generation of unknown frequencies

  • for i=1:K

  •    x=x+sin(2*pi*f(i)*k*T); % noisy signal with sinusoidal components

  • end

  • t = k*T;

  • figure(1),plot (t(1:N/8),x(1:N/8))

  • xlabel(′Time(sec)′);ylabel(′Magnitude′);

  • % Compute and plot power density spectrum

  • figure(2),

  • X= abs(fft(x));

  • S = X.^2/N;

  • f = linspace (0,(N-1)*Fs/N,N);

  • plot (f(1:N/2),S(1:N/2))

  • set(gca,′Xlim′,[0,Fs/2])

  • xlabel(′Frequency (Hz)′);

  • ylabel(′Power spectrum′)

  • % Finding frequencies

  • s = f_prompt (′Enter threshold for locating peaks′,0,max(S),.7*max(S));

  • for i = 1: N/2

  •    if (S(i)>s)

  •      fprintf (′f = %.0f Hz\n′,f(i))

  •    end

  • end

For a random run of the above program, the noisy signal and its power spectral density are shown in Fig. 4.21a, b, respectively, and the two unknown frequencies are identified as \( f_{1} = 322\;{\text{Hz}} \) and \( f_{2} = 411\;{\text{Hz}} \).

Fig. 4.21
figure 21

a Noisy signal and b power spectrum density of the noisy signal

4.13.2 Denoising of a Speech Signal

The DFT can be applied to Fourier domain filtering which is equivalent to circular convolution of a sequence of finite length with an ideal impulse response of finite length. This approach is useful in denoising a signal for suppressing high-frequency noise from a low-frequency signal corrupted with noise. For purpose of illustration, we considered the speech signal ‘To take good care of yourself’ from sound file ‘goodcare.wav’. The following MATLAB program is used to read the speech signal from the wav file and to add noise to the speech signal and to reconstruct the original speech signal by performing circular convolution of the noisy speech signal with finite length impulse response.

%Program 4.2

Denoising using circular convolution

  • clear;clc;

  • [x,fs]=wavread(′goodcare.wav′);

  • wavplay(x,fs)% listen to original speech signal

  • no=0.075*randn(1,length(x));% noise generation

  • xn=x+no′;%add noise to original speech signal

  • wavplay(xn,fs)%listen to noisy speech signal

  • figure(1),plot(x);xlabel(′Number of samples′);ylabel(′Amplitude′);

  • figure(2),plot(xn);xlabel(′Number of samples′);ylabel(′Amplitude′);

  • h=ones(1,64)/64;y=fftfilt(h,xn);%perform denoising

  • wavplay(12*y,fs);% listen to recovered speech signal

  • figure(3),plot(12*y);xlabel(′Number of samples′);ylabel(′Amplitude′);

The speech signal, the noisy speech signal, and the recovered speech signal after denoising, obtained from the above MATLAB program, are shown in Figs. 4.22a–c, respectively. From these figures, it can be observed that the recovered speech signal after denoising is nearly same as the original signal.

Fig. 4.22
figure 22

a Speech signal, b noisy speech signal, and c recovered speech signal after denoising

4.13.3 DTMF Tone Detection Using Goertzel Algorithm

Dual-tone multifrequency (DTMF) signaling is widely used worldwide for voice communications in modern telephony to dial numbers and configure switch boards. It is also used in voice mail, electronic mail, and telephone banking.

DTMF signaling uses two tones to represent each key on the touch pad. There are 12 distinct tones. When any key is pressed, the tone of the column and the tone of the row are generated. As an example, pressing the ‘5’ button generates the tones 770 Hz and 1336 Hz. In this example, use the number 10 to represent the ‘*’ key and 11 to represent the ‘#’ key.

The frequencies were chosen to avoid harmonics: No frequency is a multiple of another, the difference between any two frequencies does not equal any of the frequencies, and the sum of any two frequencies does not equal any of the frequencies.

The industry standard frequency specifications for all the keys are listed in Fig. 4.23.

Fig. 4.23
figure 23

DTMF tone specifications

The DTMF signals for each button on telephone pad are shown in Fig. 4.24. The MATLAB program to generate the DTMF signals is listed in Program 4.3.

Fig. 4.24
figure 24

Time responses of each tone of the telephone pad

Program 4.3

  • %MATLAB program DTMF tones generation

  • clear all;clc;

  • Fs = 8000;N = 205;t=[0:1:204]/Fs;

  • lf=[697;770;852;941];hf=[1209;1336;1477];

  • ylf1=sin(2*pi*lf(1)*(0:N-1)/Fs);ylf2=sin(2*pi*lf(2)*(0:N-1)/Fs);

  • ylf3=sin(2*pi*lf(3)*(0:N-1)/Fs);ylf4=sin(2*pi*lf(4)*(0:N-1)/Fs);

  • yhf1=sin(2*pi*hf(1)*(0:N-1)/Fs);yhf2=sin(2*pi*hf(2)*(0:N-1)/Fs);

  • yhf3=sin(2*pi*hf(3)*(0:N-1)/Fs);

  • y1=ylf1+yhf1;y2=ylf1+yhf2;y3=ylf1+yhf3;y4=ylf2+yhf1;

  • y5=ylf2+yhf2;y6=ylf2+yhf3;y7=ylf3+yhf1;y8=ylf3+yhf2;

  • y9=ylf3+yhf3;ystar=ylf4+yhf1;y0=ylf4+yhf2;yhash=ylf4+yhf3;

  • figure(1)

  • subplot(2,2,1);plot(t,y1);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:1,[697,1209]′);

  • subplot(2,2,2);plot(t,y2);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:2,[697,1336]′);

  • subplot(2,2,3);plot(t,y3);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:3,[697,1477]′);

  • subplot(2,2,4);plot(t,y4);

  • xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:4,[770,1209]′);

  • figure(2)

  • subplot(2,2,1);plot(t,y5);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:5,[770,1336]′);

  • subplot(2,2,2);plot(t,y6);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:6,[770,1477]′);

  • subplot(2,2,3);plot(t,y7);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:7,[852,1209]′);

  • subplot(2,2,4);plot(t,y8);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:8,[852,1336]′);

  • figure(3)

  • subplot(2,2,1);plot(t,y9);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:9,[852,1477]′);

  • subplot(2,2,2);plot(t,ystar);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:*,[941,1209]′);

  • subplot(2,2,3);plot(t,y0);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:0,[941,1336]′);

  • subplot(2,2,4);plot(t,yhash);xlabel(′time (seconds)′)

  • ylabel(′Amplitude′);grid;title(′symbol:#,[941,1477]′);

  • DTMF tone detection

The DTMF detection relies on the Goertzel algorithm (Goertzel filter). The main purpose of using the Goertzel filters is to calculate the spectral value at the specified frequency index using the filtering method. Its advantage includes the reduction of the required computations and avoidance of complex algebra. The detection of frequencies using Goertzel algorithm contained in each tone of the telephone pad is shown in Fig. 4.25. The MATLAB program for the tones detection using the Goertzel algorithm is listed in Program 4.4.

Fig. 4.25
figure 25

DTMF tone detection using Goertzel algorithm

Program 4.4

  • clear all;clc;

  • Fs = 8000;N = 205;load DTMFdata

  • f = [697 770 852 941 1209 1336 1477];

  • freq_indices = round(f/Fs*N) + 1;

  • for tonechoice=1:12

  • tonedata=DTMFs(tonechoice,:);

  • dft_data(tonechoice,:) = goertzel(tonedata,freq_indices);

  • end

  • figure(1)

  • subplot(2,2,1);stem(f,abs(dft_data(1,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:1,[697,1209]′);

  • subplot(2,2,2);stem(f,abs(dft_data(2,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:2,[697,1336]′);

  • subplot(2,2,3);stem(f,abs(dft_data(3,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:3,[697,1477]′);

  • subplot(2,2,4);stem(f,abs(dft_data(4,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:4,[770,1209]′);

  • figure(2)

  • subplot(2,2,1);stem(f,abs(dft_data(5,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:5,[770,1336]′);

  • subplot(2,2,2);stem(f,abs(dft_data(6,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:6,[770,1477]′);

  • subplot(2,2,3);stem(f,abs(dft_data(7,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:7,[852,1209]′);

  • subplot(2,2,4);stem(f,abs(dft_data(8,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:8,[852,1336]′);

  • figure(3)

  • subplot(2,2,1);stem(f,abs(dft_data(9,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:9,[852,1477]′);

  • subplot (2,2,2);stem(f,abs(dft_data(10,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:*,[941,1209]′);

  • subplot (2,2,3);stem(f,abs(dft_data(11,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:0,[941,1336]′);

  • subplot (2,2,4);stem(f,abs(dft_data(12,:)));ax = gca;ax.XTick = f;

  • xlabel(′Frequency(Hz′)

  • ylabel(′DFT magnitudetude′);grid;title(′symbol:#,[941,1477]′);

4.14 Problems

  1. 1.

    Determine the Fourier series representation for the following discrete-time signals:

    1. (a)

      \( x\left( n \right) = 3\sin \left( {\frac{\pi n}{4}} \right)\sin \left( {\frac{2\pi n}{5}} \right) \)

    2. (b)

      \( x\left( n \right) \) is periodic of period 8, and \( x\left( n \right) = n \) for \( 0 \le n \le 3 \), and \( x\left( n \right) = n \) for \( 4 \le n \le 7 \)

  2. 2.

    Compute the eight-point DFT of \( \left( { - 1} \right)^{n} \)

  3. 3.

    Find the four-point DFT of the following sequences

    1. (i)

      \( x\left( n \right) = \left\{ {1,2,1,1} \right\} \)

    2. (ii)

      \( x\left( n \right) = \sin \left( {n + 1} \right)\pi /4 \)

    3. (iii)

      \( x\left( n \right) = \left\{ {2, - 1,1, - 2} \right\}. \)

  4. 4.

    Find eight-point DFT of the following sequences

    1. (i)

      \( x\left( n \right) = \left\{ {1,0,1,0,0,1,1,0} \right\} \)

    2. (ii)

      \( x\left( n \right) = \cos \left( {n + 1} \right)\pi /2 \)

    3. (iii)

      \( x\left( n \right) = \left\{ {1,1,0,0,1,0,1,1} \right\} \)

  5. 5.

    Compute the eight-point DFT of the square-wave sequence:

    $$ x\left( n \right) = \left\{ {\begin{array}{*{20}l} {2 } & {0 \le n \le \left( {N/2} \right)} \\ { - 2 } & {\left( {N/2} \right) \le n < N - 1} \\ \end{array} } \right. $$
  6. 6.

    Find 16-point DFT of the following sequence:

    $$ x\left( n \right) = \left\{ {\begin{array}{*{20}c} {1 } & {0 \le n \le 7} \\ {0 } & {7 < n < 15} \\ \end{array} } \right. $$
  7. 7.

    Compute the eight-point circular convolution of

    $$ x_{1} \left( n \right) = \left\{ {1,1,0,1,0,1,1,0} \right\}\, {\text{and}}\,x_{2} \left( n \right) = \sin \left( {3\pi /4} \right), 0 \le n \le 7. $$
  8. 8.

    Find the output \( y\left( n \right) \) of a filter whose impulse response is \( h\left( n \right) = \left\{ {0,1,1} \right\} \) and the input signal is \( x\left( n \right) = \left\{ {1, - 2,0,1,0,2,1,2,2,1} \right\} \) using the overlap-add method.

  9. 9.

    Using linear convolution, find \( y\left( n \right) = x\left( n \right)*h\left( n \right) \) for the sequences \( x\left( n \right) = \left( {2, - 3,1,2,1,1, - 1, - 3,1,2,1, - 1} \right) \) and \( h\left( n \right) = \left( {2,1} \right) \). Compare the result by solving the problem using overlap-save method.

  10. 10.

    Compute the eight-point DFT of the following sequence using the radix-2 DIT algorithm for the following sequences:

    1. (i)

      \( x\left( n \right) = \left\{ {1,1, - 1,0,1,0,1, - 1} \right\} \)

    2. (ii)

      \( x\left( n \right) = \left\{ {1,2,1, - 1,2,1, - 1,1} \right\} \)

    3. (iii)

      \( x\left( n \right) = \left\{ {0.5,0,1,0.5,1,0,0.5,0.5} \right\} \)

  11. 11.

    Compute the eight-point DFT of the sequence \( x\left( n \right) = \left\{ {1,1, - 1,0,1,0,1, - 1} \right\} \) using the DIF algorithm

  12. 12.

    Find the 16-point DFT of the following sequence using radix-4 DIF algorithm.

    $$ x\left( n \right) = \left\{ {1,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1} \right\} $$
  13. 13.

    Compute DFT of the sequence \( x\left( n \right) = \left\{ {1,2,3,4} \right\} \) using the Goertzel algorithm

  14. 14.

    Develop the FFT algorithm for the composite number 18, and show the flow graph.

  15. 15.

    Find the IDFT of \( Y\left( k \right) = \left\{ {1,0,0,1} \right\} \).

  16. 16.

    Compute the IDFT of the sequence \( X\left( k \right) = \left\{ {3,j,1 + 2j,1 - j,1 + 2j,1,0, - j} \right\} \) using (a) DIT algorithm and (b) DIF algorithm.

4.15 MATLAB Exercises

  1. 1.

    Verify the results of Problem 10 of Sect. 4.13 using MATLAB.

  2. 2.

    Verify the results of Problem 14 of Sect. 4.13 using MATLAB.

  3. 3.

    Write a MATLAB program using the command circshift to compute circular convolution of two sequences and verify the result of Problem 7 of Sect. 4.13.

  4. 4.

    Verify the results of Problem 8 of Sect. 4.13 using MATLAB.