You are on page 1of 14

Chapter 4

Discrete Time Fourier Transform

The development in terms of vector spaces was geared towards handling discrete-time
aperiodic infinite length sequences. We now develop the discrete-time Fourier transform,
which is the representation of aperiodic infinite length sequences with finite energy (i.e.,
sequences in ℓ2 (Z)) in terms of complex exponentials. We start by first considering its
connection to finite length sequences.
Suppose we have an arbitrary sequence x ∈ ℓ2 (Z). Then we consider a finite length
sequence x̆M such that,

x[n] −M + 1 ≤ n ≤ M − 1
x̆M [n] = (4.1)
0 else.

Clearly, x̆M [n] is a finite length sequence which is zero outside an interval of length 2(M −
1) + 1 = 2M − 1. Therefore we can represent x̆M using the discrete-Fourier transform
(DFT) as
M
X −1 M
X −1
−jk 2π n 2π
X̆M [k] = x̆[n]e N = x[n]e−j N kn (4.2)
n=−M +1 n=−M +1

where we have defined N = 2M − 1.

Also note that


+∞
X 2π
X̆M [k] = x̆M [n]e−j N kn
n=−∞

since x̆M [n] = 0, for n > M − 1, and n < −M + 1.

41
42 Chapter 4.

By letting M become large, one can define a function:


+∞
X
X(ejω ) = x[n]e−jωn , (4.3)
n=−∞

but we are still uncertain about whether this is a well-defined function. To examine this,
let us define:
+∞
X M
X −1
XM (ejω ) = x̆M [n]e−jωn = x[n]e−jωn
n=−∞ n=−M +1

which is well-defined since it is a finite summation. Also note that


 
XM [k] = XM ejkω0 (4.4)


where ω0 = N. Now, using our synthesis representation of DFT, we can write,
 P −1 j 2π
 N1 Mk=−M +1 X̆M [k]e
N
kn
−N1 − 1 ≤ n ≤ N1 − 1
x̆M [n] = (4.5)

0 else.
2π 1 ∆
Now, by defining ∆ = N, N = 2π gives for n ∈ {−N1 − 1, · · · , N1 − 1}
1 X  
x̆M [n] = X̆M ejω0 k ej∆kn ∆

k

Letting M → ∞, we see that x̆M [n] → x[n] and we have


Z
1 
x[n] = x̆M [n] = X ejω ejωn dω,
2π 2π
where
M
X −1
 
X ejω = lim XM ejω = lim x[n]e−jωn
M →∞ M →∞
n=−M +1

yielding:
Z
1 
x[n] = X ejω ejωn dω =⇒ synthesis (4.6)
2π 2π

 X
X ejω = x[n]e−jωn =⇒ analysis (4.7)
n
4.1. DTFT as a limit of DFS 43

Now, in doing the conversion from XM (ejω ) to X(ejω ) , we inherently assumed the
existence of
M
X −1
lim x[n]e−jωk n
M →∞
n=−M +1

for each ωk ∈ [0, 2π], where N = 2M − 1. We therefore intuitively required a point-wise


convergence. For absolutely summable sequences
X
|x[n]| < ∞,
n

this is easily provable in the following way:


X X
| x[n]e−jωn | ≤ |x[n]| < ∞,
n n
P
and hence n x[n]e−jωn is a well-defined quantity.
However, for x ∈ ℓ2 (Z), though the convergence may not be point-wise it can be shown
that
Z π
 
lim |XM ejω − X ejω |2 dω = 0 (4.8)
M →∞ −π

which means that we have convergence in a mean-square sense. Moreover, this means that
there could be points ω ∈ [0, 2π] for which the summation diverges, but the measure of
this point-set is zero.

4.1 DTFT as a limit of DFS


Intuitively, from the previous argument, it seems like the DFT (or the DFS) converges
to the DTFT  2πfor larger N . Another way of thinking about this is by observing that the
frequencies N k become “denser” in [0, 2π] interval. To make this notion more precise,
consider an N -periodic sequence x̃[n] as,
+∞
X
x̃[n] = x[n + ℓN ], (4.9)
ℓ=−∞

which is guaranteed to be periodic and well-defined for absolutely summable sequences x[n].
This can be seen from the fact that
N
X −1 N
X +∞
−1 X +∞
X
x̃[n] = x[n + ℓN ] = x[m] < ∞.
n=0 n=0 ℓ=−∞ m=−∞
44 Chapter 4.

Figure 4.1: x[n]

Figure 4.2: x̃[n], N = 3

Clearly limN →∞ x̃[n] = x[n]. Consider the DFS of x̃[n]:


N −1 N −1
( +∞ )
X X X
−j 2π kn 2π
X̃[k] = x̃[n]e N = x[n + ℓN ] e−j N kn
n=0 n=0 ℓ=−∞
+∞ N
X X −1

= x[n + ℓN ]e−j N kn
ℓ=−∞ n=0
+∞ N
X X −1

= x[n + ℓN ]e−j N k(n+ℓN )
ℓ=−∞ n=0
X+∞  2π 

= x[m]e−j N km = X ej N k . (4.10)
m=−∞
4.2. DTFT as a formal change of basis 45

Hence

 jω
X̃[k] = X e
(4.11)
ω= 2π
N
k

which means that the Fourier series coefficients sample the DTFT. As N grows, the
samples become finer and the DFS coefficients converge to the DTFT. This can be seen
by
N −1
1 X  j 2π k  j 2π kn
x̃[n] = X e N e N .
N n=0
2π 1 ∆
By defining ∆ = N we can see that N = 2π yielding
N −1
1 X  jk∆  jn(k∆)
x̃[n] = X e e ∆

n=0
which by Riemann summation yields
Z
N →∞ 1 
x̃[n] −→ X ejω ejωn dω = x[n]. (4.12)
2π 2π

4.2 DTFT as a formal change of basis


Formally for ω ∈ R, one can define the sequence Vω [n] = ejωn , ω ∈ R and write the DTFT
as
 X
X ejω = x[n]e−jωn = hVω , xi.
n

However, this has several caveats. First the sequences {Vω }ω∈R are uncountably infinite
in number. Second, Vω ∈ / ℓ2 (Z), and so in order to representing sequences in ℓ2 (Z), we are
using sequences which are technically outside the space ℓ2 (Z). To define orthogonality of
{Vω }ω∈R sequences, we need to introduce a quirky mathematical entity called the Dirac
delta function δ(t) defined through its operation under integration
Z +∞ Z +∞
δ(t − τ )f (t) dt = f (τ ) , δ(t)dt = 1, (4.13)
−∞ −∞
where f (t) is an arbitrary integrable function.

Let us define a Dirac-delta pulse train as,


+∞
X
δ̃(ω) = 2π δ(ω − 2πk) (4.14)
k=−∞
46 Chapter 4.

Figure 4.3: δ̃(ω − ω0 )

First, we can write


Z π
1
δ̃(ω − ω0 )ejωn dω = ejω0 n = Vω0 [n].
2π −π
Hence we see that
DT F T
Vω0 [n] ←→ δ̃(ω − ω0 ) (4.15)
Now, we can compute the inner product of the sequences Vθ [n] and Vσ [n] by finding the
DTFT of x[n] = Vσ [n] = ejσn at ω = θ:
X X X
(ejθn )∗ ejσn = ejσn .e−jθn = x[n].e−jθn = X(ejω )

hVθ , Vσ i = = δ̃(θ − σ)
ω=θ
n n n
which is formally equivalent to orthogonality.
Using the delta function we can define the DTFT of several sequences which are not
in ℓ2 (Z), such as
DT F T
c[n] = α ∀n ←→ αδ̃(ω)
DT F T 1 h jφ i
v[n] = cos(ω0 n + φ) ←→ e δ̃(ω − ω0 ) + e−jφ δ̃(ω + ω0 )
2
DT F T −j h jφ i
w[n] = sin(ω0 n + φ) ←→ e δ̃(ω − ω0 ) − e−jφ δ̃(ω + ω0 )
2

4.3 Periodic Sequences


+∞ +∞ N −1
!

 X X 1 X 2π
X̃ e = −jωn
x̃[n]e = X̃[k]ej N nk e−jωn
n=−∞ n=−∞
N
k=0
N −1 +∞
! N −1  
1 X X
j 2π nk −jωn 1 X 2π
= X̃[k] e N e = X̃[k]δ̃ ω − k . (4.16)
N n=−∞
N N
k=0 k=0
4.4. Fourier transform properties 47

4.4 Fourier transform properties


DT F T 
1. x[−n] ←→ X e−jω
DT F T 
2. x∗ [−n] ←→ X ∗ ejω
DT F T  
3. αx[n] + βy[n] ←→ αX ejω + βY ejω
DT F T 
4. x[n − n0 ] ←→ e−jωn0 X ejω
 
ejω0 n x[n − n0 ] ←→ X ej(ω−ω0 )
DT F T
5.

6. Planchard-Parseval equality:
Z π
X DT F T 1  

x [n]y[n] ←→ X ∗ ejω Y ejω dω
n
2π −π

DT F T 1
or hx, yi ←→ hX, Yi

7. Modulation property:
Z π    
1 DT F T
x[n]y[n] ←→ X ejθ Y ej(ω−θ) dθ
2π −π

Proof:
Z π  
X X 1
y[n]x[n]e −jωn
= y[n] X ejθ ejθn dθ e−jωn
n n
2π −π

Z π  X Z π    
1 1
= X ejθ y[n]e−j(ω−θ)n dθ = X ejθ Y ej(ω−θ) dθ
2π −π n
2π −π

Proof for (6):


Z π    
DT F T jω
 1

z[n] = x [n]y[n] ←→ Z e = X ∗ e−jθ Y ej(ω−θ) dθ (from (7))
2π −π
Z π    
X

X  jω 1
=⇒ x [n]y[n] = z[n] = Z e = X ∗ e−jθ Y e−jθ dθ
n n

ω=0 2π −π

Z π    
1
= X ∗ ejθ Y ejθ dθ
2π −π
48 Chapter 4.

4.5 Duality in the discrete Fourier series


Recall that for the DFS,
N
X −1

X̃[k] = x̃[n]e−j N kn =⇒ analysis
n=0

N −1
1 X 2π
x̃[n] = X̃[k]ej N kn =⇒ synthesis.
N
k=0

The similarity in the analysis and synthesis equations are quite striking. If we denote
DF S
x̃[n] ←→ X̃[k] as the time-domain and Fourier-domain representations, then we notice
that for a periodic signal ỹ[n] defined as

ỹ[n] = X̃[N − n], for n = 0, . . . , N − 1

and

ỹ[n] = ỹ[n + rN ], r ∈ Z,

we have
N
X −1 N
X −1 N
X
2π 2π (a) 2π ′
Ỹ [k] = ỹ[n]e−j N kn = X̃[N − n]e−j N kn = X̃[n′ ]e−j N k(N −n )
n=0 n=0 n=1
N −1 N −1
(b) X 2π ′ 1 X 2π ′
= X̃[n′ ]e−j N k(N −n ) = N · X̃[n′ ]ej N kn = N x̃[k],
N
n′ =0 n′ =0

where (a) follows by defining n′ = N −n and (b) follows form the fact that X̃[N ]e−j N k(N −N ) =

X̃[0]e−j N (N −0) . Therefore, we see that if
DF S
x̃[n] ←→ X̃[k],

then
DF S
X̃[N − n] ←→ N x̃[k], (4.17)

giving us duality. Therefore, the time-reversed (over a period) Fourier series coefficient
if used as a time-domain signal yields the corresponding frequency-domain representation
as the original time-domain signal!
4.6. Relationships between Fourier transforms 49

4.6 Relationships between Fourier transforms


Periodic sequences (DF S)
DF S
x̃[n] ←→ X̃[k]

N −1
1 X 2π
x̃[n] = X̃[k]ej N kn
N
k=0

N
X −1

X̃[k] = x̃[n]e−j N kn .
n=0

We also know that for periodic sequences the DTFT is


+∞ N −1  
 X 1 X 2π
X̃ ejω = x̃[n]e−jωn = X̃[k]δ̃ ω − k , (4.18)
n=−∞
N N
k=0

yielding a pulse-train representation of the periodic signal’s DTFT. Since we are interested
only in ω ∈ [0, 2π] then the impulses in DTFT representation fall exactly at ω = 2π N k, k =
0, . . . , N − 1, with coefficients X̃[k], which is exactly the DFS representation giving a
complete equivalence between the DTFT and DFS representation of periodic signals. This
shows the applicability and generality of the DTFT.

Finite support signals (DF T )


N
X −1

X[k] = x[n]e−j N kn
n=0

N −1
1 X 2π
x[n] = X[k]ej N kn , n = 0, . . . , N − 1
N
k=0

where x[n] = 0 for n ≥ N, n < 0.

Now
+∞
X N
X −1

 −jωn
X e = x[n]e = x[n]e−jωn ,
n=−∞ n=0
50 Chapter 4.

which shows that





X e = X[k],
ω= 2π
N
k

which means that the DFT coefficients are only sampling the DTFT at ω = 2π N k, k =
0, . . . , N − 1. The DFT representation shows that we need only these N samples (and
not the DTFT for all ω ∈ [0, 2π]) to represent x[n] uniquely. In the same sense, one
can think of finding the DTFT by zero-padding the finite length sequence to obtain the
representation, and the sampling property implies that it is a redundant representation.

4.7 Fourier representation application methods


We have learned about the basic Fourier representations and their properties. The repre-
sentations were shown to be equivalent and we argued that the domain in which we choose
to represent a signal is dictated by which features we are interested in. For example in
HW #2, the noise cancellation example illustrated that when there is a “narrow-band”
(in frequency-domain) disturbance, then it is easier to “clean-up” the signal through a
Fourier representation. On the other hand if we have a time-domain “impulsive” (short
time duration) disturbance, then it is easier to do the processing in the time-domain. So,
we now look at methodologies of using the Fourier representation.
We have learned the DT F T, DF T and DFS as representations for aperiodic infinite
length sequences, finite length sequences and infinite length periodic sequences, respec-
tively. Though one can write down the closed-form (analytical) representation for a small
set of discrete-time sequences, the fundamental utility of the Fourier representation (in
particular the DFT) is its role as a numerical tool for analysis and synthesis. Since most
sequences we will encounter will have finite support, the DFT representation is practically
the most useful. However, the DTFT (for infinite length a-periodic sequences) becomes
very useful in representing some filtering operations and interpreting their behavior.

4.8 Fast Fourier transform (FFT) and zero-padding


The DFT given below needs roughly N multiplications and additions for every Fourier
coefficient (or in the synthesis step for every time-domain point).

N
X −1

X[k] = x[n]e−j N kn
n=0
4.9. Magnitude and Phase representation 51

N −1
1 X 2π
x[n] = X[k]ej N kn .
N
k=0

This yields roughly cN 2 operations to compute a DFT, where c is some constant which
depends on the complexity of a multiplication (and addition) operation. The FFT is not
another transform but just an efficient way to compute the DFT by using the inherent
structure in the operations. For N ’s which are powers of 2, i.e. N = 2Q for some Q ∈ N,
one can do the DFT with roughly c′ N log N operations, giving a significant reduction in
computational complexity for large N .
Therefore, in order to use this, one might need to zero-pad a signal to compute its FFT.
For example if we are given an N -length sequence x[n], we get a zero-padded sequence x′ [n]
by making it an M -length sequence for M = 2Q > N for Q ∈ N. Even though we get M
instead of N Fourier coefficients, it is clear that we do not get extra “information” about
the signal. This artificial increase in resolution could have been recreated by just using
the N -point transform. If we denote x and x′ as the N -length and M -length vectors,
respectively, and have X ∈ CN , X′ ∈ CM as their Fourier representations, then

X = WN x X′ = WM x′ , (4.19)

where WN is the N -length DFT, i.e. (WN )p,q = e−j N pq , and WM is the corresponding

M -length DFT, (WM )p,q = e−j M pq .
Since,
 
1 H ′ 1 H ′ x
x = WN X , x = W X = , (4.20)
N M M 0

where 0 = [0, · · · , 0]T ∈ CM −N , yielding


   
′ x I 1 ′ H
X = WM = WM x = WM WN X. (4.21)
0 0(M −N )×N N
| {z }
| {z }

WM TM,N

Therefore, given X one can generate X′ as we suspected. However, for visualization the
interpolated version with zero-padding might be more useful.

4.9 Magnitude and Phase representation


Since the Fourier transform inherently produces complex numbers, it is natural to sepa-
rately plot its magnitude and phase since any z ∈ C can be written as z = |z|ejφz . The
magnitude gives a lot of importance to the strength of the signal at a particular frequency.
52 Chapter 4.

In many ways, this perhaps gives us qualitatively the most important information about
the structure of a signal. However, in many cases, the phase is equally important and can
not be ignored.

4.10 Spectral analysis


The Fourier representation (or spectrum) is an alternate representation of the signal and
is useful in processing and analysis of it.

Magnitude: The magnitude is just the absolute values of the Fourier representation
(coefficients). Depending on its characteristics we can classify it into:

• Lowpass: Magnitude spectrum is concentrated close to ω = 0.

• Highpass: Magnitude spectrum is concentrated around ω = π.

• Passband: Magnitude spectrum is concentrated around ωp and negligible elsewhere


(especially around ω = 0, ω = π).

Phase: The phase response is also quite important. For example,

• Linear phase signal: The phase increases or decreases linearly with frequency.

Such responses are useful for designing filters as we will see soon.

4.11 Time-frequency analysis: the spectrogram


The simplest form of the time-frequency analysis is the short-term Fourier transform (or
the spectrogram). Here a sequence is split into small consecutive (perhaps overlapping)
length-N pieces and the DFT is computed independently for each piece.  
L
For example, given a signal x[n] of length L ≫ N , we split it into P = N pieces each
of length N , and non-overlapping.

000000
111111
000000
111111
N
000000
111111
000000
111111
N
11111
00000
00000000
11111111
L − (P − 1)N

000000
111111
000000
111111
000000
111111
000000
111111
000000
111111 00000000
11111111
00000000
11111111
piece 1 piece (P − 1) piece P

Figure 4.4: x[n]


4.11. Time-frequency analysis: the spectrogram 53

Therefore, the DFT of the mth piece is (for m ∈ {1, · · · , P })


N
X −1 N
X −1
−j 2π kn 2π
S[k, m] = Xm [k] = xm [n]e N = x[n + (m − 1)N ]e−j N kn . (4.22)
n=0 n=0

One can also have overlapping pieces such that M < N is the step for each block, which
yields the spectogram
piece 1

00000
11111
00000
11111
00000
11111
00
11
N

00000
11111
00000
11111
00
11
1111
0000
000000
00000
11111
11111
00
11
0000
N
M
piece 2

Figure 4.5: x[n]

N
X −1 N
X −1
2π 2π
S[k, m] = Xm [k] = xm [n]e−j N kn + x[n + (m − 1)N ]e−j N kn . (4.23)
n=0 n=0
L
The whole transform is of length N · M , and can be represented using a matrix transform.

4.11.1 uncertainty principle


The STFT shows a trade-off between time and frequency resolutions. In order to get more
frequency resolution, one would need larger N , which makes the localization in time in
the STFT coarser. In fact, there is a fundamental trade-off between time and frequency
resolution which is similar to the uncertainty principle in physics.
54 Chapter 4.

You might also like