You are on page 1of 59

CHAPTER 3:

DISCRETE-TIME FOURIER TRANSFORM


& APPLICATIONS

Lesson #8: Review of Sampling


Lesson #9: Discrete-Time Fourier Transform (DTFT)
and the Inverse of DTFT
Lesson #10: Applications of DTFT
Duration: 5 hrs
Lecture #8
Review of Sampling

 Duration: 1 hrs
 Outline:
1. Sampling CT signals
2. Spectrum of sampled signals
3. Aliasing
Sampling CT signals

CT signal CT impulse train Sampled signal

x(t )  
→ xs (t )
sampling

∞ ∞
xs (t ) = ∑ x(t )δ (t − nT ) = ∑ x(nT )δ (t − nT )
n = −∞ n = −∞

Signal xs(t) consists of a train of CT impulses – take


off the arrow heads to get x(n) – a DT signal
Spectrum of sampled signals
Consider y(t) = xs(t) = x(t).p(t) in the frequency domain
Take Fourier transform of x(t)

X(ω) = FT{x(t)} and P(ω) = FT{p(t)}


Spectrum of sampled signals
Finding FT{p(t)}, using the continuous-time FT of periodic signals
∞ ∞
p (t ) = ∑ δ (t
n = −∞
− nT ) ←→
FT
P(ω ) = ∑ 2πanδ (ω − nω s )
n = −∞

1 T /2 1
an =
T ∫−T / 2 δ (t )e dt = T
− jωt
⇒ P(ω ) = ∑ ω δ (ω − nω )
n = −∞
s s

A CT impulse train has a FT that is an impulse train in frequency


Spacing between pulses in time is T
Spacing between pulses in frequency is 2π/T
Increasing period in time domain decreases it in frequency domain
Spectrum of sampled signals
Back to Xs(ω); with ωs: the sampling frequency

1  ∞ 
X s (ω ) = X (ω ) *  ∑ ω sδ (ω − nω s )
2π n = −∞ 
ωs ∞
1 ∞
=


n = −∞
X (ω − nω s ) = ∑ X (ω − nω s )
T n = −∞
The effect of sampling is an infinite sum of scaled, shifted
copies of the continuous time signal's Fourier Transform
Aliasing

Note that the triangles don’t overlap – so with an ideal


low pass filter with cut-off frequency ω=π/T, we could
filter xs(t) to perfectly recover x(t)
Aliasing

Aliasing: the triangles overlap  can’t recover x(t)


- Happens when ωs = 2π/T < ωb/2

0 ωb ωs
Aliasing

Avoid
aliasing:
sampling faster
than twice the
highest
frequency
component –
The Nyquist-
Shannon
sampling
theorem
Lecture #9
DTFT and the inverse of DTFT

 Duration: 2 hrs
 Outline:
1. From CTFT to DTFT
2. From ZT to DTFT
3. The inverse of DTFT
4. Properties of DTFT
From continuous-time Fourier transform
(CTFT) to discrete-time Fourier
transform (DTFT)
Take a CT signal x(t) and sample it:

x(t ) sampling
 → xs (t ) = ∑ x(nT )δ (t − nT )
n = −∞
The CTFT of the sampled signal is:

FT{x s ( t )} = ∑ x (nT)FT{δ(t − nT)}
n = −∞
∞ ∞
= ∑
n = −∞
x (nT) ∫ δ( t − nT)e − jωt dt
−∞
∞ T =1 ∞
= ∑ x (
n = −∞
nT ) e − jωnT
=
ωT = Ω
∑ x (
n = −∞
n ) e − jΩn
= X (Ω )
DTFT formula


X(Ω) = DTFT{x[n ]} = ∑ x[n ] e − jΩ n

n = −∞

Discrete in time, but continuous in frequency and periodic with


period of 2π
Gives the complex frequency spectrum of DT signal
Not all DTFT is converge
Convergence of the DTFT
We always have: ∞ ∞

∑ x[n ]e
n = −∞
− jΩn
≤ ∑ x[n ]e
n = −∞
− jΩn


≤ ∑ x[n ] e
n = −∞
− jΩn


≤ ∑ x[n ]
n = −∞
 DTFT exists when:

∑ x[n ] < ∞
n = −∞
Examples of calculating DTFT

1) Find DTFT of x(n) where x[n] = a u[n]


n

If |a| < 1:
∞ ∞ jΩ
1 e
X )=∑
(ΩDTFT a ewhen:= ∑ (ae
exists n − jΩn
) =
− jΩ n
= jΩ
n =0 n =0 1 − ae − jΩ
e −a
Examples of calculating DTFT

2) Find DTFT of x(n) where y[n] = a u[− n]


n

If |a| > 1:

0 ∞
1 −a
Y (Ω ) = ∑a e
n = −∞
n − jΩn
= ∑ (a e ) =
n =0
−1 jΩ n

1− a e
−1 jΩ
= jΩ
e −a
Examples of calculating DTFT

3) Find DTFT of p(n) where p[n] = u[n] − u[ n −  ]


Show that this DTFT has a linear phase term
N −1
1− e − jΩN

P(Ω) = ∑1.e − jΩn


=
n =0 1− e − jΩ

e − jΩN / 2
e −e
jΩN / 2 − jΩN / 2 Ω
− j ( N −1) sin(ΩN / 2)
P ( Ω ) = − jΩ / 2 . jΩ / 2 − jΩ / 2 = e 2

e e −e sin(Ω / 2)
Phase: -Ω(N-1)/2  linear in phase
Examples of calculating DTFT
4) Find DTFT of h(n) where h[n] = δ [n] + 2δ [n − 1] + 2δ [n − 2] + δ [n − 3]
Show that this DTFT has a linear phase term
3
H(Ω) = ∑ h[n ]e − jΩn
= 1 + 2e − jΩ
+ 2e − j2 Ω
+e − j3 Ω

n =0

H(Ω) = (1 + e − j3Ω ) + 2(e − jΩ + e − j2 Ω )


3Ω 3Ω 3Ω 3Ω Ω Ω
−j j −j −j j −j
=e 2
(e 2
+e 2
) + 2e 2
(e + e
2 2
)
−j
3Ω
 3Ω Ω
=e 2
 2 cos + 4 cos 
 2 2
Phase: -3Ω/2  linear in phase
From ZT to DTFT

Recall ZT of x(t):

X(z) = ∑x[n]z
n =−∞
−n

Evaluating X(z) on the unit circle (if the unit circle is in the
ROC of X(z)


X(z)
z =e j Ω
= ∑ x[n ]e
n = −∞
− jΩ n
= X (Ω)
From ZT to DTFT

DTFT is the Z-transform of x(n) evaluated on the unit circle

X (Ω ) = X ( z )
z =e j Ω

If the ROC of the ZT contains the unit circle, we can get the
DTFT from the ZT by substitution z = ejΩ
The inverse of DTFT

X(Ω) = ∑ x[n
n =−∞
] e − jΩ n

π π ∞
1 1  − jΩ n  jΩ l

2π − π
jΩ l
X (Ω)e dΩ = ∫  ∑
2π − π  n = −∞
x[n ]e 

e dΩ

∞  1 π jΩ ( l − n ) 
= ∑ x[ n ] ∫ e dΩ  = x[l]
n = −∞  2π − π 
π
1

jΩ n
x[n ] = X(Ω) e dΩ
2π − π
Examples of calculating the
inverse DTFT

1, Ω ≤ Ω c
1. Find x(n) from its DTFT X(Ω): X(Ω) = 
0, Ω c < Ω < π

1 Ωc
1 jΩn Ω c sin Ωc n
x[n ] = ∫ 1.e dΩ =
jΩn
.e Ωc
−Ωc
=
2π − Ωc
2πjn π Ωc n
Examples of calculating the
inverse DTFT

2. Find x(n) from its DTFT X(Ω): X(Ω) = cos 2 Ω

2
 e + e  1 j2Ω 1 1 − j2Ω
jΩ − jΩ

X (Ω) =   = e + + e
 2  4 2 4
1 1 1
⇒ x[n ] = δ[n + 2] + δ[n ] + δ[n − 2]
4 2 4
Examples of calculating of
the inverse of DTFT

e jΩ
3. Find x(n) from its DTFT X(Ω): X (Ω) =
e jΩ − 2

z
X(z) = | z |< 2
z−2
⇒ x[n ] = −2 u[−n − 1]
n
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Convolution in time domain
5. Convolution in frequency domain
Linearity

DTFT
ax[n ] + by[n ] ↔ aX(Ω) + bY(Ω)

The DTFT of a linear combination of two or more


signals is equal to the same linear combination of the
DTFT of the individual signals.
Time shifting

DTFT
x[n − n 0 ] ↔ e − jΩ n 0
X (Ω)
Proof: infer from the shifting property of ZT
ZT
−n 0
x[n − n 0 ] ↔ z X(z)

 A shift in time causes a linear phase shift in


frequency – no change in DTFT magnitude
Frequeny shifting and modulation
DTFT
jΩ 0 n
e x[n ] ↔ X (Ω − Ω 0 )
DTFT
1 1
cos(Ω0 n ) x[n ] ↔ X (Ω − Ω 0 ) + X (Ω + Ω 0 )
2 2

DTFT ∞ ∞
e jΩ 0 n
x[n ] ↔ ∑ (e
n = −∞
jΩ 0 n
x[n ])e − j Ωn
= ∑ x[ n
n = −∞
]e − j( Ω −Ω ) n
0
= X (Ω − Ω 0 )

 Modulation causes a shift in frequency


Convolution in time domain

DTFT
x 1[ n ] ∗ x 2 [ n ] ↔ X1 (Ω).X 2 (Ω)

Convolution in time  Multiplication in frequency


Convolution in frequency domain
DTFT
1 1
x1[n ].x 2 [n ] ↔ ∫ X1 (λ )X 2 (Ω − λ)dλ = X1 (Ω) ∗ X 2 (Ω)
2π 2 π 2π
DTFT ∞
x1[n ].x 2 [n ] ↔ ∑ 1
( x
n = −∞
[ n ].x 2 [ n ]) e − jΩn

Multiplication ∞
 1 
in time = ∑ ∫ X ( λ ) e jλ n
dλ  2
x [ n ]e − jΩn

n = −∞  2π 2 π
1


1  x [n ] e − j( Ω−λ ) n dλ
= ∫ X ( λ )∑ 2 
2π 2 π  n = −∞ 
1

1
= ∫ X ( λ ) X ( Ω − λ ) dλ Convolution in
2π 2 π
1 2
frequency
HW

Prob.1 Compute the DTFT of the following signals

{
a ) x[n ] = − 2 , − 1 , 0 , 1 , 2

}
2 − ( 12 )n | n |≤ 4
b) y[n ] = 
0 | n |> 4
c) v[n ] = 2 u[−n ]
n

d) h[n ] = a n sin(Ω 0 n )u[n ]


e) w[n ] = u[n ] − u[n − 6]
HW

Prob.2 Determine the signal having the DTFT shown in


following figure
2

−π π
HW

Prob.3 Consider the signal

{
x[n ] = − 1 , 2 , − 3 , 2 , − 1

}
with DTFT X(Ω). Compute the following quantities without
explicitly computing X(Ω)
π
(a ) X(0) (b) ∠X(Ω) (c) ∫−π X(Ω)dΩ (d) X(π)
HW

Prob.4 A signal x(n) has the following DTFT:


1
X (Ω) =
1 − ae − jΩ

Determine the DTFT of the following signals:

( a ) x[n ] ∗ x[n − 1]
(b) x[n ] cos(0.3π n )
jπn / 2
(c) e x[n + 2]
Lecture #10
DTFT applications

 Duration: 2 hr
 Outline:
1. Frequency spectrum analysis
2. System analysis in frequency-domain
Frequency spectrum

 Representation of the signal in the frequency domain


 Being generated via:
- CTFT for aperiodic CT signal
- CT Fourier series for periodic CT signal
- DTFT for aperiodic DT signal
- DT Fourier series for periodic DT signal
Frequency spectrum
Spectrum analysis

 Spectrum analysis: the technical process of


decomposing a complex signal into simpler parts.
 Any process that quantifies the various amounts
(e.g. amplitudes, powers, intensities, or phases),
versus frequency can be called spectrum analysis.
Amplitude spectrum and
phase spectrum

jθ(Ω)
X(Ω) = X(Ω) e
Amplitude spectrum Phase spectrum
∞ ∞
X (Ω) = ∑ x[n ]e
n = −∞
− jΩn
; X ( −Ω) = ∑ x[n]e
n = −∞
jΩn

⇒ X (Ω ) = X ( − Ω )
*

⇒ | X(Ω) |=| X(−Ω) | and ∠X(Ω) = −∠X(−Ω)


Example of finding amplitude
spectrum and phase spectrum

Find and plot amplitude spectrum and phase spectrum:

x[n] = u[n] - u[n - 4]

− j 4Ω
3
1− e
X (Ω) = ∑ e − jΩn
= − jΩ
n =0 1 − e
sin(2Ω) − j 3Ω / 2
= e
sin(Ω / 2)
Using Matlab to plot amplitude
spectrum and phase spectrum

w = -2*pi:pi/255:2*pi; % freq. -2π  2π, resolution of π/255


X =4*sinc(2*w/pi)./sinc(w/(2*pi)).*exp(-j*1.5*w);
subplot(2,1,1);
plot(w/pi,abs(X)); % plot amplitude spectrum
subplot(2,1,2);
plot(w/pi,phase(X)); % plot phase spectrum
Amplitude spectrum
6

0
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Phase spectrum
Energy spectral density
(ESD)

π
∞ ∞ ∞  1 
E = ∑ | x[n] | = ∑ x[n]x [n] = ∑ x[n]
2 *
∫π X
*
(Ω )e − jΩn
dΩ 
n = −∞ n = −∞ n = −∞  2π − 

Changing the order of summation & intergral:

π ∞ π
1  − jΩn  1
∫ X (Ω)  ∑ x[n ]e ∫
2
E= *
dΩ = X(Ω) dΩ
2π − π n = −∞  2π − π
Energy spectral density
Example of finding ESD

x[n] = anu[n], -1<a<1


1
X (Ω) =
1 − ae− jΩ
1 1
| X (Ω) | =
2
=
| 1 − ae | | 1 − a cos Ω + ja sin Ω |2
− jΩ 2

1
=
(1 − a cos Ω) + (a sin Ω)
2 2

1
=
1 + a 2 − 2a cos Ω
Example of finding ESD
3

2.5
mat do pho nang luong

E
1.5
S
D
1

0.5

0
-3 -2 -1 0 1 2 3
tan so omega
Frequency response

 For impulse response, h(n), its DTFT is often called


frequency response H(Ω)
 H(Ω) completely characterizes a LTI system in the
frequency domain
 H(Ω) allows us to determine the steady-state response of
the system to any arbitrary weighted linear combination
of sinusoids or complex exponential
Examples of determine
frequency response
 A LTI causal system is described by the following equation:

y[n] + 0.1y[n − 1] + 0.85 y[n − 2] = x[n] − 0.3 x[n − 1]


 First, checking the stability of the system (by using Matlab):
b = [1 -0.3];
a = [1 0.1 0.85];
zplane(b,a) % plot zeros and poles to check if all poles are
inside the unit circle

 Second, take DTFT for two sides:

1 − 0.3e − jΩ
H (Ω ) =
1 + 0.1e − jΩ + 0.85e − j 2 Ω
Examples of determine amplitude
and phase responses
1
H (Ω ) =
1 − 0.4e − jΩ
1 1
| H(Ω) |= =
| 1 − 0.4e | | 1 − 0.4 cos Ω + j0.4 sin Ω |
− jΩ

1
=
(1 − 0.4 cos Ω) 2 + (0.4 sin Ω) 2
1
=
1.16 − 0.8 cos Ω

 0.4 sin Ω 
∠H (Ω) = 0 − ∠(1 − 0.4e − jΩ
) = −arctg 
 1 − 0.4 cos Ω 
Examples of determine amplitude
and phase responses
1
H (Ω) =
1 − 0.4e − jΩ
2

1.5

0.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

0.5

-0.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Response to complex exponential
signals
jΩ 0 n
x[n ] = Ae , −∞ < n < ∞

y[n ] = ∑ h[k ] x[n − k ]
k = −∞


y[n] = ∑ h[ k ] Ae(jΩ 0 ( n − k )
)
k = −∞

 ∞ − jΩ 0 k  jΩ 0 n
= A ∑ h[k ] e ( e)
k = −∞ 
= ( Ae jΩ0 n ) H (Ω 0 ) = x[n]H (Ω 0 )
Example of determining response
to complex exponential signals
Determine the output signal of system h[ n ] = (1 / 2) n
u[n ]
to the input signal below
π
j n
x[n ] = Ae 2
, −∞ < n < ∞
π 1 2 − j26.60
H  = = e
 2  1+ j 2
1
5
π
π π 
2 − j26.6 2A
j n j n − 26.6 0 
y[n ] = x[n ]H  = Ae . e =
0
2 
2
e
2 5 5
Response to sinusoidal signals
A jΩ n A − jΩ n
x[n ] = A cos(Ω 0 n ) = e + e 0
, −∞<n <∞ 0

2 2

A jΩ 0 n A − jΩ 0 n
y[n ] = e H (Ω 0 ) + e H ( −Ω 0 )
2 2
A jΩ 0 n j∠H ( Ω 0 ) A − jΩ 0 n
= e | H (Ω 0 ) | e + e | H ( Ω 0 ) | e − j ∠H ( Ω 0 )
2 2
= A | H (Ω 0 ) | cos(Ω 0 n + ∠H (Ω 0 ) )
Example of determining response
to sinusoidal signals
Determine the response of the system h[n ] = (1 / 2) n u[n ]
to the input signal
π
x[n ] = 10 − 5 sin n + 20 cos πn , − ∞ < n < ∞
2
1  π  2 − j26.6 1 2
H(0) = = 2 ; H  = ; H(π) = =
0
e
1 − 0.5 2 5 1 + 0.5 3

π π 
y[n ] = 10 | H(0) | −5 H  sin  n + ∠H( π2 ) 
2 2 
+ 20 | H(π) | cos(πn )
π 0 40
= 20 − 2 5 sin  n − 26.6  + cos(πn )
2  3
Steady-state and transient
response to sinusoidal signals
The system response consists of 2 terms:

y[n ] = yss [n ] + y tr [n ]
yss[n]: steady-state response
.

ytr[n]: transient response, decays toward zero as n  ∞


In many practical applications, the transient response is
unimportant and therefore, it is usually ignored
Example of determining steady-
state and transient response

The LTI system described by first-order equation:

y[n ] − ay[ n − 1] = x[n ] |a| < 1

Its response to the input: x[n ] = Ae jΩn , n ≥ 0


is determined as.
n +1 − jΩ ( n +1)
Aa e A
y[n ] = a y[−1] −
n +1
e jΩn
+ e jΩn
, n≥0
1 − ae− jΩ 1 − ae − jΩ

where y[-1] is the initial condition


Example of determining steady-
state and transient response

n +1 − jΩ ( n +1)
Aa e A
y[n ] = a y[−1] −
n +1
e jΩn
+ e jΩn

1 − ae − jΩ
1 − ae − jΩ

Transient response Steady-state response

yss [n ] = AH(Ω)e jΩn


≡ AH(e )e jΩ jΩn

M M
x[n ] = ∑ A k z n
k
⇒ yss [n ] = ∑ A k H(z k )z n
k
k =1 k =1
HW

Prob.5 Determine and sketch the magnitude and phase


response of the following systems
1
a ) x[n ] = (δ [n ] − δ [n − 2])
2
1
b) x[n ] = (δ [n ] − 2δ [n − 1] + δ [n − 2])
2
1
c ) x[n ] = (δ [n ] + 3δ [n − 1] + 3δ [n − 2] + δ [n − 3])
8
HW

Prob.6 Determine the steady-state and transient responses of


the system
1
y[n ] = (x[n ] − x[n − 2])
2
to the input signal

π 
x[n ] = 5 + 3 cos n + 600  − ∞ < n < ∞
2 
HW

Prob.7 An FIR filter is described by the difference equation


y[n] = x[n] − x[n − 10]
a) Compute and sketch its magnitude and phase response

b) Determine its response to the inputs


π π π
(1) x[n ] = cos n + 3 sin  n +  − ∞ < n < ∞
10 3 10 
 2π π
(2) x[n ] = 10 + 5 cos n +  − ∞ < n < ∞
 5 2
HW

Prob.8 Determine the coefficients of a linear-phase FIR filter

y[n ] = b0 x[n ] + b1x[n − 1] + b 2 x[n − 2]

such that:
(a) It rejects completely a frequency component at Ω 0 = 2π / 3
(b) Its frequency response is normalized so that H(0) = 1
(c) Compute and sketch the magnitude and phase response of
the filter to check if it satisfies the requirements

You might also like