We first start with the most basic sampling ideas based on various forms of
Fourier transforms
[1]
[2]
[3]
.
The Spectrum of a
Continuous-Time Signal and the Fourier Transform
Although in many cases digital signal processing views the signal as simple
sequence of numbers, here we are going to pose the problem as originating with
a function of continuous time. The fundamental tool is the classical Fourier
transform defined by
F
(
ω
)
=
∫
f
(
t
)
e
−
j
ω
t
ⅆ
t
F
(
ω
)
=
∫
f
(
t
)
e
−
j
ω
t
ⅆ
t
(1)
and its inverse
f
(
t
)
=
1
2
π
∫
F
(
ω
)
e
j
ω
t
ⅆ
ω
.
f
(
t
)
=
1
2
π
∫
F
(
ω
)
e
j
ω
t
ⅆ
ω
.
(2)
where
j
=
−
1
j
=
−
1
.
The Fourier transform of a signal is called its spectrum and it is complex
valued with a magnitude and phase.
If the signal is periodic with period
f
(
t
)
=
f
(
t
+
P
)
f
(
t
)
=
f
(
t
+
P
)
,
the Fourier transform does not exist as a function (it may as a distribution)
therefore the spectrum is defined as the set of Fourier series coefficients
C
(
k
)
=
1
P
∫
0
P
f
(
t
)
e
−
j
2
π
k
t
/
P
ⅆ
t
C
(
k
)
=
1
P
∫
0
P
f
(
t
)
e
−
j
2
π
k
t
/
P
ⅆ
t
(3)
with the expansion having the form
f
(
t
)
=
∑
k
C
(
k
)
e
j
2
π
k
t
/
P
.
f
(
t
)
=
∑
k
C
(
k
)
e
j
2
π
k
t
/
P
.
(4)
The functions
g
k
(
t
)
=
e
j
2
π
k
t
/
P
g
k
(
t
)
=
e
j
2
π
k
t
/
P
form an orthogonal basis for periodic functions and
(
Equation 3) is the inner
product
C
(
k
)
=
〈
f
(
t
)
,
g
k
(
t
)
〉
C
(
k
)
=
〈
f
(
t
)
,
g
k
(
t
)
〉
.
For the non-periodic case in
(Equation 1) the spectrum is
a function of continuous frequency and for the periodic case in
(Equation 3), the spectrum
is a number sequence (a function of discrete frequency).
The
Spectrum of a Sampled Signal and the DTFT
The discrete-time Fourier transform (DTFT) as defined in terms samples of a
continuous function is
F
d
(
ω
)
=
∑
n
f
(
T
n
)
e
−
j
ω
T
n
F
d
(
ω
)
=
∑
n
f
(
T
n
)
e
−
j
ω
T
n
(5)
and its inverse
f
(
T
n
)
=
T
2
π
∫
−
π
/
T
π
/
T
F
d
(
ω
)
e
j
ω
T
n
ⅆ
ω
f
(
T
n
)
=
T
2
π
∫
−
π
/
T
π
/
T
F
d
(
ω
)
e
j
ω
T
n
ⅆ
ω
(6)
can be derived by noting that
F
d
(
ω
)
F
d
(
ω
)
is periodic with period
P
=
2
π
/
T
P
=
2
π
/
T
and, therefore, it can be expanded in a Fourier series with
(
Equation 6) resulting from
calculating the series coefficients using
(
Equation 3).
The spectrum of a discrete-time signal is defined as the DTFT of the samples
of a continuous-time signal given in
(Equation 5). Samples of the
signal are given by the inverse DTFT in
(Equation 6) but they can
also be obtained by directly sampling
f
(
t
)
f
(
t
)
in (Equation 2) giving
f
(
T
n
)
=
1
2
π
∫
−
∞
∞
F
(
ω
)
e
j
ω
T
n
ⅆ
ω
f
(
T
n
)
=
1
2
π
∫
−
∞
∞
F
(
ω
)
e
j
ω
T
n
ⅆ
ω
(7)
which can be rewritten as an infinite sum of finite integrals in the form
f
(
T
n
)
=
1
2
π
∑
ℓ
∫
0
2
π
/
T
F
(
ω
+
2
π
ℓ
/
T
)
e
j
(
ω
+
2
π
ℓ
/
T
)
T
n
ⅆ
ω
f
(
T
n
)
=
1
2
π
∑
ℓ
∫
0
2
π
/
T
F
(
ω
+
2
π
ℓ
/
T
)
e
j
(
ω
+
2
π
ℓ
/
T
)
T
n
ⅆ
ω
=
1
2
π
∫
0
2
π
/
T
[
∑
ℓ
F
(
ω
+
2
π
ℓ
/
T
)
]
e
j
(
ω
+
2
π
ℓ
/
T
)
T
n
ⅆ
ω
=
1
2
π
∫
0
2
π
/
T
[
∑
ℓ
F
(
ω
+
2
π
ℓ
/
T
)
]
e
j
(
ω
+
2
π
ℓ
/
T
)
T
n
ⅆ
ω
(8)
where
F
p
(
ω
)
F
p
(
ω
)
is a periodic function made up of shifted versions of
F
(
ω
)
F
(
ω
)
(aliased) defined in
(
Equation 9) Because
(
Equation 8) and
(
Equation 6) are equal for
all
T
n
T
n
and because the limits can be shifted by
π
/
T
π
/
T
without changing the equality, the integrands are equal and we have
F
d
(
ω
)
=
1
T
∑
ℓ
F
(
ω
+
2
π
ℓ
/
T
)
=
1
T
F
p
(
ω
)
.
F
d
(
ω
)
=
1
T
∑
ℓ
F
(
ω
+
2
π
ℓ
/
T
)
=
1
T
F
p
(
ω
)
.
(9)
where
F
p
(
ω
)
F
p
(
ω
)
is a periodic function made up of shifted versions of
F
(
ω
)
F
(
ω
)
as in (
Equation 8). The
spectrum of the samples of
f
(
t
)
f
(
t
)
is an aliased version of the spectrum of
f
(
t
)
f
(
t
)
itself. The closer together the samples are taken, the further apart the
centers of the aliased spectra are.
This result is very important in determining the frequency domain effects of
sampling. It shows what the sampling rate should be and it is the basis for
deriving the sampling theorem.
Samples
of the Spectrum of a Sampled Signal and the DFT
Samples of the spectrum can be calculated from a finite number of samples of
the original continuous-time signal using the DFT. If we let the length of the
DFT be
N
N
and separation of the samples in the frequency domain be
Δ
Δ
and define the periodic functions
F
p
(
ω
)
=
∑
ℓ
F
(
ω
+
N
Δ
ℓ
)
F
p
(
ω
)
=
∑
ℓ
F
(
ω
+
N
Δ
ℓ
)
(10)
and
f
p
(
t
)
=
∑
m
f
(
t
+
N
T
m
)
f
p
(
t
)
=
∑
m
f
(
t
+
N
T
m
)
(11)
then from (
Equation 5) and
(
Equation 9) samples of the
DTFT of
f
(
T
n
)
f
(
T
n
)
are
F
p
(
Δ
k
)
=
T
∑
n
f
(
T
n
)
e
−
j
T
Δ
n
k
F
p
(
Δ
k
)
=
T
∑
n
f
(
T
n
)
e
−
j
T
Δ
n
k
=
T
∑
m
∑
n
=
0
N
−
1
f
(
T
n
+
T
N
m
)
e
−
j
Δ
(
T
n
+
T
N
m
)
k
=
T
∑
m
∑
n
=
0
N
−
1
f
(
T
n
+
T
N
m
)
e
−
j
Δ
(
T
n
+
T
N
m
)
k
=
T
∑
n
=
0
N
−
1
[
∑
m
f
(
T
n
+
T
N
m
)
]
e
−
j
Δ
(
T
n
+
T
N
m
)
k
,
=
T
∑
n
=
0
N
−
1
[
∑
m
f
(
T
n
+
T
N
m
)
]
e
−
j
Δ
(
T
n
+
T
N
m
)
k
,
(12)
therefore,
F
p
(
Δ
k
)
=
ℱ
{
f
p
(
T
n
)
}
F
p
(
Δ
k
)
=
ℱ
{
f
p
(
T
n
)
}
(13)
if
Δ
T
N
=
2
π
Δ
T
N
=
2
π
.
This formula gives a method for approximately calculating values of the
Fourier transform of a function by taking the DFT (usually with the FFT) of
samples of the function. This formula can easily be verified by forming the
Riemann sum to approximate the integrals in
(
Equation 1) or
(
Equation 2).
Samples of the DTFT of a
Sequence
It the signal is discrete in origin and is not a sampled function of a
continuous variable, the DTFT is defined with
T
=
1
T
=
1
as
H
(
ω
)
=
∑
n
h
(
n
)
e
−
j
ω
n
H
(
ω
)
=
∑
n
h
(
n
)
e
−
j
ω
n
(14)
with an inverse
h
(
n
)
=
1
2
π
∫
−
π
π
H
(
ω
)
e
j
ω
n
ⅆ
ω
.
h
(
n
)
=
1
2
π
∫
−
π
π
H
(
ω
)
e
j
ω
n
ⅆ
ω
.
(15)
If we want to calculate
H
(
ω
)
H
(
ω
)
,
we must sample it and that is written as
H
(
Δ
k
)
∑
n
h
(
n
)
e
−
j
Δ
k
n
H
(
Δ
k
)
∑
n
h
(
n
)
e
−
j
Δ
k
n
which after breaking the sum into an infinite sum of
length-
N
N
sums as was done in
(
Equation 12) becomes
H
(
Δ
k
)
∑
m
∑
n
=
0
N
−
1
h
(
n
+
N
m
)
e
−
j
Δ
k
n
H
(
Δ
k
)
∑
m
∑
n
=
0
N
−
1
h
(
n
+
N
m
)
e
−
j
Δ
k
n
if
Δ
=
2
π
/
N
Δ
=
2
π
/
N
.
This allows us to calculate samples of the DTFT by taking the DFT of samples
of a periodized
h
(
n
)
h
(
n
)
.
H
(
Δ
k
)
=
ℱ
{
h
p
(
n
)
}
.
H
(
Δ
k
)
=
ℱ
{
h
p
(
n
)
}
.
(16)
This a combination of the results in
(
Equation 9) and in
(
Equation 13).
Fourier Series
Coefficients from the DFT
If the signal to be analyzed is periodic, the Fourier integral in
(Equation 1) does not
converge to a function (it may to a distribution). This function is usually
expanded in a Fourier series to define its spectrum or a frequency
description. We will sample this function and show how to approximately
calculate the Fourier series coefficients using the DFT of the samples.
Consider a periodic signal
f
˜
(
t
)
=
f
˜
(
t
+
P
)
f
˜
(
t
)
=
f
˜
(
t
+
P
)
with
N
N
samples taken every
T
T
seconds to give
T
n
˜
(
t
)
T
n
˜
(
t
)
for integer
n
n
such that
N
T
=
P
N
T
=
P
.
The Fourier series expansion of
f
˜
(
t
)
f
˜
(
t
)
is
f
˜
(
t
)
=
∑
k
=
−
∞
∞