Indeed, our very use of the term “discrete-time" indicates the
probable origin of the signals when, in fact, the independent
variable could be length or any other variable or simply an ordering
index. The term “digital" indicates the signal is probably going to
be created, processed, or stored using digital hardware. As in the
continuous-time case, the Fourier transform will again be our
primary tool Entry 20, Entry 21, Entry 5.
Notation has been an important element in mathematics. In some
cases, discrete-time signals are best denoted as a sequence of
values, in other cases, a vector is created with elements which are
the sequence values. In still other cases, a polynomial is formed
with the sequence values as coefficients for a complex variable. The
vector formulation allows the use of linear algebra and the
polynomial formulation allows the use of complex variable theory.
The description of signals in terms of their sinusoidal frequency content
has proven to be as powerful and informative for discrete-time signals as
it has for continuous-time signals. It is also probably the most powerful
computational tool we will use. We now develop the basic
discrete-time methods starting with the discrete Fourier transform (DFT)
applied to finite length signals, followed by the discrete-time Fourier
transform (DTFT) for infinitely long signals, and ending with the
z-transform which uses the powerful tools of complex variable theory.
It is assumed that the signal x(n)x(n) to be analyzed is a sequence of NN
real or complex values which are a function of the integer variable nn.
The DFT of x(n)x(n), also called the spectrum of x(n)x(n), is a length NN
sequence of complex numbers denoted C(k)C(k) and defined by
C
(
k
)
=
∑
n
=
0
N
-
1
x
(
n
)
e
-
j
2
π
N
n
k
C
(
k
)
=
∑
n
=
0
N
-
1
x
(
n
)
e
-
j
2
π
N
n
k
(1)
using the usual engineering notation: j=-1j=-1. The inverse
transform (IDFT) which retrieves x(n)x(n) from C(k)C(k) is given
by
x
(
n
)
=
1
N
∑
k
=
0
N
-
1
C
(
k
)
e
j
2
π
N
n
k
x
(
n
)
=
1
N
∑
k
=
0
N
-
1
C
(
k
)
e
j
2
π
N
n
k
(2)
which is easily verified by substitution into (1). Indeed, this
verification will require using the orthogonality of the basis function of
the DFT which is
∑
k
=
0
N
-
1
e
-
j
2
π
N
m
k
e
j
2
π
N
n
k
=
N
if
n
=
m
0
if
n
≠
m
.
∑
k
=
0
N
-
1
e
-
j
2
π
N
m
k
e
j
2
π
N
n
k
=
N
if
n
=
m
0
if
n
≠
m
.
(3)
The exponential basis functions, e-j2πNke-j2πNk, for k∈{0,N-1}k∈{0,N-1}, are the NN values of the NNth roots of unity (the N zeros of
the polynomial (s-1)N(s-1)N). This property
is what connects the DFT to convolution and allows efficient algorithms
for calculation to be developed Entry 4. They are used so often that the
following notation is defined by
W
N
=
e
-
j
2
π
N
W
N
=
e
-
j
2
π
N
(4)
with the subscript being omitted if the sequence length is obvious from
context. Using this notation, the DFT becomes
C
(
k
)
=
∑
n
=
0
N
-
1
x
(
n
)
W
N
n
k
C
(
k
)
=
∑
n
=
0
N
-
1
x
(
n
)
W
N
n
k
(5)
One should notice that with the finite summation of the DFT, there is no
question of convergence or of the ability to interchange the order of
summation. No “delta functions” are needed and the NN transform values
can be calculated exactly (within the accuracy of the computer or
calculator used) from the NN signal values with a finite number of
arithmetic operations.
There are several advantages to using a matrix formulation of the DFT.
This is given by writing (Equation 1) or (Equation 5) in matrix operator form as
C
0
C
1
C
2
⋮
C
N
-
1
=
W
0
W
0
W
0
⋯
W
0
W
0
W
1
W
2
W
0
W
2
W
4
⋮
⋮
W
0
⋯
W
(
N
-
1
)
(
N
-
1
)
x
0
x
1
x
2
⋮
x
N
-
1
C
0
C
1
C
2
⋮
C
N
-
1
=
W
0
W
0
W
0
⋯
W
0
W
0
W
1
W
2
W
0
W
2
W
4
⋮
⋮
W
0
⋯
W
(
N
-
1
)
(
N
-
1
)
x
0
x
1
x
2
⋮
x
N
-
1
(6)
or
C
=
Fx
.
C
=
Fx
.
(7)
The orthogonality of the basis function in (Equation 1) shows up in this matrix
formulation by the columns of FF
being orthogonal to each other as
are the rows. This means that FTF=kIFTF=kI, where kk is a
scalar constant, and, therefore, FT=kF-1FT=kF-1. This is
called a unitary operator.
The definition of the DFT in (Equation 1) emphasizes the fact that each of
the NN DFT values are the sum of NN products. The matrix formulation in
(Equation 6) has two interpretations. Each kk-th DFT term is the inner
product of two vectors, kk-th row of FF and xx; or, the DFT
vector, CC is a weighted sum of the NN columns of FF with
weights being the elements of the signal vector xx. A third view
of the DFT is the operator view which is simply the single matrix equation
(Equation 7).
It is instructive at this point to write a computer program to calculate
the DFT of a signal. In Matlab Entry 18, there is a pre-programmed
function to calculate the DFT, but that hides the scalar operations. One
should program the transform in the scalar interpretive language of Matlab
or some other lower level language such as FORTRAN, C, BASIC, Pascal, etc.
This will illustrate how many multiplications and additions and
trigonometric evaluations are required and how much memory is needed. Do
not use a complex data type which also hides arithmetic, but use Euler's
relations
e
j
x
=
cos
(
x
)
+
j
sin
(
x
)
e
j
x
=
cos
(
x
)
+
j
sin
(
x
)
(8)
to explicitly calculate the real and imaginary part of C(k)C(k).
If Matlab is available, first program the DFT using only scalar
operations. It will require two nested loops and will run rather
slowly because the execution of loops is interpreted. Next, program
it using vector inner products to calculate each C(k)C(k) which will
require only one loop and will run faster. Finally, program it
using a single matrix multiplication requiring no loops and running
much faster. Check the memory requirements of the three approaches.
The DFT and IDFT are a completely well-defined, legitimate transform pair
with a sound theoretical basis that do not need to be derived from or
interpreted as an approximation to the continuous-time Fourier series or
integral. The discrete-time and continuous-time transforms and other
tools are related and have parallel properties, but neither depends on the
other.
The notation used here is consistent with most of the literature and with
the standards given in Entry 9. The independent index variable
nn of the signal x(n)x(n) is an integer, but it is usually interpreted as
time or, occasionally, as distance. The independent index variable kk of
the DFT C(k)C(k) is also an integer, but it is generally considered as
frequency. The DFT is called the spectrum of the signal and the magnitude
of the complex valued DFT is called the magnitude of that spectrum and the
angle or argument is called the phase.
Although the finite length signal x(n)x(n) is defined only over the
interval {0≤n≤(N-1)}{0≤n≤(N-1)}, the IDFT of C(k)C(k) can be
evaluated outside this interval to give well defined values. Indeed,
this process gives the periodic property 4. There are two ways of
formulating this phenomenon. One is to periodically extend x(n)x(n) to
-∞-∞ and +∞+∞ and work with this new signal. A second
more general way is evaluate all indices nn and kk modulo NN.
Rather than considering the periodic extension of x(n)x(n) on the line
of integers, the finite length line is formed into a circle or a
line around a cylinder so that after counting to N-1N-1, the next
number is zero, not a periodic replication of it. The periodic
extension is easier to visualize initially and is more commonly used
for the definition of the DFT, but the evaluation of the indices by
residue reduction modulo NN is a more general definition and can be
better utilized to develop efficient algorithms for calculating the
DFT Entry 4.
Since the indices are evaluated only over the basic interval, any
values could be assigned x(n)x(n) outside that interval. The periodic
extension is the choice most consistent with the other properties of
the transform, however, it could be assigned to zero Entry 20. An
interesting possibility is to artificially create a length 2N2N
sequence by appending x(-n)x(-n) to the end of x(n)x(n). This would
remove the discontinuities of periodic extensions of this new length
2N2N signal and perhaps give a more accurate measure of the
frequency content of the signal with no artifacts caused by “end
effects". Indeed, this modification of the DFT gives what is called
the discrete cosine transform (DCT) Entry 15. We will assume the
implicit periodic extensions to x(n)x(n) with no special notation
unless this characteristic is important, then we will use the
notation x˜(n)x˜(n).
Convolution is an important operation in signal processing that is
in some ways more complicated in discrete-time signal processing
than in continuous-time signal processing and in other ways easier.
The basic input-output relation for a discrete-time system is given
by so-called linear or non-cyclic convolution defined and denoted by
y
(
n
)
=
∑
m
=
-
∞
∞
h
(
m
)
x
(
n
-
m
)
=
h
(
n
)
*
x
(
n
)
y
(
n
)
=
∑
m
=
-
∞
∞
h
(
m
)
x
(
n
-
m
)
=
h
(
n
)
*
x
(
n
)
(9)
where x(n)x(n) is the perhaps infinitely long input discrete-time signal,
h(n)h(n) is the perhaps infinitely long impulse response of the system, and
y(n)y(n) is the output. The DFT is, however, intimately related to cyclic
convolution, not non-cyclic convolution. Cyclic convolution is defined
and denoted by
y
˜
(
n
)
=
∑
m
=
0
N
-
1
h
˜
(
m
)
x
˜
(
n
-
m
)
=
h
(
n
)
∘
x
(
n
)
y
˜
(
n
)
=
∑
m
=
0
N
-
1
h
˜
(
m
)
x
˜
(
n
-
m
)
=
h
(
n
)
∘
x
(
n
)
(10)
where either all of the indices or independent integer variables are
evaluated modulo NN or all of the signals are periodically extended
outside their length NN domains.
This cyclic (sometimes called circular) convolution can be expressed as a
matrix operation by converting the signal h(n)h(n) into a matrix operator as
H
=
h
0
h
L
-
1
h
L
-
2
⋯
h
1
h
1
h
0
h
L
-
1
h
2
h
1
h
0
⋮
⋮
h
L
-
1
⋯
h
0
,
H
=
h
0
h
L
-
1
h
L
-
2
⋯
h
1
h
1
h
0
h
L
-
1
h
2
h
1
h
0
⋮
⋮
h
L
-
1
⋯
h
0
,
(11)
The cyclic convolution can then be written in matrix notation as
Y
=
H
X
Y
=
H
X
(12)
where XX and YY are column matrices or vectors of the input
and output values respectively.
Because non-cyclic convolution is often what you want to do and cyclic
convolution is what is related to the powerful DFT, we want to develop a
way of doing non-cyclic convolution by doing cyclic convolution.
The convolution of a length NN sequence with a length MM sequence yields
a length N+M-1N+M-1 output sequence. The calculation of non-cyclic
convolution by using cyclic convolution requires modifying the signals by
appending zeros to them. This will be developed later.
The properties of the DFT are extremely important in applying it to signal
analysis and to interpreting it. The main properties are given here
using the notation that the DFT of a length-NN complex sequence x(n)x(n) is
F{x(n)}=C(k)F{x(n)}=C(k).
- Linear Operator: F{x(n)+y(n)}=F{x(n)}+F{y(n)}F{x(n)+y(n)}=F{x(n)}+F{y(n)}
- Unitary Operator: F-1=1NFTF-1=1NFT
- Periodic Spectrum: C(k)=C(k+N)C(k)=C(k+N)
- Periodic Extensions of x(n)x(n): x(n)=x(n+N)x(n)=x(n+N)
- Properties of Even and Odd Parts: x(n)=u(n)+jv(n)x(n)=u(n)+jv(n) and
C(k)=A(k)+jB(k)C(k)=A(k)+jB(k)
| uu | vv | AA | BB | |C||C| | θθ |
| even | 0 | even | 0 | even | 0 |
| odd | 0 | 0 | odd | even | π/2π/2 |
| 0 | even | 0 | even | even | π/2π/2 |
| 0 | odd | odd | 0 | even | 0 |
- Cyclic Convolution: F{h(n)∘x(n)}=F{h(n)}F{x(n)}F{h(n)∘x(n)}=F{h(n)}F{x(n)}
- Multiplication: F{h(n)x(n)}=F{h(n)}∘F{x(n)}F{h(n)x(n)}=F{h(n)}∘F{x(n)}
- Parseval: ∑n=0N-1|x(n)|2=1N∑k=0N-1|C(k)|2∑n=0N-1|x(n)|2=1N∑k=0N-1|C(k)|2
- Shift: F{x(n-M)}=C(k)e-j2πMk/NF{x(n-M)}=C(k)e-j2πMk/N
- Modulate: F{x(n)ej2πKn/N}=C(k-K)F{x(n)ej2πKn/N}=C(k-K)
- Down Sample or Decimate: F{x(Kn)}=1K∑m=0K-1C(k+Lm)F{x(Kn)}=1K∑m=0K-1C(k+Lm) where N=LKN=LK
- Up Sample or Stretch: If xs(2n)=x(n)xs(2n)=x(n) for integer nn and
zero otherwise,
then F{xs(n)}=C(k)F{xs(n)}=C(k),
for k=0,1,2,...,2N-1k=0,1,2,...,2N-1
- N Roots of Unity: (WNk)N=1(WNk)N=1 for k=0,1,2,...,N-1k=0,1,2,...,N-1
- Orthogonality:
∑k=0N-1e-j2πmk/Nej2πnk/N=Nifn=m0ifn≠m.∑k=0N-1e-j2πmk/Nej2πnk/N=Nifn=m0ifn≠m.(13)
- Diagonalization of Convolution: If cyclic convolution is expressed as a matrix
operation by y=Hxy=Hx with HH given by (Equation 11),
the DFT operator diagonalizes the convolution operator HH, or
FTHF=HdFTHF=Hd where HdHd is a diagonal matrix with
the NN values of the DFT of h(n)h(n) on the diagonal. This is a matrix
statement of Property 6. Note the columns of FF are the NN
eigenvectors of HH, independent of the values of h(n)h(n).
One can show that any “kernel" of a transform that would support cyclic,
length-N convolution must be the N roots of unity. This says the DFT is
the only transform over the complex number field that will support
convolution. However, if one considers various finite fields or rings, an
interesting transform, called the Number Theoretic Transform, can be
defined and used because the roots of unity are simply two raised to a
powers which is a simple word shift for certain binary number
representations Entry 1, Entry 2.
It is very important to develop insight and intuition into the DFT or
spectral characteristics of various standard signals. A few DFT's of
standard signals together with the above properties will give a fairly
large set of results. They will also aid in quickly obtaining the DFT of
new signals. The discrete-time impulse δ(n)δ(n) is defined by
δ
(
n
)
=
1
when
n
=
0
0
otherwise
δ
(
n
)
=