You are on page 1of 23

Lecture 6: The Discrete-Time Fourier Analysis

(DTFT)

Prof. Dr. Salina A.


Samad
Mr. Iskandar Yahya
The discrete-time Fourier
transform(DTFT)
If x(n) is absolutely sum able:

∑−∞ x( k ) < ∞

Then, discrete-time Fourier transform(DTFT):

) ≅ F [ x( n )] = ∑ −∞ x( n )e − jwn
jw ∞
X(e

Inverse discrete-time Fourier transform(IDTFT)


of X(ejw):
1 π

−1 − jw jw jwn
x( n ) ≅ F [ X ( e )] = X ( e )e dw
2π − π
Two important properties
1. Periodicity
 The DTFT X(ejw) is periodic in w with period 2π:

X ( e jw ) = X ( e j( w + 2 π ) )
 Implication:
 We need only one period of X(ejw)
 i.e. w∈[0,2π], or [- π, π], ect.
2. Symmetry
 For real-valued x(n), X(ejw) is conjugate symmetric
 X(ejw) = X*(ejw) or
 - Re[X(e-jw)] = Re[X(ejw)] (even symmetry)
- Im[X(e-jw)] = Im[X(ejw)] (odd symmetry)
-|X(e-jw)| = |X(ejw)| (even symmetry)
- phase(X(e-jw)) = phase(X(ejw)) (odd symmetry)
 Implication:
 We need only half period of X(ejw)
 i.e. w∈[0,π]
The discrete-time Fourier
transform(DTFT)
Example 1: Determine the DTFT of :
x( n ) = ( 0.5 )n u( n )

) = ∑ −∞ x( n )e = ∑0 ( 0.5 )n e − jwn
jw ∞ − jwn ∞
X(e
1 e jw
= ∑ − ∞ ( 0.5e − jw )n =

− jw
=
1 − 0.5e e jw − 0.5
The discrete-time Fourier
transform(DTFT)
Matlab implementation for Example 1:
 plot magnitude, angle, real, imaginary parts of ex 3.1
between [0, π]
>> w = [0:1:500]*pi/500; % [0, pi] axis divided into 501
points from 0 to pi.
X = exp(j*w) ./ (exp(j*w) - 0.5*ones(1,501));
magX = abs(X); angX = angle(X);
realX = real(X); imagX = imag(X);

>>subplot(2,2,1); plot(w/pi,magX); grid


xlabel('frequency in pi units'); title('Magnitude Part');
ylabel('Magnitude')
>> subplot(2,2,3); plot(w/pi,angX); grid
xlabel('frequency in pi units'); title('Angle Part');
ylabel('Radians')
>> subplot(2,2,2); plot(w/pi,realX); grid
xlabel('frequency in pi units'); title('Real Part');
ylabel('Real')
>> subplot(2,2,4); plot(w/pi,imagX); grid
xlabel('frequency in pi units'); title('Imaginary Part');
ylabel('Imaginary')
The Discrete-Time Fourier
Transform(DTFT)
Matlab implementation for Example 1:
 plot magnitude, angle, real, imaginary parts of ex 3.1
[0, π]
betweenMagnitude Part
2 2
Real Part

1.8 1.8

1.6 1.6
Magnitude

1.4 1.4

Real
1.2 1.2

1 1

0.8 0.8

0.6 0.6
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

frequency in pi units frequency in pi units
Angle Part Imaginary Part
0 0

­0.1 ­0.1

­0.2 ­0.2
Imaginary
Radians

­0.3 ­0.3

­0.4 ­0.4

­0.5 ­0.5

­0.6 ­0.6

­0.7 ­0.7
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

frequency in pi units frequency in pi units
The discrete-time Fourier
transform(DTFT)
Example 2: Determine the DTFT of the
following finite-duration sequence:
x( n ) = { 1, 2 ,3, 4 ,5 }

) = ∑−∞ x( n )e − jwn = e jw + 2 + 3e − jw + 4e − j 2 w + 5e − j 3w
jw ∞
X(e
The discrete-time Fourier
transform(DTFT)
Matlab implementation for Example 2:

>> n = -1:3; x = [1,2,3,4,5]; % sequence x(n)


k = 0:500; w = (pi/500)*k; % [0, pi] axis divided into 501 points.
X = x * (exp(-j*pi/500)) .^ (n'*k); % DTFT using matrix-vector product
magX = abs(X); angX = angle(X);
realX = real(X); imagX = imag(X);

subplot(2,2,1); plot(w/pi,magX); grid


xlabel('frequency in pi units'); title('Magnitude Part');
ylabel('Magnitude')
subplot(2,2,3); plot(w/pi,angX); grid
xlabel('frequency in pi units'); title('Angle Part'); ylabel('Radians')
subplot(2,2,2); plot(w/pi,realX); grid
xlabel('frequency in pi units'); title('Real Part'); ylabel('Real')
subplot(2,2,4); plot(w/pi,imagX); grid
xlabel('frequency in pi units'); title('Imaginary Part');
ylabel('Imaginary')
The discrete-time Fourier
transform(DTFT)
Matlab implementation for Example 2:
Magnitude Part Real Part
16 15

14
10
12
Magnitude

10

Real
5
8

6
0
4

2 ­5
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

frequency in pi units frequency in pi units
Angle Part Imaginary Part
4 4

2
2
0
Imaginary
Radians

­2
0
­4

­6
­2
­8

­4 ­10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

frequency in pi units frequency in pi units
The discrete-time Fourier
transform(DTFT)
Example 3:
Let, x(n) = (0.9ejπ/3)n, 0≤n≤10,
Then, find X(ejw) ? Investigate its Periodicity?

>> n = 0:10; x = (0.9*exp(j*pi/3)).^n;


k = -200:200; w = (pi/100)*k;
X = x * (exp(-j*pi/100)) .^ (n'*k);
magX = abs(X); angX =angle(X);
subplot(2,1,1); plot(w/pi,magX);grid
axis([-2,2,0,8])
xlabel('frequency in units of pi'); ylabel('|X|')
title('Magnitude Part')
>> subplot(2,1,2); plot(w/pi,angX/pi);grid
axis([-2,2,-1,1])
xlabel('frequency in units of pi'); ylabel('radians/pi')
title('Angle Part')
The discrete-time Fourier
transform(DTFT)
Magnitude Part
8

6
|X|

0
­2 ­1.5 ­1 ­0.5 0 0.5 1 1.5 2

frequency in units of pi
Angle Part
1
radians/pi

0.5

­0.5

­1
­2 ­1.5 ­1 ­0.5 0 0.5 1 1.5 2

frequency in units of pi

 From the plot, we observe that X(ejw) is periodic in ω but is


not conjugate-symmetric.
The discrete-time Fourier
transform(DTFT)
Example 4:
 Let, x(n) = (0.9)n, -5≤n≤5,
 Then, determine X(ejw) ? Investigate the Conjugate-
symmetry property?

>> n = -5:5; x = (-0.9).^n;


k = -200:200; w = (pi/100)*k;
X = x * (exp(-j*pi/100)) .^ (n'*k);
magX = abs(X); angX =angle(X);
subplot(2,1,1); plot(w/pi,magX);grid
axis([-2,2,0,15])
xlabel('frequency in units of pi'); ylabel('|X|')
title('Magnitude Part')
subplot(2,1,2); plot(w/pi,angX/pi);grid
axis([-2,2,-1,1])
xlabel('frequency in units of pi'); ylabel('radians/pi')
title('Angle Part')
The discrete-time Fourier
transform(DTFT)
Magnitude Part
15

10
|X|

0
­2 ­1.5 ­1 ­0.5 0 0.5 1 1.5 2
frequency in units of pi
Angle Part
1
radians/pi

0.5

­0.5

­1
­2 ­1.5 ­1 ­0.5 0 0.5 1 1.5 2
frequency in units of pi

 From the plot above, we observe that X(ejw) is periodic in ω


and also conjugate-symmetric.
The Properties of DTFT
Let, X(ejw) be the discrete time Fourier Transform
of x(n), Then:
1. Linearity
F [ αx1( n ) + βx2 ( n )] = αF [ x1( n )] + βF [ x2 ( n )]
 2. Time shifting
F [ x( n − k )] = X ( e jw )e − jwk
 3. Frequency shifting
F [ x( n )e jw0 k ] = X ( e j( w− w0 ) )
 4. Conjugation
F [ x* ( n )] = X * ( e − jw )
 5. Folding
F [ x( − n )] = X ( e − jw )
x( n ) = xe ( n ) + xo ( n )
 6. Symmetries in real sequences
then ) F [ xe ( n )] = Re[ X ( e jw )]
F [ xo ( n )] = j Im[ X ( e jw )]
The Properties of DTFT

 7. Convolution
F [ x1( n )* x2 ( n )] = F [ x1( n )] F [ x2 ( n )] = X 1( e jw ) X 2 ( e jw )
 8. Multiplication
1
F [ x1( n ) ⋅ x2 ( n )] = F [ x1( n )] ⊗ F [ x2 ( n )] =
2π ∫
X 1( e jθ ) X 2 ( e jθ )dθ

Exercise: Verify the properties of DTFT using


Matlab by using numerical (random
sequences) or graphical approach
(cosine/exponential sequences).
The LTI Systems
Frequency domain representation
Frequency Response
 The discrete-time Fourier transform of an impulse
response is call the Frequency Response (or Transfer
Function) of an LTI system and is denoted by :
(eqn 1)

 Then we can represent the system by:


(eqn
2)

 The output sequence is the input exponential


sequence modified by the response of the system at
frequency ωo.
 Note that we have the gain (magnitude) response
The LTI Systems
 Example 1: Determine the frequency response H(ejw) of a
system characterized by h(n) = (0.9)n u(n). Plot the
magnitude and phase responses.
 Solution:
 Use (eqn 1):

 Hence

 and
The LTI Systems
 To plot, we can implement both magnitude and phase
responses, or the frequency response then compute its
magnitude and phase. The second approach is more
practical with Matlab:

W = [0:1:500]*pi/500; % [0, pi] axis divided into


501 points.
H = exp(j*W) ./ (exp(j*W) - 0.9*ones(1,501));
magH = abs(H); angH = angle(H);
subplot(2,1,1); plot(W/pi, magH); grid;
xlabel('frequency in pi units'); ylabel('|H|');
title('Magnitude response');
subplot(2,1,2); plot(W/pi, angH/pi); grid;
xlabel('frequency in pi units'); ylabel('Phase in pi
radians');
title('Phase Response');
The LTI Systems
 The plot:

Magnitude response
12

10

8
|H|

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
frequency in pi units
Phase Response
0
Phase in pi radians

­0.1

­0.2

­0.3

­0.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
frequency in pi units
The LTI Systems
 Example 2: An LTI system is specified by the difference
equation:

 a) Determine H(ejw).
 b) Calculate and plot the steady-state response yss(n) to:

 Solution:
Rewrite as y(n) – 0.8y(n-1) = x(n)
a) Use (eqn 2):
The LTI Systems
 Solution:

b) In the steady state the input is x(n) = cos(0.05πn) with


frequency wo = 0.05π and θ0 = Oo. The response of the
system is:

Therefore,

This means that at the output the sinusoidal is scaled by


4.0928 and shifted by 3.42 samples. This can be verified
using matlab (plot).
The LTI Systems
 Matlab implementation:

subplot(1,1,1)
b = 1; a = [1,-0.8];
n=[0:100]; x = cos(0.05*pi*n);
y = filter(b,a,x);
subplot(2,1,1); stem(n,x);
xlabel('n'); ylabel('x(n)');
title('Input Sequence')
subplot(2,1,2); stem(n,y);
xlabel('n'); ylabel('y(n)');
title('Output sequence')
The LTI Systems
 Matlab implementation (PLOT):

Input Sequence
1

0.5
x(n)

­0.5

­1
0 10 20 30 40 50 60 70 80 90 100
n
Output sequence
5

3.42
4.092 
y(n)

­5
0 10 20 30 40 50 60 70 80 90 100
n

You might also like