You are on page 1of 27

DISCRETE FOURIER TRANSFORM AND SIGNAL SPECTRUM 4.

1 DISCRETE FOURIER TRANSFORM: In time domain, representation of digital signals describes the signal amplitude versus the sampling time instant or the sample number. However, in some applications, signal frequency content is very useful otherwise than as digital signal samples. The representation of the digital signal in terms of its frequency component in a frequency domain, that is, the signal spectrum, needs to be developed. As an example, fig 4.1 illustrates the time domain representation of a 1,000-Hz sinusoid with 32 samples at a sampling rate of 8,000 Hz; the bottom plot shows the signal spectrum (frequency domain representation), where we can clearly observe that the amplitude peak is located at the frequency of 1,000 Hz in the calculated spectrum.

The fig. shows that, the spectral plot better displays frequency information of a digital signal. The algorithm transforming the time domain signal samples to the frequency domain components is known as the discrete Fourier transform, or DFT. The DFT also establishes a relationship between the time domain representation and the frequency domain representation. Therefore, we can apply the DFT to perform frequency analysis of a time domain sequence. In addition, the DFT is widely used in many other areas, including spectral analysis, acoustics, imaging/video, audio, instrumentation, and communications systems. To be able to develop the DFT and understand how to use it, we first study the spectrum of periodic digital signals using the Fourier series. 4.1.1 Fourier Series Coefficients of Periodic Digital Signals: Let us look at a process in which we want to estimate the spectrum of a periodic digital signal x(n) sampled at a rate of fs Hz with the fundamental period T0 = NT, as shown in fig 4.2, where there are N samples within the duration of the fundamental period and T = 1/fs is the sampling period. For the time being, we assume that the periodic digital signal is band limited to have all harmonic frequencies less than the folding frequency fs/2 so that aliasing does not occur.

130

According to Fourier series analysis, the coefficients of the Fourier series expansion of a periodic signal x(t) in a complex form is: 1 c k ! x(t ) e  jk [0t dt g k g (4.1) T0 T0
where k is the number of harmonics corresponding to the harmonic frequency of kf 0 and [ 0 ! 2T T0 and f 0 ! 1 T0 are the fundamental frequency in radians per second and the fundamental frequency in Hz, respectively. To apply equation (4.1), we substitute T0 ! NT , [ 0 ! 2T T0 and approximate the integration over one period using a summation by substituting dt ! T and t ! nT . We obtain:

1 ck ! N

x ( n) e
n !0

N 1

j 2T kn N

g

(4.2)

Since the coefficients c k are obtained from the Fourier series expansion in the complex form, the resultant spectrum ck will have two sides. There is an important feature of equation (4.2) in which the Fourier series coefficient c k is periodic of N. We can verify this as follows:
  1 N 1 1 N 1 N c k  N ! x(n) e ! x(n) e N e  j 2 T n N n !0 N n !0  j 2T n Since e ! Cos 2T n  jSin 2T n ! 1 , it follows that: c k  N ! ck j 2T ( k  N ) n j 2T kn

(4.3)

(4.4)

Therefore, the two-sided line amplitude spectrum c k is periodic, as shown in fig 4.3.

From the fig 4.3, we note the following points: (a) As displayed in fig., only the line spectral portion between the frequency  f s 2 and frequency f s 2 (folding frequency) represents the frequency information of the periodic signal. (b) Notice that the spectral portion from f s 2 to f s is a copy of the spectrum in the negative frequency range from  f s 2 to 0 Hz due to the spectrum being periodic for every Nf 0 Hz. Again,

131

the amplitude spectral components indexed from f s 2 to f s can be folded at the folding frequency to f s 2 match the amplitude spectral components indexed from 0 to f s 2 in terms of f s  f Hz, where f is in the range from f s 2 to f s . For convenience, we compute the spectrum over the range from 0 to f s Hz with nonnegative indices, that is:
 1 N 1 x ( n) e N n !0 j 2T kn N

ck !

k ! 0,1, 2 - - N  1

(4.5)

We can apply Equation (4.4) to find the negative indexed spectral values if they are required. (c) For the k th harmonic, the frequency is: (4.6) The frequency spacing between the consecutive spectral lines, called the frequency resolution, is f 0 Hz.

f ! kf 0 Hz

4.1.2 Discrete Fourier Transform Formulas: Now, let us concentrate on development of the DFT. fig 4.4 shows one way to obtain the DFT formula.

First, we assume that the process acquires data samples from digitizing the interested continuous signal for duration of T seconds. Next, we assume that a periodic signal x (n) is obtained by copying the acquired N data samples with the duration of T to itself repetitively. Note that we assume continuity between the N data sample frames. This is not true in practice. We determine the Fourier series coefficients using one-period N data samples and Equation (4.5). Then we multiply the Fourier series coefficients by a factor of N to obtain:
132

X (k ) ! Nck ! x(n) e
n! 0

N 1

j 2T kn N

k ! 0,1, 2 - - N  1

where (k ) constitutes the DFT coefficients. Notice that the factor of N is a constant and does not affect the relative magnitudes of the DFT coefficients (k ) . As shown in the last plot, applying DFT with N data samples of x (n) sampled at a rate of f s (sampling period is T ! 1 f s ) produces N complex DFT coefficients X (k ) . The index n is the time index representing the sample number of the digital sequence, whereas k is the frequency index indicating each calculated DFT coefficient, and can be further mapped to the corresponding signal frequency in terms of Hz. Now let us conclude the DFT definition. Given a sequence x ( n), 0 e n e N  1, its DFT is defined as:

X (k ) ! Nck ! x (n) e
n !0

N 1

j 2T kn N

kn ! x ( n) W N n! 0

N 1

k ! 0,1, 2 - - N  1
(4.7)

Equation (4.7) can be expanded as: X ( k ) ! x ( 0)W Nk 0  x (1)W Nk 1  - -  x ( N  1)W Nk ( N 1)

for

k ! 0, 1, 2 - - N  1

where the factor W N (called the twiddle factor in some textbooks) is defined as:

WN ! e

j 2T N

2T 2T ! Cos  jSin N N

The inverse DFT is given by:

x ( n) !

1 N 1 X (k ) e N n !0

j 2T kn N

 ! X (k ) WN kn n !0

N 1

n ! 0,1, 2 - - N  1
(4.10)

Similar to Equation (4.7), the expansion of Equation (4.10) leads to:

x (n) !

1 X (0)WN0 n  X (1)WN1n  - -  X ( N  1)WN ( N 1) n N for n ! 0,1, 2 - - N  1

As shown in fig 4.4, in time domain we use the sample number or time index n for indexing the digital sample sequence x (n) . However, in frequency domain, we use index k for indexing N calculated DFT coefficients X (k ) . We also refer to k as the frequency bin number in Equations (4.7) and (4.8). Now we explore the relationship between the frequency bin k and its associated frequency. Omitting the proof, the calculated N DFT coefficients X (k) represent the frequency components ranging from 0 Hz (or radians/second) to f s Hz (or [ s radians/second), hence we can map the frequency bin k to its corresponding frequency as follows: k[ s [! (Radians per second) (4.12) N or in terms of Hz, kf f ! s (Hz) (4.13) N
133

(4.8)

(4.9)

(4.11)

where [ s ! 2T f s . We can define the frequency resolution as the frequency step between two consecutive DFT coefficients to measure how fine the frequency domain presentation is and achieve: [ ([ ! s (Radians per second) (4.14) N or in terms of Hz, it follows that: f (4.15) (f ! s (Hz) N 4.2 AMPLITUDE, PHASE AND POWER SPECTRUM: One of the DFT applications is transformation of a finite-length digital signal x(n) into the spectrum in frequency domain. Fig 4.5 demonstrates such an application, where Ak and Pk are the computed amplitude spectrum and the power spectrum, respectively, using the DFT coefficients X(k). First, we achieve the digital sequence x(n) by sampling the analog signal x(t) and truncating the sampled signal with a data window with a length T0 = NT, where T is the sampling period and N the number of data points. The time for data window is: T0 = NT (4.16)

For the truncated sequence x(n) with a range of n = 0, 1, 2, . . . , N - 1, we get: x(0), x(1), x(2), . . . , x(N - 1) (4.17) Next, we apply the DFT to the obtained sequence, x(n), to get the N DFT coefficients:
X (k ) ! x ( n) W Nkn
n!0 N 1

k ! 0, 1, 2 - - N  1

(4.18) Since each calculated DFT coefficient is a complex number, it is not convenient to plot it versus its frequency index. Hence, after evaluating Equation (4.18), the magnitude and phase of each DFT coefficient (we refer to them as the amplitude spectrum and phase spectrum, respectively) can be determined and plotted versus its frequency index. We define the amplitude spectrum as: 1 1 (4.19) Ak ! X (k ) ! e al X (k ) 2  Im ag X (k ) 2 k ! 0,1, 2,- - , N  1 N N We can modify the amplitude spectrum to a one-sided amplitude spectrum by doubling the amplitudes in Equation (4.19), keeping the origina l DC term at, k = 0. Thus we have: 1 X ( 0 ) k !0 (4.20) Ak ! N 1 N X ( k ) k !1 - - N / 2 We can also map the frequency bin k to its corresponding frequency as:
134

kf s (Hz) N Correspondingly, the phase spectrum is given by: Im ag X (k ) N (k ) ! tan 1 k ! 0,1, 2,- - - , N  1 e al X (k ) Besides the amplitude spectrum, the power spectrum is also used. The DFT spectrum is defined as: 1 1 2 2 2 Im Pk ! 2 X ( k ) ! 2 e al X ( k )  ag X ( k ) k ! 0, 1, 2, - - , N  1 N N Similarly, for a one-sided power spectrum, we get: f !

(4.21)

(4.22) power (4.23)

k !0 X ( 0) (4.24) Pk ! N12 2 k !1 - - N / 2 N 2 X (k ) kf 1 v 10 and f ! s ! ! 2.5 Hz 4 N (4.25) Again, notice that the frequency resolution, which denotes the frequency spacing between DFT coefficients in frequency domain, is defined as: f (f ! s (Hz) (4.26) N It follows that better frequency resolution can be achieved by using a longer data sequence.
2

4.2 THE DFT AS A LINEAR TRANSFORMATION: DFT and IDFT both are linear transformations on sequence x (n) and X (k ) are discrete time sequence and discrete frequency sequence respectively. DFT and IDFT satisfy the principle of superposition. DFT is a linear transformation tools just like z transform. The DFT as a linear transformation is explained and studied by using matrices. DFT and IDFT can be computed by using matrices. Computation of N point DFT requires N X N complex multiplications and N (N 1) complex additions. N point DFT in matrix form is defined as: (4.27) X ( k ) ! W N x ( n) N point IDFT in matrix form is defined as: 1   (4.28) x ( n ) ! W N 1 X ( k ) ! W N X (k ) N  Where W N represents complex conjugate of W N and W N1 represents inverse of W N . WN is defined as: 1 1 1 1 1 W 1 2 N 1 WN WN N WN ! / W N2 W N4 WN2 N 1 / / / 1 W NN 1 W N2 N 1 - W N N 1 N 1 N point vector x (n) is defined as:

(4.29)

135

x (0 ) x (1) x(n) ! x ( N  1)

(4.30)

4.3 PROPERTIES OF THE DFT: Most of the properties of the DFT and z transform have some similarity because they have some relationship with each other. DFT also differs in some properties such as circular convolution property. Circular convolution is the special property of DFT of a discrete time sequence. There are several properties of the DFT play an improtant role in practical techniques for processing signals. These properties are given as follows: 1. Periodicity 2. Linearity 3. Symmetry 4. Circular convolution of two seqences 5. Time reversal of a sequence 6. Circular time shift of a sequence 7. Circular frequency shift of a sequence 8. Circular correlation of two sequences 9. Multiplication of two sequences 10. Parsevals theorem 4.3.1 Peridicity property: If a signal or sequence repeats its waveform after N samples then it is called a periodic signal or sequence and N is called as period of the signal or sequence. If a discrete time signal is periodic then its DFT will also be periodic. If x(n) is a discrete time signal and X(k) is the N point DFT of x(n), then: x ( n  N ) ! x ( n) for all values of n (4.31) This is true for periodic signals only. Similarly: X ( k  N ) ! X ( k ) for all values of k (4.32) This property is used in some applications of DSP such as in DFT algorithms used for linear filtering, power spectrum estimation etc. Proof: DTFT ?x(n)A! ?x(n)A e 2 T / N
n!0 N 1 n !0 N 1 kn

DTFT ?x(n  N )A ! ?x(n  N )A e 2 T / N ! ?x(n d  2 T / N 2 T / N e )Ae


kn k nd n !0

N 1

kN

)A ! ?x(n d e 2 T / N
n!0

N 1

k nd

! X (k )

e ?

j 2T k

! cos 2 T k  j sin 2 T k ! 1

4.3.2 Linearity property:


136

DFT also have a linear transform just like z transform. It satisfies the principle of superposition.
N  pt  N  pt  If x1 (n) n DFT p X 1 (k ) and x 2 (n ) n DFT p X 2 (k ) , then for any real valued

or complex valued constants A1 and A2 :


N  pt  A1 x1 ( n)  A2 x 2 (n ) n DFT p A1 X 1 ( k )  A2 X 2 ( k )

(4.33)

Proof: DTFT ?A1 x1 (n)  A2 x2 (n)A! ?A1 x1 (n)  A2 x 2 (n)A e  2 T / N


N 1 n!0 kn

! ?A1 x1 (n)A e  2 T / N
n!0

N 1

 ?A x
kn N 1 n!0 2

(n )A e  2 T / N

kn

! A1 X 1 (k )  A2 X 2 (k )

4.3.3 Symmetry property: If a signal or sequence repeats its waveform in a negative direction after N 2 number of samples, then it is called symmetric sequence or signal. Symmetry properties of the DFT are studied in two cases. Case 1: Signal x(n) and its DFT X(k) both are complex and periodic sequences. The symmetry properties of x(n) and X(k) in this case as given in the table. x(n) Complex conjugate x  (n ) Complex conjugate x  ( N  n) X(k) Complex conjugate X  ( N  k ) Complex conjugate X  (k )

Case 2: Now in this case x(n) is a real and periodic sequence but its DFT is complex and periodic sequence of N samples, then the symmetry properties of x(n) and X(k) in this case as given in the table. x(n) X(k) Conjugate even part 1 Real Part of complex sequence x R (n) X ce ( k ) ! X ( k )  X  ( N  k ) 2 Conjugate odd part 1 Imaginary Part of complex sequence jx I (n) X co ( k ) ! X ( k )  X  ( N  k ) 2 Conjugate even part 1 Real Part of complex sequence X R (k ) x ce ( n) ! x ( n)  x  ( N  n) 2 Conjugate odd part 1 Imaginary Part of complex sequence jX I (k ) x co ( n) ! x ( n)  x  ( N  n) 2 4.3.4 Circular convolution property:

137

This is the special property of the DFT. This property is not satisfied by z transform. Circular convolution is defined as:
x 3 (m ) ! x1 ( n) x 2 ?( m  n)AN
n! 0 N 1

(4.34)

Where m ! 0, 1, 2, - , N  1 and x 2 ? m  n AN is circular shift of sequence x 2 (n) . Circular convolution of two discrete time sequences x1 (n) and x 2 (n) is denoted by: x 3 ( n) ! x1 ( n) x 2 ( n ) Here denotes N point circular convolution of two sequences. Circular convolution like linear convolution is a commutative operation. Multiplication of the DFTs of the two sequences is equivalent to the circular convolution of the two sequences in the time domain. The basic difference between circular convolution and linear convolution is that, in circular convolution, the folding and shifting operations are performed in a circular fashion by computing the index of one of the sequences modulo N. Modulo N operation is not used in linear convolution. This operation is used for circular shifting of sequence x(n). It can be explained with the help of an example given below: N  pt  N  pt  If x1 (n) n DFT p X 1 (k ) and x 2 (n ) n DFT p X 2 (k ) , then from special property
N  pt  of DFT: x1 (n) x 2 (n) n DFT p X 1 (k ) X 2 (k ) .

Proof: IDTFT ?x3 (m)A!


! !

1 N

km ?X 3 (k )A e 2 T / N k !0

N 1

1 N

?X
k !0

N 1

(k ) X 2 (k )Ae 2 T / N

km

1 N 1 N

x (n) e
k !0

N 1 N 1

2T / N k n

n!0

x (l ) e
2 l !0

N 1

2 T / N k l

2T / N k m

x1 (n) x2 (l ) e 2 T k / N
n!0 l !0 k !0

N 1

N 1

N 1

m  n  l

We know that:

N a ! 1  a N k !0  a N 1
N 1 k  2T k / N ( m  n  l )

for a ! 1 other wise

Similarly:

e
k !0

N 1

Hence: ?x3 (m)A !

N 1 1 N 1 N 1 x1 (n) x2 (l ) N ! x1 (n) x2 (m  n) N N n !0 l !0 n !0

4.3.5 Time Reversal of a sequence property: Reversing the N point discrete time sequence is equivalent to reversing the DFT values. N  pt  x?( n)An DFT p X ?(  k ) A (4.35)

N ! 1  a N  a N 1

for l ! m  n  pN ! m  n N other wise

138

Proof:
DTFT ?x ( n) A! ?x ( n) A e  2 T / N
n!0 N 1 n! 0 N 1

kn

DTFT ?x (  n) A ! ?x (  n)A e 2 T / N
N 1 n!0

kn

! ?x ( n d e  2 T / N )A

k  nd

! ?x ( n d e  2 T / N )A
n!0

N 1

 k nd

! X (k )

4.3.6 Circular time shift of a sequence property:


N  pt  x?( n  m )AN n DFT p e  j 2T k m N X ( k )

(4.36)

Where x?(n  m)AN a circularly time shifted version of x (n) . Proof:

DTFT ?x(n)A ! ?x(n)A e 2 T / N


N 1 n! 0 N 1 n!0

kn

DTFT ?x(n  m)A! ?x(n  m)A e  2 T / N


Let n  m ! md )Ae DTFT ?x(n  m)A! ?x(md  2 T / N
n!0 N 1 ) k ( m  md

kn

! e 2 T / N

?x(md e )A
km n!0

N 1

 2 T / N k md

! e 2T / N

km

X (k )

4.3.7 Circular frequency shift of a sequence property:


N  pt  e j 2T n m N x ( n) n DFT p X ?(k  m) AN

(4.37)

Where X ?(k  m)AN a circularly time shifted version of X (k ) . Proof:


IDTFT ?X ( k )A ! 1 N

?X (k )A e
N 1 k !0

2T / N k n

IDTFT ?X ( k  m) A! ! 1 N
N 1 k !0 nm

1 N

?X (k  m)A e
N 1 k !0 d

2T / N k n

n m  m )A ! ?X (md e 2 T / N

1 N

)A ?X (md e
N 1 k !0

2T / N

n md 2 T / N

nm

1 N 1 n md nm )A ! 2T / N e ?X (md e 2 T / N ! e 2 T / N x(n) N k !0 4.3.8 Circular correlation of two sequence property:

Let us consider two complex valued discrete time sequences: N  pt  N  pt  x1 ( n) n DFT p X 1 (k ) and x 2 ( n ) n DFT p X 2 ( k )
139

  N Then: R x1 x 2 ( n ) ! x1 ( n ) x 2 ?( n  m) AN n pt  DFT p X 1 ( k ) X 2 ( k ) n !0

N 1

(4.38)

4.3.9 Multiplication of two sequence property:


N  pt  N  pt  If x1 ( n) n DFT p X 1 ( k ) and x 2 ( n ) n DFT p X 2 ( k ) , then:

N  pt  x1 ( n) x 2 ( n) n DFT p

1 X 1 (k ) X 2 (k ) N

(4.39)

Proof:

DTFT ?x(n )A ! ?x(n)A e 2 T / N


n !0 N 1 n !0

N 1

kn

DTFT ?x1 (n ) x 2 (n)A ! ?x1 (n) x 2 (n )A e 2 T / N

kn

N 1 N 1 kn ln mn 1 1 N 1 ! X 1 ( m ) e j 2T / N X 2 (l ) e j 2T / N e  2 T / N N l !0 n! 0 N m !0 N 1 N 1 N 1 k l m 1 ! 2 X 1 (m) X 2 (l ) e  j 2 T n / N N m!0 n! 0 l !0 We know that: N 1 N if l ! k  m  pN ! k  m N e j 2T n / N ! 0 otherwise n !0 N 1 N 1 N 1 1 1 N 1 DTFT ?x1 (n) x 2 (n)A! 2 X 1 (m) X 2 (l ) N ! X 1 (m) X 2 (k  m) N N m! 0 N m! 0 l !0 l !0 4.3.10 Parsevals Theorem:

For a complex valued sequences:


N  pt  N  pt  x1 (n) n DFT p X 1 (k ) and x 2 (n ) n DFT p X 2 (k )

Then:

N  pt  x1 (n) x 2 (n) n DFT p

1 N 1 X 1 (k ) X 2 (k ) (4.40) N n!0 n !0 If x1 (n) ! x 2 (n) ! x(n) then X 1 (k ) ! X 2 (k ) ! X (k ) , then the above theorem will be:
N 1

x (n ) x
n !0 N 1 N 1

N 1

N ( n ) n pt  DFT p

x ( n)
n !0

N  pt  n DFT p

1 N

X (k )
n! 0

4.4 RELATION SHIP BETWEEN DFT AND Z TRANSFORM:

1 N

X (k ) X
n!0

N 1

(k )

(4.41)

140

Now we will develop the relationship between DFT and z transform. z transform of a discrete time sequence of finite duration is defined as:
X (z) !
N 1

x ( n) z
n ! g

n

DFT of a discrete time sequence of finite duration is defined as:


X ( k ) ! x ( n)e  j 2 T nk
n !0 N

Comparing the above two equations: X (k ) ! X ( z ) z ! e j 2 T k N But inverse DFT is given by: 1 N 1 x ( n) ! X ( k )e j 2 T nk / N N k !0 Substituting the value of x(n) in the equation for z transformation: g N 1 1 N 1 n 1 N 1 X ( z ) ! X ( k )e j 2 T nk / N z  n ! X (k ) e j 2 T k / N z 1 N k !0 n ! g N k ! 0 n!0

(4.42)

! !

1 N

N 1

X (k )
k !0  N N 1 k !0

? e 1

z 1 1  e j 2 T k / N z 1
j2T k / N

N 11

A! 1 X (k ) ?1  e
N 1 k !0

z N 1  e j 2 T k / N z 1
j 2T k

A
(4.43)

1 Z N

1 e

X (k )
j 2T k / N

1

?e 3

j 2T k

!1

4.5 LINEAR CONVOLUTION USING DFT: The product of two DFTs is equivalent to the circular convolution of the corresponding time domain sequence. Here we have no use of circular convolution because our objective is to determine the output of a linear filter to a given input sequence. The purpose of linear convolution is linear filtering the input of linear system. The output of a filter is given by linear convolution of x(n) and h(n) as:
g

y ( n) !

h( k ) x ( n  k )
k ! g

(4.44)

Here k is discrete time index. Here we are considering a finite duration input sequence of x(n) of length L and unit sample response of FIR filter h(n) of length M. Output of this FIR filter will be given by:
M 1

y(n) !

h( k ) x ( n  k )
k !0

(4.45) DFT of size N u L  M  1 , is required to represent y(n) in the frequency domain: Y ( k ) ! X (k ) H ( k ) (4.46) Here k is a discrete frequency index. 4.6 PITFALLS IN USING DFT: The DFT is primarily concerned with the analysis and processing of discrete time periodic signals and it is an approximation of the CFT (Continuous Fourier Transform). Fast Fourier Transform (FFT) is a compurationally efficient and speedier method of performing
141

DFT. FFT can be used directly for numerical analysis of sampled versions of continuous time signals. Most of the problems of using DFT arise due to misunderstanding of what this approximation involves. Important characteristics of DFT are:  Continuous Fourier Transform (CFT) of a periodic function is also periodic.  Both DFT and IDFT operations ae done over a finite number of samples of continuous time signal.  Both DFT and IDFT produces discrete samples which are eqully periodic with period N.  DFT of convolution between two discrete time sequences is equal to the product of their individual DFTs. The following fig shows the comparison between CFT and DFT. Fig 4.6(a) illustrates the sinusoidal continuous time signal x (t ) and its fourier transform X ( f ) . X ( f ) consists of two impulses at f ! s f 0 , because x (t ) has a single frequency. Fig 4.6(b) shows the rectangular window function wR (t ) and its Fourier transform WH ( f ) . The spectrum of window function extends from  g to g . Here the window function wR (t ) is a time limited function. Fig 4.6(c) represents the multiplication of x (t ) and wR (t ) . This product results in truncation of continuous time signal x (t ) . This product in time domain corresponds to convolution in the frequency domain, i.e., Y ( f ) ! X ( f )  WR ( f ) . Fig 4.6(d) shows a comb function f (t ) and its Fourier transform F ( f ) . Comb function f (t ) is a periodic train of impulses with a time interval of (t between the impulses. Fourier transform of comb function, F ( f ) is the corresponding Fourier spectra 1 . It is the sampling frequency which are again a set of periodic impulses separated by f s ! (t due to Nyquist. Fig 4.6(e) illustrates the sampled version of the product d (t ) ! y (t ) f (t ) ! x (t ) wR (t ) f (t ) . The corresponding Fourier transform: D( f ) ! Y ( f )  F ( f ) ! X ( f )  W R ( f )  F ( f ) . This figure shows that the sampled truncated cosine wave x (t ) produces continuous spectra from  g to g . Fig 4.6(f) shows the discrete time sequence x d (n) and its Discrete Fourier transform (DFT). DFT of sequence x d (n) is given by:
N 1 n !0

S d ( k ) ! e 2 T / N

kn

4.6.1 Problems of pitfalls in using DFT: For convenience we have taken cosine sinusoidal signal x (t ) of single frequency f 0 . We expect an arbitrary waveform. In this article we are going to discuss the problems which arise in using DFT and their remedies. (a) Truncation error: This error is caused by using the rectangular window function wR (t ) . The fig 4.6(c) shows, a time limited signal has an infinite frequency spectra and spectrum of x(t )wR (t ) is
142

spread into frequencies other than s f 0 . These other frequency components in the spectra are not useful and it is called truncation error. (a) Aliasing error: Due to truncation of the signal, the frequencies spread into the frequency domain for larger than the allowable range. Even after sampling a signal higher than the Nyquist rate, the aliasing error cannot be entirely eliminated. (c) Spectral leakage: Leakage of energy takes place when the original signal x (t ) is truncated and sampled. It means energy in the original signal frequency f 0 will now leaks into other frequencies. Due to this leakage we get undesirable modification of the total spectrum. This spectral leakage becomes important when the higher frequency component of the composite spectrum shifts beyond the folding frequency f s / 2 . (d) Improper use of DFT: This problem is shown in fig 4.7. In this figure the waveforms are continuous time in shape. For correct use of DFT separate the waveform of x (t ) with duration T1 which is equal to impulse duration T . Here y (t ) ! h(t )  x(t ) . We have no signal between T and T  T1 . If this gap is not provided during computation by Discrete Fourier Transform (DFT), the aliasing effect will arise and its other associated problems will also occur. (e) Picket Fence effect: This problem is caused from the inability of the DFT to observe the spectrum as a continuous function x (t ) because DFT computation is limited to integer multiples of the fundamental frequency f 0 . The observation of spectrum with DFT is equivalent to looking x (t ) through a sort of fence. It means we observe the exact waveform of x (n) only at discrete points of signals. 4.6.2 Remedies to Problems of pitfalls in using DFT: (a) Remedy to truncation error: The truncation error can be reduced by selecting a window function w(t ) that minimizes the spreading of the spectra into higher frequencies. For example a raised cosine function is as shown in fig 4.8. This window function reduces the time function more gradually near ends of the interval than the rectangular window function. By using these window functions, the convergence of series is more rapid and results in less spectral leakage. (b) Remedy for aliasing error: To reduce the aliasing error, we need prior knowledge of the spectrum of signal, so we can choose appropriate sampling rate. Prefiltering is done in order to ensure about the highest frequency component so as to decide the appropriate sampling rate.
143

(c) Remedy for spectral leakage: This leakage of energy into other frequencies can be minimized by selecting sampling frequency in such a way that the zero and peak samples of the truncated signal x (t ) are always present. Longer bandwidth of the signal will reduce spectral leakage. (d) Remedy for improper use of DFT: Improper use of DFT can be taken care of by padding some extra zero samples. (e) Remedy for Picket Fence effect: Picket fencing can be reduced by varying the number of points N in a given time period T and adding zeros at the end of the original record, while maintaining the original record intact. This method artificially alters the period and this new period changes the locations of spectral lines without changing the continuous form of the original spectrum. By shifting the samples points we can easily observe those spectral components which were originally hidden from view. PROBLEMS Example 4.1 The periodic signal x(t ) ! Sin 2T t is sampled using the rate f s ! 4 Hz.
(a) Compute the spectrum ck using the samples in one period. (b) Plot the two-sided amplitude spectrum c k over the range from - 2 to 2 Hz.

Solution:
(a) From the analog signal, we can determine the fundamental frequency [ 0 ! 2T f 0 radians per second and f 0 ! 1 Hz, and the fundamental period T0 ! 1 second. Since using the sampling interval T ! 1 f s ! 0.25 second, we get the sampled signal as: and plot the first eight samples as shown in fig.

x(n) ! x(nT ) ! Sin 2T nT ! Sin 0.5T n

Choosing the duration of one period, N ! 4 , we have the sample values as follows:

x (0) ! 0; x (1) ! 1; x (2) ! 0; x (3) ! 1


Using the equation: c k !
 1 x(n) e N n !0 N 1 j 2T kn N

k ! 0,1, 2 - - N  1

c0 !

1 1 3 x(n) ! 4 ?x(0)  x(1)  x(2)  x(3)A! 0 4 n !0


144

c1 ! !

 1 3 x ( n) e 4 n!0

j 2T n 4

 1 x (0)  x (1)e 4

jT 2

 x (2)e  jT  x (3)e

jT 3 2

1 ?x(0)  jx (1)  x(2)  jx(3)A! 1 ?0  j (1)  0  j (1)A!  j 0.5 4 4 3 1 1 c 2 ! x ( n) e  jT n ! x (0)  x (1)e  jT  x ( 2)e  j 2T  x (3)e  j 3 T 4 n! 0 4 1 1 0 ! ?x (0)  x (1)  x ( 2)  x (3) A! ?  1  0  1A ! 0 4 4 j 3T n j 3T j 9T    1 1 3 c 3 ! x ( n) e 2 ! x (0)  x (1)e 2  x ( 2)e  j 3T  x (3) e 2 ! j 0.5 4 4 n !0

Using periodicity

c k  N ! c k c3 ! c1 !  j 0.5, c 2 ! c2 ! 0, c 1 ! c3 ! j 0.5 c 4 ! c0 ! 0, c 5 ! c1 ! j 0.5

(b) The amplitude spectrum for the digital signal is sketched in fig.

Example 4.2 Given a sequence x (n) for 0 e n e 3 , where x(0) = 1, x(1) = 2, x(2) = 3, and x(3) = 4, (b) Evaluate its DFT X(k). Solution: (a) Since N = 4 and Wk ! e
j T 2 3

, using Equation (4.7) we have a simplified formula:


kn 4

X ( k ) ! x ( n) W
n !0
3 3

! x ( n) e
n !0

jT kn 2

X (0) ! x(n) W40 ! x(n) e  j 0 ! x(0)e  j 0  x(1)e  j 0  x(2)e  j 0  x(3)e  j 0


n !0 n !0

! x(0)  x(1)  x(2)  x(3) ! 1  2  3  4 ! 10


3

X (1) ! x(n) e
n!0

j

Tn 2

! x(0)e  j 0  x(1)e

j

T 2

 x(2)e  jT  x(3)e

j

3T 2

! x(0)  jx(1)  x(2)  jx (3) ! 1  j 2  3  4 j ! 2  j 2

145

X (2) ! x(n) e  jnT ! x(0)e  j 0  x(1)e  jT  x(2)e  j 2T  x(3)e  j 3T


n!0

! x(0)  x(1)  x(2)  x(3) ! 1  2  3  4 ! 2


3

X (3) ! x ( n) e
n!0

j

3T n 2

! x ( 0)e  j 0  x (1) e

j

3T 2

 x ( 2)e  j 3T  x (3) e

j

9T 2

! x (0)  jx (1)  x ( 2)  jx (3) ! 1  j 2  3  j 4 ! 2  j 2

Example 4.3
Using the DFT coefficients X(k) for 0 k 3 computed in Example 4.2, evaluate its inverse DFT to determine the time domain sequence x(n).

Solution: Since N = 4 and W41 ! e


j T 2

, using Equation (4.10) we have a simplified formula:


jT kn

1 3 1 3 x(n) ! x(n) W4 kn ! X (k ) e 2 4 k !0 4 k !0 3 1 1 x(0) ! X (k ) e j 0 ! X (0)e j 0  X (1)e j 0  X (2)e j 0  X (3)e j 0 4 4 k !0 1 10 ! ?  (2  j 2)  2  (2  2 j )A! 1 4 Tn T 3T j j j 1 3 1 x (1) ! X ( k ) e 2 ! X (0)e j 0  X (1)e 2  X ( 2)e jT  X (3) e 2 4 k !0 4 1 1 ! ?X (0)  jX (1)  X ( 2)  jX (3)A ! ?  j ( 2  j 2)  ( 2)  j ( 2  j 2) A! 2 10 4 4 1 3 1 x ( 2) ! X ( k ) e jnT ! X ( 0)e j 0  X (1)e jT  X ( 2)e j 2T  X (3) e j 3T 4 k !0 4 1 1 10 ! ?X (0)  X (1)  X ( 2)  X (3) A! ?  ( 2  j 2)  ( 2)  ( 2  j 2) A! 3 4 4

x (3) !

j 1 3 X (k ) e 4 k !0

3T n 2

j 1 j0 X (0) e  X (1)e 4

3T 2

 X ( 2)e j 3T  X (3)e

9T 2

1 ?X (0)  jX (1)  X (2)  jX (3)A! 1 ?  j (2  j 2)  (2)  j (2  j 2)A! 4 10 4 4

Example 4.4 In Example 4.2, if the sampling rate is 10 Hz, (a) Determine the sampling period, time index, and sampling time instant for a digital sample x (3) in time domain. (b) Determine the frequency resolution, frequency bin number, and mapped frequency for each of the DFT coefficients X (1) and X (3) in frequency domain. Solution:
146

(a) In time domain, we have the sampling period calculated as: T ! 1 f s ! 1 / 10 ! 0.1 second For data x(3), the time index is n = 3 and the sampling time instant is determined by: t ! nT ! 3 v 0.1 ! 0.3 second (b) In frequency domain, since the total number of DFT coefficients is four, the frequency resolution is determined by:

(f !

f s 10 ! ! 2.5 Hz 4 N

The frequency bin number for X(1) should be k = 1 and its corresponding frequency is determined by:

f !
Similarly, for X(3) and k = 3,

kf s 1 v 10 ! ! 2.5 Hz 4 N kf s 3 v 10 ! ! 7.5 Hz 4 N

f ! Example 4.5

1 Compute the 8 point DFT of the signal: x(n) ! _, 1, 1, 1, 1, 1, 0, 0a. Also sketch its magnitude and phase spectra.
Solution: Since N = 8, we have a simplified DFT formula:
kn X ( k ) ! x ( n ) W N ! x ( n) e n !0 n !0 7 7  j 2T kn 8

! x ( n) e
n! 0

jT kn 4

X (0) ! x ( n) W80 ! x ( n) e  j 0
n !0 n !0

! x (0)e  j 0  x (1)e  j 0  x ( 2)e  j 0  x (3)e  j 0  x ( 4) e  j 0  x (5)e  j 0  x (6)e  j 0  x ( 7)e  j 0 ! x (0)  x (1)  x ( 2)  x (3)  x ( 4)  x (5)  x (6)  x (7) ! 1  1  1  1  1  1  0  0 ! 6 X (1) ! x ( n) e
n!0 7 j Tn 4

! x (0) e  j 0  x (1)e

j

T 4

 x ( 2 )e

j

T 2

 x (3)e

j

3T 4

 x ( 4)e  jT  x (5) e

j

5T 4

 x ( 6) e

j

3T 2

 x (7 )e

j

7T 4

! 0.7071  j1.7071

147

X (2 ) ! x ( n ) e
n! 0

j

Tn 2

! x (0)e !1 j

 j0

 x (1)e
j

j

T 2

 x ( 2) e

 jT

 x (3)e

j

3T 2

 x ( 4) e

 j 2T

 x (5)e

j

5T 2

 x ( 6) e

 j 3T

 x (7 )e

j

7T 2

3T n 4

X (3) ! x( n) e
n!0

! x(0)e  j 0  x (1)e

j

3T 4

 x( 2)e

j

3T 2

 x(3)e

j

9T 4

 x( 4)e  j 3T  x(5)e

j

15T 4

 x (6)e

j

9T 2

 x ( 7) e

j

21T 4

! 0.7071  j 0.2929

Similarly:
X ( 4) ! x (n ) e  jT n ! 0
n!0 5T n 4 7 7

X (5) ! x( n) e
n!0 7

j

! 0.7071  j 0.2929
7 7T n 4

X ( 6) ! x ( n ) e
n!0

j

3T n 2

! 1  j X ( 7) ! x ( n) e
n!0

j

! 0.7071  j1.7071

Amplitude !

e 2  Im 2

Im Phase ! tan 1 Re Amplitude of X(k) is given by: X ( k ) ! _ , 1 .8478 , 1 .4142 , 0.7654 , 0, 0 .7654 , 1 .4142 , 1 .8478 a 6

Phase of X(k) is given by: X (k ) ! _ ,  1.9635,  0.785, 0.3927, 0,  0.3927, 0.785, 1.9635a 0

148

6 <X(k) |X(k)|

1.5 5 1 4 0.5

-0.5 2 -1 1 -1.5

3 4 Discrete frequency (k)

-2

3 4 Discrete frequency (k)

Example 4.6 Determine the N point DFT of a finite duration sequence given by: 1 0 e n e L 1 x ( n) ! 0 otherwise Solution: DFT of the given sequence is given by: X ( k ) ! x ( n) e
n !0 L 1  j 2T kn N

e
n !0

L 1

This is a geometric progression of the form:

Where A is the first term of G. P., and R is the common ratio of G. P., putting the values of A, R in the above equation: e 11   j 2 T k / N X (k ) ! 1  e j2T k / N

This is the N point DFT of the given sequence. Example 4.7 Determine the N point DFT of a finite duration sequence given by: 1 2ene6 x ( n) ! 0 n ! 0,1, 7, 8, 9 Solution: DFT of the given sequence is given by:
149

j 2T kn N

! 1  e  j 2 T k / N  - -  e  j 2 T k / N ( L 1)

A 1  R M 1 ?  RA 1

L 1!1

A! 1  e

 j 2 T kL / N

1  e j 2T k / N

X (k ) ! x(n) e
n !0

L 1

j 2T kn N

e
n! 2

j 2T kn N

! e
n !0

j 2T kn N

 e
n !0

j 2T kn N

This is a geometric progression of the form:

1 A?  R A
M 1

?  RA 1

Where A is the first term of G. P., and R is the common ratio of G. P., putting the values of A, R in the above equation:
X (k ) ! 11  e  j 2 T k / N 11  e  j 2 T k / N e  j 4 T k / N  e  j14 T k / N  ! 1  e  j 2T k / N 1  e  j 2T k / N 1  e  j 2T k / N e  j 4 T k / 10  e  j14 T k / 10 e  j 2T k / 5  e  j7 T k / 5 e  j 2T k / 5  e  j7 T k / 5 ! ! ! 1  e  j 2 T k / 10 1 e jT k /5 1  e jT k / 5

6 1

A ?

11

Example 4.8 Determine the DFT of the 4 point discrete time sequence x(n) ! _, 2, 3, 4ausing 1 DFT transformation matrix. Also determine IDFT from DFT. Solution: DFT matrix is given by:
1 1 1 W 1 4 W4 ! 1 W42 3 1 W4

1 W W W
2 4 4 4 6 4

1 W43 W46 W49

From the property of periodicity W NK  N ! W NK , the above matrix is modified as:


W44 ! W 40 , W46 ! W42  4 ! W 42 , W 49 ! W 41 2 v 4 ! W 41

And W41 !  j 2T e
1 1 1 W 1 4 W4 ! 1 W42 3 1 W4
4 1

!  j,

W42 !  j 2T e

4 2

! 1,

W43 !  j 2T e

4 3

! j,

1 W W W
2 4 0 4 2 4

1 1 1 1 1 1  j  1 j 3 W4 ! W42 1  1 1  1 W41 1 j  1  j

1 1 1 1  2  3  4 10 1 1 1  j  1 j 2 1  2 j  3  4 j  2  2 j ! ! Then X ( k ) ! W4 x ( n) ! 1  1 1  1 3 1  2  3  4  2 1 j  1  j 4 1  2 j  3  4 j  2  2 j
150

Inverse DFT of X (k ) is determined by: x ( n) !


1 1 1 1 1 j  1  j W 4 ! 1  1 1  1 1  j  1 j

1  W N X (k ) N

Then
1 1 10 10  2  2 j  2  2  2 j 1 1 1 1 j  1  j  2  2 j 2 2 1 1 ! 1 10  2 j  2 j  2  2 j  2 j ! 2 x ( n) ! W 4 X ( k ) ! 4 1  1 1  1  2 4 10  2  2 j  2  2  2 j 3 4 2 2 10  2 j  2 j  2  2 j  2 j 4 1  j  1 j  2  2 j

Example 4.9 Find linear convolution of x(n) and h(n) using DFT method. 1 n!0 1 n!0 2 1 n !1 h( n) ! 1 n !1 Given x(n) ! 2 otherwise 0 0 otherwise Solution: Sample points of s (n) !, N x ! 2 Sample points of h( n) !, N h ! 2 Sample points of y ( n) !, N y ! N x  N h  1 ! 2  2  1 ! 3 To avoid time aliasing, we convert 2 sample sequences into 3 sample sequence by padding with zero. The fig shows the graphical representation of sequences x(n) and h(n). Three point DFT sequences are given by: X (k ) ! x(n)e  j 2 T / N k n ! x(n)e  j 2 T k n / 3
n!0 n!0 2 2

! x(0)e 0  x(1)e  j 2 T k / 3   x(2)e  j 4 T k / 3 ! 1  X (0) ! 1.5 X (1) ! 1  0.5e  j 2 T / 3 X (2) ! 1  0.5e  j 4 T / 3

151

1  j 2T k / 3 e 2

H (k ) ! h (n )e  j 2 T / N k n ! x(n)e  j 2 T k n / 3
n !0 n! 0

! x(0)e 0  x(1)e  j 2 T k / 3   x(2)e  j 4 T k / 3 ! H (0) ! 1.5 H (1) ! 0.5  e  j 2 T / 3

1  e  j 2T k / 3 2

H (2) ! 0.5  e  j 4 T / 3 Since a time domain convolution is equivalent to a frequency domain multiplication: Y ( k ) ! X (k ) H ( k ) Y (0) ! X (0) H (0) ! 1.5 v 1.5 ! 2.25 Y (1) ! X (1) H (1) ! 1  0.5e  j 2 T / 3 0.5  e  j 2 T / 3 ! 0.5  1.25e  j 2 T / 3  0.5e  j 4 T / 3

Y ( 2) ! X ( 2) H ( 2) ! 1  0.5e  j 4 T / 3 0.5  e  j 4 T / 3
 j 4T / 3  j8T / 3

! 0.5  1.25e  0.5e Inverse DFT is given by: 1 2 1 2 y (n) ! Y (k )e j 2 T / N k n ! Y (k )e j 2 T k n / 3 N k !0 N k !0 1 ! Y (0)e 0  Y (1)e j 2 T n / 3  Y (2)e j 4 T n / 3 3 1 ! 2.25  0.5  1.25e  j 2 T / 3  0.5e  j 4 T / 3 e j 2 T n / 3  0.5  1.25e  j 4 T / 3  0.5e  j 8 T / 3 e j 4 T n / 3 3 y(0) ! 0.5

y(1) ! 1.25 y(2) ! 0.5

Example 4.10 Show that for an arbitrary k , that: (a) X (  k ) ! X  ( k ) N N (b) X  k ! X   k 2 2 Solution: (a) Since
X ( k ) ! x ( n )  j 2 T / N X (  k ) ! x ( n )  j 2 T / N e e
kn n! 0 n !0 N 1 N 1

 k n

e ! x ( n ) j 2 T / N ! X  ( k )
kn n !0

N 1

N 1 N 1 N kn kn k n N N 1 e e e e (b) X  k ! x (n )  j 2 T / N 2 ! x(n)  jT n j 2 T / N ! x(n) j 2 T / N 2 n !0 n!0 n !0

152

N 1 N 1 N kn   k n k n N N 1 X   k ! x(n)  j 2 T / N 2 ! x(n) jT n  j 2 T / N ! x(n) j 2 T / N e e e e 2 n!0 n !0 n !0 N N X  k ! X   k 2 2

Example 4.11 Assume that X 1 (k ) is the DFT of x (n) with period N and X 2 (k ) is the DFT of x (n) with period 2 N . Determine X 2 (k ) interms of X 1 (k ) . Solution:
X 1 (k ) ! x(n) e  j 2 T / N
n! 0 2 N 1 N 1

kn

! x ( n) W Nn k
n!0 2 N 1

N 1

X 2 (k ) !

x(n) e
n!0

 j 2T / 2 N k n

x ( n) W
n !0

nk 2N

Since x (n) is a periodic sequence, so it satisfies the condition: x(n) ! x(n  N ) ! x(n  2 N )
W2nk ! e  j 2 T / 2 N N
N 1 2 N 1

kn

! e  j 2T / N

kn 2

! W Nn k

X 2 ( k ) ! x ( n ) W Nn k 2 
n! 0 2 N 1

x (n  N ) W
n! N

( n N ) k 2 N

k 2 N 1 k ( ( ! X 1  x ( n  N ) W N n  N ) k 2 ! X 1  x ( n) W Nn  N ) k 2 2 n! N 2 n!N n  N k / 2 nk/2 k k 2 N 1 k 2 N 1 ! X 1  x (n )  j 2 T / N  j T ! X 1  x(n)  j 2 T / N e e e 2 n! N 2 n!N k nk/2 k k k N 1 ! X 1  x (n )  j 2 T / N  j T ! 1   j T X 1 e e e 2 2 n !0

If k is odd, then  jT ! (1) k X 2 (k ) ! ?  1AX 1 (k ) ! 0 e 1


k

If k is even, then  jT ! 1 X 2 (k ) ! 2 X 1 (k ) e
k

Example 4.12 Let us consider two 4 point sequences x (n) and h(n) as follows: T n x ( n) ! Cos for n ! 0, 1, 2, 3 2 h( n) ! 2 n for n ! 0,1, 2, 3 Calculate: (a) Calculate the 4 point DFT X (k ) (b) Calculate the 4 point DFT H (k ) (c) Calculate y (n) by multiplying X (k ) and H (k ) and performing inverse DFT. Solution:

153

(a)
3 N 1 kn T n  j 2T / 4 k n X (k ) ! x ( n)  j 2 T / N ! Cos e e 2 n!0 n !0 3T 3 k T 0 ! Cos (0) W N  Cos W 4k  Cos T W 42 k  Cos W4 2 2

! 1  W42 k

(b)
H ( k ) ! h( n)  j 2 T / N ! 2 n  j 2 T / 4 e e
N 1 kn 3 n! 0 n !0 k 4 2k 4 kn

! W  2W  4W

4 0

 8 W43 k ! 1  2 W4k  4 W 42 k  8W43 k

(c)

Y ( k ) ! X (k ) H ( k ) !  W 42 k  2 W4 k  4 W42 k  8W 43 k 1 1 ! 1  2W 4 k  4W 42 k  8W43 k  W 42 k  2W43 k  4W 44 k  8W 45 k ! 1  2W 4 k  4W 42 k  8W43 k  W 42 k  2W43 k  4W 40  8W4 k ! 1  2W 4 k  4W 42 k  8W43 k  W 42 k  2W43 k  4  8W 4 k ! 3  6 W 4k  3W 42 k  6 W 43k

y (n) ! IDFT ?X (k )A! 3H n  6 H n  1  3H n  2  6 H n  3


Example 4.13 Compute DFT for
x(n) ! 1 !0 for for n is even n is odd

for 0 e n e 3

Solution:
X ( k ) ! x ( n ) e
n!0 N 1  j 2T / N k n

e
n!0 N

N 1 2

 j 2T / N k n

Since a k !
k !0

1   j 2T k / N 1  j T k j 2 T k / N e e e 1 aP X (k ) ! !  j2T k / N  j 2T k / N 1 a 1 e 1 e

Example 4.14 Compute DFT for

x( n ) ! a n !0
Solution:
N 1 n!0

0 e n e N 1 otherwise
kn N 1 n !0 kn

X (k ) ! x ( n )  j 2 T / N ! a n  j 2 T / N e e

154

1  e  j 2T k / N 2 1 aP Since a ! X (k ) ! 1 a 1  e  j 2T k / N k !0
P k

1

1  e j T k e j 2T k / N 1  e  j2T k / N

Example 4.15 Compute DFT for x(n) ! e j[ 0 n


!0

0 e n e N 1 otherwise

Solution:
X (k ) ! x ( n ) e  j 2 T / N
n!0 P N 1

kn

! a n e  j 2T / N
n !0

N 1

kn

1  e  j 2T k / N 2 1 aP X (k ) ! Since a k ! 1 a 1  e  j 2T k / N k !0

1

1  e j T k e j 2T k / N 1  e  j2T k / N

Example 4.16 For the given x(n) ! Cos nT 2 and h( n) ! 2 n , calculate the 4 point X (k ) and H (k ) . Solution: From given data x (n) ! ? , 0,  1, 0A and h(n) ! ? , 2, 4, 8A 1 1
X ( k ) ! x ( n) e  j 2 T / N
n !0 N 1

kn

! x ( n) e  j 2 T / 4
n !0

kn

X ( 0) ! x (0)  x(1)  x ( 2)  x (3) ! 0

 x(3) e  x(2) e  x(3) e X ( 2) ! x (0)  x (1) e  x(2) e  x(3) e X (3) ! x (0)  x (1) e ! h(n) e H ( k ) ! h ( n ) e
X (1) ! x (0)  x (1) e  j 2 T / 4  x ( 2) e  j 2 T / 4
 j 2T / 4 2  j 2T / 4 3 3  j 2T / 4 4  j2T / 4 6 N 1 n !0  j 2T / N k n  j2T / 4 k n n!0

 j 2T / 4 3

 j 2T / 4 6

 j 2T / 4 9

!2 !0 !2

H (0) ! h(0)  h(1)  h( 2)  h (3) ! 15 H (1) ! h(0)  h(1) e  j 2 T / 4  h( 2) e  j 2 T / 4


 j 2T / 4 2  j 2T / 4 3

e H ( 2) ! h(0)  h(1) e H (3) ! h(0)  h(1)

 h(2) e  h(2) e

 j 2T / 4 4

 j 2T / 4 6

 h(3) e  h(3) e  h(3) e


2

 j 2T / 4 3

 j 2T / 4 6

 j2T / 4 9

! 3  6 j ! 5 ! 3  6 j

Example 4.17 Compute DFT by using matrix transformation method x(n) ! a n 0ene3

!0
Solution:

otherwise

155

For 4 point DFT, the DFT matrix is given by: W40 W40 W40 W40 0 W W41 W42 W43 W4 ! 40 W4 W42 W44 W46 0 3 6 9 W4 W4 W4 W4
k WN ! e 2T

Where:

W 41 W 42 W 43

W ! e ! e ! 1 ! e !  j ! e ! e ! 1 ! e ! e ! e ! j
N k 0 4 2 T 4 0 T 2 0 2 T 4 1 T 2 T 2 T 4 2 2T 4 3 3 T 2

1 1 1 W 1 4 X (k ) ! 1 W42 3 1 W4

1 W W W
2 4 4 4 6 4

1 x(0) 1 1 1 1 1  3 W4 x(1) j  1 j a ! 1 W46 x(2) 1  1 1  1 a 2 W49 x(3) 1 j  1  j a 3

1 a  a2 1  ja  a 2 X (k ) ! 1 a  a2 2 1  ja  a

 a3  ja 3  a3  ja 3

156

You might also like