0% found this document useful (0 votes)
107 views42 pages

Lesson 2.0 DFT

This document discusses frequency domain analysis of linear shift-invariant systems. It introduces the discrete Fourier transform (DFT) and shows how it can be used to analyze systems in the frequency domain. Key steps include: 1) Defining the input signal as a complex exponential to represent different frequencies. 2) Applying the system and showing the output is a complex function of the input multiplied by the frequency response of the system. 3) Explaining that the frequency response contains information about how the system affects different frequencies and is determined by the system's impulse response. 4) Showing that convolution in the time domain is equivalent to simple multiplication in the frequency domain.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views42 pages

Lesson 2.0 DFT

This document discusses frequency domain analysis of linear shift-invariant systems. It introduces the discrete Fourier transform (DFT) and shows how it can be used to analyze systems in the frequency domain. Key steps include: 1) Defining the input signal as a complex exponential to represent different frequencies. 2) Applying the system and showing the output is a complex function of the input multiplied by the frequency response of the system. 3) Explaining that the frequency response contains information about how the system affects different frequencies and is determined by the system's impulse response. 4) Showing that convolution in the time domain is equivalent to simple multiplication in the frequency domain.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

DSP 1 Lecture 2.

0 L t 20
Discrete Fourier Transform

..and the Story y of Digital Signal Processing I. BEGINS !!

Frequency Domain Analysis


Linear Shift-Invariant System

x[n]

h[n]

y[n]

Step #1 Lets assume the following input sequence

x[n] = e j n < n < e j n = cos( n) + j sin( n)


Notice the units of are --------3
radians sample

Frequency Domain Analysis


Step #2 Applying Linear Convolution to input sequence
y[n] = h[n] x[n] = y[n] =
k =

h[k ]x[n k ] =
=e
j n k =

k =

h[k ]e
+

j ( n k )

h[k ]e

j k

y[n] = e j n H (e j )

H (e ) =

k =

h[k ]e
j

j k

This is a complex-valued function that depends only on the system Impulse response h[n]. We will call this function the Frequency Response of the LTI system, more on this later !!

H (e j ) = A(e j )e jP ( e

) 2

A(e j ) = Re H (e j )} + Im H (e j )} , P(e j ) = arg H (e j )}


2

Frequency Domain Analysis


Linear Shift-Invariant System

x[n]

h[n]

y[n]

Step #1 Lets assume the following input sequence


x[n] = A cos(0 n + ) < n < A j j0 n A j j0 n = x1[n] + x2 [n] x[n] = e e + e e 2 2 A j j0 n A j j0 n x1[n] = e e , x2 [n] = e e 2 2

Frequency Domain Analysis


STEP #2 --- Applying Superposition
A j + A j + j0 ( n k ) y[n] = y1[n] + y2 [n] = e h[k ]e + e h[k ]e j0 ( n k ) 2 k = 2 k =
y[n] = A j j0 n A A A e e H (e j n ) + e j e j0 n H (e j n ) = e j e j0 n H (e j n ) + e j e j0 n H * (e j n ) 2 2 2 2
H (e j ) = H * (e j0 )

if h [n] is real

y[n] = A H (e j0 ) cos 0 n + + arg H (e j0 ) g

})

arg H (e

j0

Im( H (e j0 )) ) = tan Re( H (e j0 ))

Frequency Domain Analysis


Lets take a closed look at the Frequency Response function

H (e j ) = H (e
j ( + 2 )

k =

h[k ]e j k

)=

k =

h[k ]e

j ( + 2 ) k

k =

h[k ]e j k e j 2 k = H (e j ) e j 2 k = 1, k

It i P i di with a Period is 2 !! is Periodic ith P i d i 2


dH (e j ) + d j k = h[k ] e d d k =

It is continuous complex valued-function


7

Frequency Domain Analysis


Example 1.0
1 0 n N 1 h[n] = 0, otherwise
j

N-Point Impulse Response (FIR)

H (e ) =

k =

h[k ]e

j k

= e
k =0

N 1

j k

1 e j N = 1 e j

N sin ( N 1) 2 e j 2 = 1 sin 2

Magnitude Frequency Response


5 4.38 Amplitu - Volts ude 3.75 3.13 H( ) 2.5 1.88 1.25 0.63 0 1 0.8 0.6 0.4 0.2 0 2 Normalized Radians/Sample 0.2 0.4 0.6 0.8 1

2 N

Frequency Domain Analysis


Phase Frequency Response
3.14 2.36 1.57 Phase - Ra adians 0.79 arg( H( ) ) H( 0 0.79 1.57 2.36 3.14 1 0.8 0.6 0.4 0.2 0 2 Normalized Radians/Sample 0.2 0.4 0.6 0.8 1

Frequency Domain Analysis


Important Observation The complex function is in the form of a Complex Fourier Series.

H (e j ) =

k =

h[k ]e

j k

Complex Fourier Series

The so called Dirichlet conditions guarantee that series (right hand side) will be equal to the left hand side H (e j ) Dirichlet conditions are : 1. 2. 2 3.
j The signal H (e ) has finite number of discontinuities in any period

The i Th signal H (e j ) contains a finite number of maxima and minima d i l t i fi it b f i d i i during any period
j g y g y period, that is, , , The signal H (e ) is absolutely integrable in any p

10

H (e j ) d <

Frequency Domain Analysis


A weaker condition, is that if signal has finite energy in one period

H (e j ) d <
j

e( ) = H (e )

k =

h[k ]e jk

Guarantees that the energy in the difference signal is zero

11

Frequency Domain Analysis


It is a Fourier Series if the conditions for existence are satisfied

H (e j ) =

k =

h[k ]e

j k

H (e )e

j m

+ j n j m d = h[n]e e d n =

Interchange summation and integration

H N (e j ) =

n = N

h[n]e

j n

If this sequence converges uniformly

H N (e j ) H (e j ) N

12

Frequency Domain Analysis


+ + j n j m j j m H (e )e d = h[n]e e d = h[n] e j ( n m ) d = n = = n =

j ( n m )

2 m = n d = 0mn

2 x[m] m = n H (e j )e j m d = 0mn

1 2

H (e j )e j m d = h[m]

Therefore it forms a transform pair !!!


13

Frequency Domain Analysis


Fourier Transform Pair
Direct Transform DISCRETE-TIME FOURIER TRANSFORM (DTFT)

H (e j ) =

n =

h[n]e j n

Inverse Transform INVERSE DISCRETE-TIME FOURIER TRANSFORM DISCRETE TIME (IDTFT)

14

1 2

H (e j )e j n d = h[n]

Frequency Domain Analysis


Uniformly convergence is guaranteed if and only if h[n] is absolutely summable
S=
+

k= =

h[k ] <

Sufficient Conditions for Convergence absolutely summable b l t l bl

Some sequences are not absolutely summable, but they are square summable
Eh =
k =

h[k ] <
2

Weaker condition !!

For this sequences We impose the mean-square p q convergence condition

lim N

H (e

) H N (e ) d = 0

15

Frequency Domain Analysis


From the Energy point of view !!!!
Eh =

k =

1 * h[k ] = h[k ]h [n] = h[k ] k = k = 2


2 + +

(e )e

j n

d =

1 Eh = 2

1 H * (e j ) h[k ]e j n d = 2 n =

1 H * (e j ) H (e j )d = 2
j

H (e

) d

Eh =

k =

1 h[k ] = 2
2

H (e

) d

This is Parsevals relation for DT aperiodic signals with finite energy 16

Frequency Domain Analysis


Distribution of energy as a function of frequency, and it is called the energy density spectrum

S hh ( ) = H (e )
j

17

Frequency Domain Analysis


Sample Table

Sequence
[ n]
[n n0 ]

DTFT
1

e jn0
2 ( )
2 ( 0 )
1 1 e j

e jn0
nu[n], < 1
cos(n0 )

( + 0 ) + ( 0 )

18

Frequency Domain Analysis


Example 1.1

h[n] = nu[n]
1 < 1

Infinite Impulse Response (IIR) Absolutely Summable !!!

n =
n=0

Discrete-Time Fourier Transform (Frequency Response)

H (e ) = e
j n =0

n j n

= ( e
n =0

n j

1 = 1 e j

Energy Density Spectrum

19

1 S hh ( ) = 1 2 cos + 2

Frequency Domain Analysis


Important Property Shifting a sequence in time results in the multiplication of DTFT by a complex exponential
y[n] Y (e j ) y[n n0 ] e jn0Y (e j )

y[n] =

k =

h[k ]x(n k )
n =

Convolution in the time-domain

y[n]e

j n

n = k =

h[k ]x(n k )e
j n k =

j n

k =

h[k ] x(n k )e
n =

= h[k ]e j k X (e j ) = H (e j ) X (e j )

Frequency-domain Y (e j ) = H (e j ) X (e j ) Convolution in Frequency domain

20

Frequency Domain Analysis


Given

h[n] System Time-Domain IR


Linear Shift-Invariant System

x[n]
X (e )

y[n] h[n]
Y (e j ) H (e j )
Time-domain Solution -------------

y[n] =

k =

h[k ]x(n k )

Y (e j ) = H (e j ) X (e j )

Frequency-domain Solution-------

21

y[n] =

1 2

Y (e

)e jn d

Frequency Domain Analysis


Given
y[n] = ak y (n k ) + bk x(n k )
k =1 k =0 p q

System Difference Equation

Linear Shift-Invariant System

x[n]
Y (e ) = ak e
j k =1 j p

y[n] = ak y (n k )
k =1

+ bk x(n k )
k =0

y[n]

j k

Y (e ) + bk e j k X (e j )
j k =0

p q j j k = X (e ) bk e j k Y (e ) 1 + ak e k =0 k =1

22

Y (e ) = j X (e )

b e
k =0 p k k =1

j k

1 + ak e jk

= H (e j )

System Frequency Response

Frequency Domain Analysis


Option 1 -Y (e ) = j X (e )
j

bk e j k 1 + ak e j k
k =1 k =0 p

= H (e )

1 h[n] = 2

H (e j )e j n d

System Frequency Response (Frequency Domain)

IDTFT Impulse Response (Time Domain)

System Output Time-domain Convolution

y[n] =

k =

h[k ]x(n k )

23

Frequency Domain Analysis


Option 2 -Y (e j ) = j X (e ) bk e j k 1 + ak e j k
k =1 k =0 p q

= H (e )

Y (e j ) = H (e j ) X (e j )
System Output (Frequency Domain)

System Frequency Response (Frequency Domain)

System Output (Time Domain)

1 y[n] = 2

H (e j ) X (e j )e j n d

24

Frequency Domain Analysis


Example 1.3 - Given the System Difference Equation
y[n] = 1.3433 y[n 1] 0.9025 y[n 2] + x[n] 1.4142 x[n 1] + x[n 2]
1 1.4142e j + e 2 j H (e ) = 1 1.3433e j + 0.9025e 2 j
j

System Frequency Response

Option 1

1 h[n] = 2

H (e

)e

j n

1 d = 2

1 1.4142e j + e 2 j j n 1 1.3433e j + 0.9025e2 j e d

Impulse response

System Output Time-domain Convolution


Option 2

y[n] =

k =

h[k ]x(n k )
System Output (FD)

1 1.4142e j + e 2 j Y (e ) = X ( e ) 1 1.3433e j + 0.9025e 2 j


j j

1 y[n] = 2

1 1.4142e j + e 2 j 1 4142 j j n X (e )e d 1 1.3433e j + 0.9025e2 j

System Output (TD)

25

Frequency Domain Analysis


Example 1.4
j

Given the System Frequency response

1 + e 2 j 0.5 0 5 0 5 + 0.5e 2 j H (e ) = j 2 j 2 e + 0.5e 1 0.5e j + 0.25e 2 j


System Difference E S t Diff Equation ti

y[n] = 0.5 y[n 1] 0.25 y[n 2] + 0.5 x[n] + 0.5 x[n 2]

Impulse Response --(Z-Transform)

h[n] = 0.5h[n 1] 0.25h[n 2] + 0.5 [n] + 0.5 [n 2]

1 Impulse Response --- h[n] = 2 (DTFT)

H (e

)e

j n

1 d = 2

j n 0.5 + 0.5e 2 j 1 0.5e j + 0.25e2 j e d

26

Frequency Domain Analysis


Example 1.5 --- Given the Time-Domain Impulse Response

h[n] = nu[n]

n=0

1 < <1 1

Geometric Series Absolutely Summable !!!


n

Frequency Response System Difference Equation

H (e j ) = n e j n = ( n e j ) =
n =0 n=0

1 1 e j

Y (e j ) 1 H (e ) = = y[n] y[n 1] = x[n] j j X (e ) 1 e


j

27

Frequency Domain Analysis


Closed-Form Expressions For Some Commonly Encountered Series

1 aN a = 1 a n =0
N 1 n

1 a = 1 a a < 1 n =0
n

na =
n

N 1

( N 1)a N +1 Na N + a

n =0

(1 a )

na n =
n =0
N 1

(1 a )

a <1

1 n = N ( N 1) 2 n =0

N 1

1 n 2 = N ( N 1)(2 N 1) 6 n =0

28

Frequency Domain Analysis


Example 1.6 -

x[n]

h[n]

y[n]

Given Let -

h[n] = nu[n] a < 1 x[n] = nu[n] < 1

Stable (absolutely summable)

Required y[n] = ??

y[n] = h[n]* x[n] ]


H (e j ) =
29

Y (e j ) = H (e j ) X (e j )

1 1 , X (e j ) = 1 e j 1 e j

Frequency Domain Analysis


Y (e j ) = A= 1 1 A B = + 1 e j 1 e j 1 e j 1 e j ,B =

+ j Y (e ) = 1 e j 1 e j y[n] = n n u[n]

30

Frequency Domain Analysis


Step #1 Starting with the DTFT of finite length sequence x [n]

x[n] 0 n N 1

Finite length sequence Absolutely Summable (ALWAYS)

X (e ) = x[n]e
j

N 1

j n

DTFT

n= 0

1 x[n] = 2

X (e j )e + j n d

IDTFT

Always exits or converge Periodic 2 Continuous (requires infinite number of values) Complex value function

Is there a simpler relation for the IDTFT ?


THEOREM ----- Only N values of the DTFT, called frequency samples, at N distinct frequency points are sufficient to determine x[n], and hence, DTFT, uniquely. uniquely This is only valid for sequences of finite length.

31

Frequency Domain Analysis


Step #2 Closed look at the DTFT
X (e )
j
0

=0
1 =

2 N

2 N

Fundamental Period

Radians Sample S l

Let us sample the frequency spectrum --------------------------------------------------- = 2 N

------ Frequency Sample Period

N Discrete Frequencies

k = k =

2 k k =01 0,1,........, N 1 N

32

Frequency Domain Analysis


Which of these frequency

0 2 1 N 2 2 N = . . 2 N 2 N 2 N 1 N
All N Discrete Frequencies Radians/Sample

corresponds to (radians/sample) ?

Integer

2 k = N N k= 2
Which of these frequency corresponds to 2 (radians/sample) ? NONE

N Discrete Frequencies Zero frequency (DC) at N/2 the frequency is N/2 -1 Unique Positive Frequencies N/2 Unique Negative Frequency

33

Frequency Domain Analysis


X (e )
j

X (e

j3

2 N

n = 0 n =1 n = 2

n=3

n = N 2 n = N 1 n = N 3

1 2 3
2 N

N 2 N 1 2

FREQUENCIES ---

2 = 2

N 1 = ( N 1) N 2 = ( N 2 )
2 N

0 = 0
1 =

2 N

2 N

3 = 3

34

2 N

Frequency Domain Analysis


Step #3 If we evaluate the DTFT at only those discrete frequencies we obtain the following relationship

X (e jk ) = x[n]e
n= 0

N 1

2 j k n N

= X [k ]

This relation is called the DFT which is also an N-point sequence, it is also referred as the N-Point DFT of x[n]

35

Frequency Domain Analysis


Step #4 Lets assume the form of the IDTF and show that it forms a FT pair
Let us assume that the N-Point IDFT is given by

1 x[n] = N
WN = e

X ( k )e
n =0

N 1

2 + j k n N

0 k N 1

By defining a new complex number as

2 j N

We obtain the following form

1 x[n] = N
2 j k n N

X [ K ]WN
n=0
N 1 n=0

N 1

nk

X [k ] = x[n]e
n =0

N 1

= x[n]WN nk

N-Point DFT

36

Frequency Domain Analysis


X [ k ] = x[n]WN
n =0 N 1 nk

1 = n =0 N
N 1

X [m]WN nm WN nk 0 m=
N 1

x[n]
1 X [k ] = N

X [m]W
n=0 m=0

N 1 N 1

n[ m k ]

1 = N

m =0 n =0

X [m]W
+ WN
2[ m k ]

N 1 N 1

n[ m k ]

1 = N

N 1 n[m k ] 0 X [m] WN m= n =0
N 1

Let L t us look at the term in parenthesis l k t th t i th i

WN
n =0

N 1

n[ m k ]

= WN 0 + WN

[ m k ]

+ .. + WN

( N 1)[ m k ]

0,1, 2 1, 0,1, 2,3,..., m = 0 1 2,..., N 1 k = 0 1 2 3 N 1 m k = i i = 0,1, 2,....


( N 1)[i ]

Let us re-define a new index as

WN + WN
0

[ i ]

+ WN

2[i ]

+ .. + WN

= WN

i 0

) + (W ) + (W )
i 1 N N

i 2

+ .. + WN

i ( N 1)

1 WN

( ) 1 (W )
i N

i N

37

Frequency Domain Analysis


1 WN

( ) 1 (W )
i N

i N

1 e

2 Ni N
j 2 i N

1 cos ( 2 i ) j sin ( 2 i )
1 e
j 2 i N

1 e
0

0 i = 0,1, 2,3,.., N 1, N + 1,... = N i = N , 2 N ,3 N , 4 N ,5 N ,...


, , , N m k = rN , r = 1, 2,3,.... = 0 otherwise

WN
n=0

N 1

n[ m k ]

= WN + WN

[ m k ]

+ WN

2[ m k ]

+ .. + WN

( N 1)[ m k ]

1 X [k ] = N

N 1 n[m k ] = X [k ] 0 X [m] WN m= n =0
N 1

It is FT Pair !!!!!!!!!!!!!!!!!!!
38

Frequency Domain Analysis


Step #5 Show that we can recover the DTFT from the N-point DFT

X (e ) = x[n]e j n 0 k N 1
j n =0

N 1

DTFT

1 j X (e ) = n =0 N
N 1

X [k ]e
k =0

N 1

+j

2 kn N

j n 1 = e N

X [k ]e
n =0 k =0

N 1 N 1

2 j k n N

IDFT

1 j X (e ) = N
39

X (k )e
k =0 n =0

N 1 N 1

2 j k n N

Frequency Domain Analysis


1 j X (e ) = N

X (k )e
k =0 n =0

N 1 N 1

2 j k n N

1 = N

X ( k ) e
k =0 n =0

N 1

N 1 j 2 k n N

1 X (e ) = N
j

X (k )
k =0

N 1

1 e

2 j k N N 2 j k N

1 e

N 2 sin k N 1 2 N j[ 2N k ][ N 1 ] e 2 2 = X ( k ) 1 2 k =0 N sin k N 2

Interpolation Formula
N 2 sin k N 1 N j[ 2N k ][ N 1 ] 2 j 2 2 X (e ) = X ( k ) e 1 2 k =0 N sin i k N 2 40

Frequency Domain Analysis

Simulation MathCAD Example p

41

FIN !!!!
42

You might also like