We just covered ideal (and non-ideal) (time) sampling of CT signals.
This enabled DT signal processing solutions for CT
applications (Figure 1):
Much of the theoretical analysis of such systems relied on
frequency domain representations. How do we carry out these
frequency domain analysis on the computer? Recall the
following relationships:
xn
↔
DTFT
Xω
x
n
↔
DTFT
X
ω
xt
↔
CTFT
XΩ
x
t
↔
CTFT
X
Ω
where ωω and
ΩΩ are continuous frequency
variables.
Consider the DTFT of a discrete-time (DT) signal
xn
x
n
. Assume
xn
x
n
is of finite duration N
N (i.e., an
NN-point signal).
Xω=∑n=0N−1xnⅇ-ⅈωn
X
ω
n
N
1
0
x
n
ω
n
(1)
where
Xω
X
ω
is the continuous function that is indexed by the
real-valued parameter
-π≤ω≤π
ω
. The other function,
xn
x
n
, is a discrete function that is indexed by
integers.
We want to work with
Xω
X
ω
on a computer. Why not just sample
Xω
X
ω
?
Xk=X2πNk=∑n=0N−1xnⅇ-ⅈ2πkNn
X
k
X
2
N
k
n
N
1
0
x
n
2
k
N
n
(2)
In
Equation 2 we sampled at
ω=2πNk
ω
2
N
k
where
k=01…N−1
k
0
1
…
N
1
and
Xk
X
k
for
k=0…N−1
k
0
…
N
1
is called the
Discrete Fourier Transform (DFT) of
xn
x
n
.
The DTFT of the image in Figure 2 is written as follows:
Xω=∑n=0N−1xnⅇ-ⅈωn
X
ω
n
N
1
0
x
n
ω
n
(3)
where
ωω is any
2π
2
-interval, for example
-π≤ω≤π
ω
.
where again we sampled at
ω=2πNk
ω
2
N
k
where
k=01…M−1
k
0
1
…
M
1
. For example, we take
M=10
M
10
. In the following section we will discuss in
more detail how we should choose
MM, the number of samples in
the
2π
2
interval.
(This is precisely how we would plot
Xω
X
ω
in Matlab.)
Given NN (length of
xn
x
n
), choose
M≫N
≫
M
N
to obtain a dense sampling of the DTFT (Figure 4):
Choose MM as small as
possible (to minimize the amount of computation).
In general, we require
M≥N
M
N
in order to represent all information in
∀n,n=0…N−1:xn
n
n
0
…
N
1
x
n
Let's concentrate on
M=N
M
N
:
xn
↔
DFT
Xk
x
n
↔
DFT
X
k
for
n=0…N−1
n
0
…
N
1
and
k=0…N−1
k
0
…
N
1
numbers
↔
N numbers
numbers↔N numbers
Define
Xk≡X2πkN
X
k
X
2
k
N
(4)
where
N=lengthxn
N
length
x
n
and
k=0…N−1
k
0
…
N
1
. In this case,
M=N
M
N
.
Xk=∑n=0N−1xnⅇ-ⅈ2πkNn
X
k
n
N
1
0
x
n
2
k
N
n
(5)
xn=1N∑k=0N−1Xkⅇⅈ2πkNn
x
n
1
N
k
N
1
0
X
k
2
k
N
n
(6)
Represent
xn
x
n
in terms of a sum of
NN complex sinusoids of amplitudes
Xk
X
k
and frequencies
∀k,k∈0…N−1:
ω
k
=2πkN
k
k
0
…
N
1
ω
k
2
k
N
Fourier Series with fundamental frequency
2πN
2
N
IDFT treats
xn
x
n
as though it were NN-periodic.
xn=1N∑k=0N−1Xkⅇⅈ2πkNn
x
n
1
N
k
N
1
0
X
k
2
k
N
n
(7)
where
n∈0…N−1
n
0
…
N
1
What about other values of
nn?
Proof that the IDFT inverts the DFT for
n∈0…N−1
n
0
…
N
1
1N∑k=0N−1Xkⅇⅈ2πkNn=1N∑k=0N−1∑m=0N−1xmⅇ-ⅈ2πkNmⅇⅈ2πkNn=???
1
N
k
N
1
0
X
k
2
k
N
n
1
N
k
N
1
0
m
N
1
0
x
m
2
k
N
m
2
k
N
n
???
(8)
Given the following discrete-time signal (Figure 5) with
N=4
N
4
,
we will compute the DFT using two different methods (the DFT
Formula and Sample DTFT):
-
DFT Formula
Xk=∑n=0N−1xnⅇ-ⅈ2πkNn=1+ⅇ-ⅈ2πk4+ⅇ-ⅈ2πk42+ⅇ-ⅈ2πk43=1+ⅇ-ⅈπ2k+ⅇ-ⅈπk+ⅇ-ⅈ32πk
X
k
n
N
1
0
x
n
2
k
N
n
1
2
k
4
2
k
4
2
2
k
4
3
1
2
k
k
3
2
k
(9)
Using the above equation, we can solve and get the
following results:
x0=4
x
0
4
x1=0
x
1
0
x2=0
x
2
0
x3=0
x
3
0
-
Sample DTFT. Using the same figure, Figure 5, we will take the DTFT of the signal and
get the following equations:
Xω=∑n=03ⅇ-ⅈωn=1−ⅇ-ⅈ4ω1−ⅇ-ⅈω=???
X
ω
n
0
3
ω
n
1
4
ω
1
ω
???
(10)
Our sample points will be:
ω
k
=2πk4=π2k
ω
k
2
k
4
2
k
where
k=0123
k
0
1
2
3
(Figure 6).
DFT
Xk
X
k
consists of samples of DTFT, so
Xω
X
ω
, a
2π
2
-periodic DTFT signal, can be converted to
Xk
X
k
, an NN-periodic DFT.
Xk=∑n=0N−1xnⅇ-ⅈ2πkNn
X
k
n
N
1
0
x
n
2
k
N
n
(11)
where
ⅇ-ⅈ2πkNn
2
k
N
n
is an
NN-periodic basis
function (See
Figure 7).
Also, recall,
xn=1N∑n=0N−1Xkⅇⅈ2πkNn=1N∑n=0N−1Xkⅇⅈ2πkNn+mN=???
x
n
1
N
n
N
1
0
X
k
2
k
N
n
1
N
n
N
1
0
X
k
2
k
N
n
m
N
???
(12)
When we deal with the DFT, we need to remember that, in
effect, this treats the signal as an
NN-periodic sequence.
Think of sampling the continuous function
Xω
X
ω
, as depicted in Figure 9.
Sω
S
ω
will represent the sampling function applied to
Xω
X
ω
and is illustrated in Figure 9 as well. This will result in our
discrete-time sequence,
Xk
X
k
.
Remember the multiplication in the frequency domain is equal
to convolution in the time domain!
∑k=-∞∞δω−2πkN
k
δ
ω
2
k
N
(13)
Given the above equation, we can take the DTFT and get the
following equation:
N∑m=-∞∞δn−mN≡Sn
N
m
δ
n
m
N
S
n
(14)
Sn
S
n
is NN-periodic,
so it has the following Fourier Series:
c
k
=1N∫-N2N2δnⅇ-ⅈ2πkNndn=1N
c
k
1
N
n
N
2
N
2
δ
n
2
k
N
n
1
N
(15)
Sn=∑k=-∞∞ⅇ-ⅈ2πkNn
S
n
k
2
k
N
n
(16)
where the DTFT of the exponential in the above equation
is equal to
δω−2πkN
δ
ω
2
k
N
.
So, in the time-domain we have (Figure 10):