You are on page 1of 17

Example1:

Consider a length-N sequence defined for n = 0,1,2,,(N-1) where


n!0 1 x[ n ] ! 0 otherwise Find the DFT of the given sequence .

The N-point DFT is equal to

X [k ] ! x[n]WN
n!0

N 1

kn

k ! 0,1,2,......., ( N  1)

! 1

Example2:
Consider a length-N sequence defined for n = 0,1,2,,(N-1) where
n!m 1 y[ n ] ! 0 otherwise Find the DFT of the given sequence . Y [ k ] ! x[ n ]W N
n!0 km ! WN N 1 kn

The N-point DFT is equal to

k ! 0,1,2,......., ( N  1)

Example 3:
Consider an L up-sampler described by the discrete sequence
x ?n L A y[ n ] ! 0 n ! 0,s L, s2 L,...... otherwise

Find the DTFT of this sequence.

The input/output relationship in frequency domain is:


Y ej !
j n

n ! ult of L

Substituting, m = (n/L) Y e jw ! Example: x[n] X(ejw)

x?mAe
m ! g

 jwLm

x?n L Ae

! X e jwL

2T

T/2 T

2T

2T

Commonly used General Properties of the DFT


Assume that we denote the data sequence x(nT) as x[n] . (1) Symmetry property Re[X(N-k)]=ReX(k) This implies that amplitude has symmetry .

Im[X(N-k)]= - Im[X(k)] This implies that the phase spectrum is antisymmetric.

(2) If x[n] is an even function xe[n] then

A F ?xe ?nA ! X e k ! xe ?nAcos k;nT


n!0

N 1

This implies that the transform is also even (3) If x[n] is odd function xo[n] than

A F ?xo ?nA ! X o k !  j xo ?nAsin k;nT


n !0

N 1

This implies that the transform is purely imaginary and odd (4) Parsevals Theorem The normalized energy in the signal is given by either of the following expressions

x 2 ?nA!
n!0

N 1

1 N 1 2 X k N k !0

(5) Delta Function

?H n A! 1 ?u[n]A!

g 1  TH w  2Tk 1  e  j k ! g

(6) Unit step function


(7)

F e jw n !
0

? A 2TH w  w
k ! g

 2Tk

Fourier transform of a CT complex exponential is interpreted as an impulse at w=w0. For discrete-time we expect something similar but difference is that DTFT is periodic in w with period 2T. This says that FT of x[n] should have impulses at w0, w0 2T, w04T etc. (8)
E n u[ n ] (n 1)
F

1 1  Ee  jw

(9) Linear cross-correlation of two data sequences or series may be computed using DFTs. The linear cross correlation of two finite-length sequences x1[n] and x2[n] each of length N is defined to be: rx x ( j ) !
1 2

1 N

n ! g

x n x n  j
1 2

,g e j e g

Circular correlation of finite length periodic sequences x1p[n] and x2p[n] is described as: rcx x ( j ) !
1 2

1 N 1 x1 p n x2 p n  j N n!0

, j ! 0,......., ( N  1)

This circular correlation can be evaluated using DFTs as shown below:

rcx1x2 ( j ) ! F 1 X 1 k X 2 ( k )

The circular correlation can be converted into a linear correlation by using augmenting zeros. If the sequences are x1[n] of length N1 and x2[n] of length N2, then their linear correlation will be of length N1+N2-1. To achieve this x1[n] is replaced by x1a[n] which consists of x1[n] with (N2-1) zeros added and x2[n] is augmented by (N1-1) zeros to become x2a[n].
rx1 x2 ( j ) ! F 1 X 1a k X 2 a k

Symmetry Relations of the T of a real sequence


Sequence x[n]
xev [n ] x od [n ] X e jw ! X  e  jw
jw re re jw

FourierTransform X ! X re jw  jX im jw e e e
jw

conjugate symmetry X ! X real part is even e e X !  X imaginary part is odd e e X ! X e e even magnitude arg_ ! arg_ X e a X e a odd phase
 jw  jw

jX im jw e

X re jw e

im

im

jw

 jw

jw

 jw

General Properties of the DT Fourier Transform


Property Linearity Time Shifting Conjugation Time Reversal Frequency Shifting First Difference Conjugate Symmetry for Real Signals Real & Even Signals Real & Odd signals Even-Odd Decomposition Of Real Signals Parsevals Relation Periodic signal

Ax[n]  By[n] x[n  n0 ] x  [n] x[ n] e jMw n x[n] x[n]  x[n  1]


0

Fourier Series Coefficients Aa k  Bb k

ak e

2T  jk n0 N  a k

ak ak M
2 1  e  jk T N a k
 ak ! ak

x[n] real

x[n] real and even x[n] real and odd

a k real and even a k purely imaginary and odd

xo [n] ! Od _x[n]a 1 N

xe [n] ! Ev_x[n]a

[ x[n]real ] [ x[n]real ]
n! N

Re_ k a a j Im_ k a a
k! N

x[n] !

ak

Example:
Given the discrete sequence below find and plot the DTFT of the signal.
x[ n ] ! cos w0 n with w0 ! 2T 5

Using

X e jw !
g

2TH w  w
l ! g

 2Tl
g

X e jw ! that is;

T T TH w  25  2Tl  TH w  25  2Tl
l ! g l ! g

2T X e jw ! TH w  5

2T  TH w  5

T e w T

and X e jw repeats with period of 2T as shown below:

X e jw

w -2T -wo 0 wo 2T- wo 2T 2T+ wo

Time Shifting: Example.


Find the DTFT of an impulse function which occurs at time zero.
x[ n ] ! H [ n ] X e jw ! H [ n ]e  jwn ! 1 H [ n ] 1 H [ n  1] (1) e  jw (1)
F F

Convolution Property: If x[n] , h[n] and y[n] denote the input , impulse response and output of an LTI system then
y[ n ] ! x[ n] h[ n ] @ Y e jw ! X e jw H e jw


are the DTFT of the DT sequences.

where, Y e jw , X e jw and H e jw

Example: Consider an LTI system with impulse response and input as given below
h[n] ! E n u[n] x[n] ! F n u[n] E F 1 1

Develop an expression for the response of the system?

X e jw !


jw

1 1  Fe  jw

1 e ! 1  Ee

Y e jw ! X e jw
jw

1 e !  Ee  Fe 1 1 A B Y ! e   Ee  Fe 1 1
 jw

Using (1) and (2) and solving for A and B gives A! E E F B! F E F

Y e jw

E F  E F E F !   jw 1  Ee 1  Fe  jw

Hence y[n] ! 1 E n1u[n]  F n 1u[n] E F

Case2: If E ! F

Ye

!
jw

1  Ee

 jw 2

1 !  jw 1  Ee

the above expression is also equal to :


Y jw ! e 1  Ee 1 ! 1 j jw d e  jw E dw 1  Ee

 jw 2

 jw

jw

 jw

 jw

(1) ( 2)

 jw

for E { F

Proof: We know that the differentiation in frequency dictates the following n x[n] dX e jw j dw

since

E n u[n]

1 1  Ee  jw

we can together with above property say the

following is also correct n E n u[n] m


F

d 1 dw 1  Ee  jw

to account for the factor e jw we need to use a time-shift in the time-domain signal

n  1 E n1u[n  1]
Finally to account for the factor

je jw

1 d  jw dw 1  Ee

1 ! E 1 we can write E E!F

y[ n ] ! n  1 n u[ n  1] E

We note that n  1 nu[ n  1] is still zero prior to n = 0 since (n+1) = 0 at n = -1 E Hence the final result can be written as:
y[ n ] ! n  1 n u[ n ] E E!F

Example:
Consider the sequence x[n] whose Fourier Transform X(ejw) is depicted for -T <= w <= T. Determine if x[n] is periodic, real, even, and/or finite energy. | X(ejw) |

X(ejw)

2T 3 2 -T T -2T -T -T/2 0 T/2 T w

If a signal is periodic and yet discrete the discrete-time Fourier Transform of it can not be continuous. It shall be zero except possibly for impulses located at various integer multiples of the fundamental frequency. x[n] is not periodic

From the symmetry properties for Fourier transforms a real valued sequence must have a Fourier transform of EVEN magnitude and a phase function that is ODD. x[n] is real by observation of the plots given above If x[n] is an even function then by symmetry properties for real signals X(ejw) must be real and even. Since X e jw ! X e jw e  j 2 w The DTFT can not be a real valued function due to the complex ecponential x[n] is not even Finally to test the finite-energy property we can use Parsevals relation.

n ! g

x?n A

1 2T

2T

X e dw
jw 2

it is clear from the above figure that carrying out this integral will lead to a finite quantity. We conclude that x[n] has finite energy.

DTFT Computation Using MATLAB


The related matlab functions that can be used are : freqz abs angle unwrap real imag Function freqz can be used to compute the values of the DTFT of a sequence described as a rational function in terms of ejw:
X e
jw

p 0  p1e  jw  ........  p e  jw P e jw ! ! D e jw d 0  d 1 e  jw  ........  d N e  jwN

at a predefined set of discrete frequency points w = wl . For an accurate plot a fairly large number of frequency points should be selected. There are various forms of the function: H = freqz( num, den, w) H = freqz( num, den, f, FT) [H,w] = freqz( num,den,k) [H, f] = freqz(num,den, k, FT) [H,w] = freqz( num,den,k,whole) [H, f] = freqz(num,den, k, wholeFT)

freqz refers to the frequency response values as a vector H of a DTFT defined in terms of the vectors num and den containing the coefficients {pi} and {di} respectively at a predefined set of frequency values. w is a vector which contains the prescribed set of frequencies between 0 and 2T.

In H = freqz(num,den,f,FT) FT is the sampling frequency Vector f provides the pre-defined values in range 0

FT/2

Also it is possible to specify the total number of frequency points by k in the argument of freqz. In this case DTFT values H are computed at k equally spaced points between 0 and T and returned as the output vector w. For faster computations it is recommended that the number k be chosen as a power of 2 such as 256 or 512. Once the DTFT values have been determined they can be plotted either showing their real or imag parts or by magnitude and phase components using functions abs and angle. Function angle computes the phase in radians.

freqz(num,den) with no output arguments computes and plots the magnitude and phase response values as a function of frequency in the current figure window.

Reminder:

Here show the slides about a MATLAB program using some of the above

Computational Complexity of the DFT


A large number of multiplications and additions are required for the calculation of the DFT. Let us try to analyze the following case. For an 8-point DFT the expansion for X(k) becomes the following: X (k ) ! x n e  jk 2Tn / 8
n!0 7

, k ! 0,1,........,7

(1)

If we rename the quantity ( k2T/8 ) as K we can write the expanded summation as :


1 X (k ) ! x 0 e  K 0  x e  jK 1  x 2 e  jK 2  x 3 e  jK 3  x 4 e  jK 4  x 5 e  jK 5  x 6 e  jK 6  x 7 e  jK 7 , k ! 0,1,......... ......,7

(2)

Equation (2) contains eight terms on the right hand side . Each term consists of a multiplication of an exponential term (complex) by an other term which is real or complex. Then each of the product terms is added together. Therefore there are eight complex multiplications and seven complex additions to be calculated.

@ For a N-point DFT there will be N-complex multiplications (N-1) complex additions

for the 8-point DFT there are also 8 harmonic components to be evaluated (k=0,1,,7) . For the N-point DFT this number becomes N.

Therefore the total calculations of the 8-point DFT requires : 88 = 64 complex multiplications 87 = 56 complex additions. For the N-point DFT this becomes : NN=N2 complex multiplications N(N-1) complex additions

These numbers may seem small but then N= 1024 then approximately one million complex multiplications and one million complex additions are required. Clearly we need some means of reducing these numbers.

These numbers can be reduced if we note the redundancy that exists in the DFT expression.
i.e. k ! 1, and n ! 2, e  jk 2Tn / 8 ! e  jT / 2 k ! 2, and n ! 1, e  jk 2Tn / 8 ! e  jT / 2

The Decimation-in-time fast Fourier Transform algorithm


In this section we show how the redundancy in DFT is used o reduce the number of calculations. For the 1024-point DFT the number of calculations required can be reduced by a factor of 204.8. The algorithm which can achieve this is given the name fast Fourier Transform (FFT). When applied in the time-domain the algorithm is referred to as the decimation-in-time (DIT) FFT. Decimation here refers to the significant reduction in the number of calculations performed on time-domain data. The first DIT algorithm was introduced by Cooley and Tukey (1965).

NOTE: Computational savings will be seen to increase as

N 2  ( N / 2) log 2 N .

We will first try to establish some mathematical relationships. Let us start with the DFT definition: X 1 k ! x n e  j 2Tnk / N , k ! 0,......., ( N  1) Also the factor e Hence
nk X 1 k ! x nW N , k ! 0,......., ( N  1) n !0 N 1 n !0  j 2T / N N 1

will be written as WN.

We note at this point some of the properties of WN.

Firstly;

WN2 ! e  j 2T / N

!e
2

 j 2T 2 / N

! e  j 2T /( N / 2) ! WN / 2

Secondly;
( k k W N k  N / 2 ) ! W Nk W NN / 2 ! W Nk e  j 2T / N ( N / 2 ) ! W N e  jT ! W N

For exploiting the computational redundancy the data-sequence is divided into two equal sequences: one of even-numbered data, and one of odd-numbered data. For the sequences to be of equal length they must all contain an even-number of data. If not an augmenting zero can be added.

This allows the DFT to be converted into two DFTs each o N/2 points. This process then repeated until X1(k) is decomposed into N/2 DFTs each of two points both of which are initial data. In practice the initial data is re-ordered and the N/2 two-point DFTs are calculated by taking the data in pairs. These DFT outputs are combined to provide N/4 four-point DFTs. Then these N/4 four-point DFTs are combined to form the N/8 eight-point DFTs Etc .

Reminder:

Draw the table 3.1 on board as example

Table 1.
Data Sequence A0 8-point DFT of A0 Re-ordered A0 into two Sequences A1 and A2 4-point DFTs of A1 and A2 Reordered Sequences A1 and A2
four sequences

Structure of 8-point FFT k- ranges


x0 , x1 , x 2 , x3 , x 4 , x5 , x 6 , x7 X 1 k ! X 11 k  W Nk X 12 k

N ranges 0,.,7 0,.,7 0,.....,7

0,,7
x1 , x3 , x5 , x7

A1

x0 , x 2 , x 4 , x6
k X 11 k ! X 21 k  W N / 2 X 22 k

A2

k X 12 k ! X 23 k  W N / 2 X 24 k

0,.,3

0,.,3

A3

x0 , x 4

A4

x2 , x6

A5

x1 , x5

A6

x3 , x 7

0, 1

A3, A4, A5, A6

2-point DFTs of A3, A4, A5


and A6

X 21 k ! x 0  W Nk / 4 x 4

k X 22 k ! x 2  W N / 4 x 6

k X 23 k ! x1  WN / 4 x5

X 24 k ! x3  W Nk / 4 x 7

0,1

The suffixes , n, extend from n = 0 to n =N-1 corresponding to the data values. The terms in the even sequence may be designated x2n with n = 0 to n = N/2 -1. The terms in the odd sequence becomes x2n+1 .

Even sequence @ X 1 k !
( N / 2 ) 1 n!0

Odd sequence
( N / 2 ) 1 n!0

x2nWN2 nk 

2 n 1

W N2 n1 k

( N / 2 ) 1

x2nWN2nk  W Nk
n!0

( N / 2 ) 1 n !0

2 n 1

2 WN nk

, k ! 0,......., ( N  1)

Using the fact that


nk W N2 nk ! W N / 2 .

WN2 ! e  j 2T / N

!e
2

 j 2T 2 / N

! e  j 2T /( N / 2 ) ! WN / 2 one can write

Hence X 1 k !
( N / 2 ) 1 n !0

x2 nW Nnk/ 2  W Nk

( N / 2 ) 1 n! 0

2 n 1

nk WN / 2

, k ! 0,......., ( N  1)

(3)

Equation above can be written as


k X 1 k ! X 11 k  W N X 12 k

, k ! 0,........, N  1

Here;

X 11 k is the DFT of the even sequence


X 12 k is the DFT of the odd sequence

nk The factor W N / 2 occurs in both sums but needs calculating only once.

You might also like