38
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
i.e. F ejΩ = F [f [n]] is periodic with period 2π and its base period is given by
ΠB (Ω) = u (Ω + B) − u (Ω − B) , −π ≤ Ω ≤ π.
Example 7.17 Let x[n] = 1. We have
∞
X
X(ejΩ ) =
e−jΩn = 2π
n=−∞
∞
X
k=−∞
δ (Ω − 2kπ) .
From the duality property we may write
2π
∞
X
n=−∞
i.e.
∞
X
F.S.C.
δ(t − 2nπ) ←→ 1
F.S.C.
n=−∞
δ(t − 2nπ) ←→ 1/ (2π)
which are the expected Fourier series coefficients of the impulse train.
7.16
Discrete Fourier Transform
Let x[n] be an N -point finite sequence that is generally non-nil for 0 ≤ n ≤ N − 1 and nil
otherwise. The z-transform of x[n] is given by
X(z) =
N−1
X
x[n]z −n .
(7.112)
n=0
Its Fourier transform is given by
N−1
X
X ejΩ =
x [n]e−jΩn .
(7.113)
n=0
We note that being the z-transform evaluated on the unit circle, X(ejΩ ) is periodic in Ω with
period 2π. In fact, for k integer
N−1
N−1
X
X
x [n]e−jΩn = X ejΩ .
x [n]e−j(Ω+2kπ)n =
X ej(Ω+2kπ) =
(7.114)
n=0
n=0
Similarly to the analysis of finite duration or periodic signals by Fourier series the analysis of finite
duration or periodic sequences is the role of the Discrete Fourier Transform DFT. Moreover, in the
same way that for continuous time signals the Fourier series is a sampling of the Fourier transform,
for discrete time signals the DFT is a sampling of their Fourier transform. In particular, for an
N -point finite duration sequence or a sequence that is periodic with a period N , the DFT is in fact
a uniform sampling of the Fourier transform such that the unit circle is sampled into N points with
an angular spacing of 2π/N , as shown in Fig. 7.28 for the case N = 16. The continuous angular
frequency Ω is replaced by the discrete N values Ωk = 2πk/N, k = 0, 1, . . . , N − 1. Denoting
the DFT by the symbol X[k] we have its definition in the form
N−1
X
x[n]e−j2πnk/N , k = 0, 1, 2, . . . , N − 1
X [k] = X ej2πk/N =
n=0
(7.115)
Discrete-Time Fourier Transform
39
FIGURE 7.28
Unit circle divided into 16 points.
We note that the DFT is periodic in k with period N . This is the case since it’s a sampling of the
Fourier transform around the unit circle and
ej2π(k+mN)/N = ej2πk/N .
(7.116)
The periodic sequence that is the periodic repetition of the DFT
X[k], k = 0, 1, 2, . . .
(7.117)
e
is called the Discrete Fourier Series DFS and may be denoted by the symbol X[k].
The DFT is
therefore only one period of the DFS as obtained by setting k = 0, 1, . . . , N − 1.
From the definition of the DFT:
X[k] =
N−1
X
n=0
x[n]e−j2πnk/N , k = 0, 1, . . . , N − 1
(7.118)
the inverse transform can be evaluated by multiplying both sides of the equation by ej2πr/N . We
obtain
N−1
X
x[n]e−j2πk(n−r)/N .
(7.119)
X[k]ej2πkr/N =
n=0
Effecting the sum of both sides with respect to k
N−1
X
X[k]ej2πkr/N =
N−1
X N−1
X
x[n]e−j2πk(n−r)/N =
N−1
X
x[n]
n=0
k=0 n=0
k=0
N−1
X
e−j2πk(n−r)/N .
(7.120)
k=0
For integer m we have
e−j2πkm/N =
N, for m = pN, p integer
0, otherwise
(7.121)
e−j2πk(n−r)/N =
N, for n = r + pN, p integer
0, otherwise
(7.122)
N−1
X
k=0
whence
N−1
X
k=0
i.e.
N−1
X
X[k]ej2πkr/N = N x[r].
(7.123)
k=0
Replacing r by n we have the inverse transform
x[n] =
N−1
1 X
X[k]ej2πnk/N .
N
k=0
(7.124)
40
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
Example 7.18 Evaluate the DTFT and the DFT of the sequence
x[n] = cos Bn RN (n)
The z-transform is given by
X (z) =
N−1
X
cos nBz −n =
n=0
N−1
1 X jBn
e
+ e−jBn z −n .
2 n=0
Let a = ejB
X (z) =
N−1
X
n=0
1
an z −n + a∗n z −n =
2
1 − a∗N z −N
1 − aN z −N
+
1 − az −1
1 − a∗ z −1
The transform X(z) can be re-written
X (z) =
1 − cos B z −1 − cos N B z −N + cos [(N − 1) B] z −(N+1)
.
1 − 2 cos B z −1 + z −2
The Fourier transform is written
1 1 − aN e−jNΩ
1 − a∗N e−jNΩ
X ejΩ =
.
+
2
1 − ae−jΩ
1 − a∗ e−jΩ
The student can verify that X ejΩ can be written in the form
or, alternatively,
where
n
X ejΩ = 0.5 ej(B−Ω)(N−1)/2 SdN [(B − Ω) /2]
o
+ e−j(B+Ω)(N−1)/2 SdN [(B + Ω)/2]
N
X ejΩ =
{Φ (Ω − B) + Φ (Ω + B)}
2
Φ (Ω) =
sin (N Ω/2) −j(N−1)Ω/2
e
.
N sin (Ω/2)
The absolute value and phase angle of the
function Φ (Ω) are shown in Fig. 7.29 for N = 8.
We note that the Fourier transform X ejΩ closely resembles the transform of a continuous time
FIGURE 7.29
The SdN function and transform.
Discrete-Time Fourier Transform
41
truncated sinusoid. The DFT is given by
2π
2π
N
Φ
k−B +Φ
k+B
.
X[k] = X ej2πk/N =
2
N
N
For the special case where the interval N contains an integer number of cycles we have
2π
m, m = 0, 1, 2, . . .
N
2π
2π
X [k] = (N/2) Φ
(k − m) + Φ
(k + m)
N
N
N/2, k = m and k = N − m
=
0,
otherwise.
B=
The DFT is thus composed of two discrete impulses, one at k = m, the other at k = N − m. Note
that in the ’well behaved’ case B = 2πm/N we can evaluate the DFT directly by writing
cos(Bn) =
N−1
o
2π
2π
1 X
1 n j 2π
e N mn + e−j N mn =
X [k]ej N nk , n = 0, 1, . . . , N − 1..
2
N
k=0
Equating the coefficients of the exponentials we have
N/2, k = m, k = N − m
X [k] =
0,
otherwise.
We recall from Chapter ?? that the Fourier series of a truncated continuous time sinusoid contains in general two discrete sampling functions and that when the analysis interval is equal to the
period of the sinusoid or to a multiple thereof the discrete Fourier series spectrum contains only
two impulses. We see the close relation between the Fourier series of continuous time signals and
the DFT of discrete time signals.
7.17
Discrete Fourier Series
We shall use the notation x̃ [n] to denote a periodic sequence of period N , i.e.
x̃ [n] = x̃ [n + kN ] , k integer.
(7.125)
DF S
We shall write X̃ [k] = DF S [x̃ [n]] meaning x̃ [n] ←→ X̃ [k]. Let x [n] be an aperiodic sequence.
A periodic sequence x̃ [n] may be formed thereof in the form
x̃ [n] = x [n] ∗
∞
X
k=−∞
δ [n + kN ] =
∞
X
x [n + kN ] , k integer.
(7.126)
k=−∞
If x [n] is of finite duration 0 ≤ n ≤ N − 1, i.e. a sequence of length N the added shifted versions
thereof, forming x̃ [n], do not overlap, and we have
x̃ [n] = x [n mod N ]
(7.127)
where n mod N means n modulo N ; meaning the remainder of the integer division n ÷ N . For
example 70 mod 32 = 8.
If the sequence x [n] is of length L < N , again no overlapping occurs and in the range 0 ≤ n ≤
N − 1 the value of x̃ [n] is the same as x [n] followed by (N − L) zeros. If on the other hand the
length of the sequence x [n] is L > N , overlap occurs leading to superposition (“aliasing”) and we
can no more write x̃ [n] = x [n mod N ] .
42
7.18
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
DFT of a Sinusoidal Signal
Given a finite-duration sinusoidal signal xc (t) = sin(βt + θ)RT (t) of frequency β and duration T ,
sampled with a sampling interval Ts and sampling frequency fs = 1/Ts Hz, i.e. ωs = 2π/Ts r/s and
the signal period is τ = 2π/β . For simplicity of presentation we let θ = 0, the more general case
of θ 6= 0 being similarly developed. We presently consider the particular case where the window
duration T is a multiple m of the signal period τ i.e. T = mτ , as can be seen in Fig. 7.30 for the
case m = 3.
x(t), x[n]
N-1
0
Ts
4
8
12
16
20
t, n
t
T
FIGURE 7.30
Sinusoid with 3 cycles during analysis window.
The discrete-time signal is given by x[n] = xc (nTs ) = sin(Bn)RN [n], where B = βTs . We also
note that the N -point DFT analysis corresponds to the signal window duration
T = mτ = N Ts .
(7.128)
We may write
B = βTs =
sin(Bn) =
Hence
2π
2π
Ts =
m.
τ
N
(7.129)
N−1
o
2π
1 n j 2π
1 X
X [k]ej2πnk/N , n = 0, 1, . . . , N − 1.
e N mn − e−j N mn =
2j
N k=0
X [k] =
∓jN/2, k = m, k = N − m
0,
otherwise.
We note that the fundamental frequency of analysis in the continuous-time domain, which may be
denoted by ω0 is given by ω0 = 2π/T . The sinusoidal signal frequency β is a multiple m of the
fundamental frequency ω0 . In particular
β=
2π
2π
2π
=
=m
= mω0 .
τ
T /m
T
(7.130)
2π
2π
Ts = m .
(7.131)
T
N
The unit circle is divided into N samples denoted k = 0, 1, 2, ..., N − 1 corresponding to the
frequencies Ω = 0, 2π/N, , 4π/N, ..., (N − 1)π/N . The k = 1 point is the fundamental frequency
B = βTs = m
Discrete-Time Fourier Transform
43
Ω0 = 2π/N . Since B = m2π/N its falls on the mth point of the circle as the mth harmonic. Its
conjugate falls on the point k = N − m.
The following example illustrates these observations.
Example 7.19 Given the signal xc (t) = sin βtRT (t), where β = 250π r/s and T = 24 ms. A C/D
converter samples this signal at a frequency of 1000 Hz. At what values of k does the DFT X[k]
display its spectral peaks?
The signal period is τ = 2π/β = 8 ms. The Rectangular window of duration T contains m =
T /τ = 24/8 = 3 cycles of the signal as can be seen in Fig. 7.30. The sampling period is Ts = 1
ms. The sampled signal is the sequence x[n] = sin BnRN [n], where B = βTs = π/4 and N =
T /Ts = 24. The fundamental frequency of analysis is ω0 = 2π/T , and the signal frequency is
β = 2π/τ = (T /τ )ω0 = mω0 . In the discrete-time domain
B = βTs =
2π
2π
2π
Ts =
Ts =
m = mΩ0 .
τ
T /m
N
The spectral peak occurs at k = m = 3 and at k = N − m = 24 − 3 = 21, which are the pole
positions of the corresponding infinite duration signal, as can be seen in Fig. 7.31.
6
N = 24
b=3w0, B
w0, W0
12
0, ws, 2p
23
18
FIGURE 7.31
Unit circle divided into 24 points.
Example 7.20 Let
v (t) = cos (25πt) RT (t)
Assuming a sampling frequency fs of 100 samples per second, evaluate the DFT if T = 1.28 sec.
1.28
Let Ts be the sampling interval. fs = 100 Hz, Ts = f1s = 0.01 sec, N = TTs = 0.01
= 128.
v [n] = cos (25π × nTs ) RN (n) = cos (0.25πn) RN (n) 4
= cos (Bn) RN (n) .
Writing B = 0.25π = (2π/N )m, we have m = 16. The DFT X[k] has a peak on the unit circle at
k = 16 and k = 128 − 16 = 112.
V [k] =
as seen in Fig. 7.32
N/2 = 64, k = 16, k = 112
0,
otherwise.
44
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
FIGURE 7.32
DFT of a sequence.
7.19
Deducing the Z-Transform from the DFT
Consider a finite duration sequence x [n] which is in general non-nil for 0 ≤ n ≤ N − 1 and nil
otherwise, and its periodic extension x̃ [n] with a period of repetition N
x̃ [n] =
∞
X
x [n + kN ] .
(7.132)
k=−∞
Since x [n] is of length N its periodic repetition with period N produces no overlap; hence x̃ [n] =
x [n] , 0 ≤ n ≤ N − 1. The z-transform of the sequence x [n] is given by
X (z) =
N−1
X
x [n] z −n
(7.133)
n=0
and its discrete Fourier series DFS is given by
X̃ [k] =
N−1
X
x̃ [n] e−j2πkn/N 4
=
N−1
X
x [n] WNkn
(7.134)
n=0
n=0
where WN = e−j2π/N is the N th root of unity. The inverse DFS is
x [n] = x̃ [n] =
N−1
N−1
1 X
1 X
X̃ [k] ej2πkn/N 4
X̃ [k] WN−kn , 0 ≤ n ≤ N − 1
=
N
N
k=0
(7.135)
k=0
and the z-transform may thus be deduced from the DFS and hence from the DFT. We have
N−1
1 X
X̃ [k] WN−kn z −n
N
n=0
n=0
k=0
N−1
N−1
N−1
X −kn
1 X
1 − z −N X
X̃ [k]
=
WN z −n =
X̃ [k]
N k=0
N
1
−
WN−k z −1
n=0
k=0
N−1
X [k]
1 − z −N X
=
N
1
−
WN−k z −1
k=0
X (z) =
N−1
X
x [n] z −n =
N−1
X
(7.136)
which is an interpolation formula reconstructing the z-transform from the N -point DFT on the
z plane unit circle. We can similarly obtain an interpolation formula reconstructing the Fourier
Discrete-Time Fourier Transform
45
transform X ejΩ from the DFT. To this end we replace z by ejΩ in the above obtaining
N−1
1 − WN−kN e−jΩN
1 X
X ejΩ =
X̃ [k]
N k=0
1 − WN−k e−jΩ
N−1
1 − ej(2π/N )kN e−jΩN
1 X
X̃ [k]
=
N
1 − WN−k e−jΩ
k=0
N−1
sin {(Ω − 2πk/N ) N/2}
1 X
X̃ [k]e−j(Ω−2πk/N )(N−1)/2
=
N k=0
sin {(Ω − 2πk/N ) /2}
N−1
X
1
X̃ [k]e−j(Ω−2πk/N )(N−1)/2 SdN [(Ω − 2πk/N ) /2]
=
N
(7.137)
k=0
The function SdN (Ω/2) = sin (N Ω/2) / sin (Ω/2) is depicted in Fig. 7.33 for the case N = 8.
Note that over one period the function has zeros at values of Ω which are multiples of 2π/N = 2π/8.
In fact
sin (rπ)
N, r = 0
SdN (rπ/N ) =
(7.138)
=
0, r = 1, 2, . . . , N − 1.
sin (rπ/N )
Hence
X(ejΩ )|Ω=2πm/N =
N−1
1 X
X̃ [k]e−j(2π/N )(m−k)(N−1)/2
N k=0
(7.139)
· SdN [π (m − k) /N ] = X̃ [m]
confirming that the Fourier transform X ejΩ curve passes through the N points of the DFT.
N
p
p
W
p
p
W
FIGURE 7.33
The function SdN (Ω/2).
7.20
DFT vs DFS
The DFS is but a periodic repetition of the DFT. Consider a finite duration sequence x [n] of length
N , i.e. a sequence that is nil except in the interval 0 ≤ n ≤ N − 1, we may extend it periodically
46
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
with period N , obtaining the sequence
x̃ [n] =
∞
X
x [n + kN ] .
(7.140)
k=−∞
The DFS of x̃ [n] is X̃ [k] and the DFT is simply
X [k] = X̃ [k] , 0 ≤ k ≤ N − 1.
(7.141)
In other words the DFT is but the base period of the DFS. We may write the DFT in the form
X [k] =
N−1
X
2π
x̃ [n] e−j N nk =
N−1
X
n=0
n=0
2π
x [n] e−j N nk , 0 ≤ k ≤ N − 1.
(7.142)
The inverse DFT is
x [n] =
N−1
2π
1 X
X [k] ej N nk , n = 0, 1, . . . , N − 1.
N n=0
(7.143)
In summary, as we have seen in Chapter ??, here again in evaluating the DFT of a sequence x [n]
we automatically perform a periodic extension of x [n] obtaining the sequence x̃ [n]. This in effect
produces the sequence “seen” by the DFS. We then evaluate the DFS and deduce the DFT by
extracting the DFS coefficients in the base interval 0 ≤ k ≤ N − 1. It is common in the literature
to emphasize the fact that
X [k] = X̃ [k] RN [k]
(7.144)
where RN [k] is the N -point rectangle
RN [k] = u [k] − u [k − N ]
(7.145)
that is, the DFT X [k] is an N -point rectangular window truncation of the periodic DFS X̃ [k]. The
result is an emphasis on the fact that X [k] is nil for values of k other than 0 ≤ k ≤ N − 1. Such
distinction, however, adds no new information than that provided by the DFS, and is therefore
of little significance. In deducing and applying properties of the DFT a judicious approach is to
perform a periodic extension, evaluate the DFS and finally deduce the DFT as its base period.
Example 7.21 Let x [n] be the rectangle x [n] = R4 [n]. Evaluate the Fourier transform, the
8-point DFS and 8-point DFT of the sequence and its periodic repetition.
FIGURE 7.34
Rectangular sequence and periodic repetition.
Referring to Fig. 7.34 we have
3
X
1 − e−j4Ω
e−j2Ω sin (4Ω/2)
e−jΩn =
X ejΩ =
= −jΩ/2
= e−j3Ω/2 Sd4 (Ω/2)
−jΩ
1
−
e
sin
Ω/2
e
n=0
Discrete-Time Fourier Transform
47
The DFS, with N = 8, of the periodic sequence x̃ [n] =
∞
X
x [n + 8k] is
k=−∞
X̃ [k] = X ejΩ The magnitude spectrum is
Ω=(2π/N )k
=
3
X
2π
e−j N kn = e−j3(π/8)k Sd4 (πk/8)
n=0
4,
2.613,
X̃ [k] =
0,
1.082,
k
k
k
k
=0
= 1, 7
= 2, 4, 6
= 3, 5
which is plotted in Fig. 7.35. The DFT is the base period of the DFS, i.e.
FIGURE 7.35
Periodic discrete amplitude spectrum.
X [k] = X̃ [k] RN [k] = e−j3πk/8 Sd4 (πk/8) , k = 0, 1, . . . , 7.
7.21
Properties of DFS and DFT
The following are basic properties of Discrete Fourier Series.
Linearity
The linearity property states that if x̃1 [n] and x̃2 [n] are periodic sequences of period N each
then
DF S
x̃1 [n] + x̃2 [n] ←→ X̃1 [k] + X̃2 [k] .
(7.146)
Shift in Time The shift in time property states that
DF S
x̃ [n − m] ←→ WNkm X̃ [k] .
(7.147)
Shift in Frequency The dual of the shift in time property states that
DF S
x̃ [n] WN−nm ←→ X̃ [n − m] .
(7.148)
Duality From the definition of the DFS and its inverse we may write
x̃ [−n] =
N−1
1 X
X̃ [k] WNnk .
N k=0
(7.149)
48
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
Replacing n by k and vice versa we have
x̃ [−k] =
N−1
h
i
1 X
1
X̃ [n] WNnk = DF S X̃ [n] .
N n=0
N
DF S
(7.150)
DF S
In other words if x̃ [n] ←→ X̃ [k] then X̃ [n] ←→ N x̃ [−k] . This same property applies to the
DFT where, as always, operations such as reflection are performed on the periodic extensions of the
time and frequency sequences. The DFT is then simply the base period of the periodic sequence,
extending from index 0 to index N − 1.
Example 7.22 We have evaluated the DFT X[k] and DFS X̃ [k] of the rectangular sequence x[n]
of example 7.21 and its periodic extension x̃ [n] with a period N = 8, respectively, shown in Fig.
7.34. From the duality property we deduce that given a sequence
y[n] = X [n] = X̃ [n] RN [n] = e−j3πn/8 Sd4 (πn/8) RN [n]
i.e.
y[n] = e−j3πn/8 Sd4 (πn/8) , n = 0, 1, . . . , 7.
and its periodic repetition ỹ [n], the DFS of the latter is Ỹ [k] = N x̃ [−k] and the DFT of y[n] is
Y [k] = N x̃ [−k] RN [k].
To visualize these sequences note that the complex periodic sequence
ỹ [n] = X̃ [n] = e−j3πn/8 Sd4 (πn/8) ,
of which the absolute value is | ỹ [n] |=| X̃ [n] |, has the same absolute value as the spectrum shown
in Fig. 7.35 with the index k replaced by n. The sequence y[n] has an absolute value which is the
base N = 8-point period of this sequence and is shown in Fig. 7.36
|y[n] | = | X[n] |
4
0 1 2 3 4 5 6 7
n
FIGURE 7.36
Base-period |y[n]| of periodic absolute value sequence ỹ [n]
The transform Ỹ [k] = N x̃ [−k] is visualized by reflecting the sequence x̃ [n] of Fig. 7.34 about
the vertical axis and replacing the index n by k. The transform Y [k] is simply the N -point base
period of Ỹ [k], as shown in Fig. 7.37
7.21.1
Periodic Convolution
Given two periodic sequences x̃ [n] and ṽ [n] of period N each, multiplication of their DFS X̃ [k]
and Ṽ [k] corresponds to periodic convolution of x̃ [n] and ṽ [n]. Let w [n] denote the periodic
convolution, written in the form
w̃ [n] = x̃ [n] ~ ṽ [n] =
N−1
X
m=0
x̃ [m] ṽ [n − m] .
(7.151)
Discrete-Time Fourier Transform
49
~
~
Y [k]=N X[-k]
8
1 2 3 4 5 6 7 8 9 10 11
-3 -2 -1
k
Y [k]
8
0 1 2 3 4 5 6 7
k
FIGURE 7.37
Reflection of a periodic sequence and base-period extraction.
The DFS of w̃ [n] is given by
W̃ [k] =
=
N−1
X
n=0
N−1
X
m=0
(N−1
X
)
x̃ [m] ṽ [n − m] e−j(2π/N)nk
m=0
N−1
X
x̃ [m]
n=0
ṽ [n − m] e
−j(2π/N )nk
(7.152)
.
Let n − m = r
W̃ [k] =
=
N−1
X
m=0
N−1
X
x̃ [m]
−m+N−1
X
ṽ [r] e−j(2π/N )(r+m)k
r=−m
x̃ [m] e
−j(2π/N)mk
m=0
N−1
X
(7.153)
ṽ [r] e
−j(2π/N )rk
= X̃ [k] Ṽ [k] .
r=0
In other words
DF S
(7.154)
x̃ [n] ṽ [n] ←→ (1/N ) X̃ [k] ~ Ṽ [k] .
(7.155)
x̃ [n] ~ ṽ [n] ←→ X̃ [k] Ṽ [k] .
The dual of this property states that
DF S
Example 7.23 Evaluate the periodic convolution z̃ [n] = x̃ [n] ~ ṽ [n] for the two sequences x̃ [n]
and ṽ [n] shown in Fig.7.38
Proceeding graphically as shown in the figure we fold the sequence ṽ [n] about its axis and slide
the resulting sequence ṽ [n − m] to the point m = n along the m axis evaluating successively the
sum of the product x̃ [m] ṽ [n − m] for each value of n. We obtain the value of z̃ [n], of which the
base period has the form shown in the following table.
n
0 1 2
z̃ [n] 16 12 7
The periodic sequence z̃ [n] is depicted in Fig. 7.39
3 4
3 6
5 6 7
10 13 17
50
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
FIGURE 7.38
Example of periodic convolution.
FIGURE 7.39
Circular convolution result.
Discrete-Time Fourier Transform
7.22
51
Circular Convolution
Circular convolution of two finite duration sequences, each N points long, is simply periodic convolution followed by retaining only the base period. Symbolically we may write
x [n] } v [n] = {x̃ [n] ~ ṽ [n]} RN [n] .
DF T
(7.156)
x [n] } v [n] ←→ X [k] V [k]
(7.157)
x [n] v [n] ←→ (1/N ) X [k] } V [k] .
(7.158)
DF T
The practical approach is therefore to simply perform periodic convolution then extract the base
period, obtaining the circular convolution.
In other words, circular convolution is given by
"N−1
#
"N−1
#
X
X
x [n] } v [n] =
x̃ [m] ṽ [n − m] RN [n] =
ṽ [m] x̃ [n − m] RN [n]
(7.159)
m=0
m=0
For the case of the two sequences defined in the last example, circular convolution would be
evaluated identically as periodic convolution, as seen in the example, followed by retaining only
the base period of the evaluate periodic convolution z̃ [n], i.e.
x [n] } v [n] = z̃ [n] RN [n]
x [n] } v [n] = {16, 12, 7, 3, 6, 10, 13, 17}, for {n = 0, 1, 2, 3, 4, 5, 6, 7.}
Circular convolution is not the same but can be related to the usual linear convolution. Let y [n]
be the N -point linear convolution of two finite length sequences x [n] and v [n]
y [n] = x [n] ∗ v [n] ,
(7.160)
circular convolution is given by
x [n] } v [n] =
(
∞
X
)
y [n + kN ] RN [n] .
k=−∞
(7.161)
Circular convolution is therefore the aliasing (superposition of shifted versions) of the linear
convolution sequence y [n]. Note that if the length of y [n] is less than or equal to N then the sum on
the right hand side includes in the interval 0 ≤ n ≤ N −1 only the component y [n], while all other
components such as y [n − N ], y [n + N ] fall outside that interval so that y [n + kN ] RN [n] = 0
for k 6= 0 and
x [n] } v [n] = x [n] ∗ v [n]
(7.162)
i.e. in this case circular convolution is the same as linear convolution. If the sequences x [n] and
v [n] are of lengths N1 and N2 , the linear convolution sequence y [n] is of length N1 + N2 − 1. If an
N -point circular convolution is effected the result would be the same as linear convolution if and
only if N ≥ N1 + N2 − 1.
Example 7.24 Evaluate the linear convolution y [n] = x [n] ∗ v [n] of the sequences x [n] and v [n]
which are the base periods of x̃ [n] and ṽ [n] of the last example.
Proceeding similarly, as shown in Fig. 7.40, we obtain the linear convolution y [n] which may be
listed in the form of the following table.
n
0 1
y [n] 0 0
2 3
1 3
4 5
6 10
6 7 8 9 10
13 17 16 12 6
52
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
FIGURE 7.40
Linear convolution of two sequences.
The sequence y [n] is depicted in Fig. 7.41.
To deduce the value of circular convolution z [n] from the linear convolution y [n] we construct
the following table, where z[n] = y[n] + y[n + 8]. obtaining the circular convolution z [n] as found
y [n]
0 0 1 3
y [n + 8] 16 12 6 0
z [n]
16 12 7 3
6 10 13
0 0 0
6 10 13
17 16 12 6 0
0 0 0 0 0
17 0 0 0 0
0 0
0 0
0 0
above.
7.23
Circular Convolution using the DFT
The following example illustrates circular convolution using the DFT.
Example 7.25 Consider the circular convolution of the two sequences x̃ [n] and ṽ [n] of the last
Discrete-Time Fourier Transform
53
y[n]
16
12
8
4
1 2 3 4 5 6 7 8 9 10
n
FIGURE 7.41
Linear convolution results.
example. We evaluate X̃ [k], Ṽ [k] and their product and verify that the circular convolution z̃ [n] =
x̃ [n] ~ ṽ [n] has the DFS X̃ [k] = X̃ [k] Ṽ [k]. By extracting the N -point base period we conclude
that the DFT relation Z [k] = X [k] V [k] also holds.
The sequences x̃ [n] and ṽ [n] are periodic with period N = 8.
For 0 ≤ n ≤ 7 we have
x̃ [n] = δ [n] + δ [n − 1] + 2δ [n − 2] + 2δ [n − 3] + 3δ [n − 4] + 3δ [n − 5]
ṽ [n] = δ [n − 2] + 2 {δ [n − 3] + 2δ [n − 4] + 2δ [n − 5]}
X̃ [k] =
N−1
X
x̃ [n] e−j(2π/N)nk
n=0
= 1 + e−j(2π/8)k + 2e−j(2π/8)2k + 2e−j(2π/8)3k
+ 3e−j(2π/8)4k + 3e−j(2π/8)5k
X [k] = X̃ [k] RN [k] = X̃ [k] , k = 0, 1, . . . , N − 1
n
o
Ṽ [k] = e−j(2π/8)2k + 2 e−j(2π/8)3k + e−j(2π/8)4k + e−j(2π/8)5k
Letting w = e
−j(2π/8)k
V [k] = Ṽ [k] RN [k] = Ṽ [k] , k = 0, 1, . . . , N − 1.
we have
X̃ [k] = 1 + w + 2w2 + 2w3 + 3w4 + 3w5
Ṽ [k] = 2w2 + 3w3 + 3w4 + 3w5 .
Multiplying the two polynomials noticing that wk = wk mod 8 , we have
Z̃ [k] = X̃ [k] Ṽ [k] = 16 + 12w + 7w2 + 3w3 + 6w4
+ 10w5 + 13w6 + 17w7 , 0 ≤ k ≤ N − 1
X [k] V [k] = Z̃ [k] RN [k] = Z̃ [k] , 0 ≤ k ≤ 7.
The inverse transform of Z̃ [k] is
z̃ [n] = 16δ [n] + 12δ [n − 1] + 7δ [n − 2] + 3δ [n − 3] + 6δ [n − 4]
+ 10δ [n − 5] + 13δ [n − 6] + 17δ [n − 7] , 0 ≤ n ≤ N − 1
and
z [n] = z̃ [n] , 0 ≤ n ≤ N − 1.
This is the same result obtained above by performing circular convolution directly in the time
domain.
as stated.
54
7.24
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
Sampling the Spectrum
Let x [n] be an aperiodic sequence with z-transform X (z) and Fourier transform X ejΩ .
∞
X
X (z) =
x [n] z −n
(7.163)
n=−∞
∞
X
x [n] e−jΩn .
X ejΩ =
(7.164)
n=−∞
Sampling the z-transform on the unit circle uniformly into N points, that is at Ω = [2π/N ] k, k =
0, 1, . . . , N − 1 we obtain the periodic DFS
X̃ [k] =
∞
X
x [n] e−j(2π/N )nk .
(7.165)
n=−∞
We recall, on the other hand, that the same DFS
X̃ [k] =
N−1
X
x̃ [n] e−j(2π/N )nk
(7.166)
n=0
is the expansion of a periodic sequence x̃ [n] of period N . To show that x̃ [n] is but an aliasing of
the aperiodic sequence x [n] we use the inverse relation
x̃ [n] =
N−1
N−1
∞
1 X
1 X X
X̃ [k]ej(2π/N)nk =
x [m]e−j(2π/N )mk ej(2π/N)nk
N
N
m=−∞
1
=
N
Now
wherefrom
k=0
∞
X
m=−∞
k=0
x [m]
N−1
X
e
j(2π/N)(n−m)k
(7.167)
.
k=0
N−1
1 X j(2π/N)(n−m)k
1, m − n = lN
e
=
0, otherwise
N k=0
x̃ [n] =
∞
X
x [n + lN ]
(7.168)
(7.169)
l=−∞
confirming that sampling the Fourier transform of an aperiodic sequence x [n], leading to the DFS,
has for effect aliasing in time of the sequence x [n], which results in a periodic sequence x̃ [n] that
can be quite different from x [n]. If on the other hand x [n] is of length N or less the resulting
sequence x̃ [n] is a simple periodic extension of x [n]. Since the DFT is but the base period of the
DFS these same remarks apply directly to the DFT.
7.25
Table of Properties of DFS and DFT
Table 7.3 summarizes basic properties of the DFS expansion. Since the DFT of an N -point sequence
x [n] is but the base period of the DFS expansion of x̃ [n], the periodic extension of x [n], the same
properties apply to the DFT. We simply replace the sequence x [n] by its periodic extension x̃ [n],
apply the DFS property and extract the base period of the resulting DFS. The following example
illustrates the approach in applying the shift in time property, which states that if x̃ [n] ↔ X̃ [k]
then x̃ [n − m] ↔ e−j(2π/N)km X̃ [k].
Discrete-Time Fourier Transform
55
FIGURE 7.41
Discrete Fourier series DFS properties.
Time n
Frequency k
x̃ [n]
X̃ [k]
x̃∗ [n]
X̃ ∗ [−k]
x̃∗ [−n]
X̃ ∗ [k]
x̃ [n − m]
e−j(2π/N )km X̃ [k]
ej(2π/N )mn x̃ [n]
X̃ [k − m]
x̃ [n] ~ ṽ [n]
X̃ [k] Ṽ [k]
x̃ [n] ṽ [n]
(1/N ) X̃ [k] ~ Ṽ [k]
Proof of Shift in Time Property
Let ṽ [n] = x̃ [n − m]
Ṽ [k] =
N−1
X
n=0
Let n − m = r
Ṽ [k] =
−m+N−1
X
x̃ [n − m] e−j(2π/N )km .
(7.170)
x̃ [r] e−j(2π/N )k(r+m)
r=−m
=e
−j(2π/N )km
N−1
X
(7.171)
x̃ [r] e
−j(2π/N)kr
=e
−j(2π/N )km
X̃ [k]
r=0
i.e.
x [n − m] ↔ e−j(2π/N)km X̃ [k] .
(7.172)
Note that if the amount of shift m is greater than N the resulting shift is by m mod N since the
sequence x̃ [n] is periodic of period N .
7.26
Shift in Time and Circular Shift
Given a periodic sequence x̃ [n] of period N the name circular shift refers to shifting the sequence
by say m samples followed by extracting the base period, that is, the period 0 ≤ n ≤ N − 1. If
we consider the result of the shift on the base period before and after the shift we deduce that the
result is a rotation, a circular shift, of the N samples. For example if the periodic sequence has a
period N = 8 and has the values {. . . , 2, 9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, . . .} with
the base period x̃ [n] = 2, 9, 8, 7, 6, 5, 4, 3 for n = 0, 1, 2, . . . , 7, as shown in Fig. 7.42 (a) then
if it is shifted one point to the right the resulting base period is x̃ [n − 1] = 3, 2, 9, 8, 7, 6, 5, 4
as shown in Fig. 7.42 (b). If shifted instead by two points to the right the resulting sequence
is x̃ [n − 2] = 4, 3, 2, 9, 8, 7, 6, 5, as shown in Fig. 7.42 (c). We note that the effect is a simple
56
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
rotation to the right by the number of shifts. If the shift of x̃ [n] is to the left by one point the result
is x̃ [n + 1] = 9, 8, 7, 6, 5, 4, 3, 2, as shown in Fig. 7.42 (d) . See Fig. 7.42 The base period of x̃ [n]
FIGURE 7.42
Circular shift operations.
is given by x̃ [n] RN [n], that of x̃ [n − m] is x̃ [n − m] RN [n] as shown in the figure. The arrow in
the figure is the reference point. Shifting the sequence x̃ [n] to the right by k points corresponds to
the unit circle as a wheel turning anti-clockwise k steps and reading the values starting from the
reference point and vice versa.
Note: The properties listed are those of the DFS, but apply equally to the DFT with the
proper interpretation that x̃ [n] and X̃ [k] are periodic extensions of the N -point sequences x [n]
and X [k], that X [k] = X̃ [k] RN [k] and x [n] = x̃ [n] RN [n]. The shift in time producing
x̃ [n − m] is equivalent to circular shift and the periodic convolution x̃ [n] ~ ṽ [n] is equivalent to
cyclic convolution in the DFT domain.
7.27
Table of DFT Properties
Properties of the DFT are listed in Table 7.4. In this table the notation x ((k))N stands for
x [k mod N ]. As noted above, the properties are the same as those of the DFS except for a
truncation of a periodic sequence to extract its base period.
Discrete-Time Fourier Transform
57
FIGURE 7.42
DFT properties.
7.28
Time n
Frequency k
x [n]
X [k]
x∗ [n]
X ∗ [((−k))N ]
x∗ [((−n))N ]
X ∗ [k]
x [((n − m))N ]
e−j(2π/N )km X [k]
ej(2π/N )mn x [n]
X [((k − m))N ]
x [n] } v [n]
X [k] V [k]
x [n] v [n]
(1/N ) X [k] } V [k]
Zero Padding
Consider a sequence of x [n] of length N defined over the interval 0 ≤ n ≤ N − 1 and zero
elsewhere, and its periodic repetition x̃ [n]. We study the effect on the DFT of annexing N zeros,
called padding with zeros leading to a sequence x2 [n] of length 2N . More generally, we consider
padding the sequence x [n] with zeros leading to a sequence x4 [n] say of length 4N , x8 [n] of length
8N and higher.
The addition of N zeros to the sequence implies that the new periodic sequence x̃2 [n] is equivalent
to a convolution of the original N -point sequence x [n] with an impulse train of period 2N . The
result is a sequence of a period double the original period N of the sequence x̃ [n], which is but
a convolution of the sequence x [n] with an impulse train of period N . The effect of doubling the
period is that in the frequency domain the DFS X̃2 [k] and the DFT X2 [k] are but finer sampling of
the unit circle; into 2N points rather than N points. Similarly zero padding leading to a sequence
x4 [n] of length 4N produces a DFT X4 [k] that is a finer still sampling of the unit circle into 4N
points, and so on. We conclude that zero padding leads to finer sampling of the Fourier transform
X ejΩ , that is, to an interpolation between the samples of X [k].
The duality between time and frequency domains implies moreover that given a DFT X [k] and
DFS X̃ [k] of a sequence x [n], zero padding of the X [k] and, equivalently, X̃ [k], leading to a DFT
sequence X2 [k] corresponds to convolution in the frequency domain of X [k] with an impulse train
of period 2N . This implies multiplication in the time domain of the sequence x [n] by an impulse
train of double the frequency such that the resulting sequence x2 [n] is a finer sampling, by a factor
of two, of the original sequence x [n]. Similarly, zero padding X [k] leading to a sequence X4 [k]
of length 4N has for effect a finer sampling, by a factor of 4, i.e. interpolation, of the original
sequence x [n].
Example 7.26 Let x [n] = RN [n]
X −jΩn
N−1
1 − e−jΩN
e−jΩN/2 2j sin (ΩN/2)
e
=
X ejΩ =
=
1 − e−jΩ
e−jΩ/2 2j sin (Ω/2)
n=0
sin
(N
Ω/2)
= e−jΩ(N−1)/2 SdN (Ω/2) .
= e−jΩ(N−1)/2
sin (Ω/2)
(7.173)
58
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
We consider the case N = 4 sot that x [n] = R4 [n] and then the case of padding x [n] with
zeros obtaining the 16 point sequence
x [n] , n = 0, 1, 2, 3
y [n] =
(7.174)
0,
n = 4, 5, . . . , 15.
We have
X [k] =
3
X
e−j(2π/4)nk = X ejΩ Ω=(2π/4)k = e−j(3/2)(π/2)k Sd4 (kπ/4)
n=0
N = 4, k = 0
=
0,
k = 1, 2, 3
3
X
1 − e−j(2π/16)4k
1 − e−j(2π/16)k
n=0
−j(2π/16)2k
e
sin [(2π/16) 2k]
= −j(2π/16)k/2
= e−j(2π/16)(3k/2) Sd4 (kπ/16)
sin [(2π/16) k/2]
e
which is a four times finer sampling of X ejΩ than in the case of X [k].
Y [k] =
(7.175)
e−j(2π/16)nk =
(7.176)
Example 7.27 Consider a sinusoid xc (t) = sin(ω1 t), where ω1 = 2πf1 ), sampled at a frequency
fs = 25600 Hz. The sinusoid is sampled for a duration of τ = 2.5 msec into N1 samples. The
frequency f1 of xc (t) is such that in the time interval (0, τ ) there are 8.5 cycles of the sinusoid.
a) Evaluate the 64-point FFT of the sequence x[n] = xc (nTs , where Ts is the sampling interval
Ts = 1/fs .
b) Apply zero padding by annexing 192 zeros to the samples of the sequence x[n]. Evaluate the
256-point FFT of the padded signal vector. Observe the interpolation and the higher spectral peaks
that appear thanks to zero padding.
The following Matlab program evaluates the FFT of the signal x[n] and subsequently that of the
zero-padded vector xz [n].
% Zero padding example. Corinthios 2008
fs=25600 % sampling frequency
Ts=1/fs % sampling period T s = 3.9063x10( − 5)
tau=0.0025 % duration of sinusoid
N1=0.0025/Ts % N1=64
t=(0:N1-1)*Ts % time in seconds
% tau contains 8.5 cycles of sinusoid and 64 samples.
tau1=tau/8.5 % tau1 is the period of the sinusoid.
% f1 is the frequency of the sinusoid in Hz.
f1=1/tau1
w1=2*pi*f1
x=sin(w1*t);
figure(1)
stem(t,x)
title(’x[n]’)
X=fft(x);
% N1=64 samples on unit circle cover the range 0 to fs Hz
freq=(0:63)*fs/64;
Xabs=abs(X);
figure(2)
stem(freq,Xabs)
title(’Xabs[k]’)
% Add 28 − 64 = 192 zeros.
N = 28
Discrete-Time Fourier Transform
59
T = N ∗ T s % Duration of zero-padded vector.
xz=[x zeros(1,192)]; % xz is x with zero padding
t = (0 : N − 1) ∗ T s % t=(0:255)*Ts
figure(3)
stem(t,xz)
title(’Zero-padded vector xz[n]’)
Xz=fft(xz);
Xzabs=abs(Xz);
f reqf = (0 : 255) ∗ f s/256; % frequency finer-sampling vector
figure(4)
stem(freqf,Xzabs)
title(’Xzabs[k]’)
See Matlab program zero padding example sinusoid.m
The signal x[n] is depicted in Fig. 7.43 (a). The modulus |X[k]| of its DFT can be seen in
Fig. 7.43 (b). We note that the signal frequency falls in the middle between two samples on the
unit circle. Hence the peak of the spectrum |X[k]| which should equal N1 /2 = 32 falls between two
samples and cannot be seen. The zero-padded signal xz [n] is shown in Fig. 7.43 (c). The modulus
|Xz [k]| of the DFT of the zero padded signal can be seen in Fig. 7.43 (d).
x[n]
Xabs[k]
1
25
0.8
0.6
20
0.4
0.2
15
0
-0.2
10
-0.4
-0.6
5
-0.8
-1
0
0.5
1
1.5
2
(a)
2.5
x 10
0
0
0.5
1
1.5
2
2.5
(b)
-3
3
x 10
4
Xzabs[k]
Zero-padded vector xz[n]
35
1
0.8
30
0.6
25
0.4
0.2
20
0
15
-0.2
-0.4
10
-0.6
5
-0.8
-1
0
0.002
0.004
0.006
(c)
0.008
0.01
0
0
0.5
1
1.5
(d)
2
2.5
3
x 10
4
FIGURE 7.43
Zero-padding: (a) A sinusoidal sequence, (b) 64-point DFT, (c) zero padded sequence to
256 points, (d) 256-point DFT of padded sequence.
We note that interpolation has been effected, revealing the spectral peak of N1 /2 = 32, which
now falls on one of the N = 256 samples around the unit circle. By increasing the sequence length
60
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
through zero padding to N = 4N1 an interpolation of the DFT spectrum by a factor of 4 has been
achieved.
7.29
Discrete Z -Transform
A ’Discrete z Transform’ DZT may be defined as the result of sampling a circle in the z plane
centered about the origin. Note that the DFT is a special case of the DZT obtained if the radius
of the circle is unity. An approach to system identification pole-zero modeling employing DZT
evaluation and a weighting of z transform spectra has been proposed as an alternative to the well
know Prony’s Approach [5]. A system is given as a black box and the objective is to evaluate its
poles and zeros by applying a finite duration input sequence or an impulse and observing its finite
duration output. The approach is based on the fact that knowing only a finite duration of the
impulse response the evaluation of the DZT on a circle identifies fairly accurately the frequency of
the least damping poles. However, identification of the components’ damping coefficients, i.e. the
radius of the pole or pole-pair cannot be deduced through radial z transforms since spectra along
a radial contour passing through the pole-zero rises exponentially toword the origin of the z plane
due to a multiple pole at the origin of the transform of such a finite duration sequence.
The proposed weighting of spectra unmasks the poles identifying their location in the z plane
both in angle and radius as shown in Fig. 7.44 [?]. Once the pole locations and their residues are
found the zeros are deduced. The least damped poles are thus deleted ’deflating’ the system, i.e.
reducing its order. The process is repeated identifying the new least damped poles and so on until
all the poles and zeros have been identified. In [?] an example is given showing the identification
of a system of the 14th order.
Example 7.28 Given the sequence
x [n] = an {u [n] − u [n − N ]}
with a = 0.7 and N = 16.
a) Evaluate the z-transform X (z) of x [n], stating its ROC.
b) Evaluate and sketch the poles and zeros of X (z) in the z plane.
c) Evaluate the z-transform on a circle of radius a in the z plane.
d) Evaluate Xa [k], the ’Discrete z Transform’ DZT along the circle of radius a, by sampling the
z-transform along the circle at frequencies Ω = 0, 2π/N , 3π/N , . . ., (N − 1) π/N , similarly to the
sampling the DFT effects along the unit circle.
We have
x [n] = an RN [n]
a) X (z) =
N−1
X
an z −n =
n=0
N
=
b) Zeros
z
z N−1
1 − aN z −N
, z 6= 0
1 − az −1
− aN
.
(z − a)
aN z −N = 1 = e−j2πk
z N = aN ej2πk
z = aej2πk/N = 0.7ej2πk/16
implying a coincidence pole-zero at z = a, pole of order N − 1 at z = 0. See Fig. 7.45.
sin (N Ω/2)
1 − e−jΩN
= e−jΩ(N−1)/2
c) X aejΩ =
1 − e−jΩ
sin (Ω/2)
= e−jΩ(N−1)/2 SdN (Ω/2) .
Discrete-Time Fourier Transform
61
FIGURE 7.44
3D plot of weighted z spectrum unmasking a pole pair.
d) Xa [k] =
1 − e−j2πk
=
1 − e−j2πk/N
N, k = 0
0, k = 1, 2, . . . , N − 1.
Example 7.29 Evaluate the Fourier transform of the sequence
(
|n|
x[n] = 1 − N , −N ≤ n ≤ N
0,
otherwise.
where N is odd. Using duality deduce the corresponding Fourier series expansion and Fourier
transform. Evaluate the Fourier transform of the sequence x1 [n] = x[n − N . We may write
x[n] = v[n] ∗ v[n]
where
h
X ejΩ = V
v[n] = Π(N−1)/2 [n]
2
i2
sin (N Ω/2)
ejΩ
= Sd2N (Ω/2) =
.
sin (Ω/2)
62
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
FIGURE 7.45
Sampling a circle of general radius.
Using duality we have
Sd2N
F SC
(t/2) ←→ Vn =
(
and
F
Sd2N (t/2) ←→ V (jω) = 2π
1−
0,
|n|
, −N ≤ n ≤ N
N
otherwise
N
X
n=−N
(1 − |n| /N ) δ (ω − n) .
X1 ejΩ = e−jΩN Sd2N (Ω/2) .
7.30
Fast Fourier Transform
The Fast Fourier Transform FFT is an efficient algorithm that reduces the computations required
for the evaluation of the DFT. In what follows the derivation of the FFT is developed starting with
a simple example of the DFT of N = 8 points. The DFT can be written in matrix form. This
form is chosen since it makes it easy to visualize the operations in the DFT and its conversion to
the FFT.
To express the DFT in matrix form we define an input data vector x of dimension N the elements
of which are the successive elements of the input sequence x[n]. Similarly we define a vector X of
which the elements are the coefficients X[k] of the Discrete Fourier Transform.
The DFT
N−1
X
X [k] =
x [n]e−j2πnk/N
(7.177)
n=0
can thus be written in matrix form as
X = FN x
(7.178)
where FN is an N × N matrix of which the elements are given by
[FN ]rs = wrs
and
2π
w = e−j N .
The inverse relation is written
(7.179)
(7.180)
1 ∗
F X.
(7.181)
N N
Note that pre-multiplication of a square matrix A by a diagonal Matrix D producing the matrix
C = D A may be obtained by multiplying the successive elements of the diagonal matrix D by the
successive rows of A . Conversely, post-multiplication of a square matrix A by a diagonal Matrix
x=
Discrete-Time Fourier Transform
63
D producing the matrix C = A D may be obtained by multiplying the successive elements of the
diagonal matrix D by the successive columns of A. The following example shows the factorization
of the matrix FN , which leads to the Fast Fourier Transform.
Example 7.30
FIGURE 7.46
Unit circle divided into N = 8 points.
Let N = 8. The unit circle is divided as shown in Fig. 7.46. We have
w0
w0
0
w
0
w
X =
w0
0
w
0
w
w0
w0
w0
0
w
0
w
=
w0
0
w
0
w
w0
w0
w1
w2
w3
w4
w5
w6
w7
w0
w2
w4
w6
w0
w2
w4
w6
w0
w1
w2
w3
−w0
−w1
−w2
−w3
w0
w3
w6
w1
w4
w7
w2
w5
w0
w4
w0
w4
w0
w4
w0
w4
w0
w2
−w0
−w2
w0
w2
−w0
−w2
w0
w5
w2
w7
w4
w1
w6
w3
w0
w3
−w2
w1
−w0
−w3
w2
−w1
w0
w6
w4
w2
w0
w6
w4
w2
w0
x0
7
w x1
x2
w6
x3
w5
w4
x4
3
w x5
w 2 x6
x7
w1
w0
−w0
w0
−w0
w0
−w0
w0
−w0
w0
−w1
w2
−w3
−w0
w1
−w2
w3
w0
−w2
−w0
w2
w0
−w2
−w0
w2
w0
x0
3
−w x1
x2
−w2
−w1
x3
0
−w x4
x5
w3
w 2 x6
w1
x7
since w4 = −w0 , w5 = −w1 , w6 = −w2 , and w7 = −w3 . We may re-write this matrix relation
as the set of equations
X0
X1
X2
X3
X4
X5
X6
X7
= x0 + x1 + . . . x7
= (x0 − x4 ) w0 + (x1 − x5 ) w1 + (x2 − x6 ) w2 + (x3 − x7 ) w3
= (x0 + x4 ) w0 + (x1 + x5 ) w2 − (x2 + x6 ) w0 − (x3 + x7 ) w2
= (x0 − x4 ) w0 + (x1 − x5 ) w3 − (x2 − x6 ) w2 + (x3 − x7 ) w1
= (x0 + x4 ) w0 − (x1 + x5 ) w0 + (x2 + x6 ) w0 − (x3 + x7 ) w0
= (x0 − x4 ) w0 − (x1 − x5 ) w1 + (x2 − x6 ) w2 − (x3 − x7 ) w3
= (x0 + x4 ) w0 − (x1 + x5 ) w2 − (x2 + x6 ) w0 + (x3 + x7 ) w2
= (x0 − x4 ) w0 − (x1 − x5 ) w3 − (x2 − x6 ) w2 − (x3 − x7 ) w1 .
64
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
These operations can be expressed back in matrix form:
x0 + x4
w w
w
w
0 2
x1 + x5
0
2
w w
x2 + x6
−w
−w
w0 w3 −w2 w1
x3 + x7 .
X=
0
0
0
0
w −w w
x0 − x4
−w
x1 − x5
w0 −w1 w2 −w3
0
w −w2 −w0 w2
x2 − x6
x3 − x7
w0 −w3 −w2 −w1
{z
}
|
w0 w0
w0
w0
0
1
2
3
g
Calling the vector on the right g we can re-write this equation in the form:
w0
w0
w0
w0
w0 w0 w0 w0
0
2
0
2
w
w
−w
−w
0
2
0
2
w
w
−w
−w
X =
w0 −w0 w0 −w0
0
0
0
0
w −w
w −w
0
2
0
2
w −w −w
w
w0 −w2 −w0 w2
Let
× diag w0 , w0 , w0 , w0 , w0 , w1 , w2 , w3 g.
h = diag w0 , w0 , w0 , w0 , w0 , w1 , w2 , w3 g.
A graphical representation of this last equation is shown on the left side of Fig. 7.47. We can write
X0
X1
X2
X3
X4
X5
X6
X7
= (h0 + h2 ) w0 + (h1 + h3 ) w0
= (h4 + h6 ) w0 + (h5 + h7 ) w0
= (h0 − h2 ) w0 + (h1 − h3 ) w2
= (h4 − h6 ) w0 + (h5 − h7 ) w2
= (h0 + h2 ) w0 − (h1 + h3 ) w0
= (h4 + h6 ) w0 − (h5 + h7 ) w0
= (h0 − h2 ) w0 − (h1 − h3 ) w2
= (h4 − h6 ) w0 − (h5 − h7 ) w2
which can be re-written in the form
h0 + h2
h1 + h3
w0 w0
0
2
h0 − h2
w
w
0
2
h1 − h3
w
w
X= 0
0
h4 + h6 .
w −w
h5 + h7
w0 −w0
0
2
h4 − h6
w −w
h5 − h7
w0 −w2
{z
}
|
w0
w0
l
Denoting by l the vector on the right the relation between the vectors h and l can be represented
graphically as shown in the figure. We can write
Discrete-Time Fourier Transform
65
FIGURE 7.47
Steps in factorization of the DFT.
w0
w0
w0 w0
0
0
w
w
0
0
w
w
X =
w0 −w0
0
0
w
−w
0
0
w −w
w0 −w0
Let
We have
× diag w0 , w0 , w0 , w2 , w0 , w0 , w0 , w2 l.
v = diag w0 , w0 , w0 , w2 , w0 , w0 , w0 , w2 l.
X0
X1
X2
X3
X4
X5
X6
X7
= (v0 + v1 )
= (v4 + v5 )
= (v2 + v3 )
= (v6 + v7 )
= (v0 − v1 )
= (v4 − v5 )
= (v2 − v3 )
= (v6 − v7 ) .
These relations are represented graphically in the figure. The overall factorization diagram is shown
in Fig. 7.48. We note that the output of the diagram is not the vector X in normal order. The
output vector is in fact a vector X 0 which is the same as X but is in “reverse bit order”. As we
shall see shortly.
We now write this factorization more formally in order to obtain a factorization valid for an
input sequence of a general length of N elements. Let
T2 =
1 1
.
1 −1
(7.182)
66
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
FIGURE 7.48
An FFT factorization of the DFT.
The Kronecker product A × B of two matrices A and B result in a matrix having the elements bij
of B replaced by the product Abij . For example, let
a00 a01
(7.183)
A=
a10 a11
and
B=
The Kronecker product A × B is given by :
A×B =
Ab00 Ab01
Ab10 Ab11
so that we may write for example
Let
b00 b01
.
b10 b11
(7.184)
a00 b00 a01 b00 a00 b01 a01 b01
a10 b00 a11 b00 a10 b01 a11 b01
=
a00 b10 a01 b10 a00 b11 a01 b11
a10 b10 a11 b10 a10 b11 a11 b11
1
(7.186)
D2 = diag(w0 , w0 ) = diag(1, 1)
0
0
0
2
0
0
0
1
(7.187)
D4 = diag(w , w , w , w )
0
(7.185)
1
1
1
1
1
1
1
.
I 4 × T2 =
1
−1
1
−1
1
−1
1
−1
0
(7.188)
2
3
D8 = diag(w , w , w , w , w , w , w , w ).
(7.189)
Discrete-Time Fourier Transform
67
Using these definitions we can write the matrix relations using the Kronecker product. We have
g = (I4 × T2 )x
(7.190)
h = D8 g
(7.191)
l = (I2 × T2 × I2 )h
(7.192)
v = (D4 × I2 )l
(7.193)
X 0 = (T2 × I4 )v = col [X0 , , X4 , , X2 , , X6 , , X1 , , X5 , , X3 , , X7 ]
(7.194)
where ’col’ denotes a column vector. The global factorization which produces the vector X 0 is
written :
0
X 04
(7.195)
=F8 x = (T2 × I4 )(D4 × I2 )(I2 × T2 × I2 )D8 (I4 × T2 )x.
Represented graphically, this factorization produces identically the same diagram as the one shown
in Fig. 7.48. The factorization of the matrix F8 0 is given by
1
1 1
1 1
1
1 1
1 − 1
0
1 −1
w
1
1
2
1 −1
w
1
−
1
0
F8 =
1 1
1
1 1
1
1
1
1
−
1
1 −1
w0
1 1
1 −1
w2
1 −1
1
1
1
1
1
1
1
1
1
1
1
1
(7.196)
0
−1
w
1
1
1
−1
w
1
−1
w2
1
−1
w3
and may be written in the closed form
F80 =
3
Y
i=1
(D2i × I23−i ) (I2i−1 × T2 × I23−i ).
(7.197)
This form can be generalized. For N = 2n , writing [1]
i
i
i
K2i = diag(w0 , w2 , w2×2 , w3×2 , . . .)
(7.198)
D2n−i = Quasidiag(I2n−i−1 , K2i ).
(7.199)
X = Quasidiag(A, B, C, . . .)
(7.200)
and
A matrix
is one which has the matrices A, B, C, . . . along its diagonal and zero elements elsewhere. We
can write the factorization in the general form
FN0 =
n
Y
i=1
(D2i × I2n−i ) (I2i−1 × T2 × I2n−i ) .
(7.201)
As noted earlier from factorization diagram , Fig. 7.48, the coefficients Xi0 of the transform are in
reverse bit order. For N = 8, the normal order (0, 1, 2, 3, 4, 5, 6, 7) in 3-bit binary is written:
(000, 001, 010, 011, 100, 101, 110, 111) .
(7.202)
68
Signals, Systems, Transforms and Digital Signal Processing with MATLAB
The bit reverse order is written:
(000, 100, 010, 110, 001, 101, 011, 111)
(7.203)
which is in decimal: (0, 4, 2, 6, 1, 5, 3, 7). The DFT coefficients X[k] in the diagram, Fig. 7.48
can be seen to be in this reverse bit order.
We note that the DFT coefficients X[k] are evaluated in log 2 8 = 3 iterations, each iteration involving 4 operations (multiplications). For a general value N = 2n the FFT factorization includes
log2 N = n iterations, each containing N/2 operations for a total of (N/2) log2 N operations. This
factorization is a base-2 factorization applicable if N = 2n , as mentioned above. If the number
of points N of the finite duration input sequence satisfies that N = r n where r, called the radix
or base, is an integer, then the FFT reduces the number of complex multiplications needed to
evaluate the DFT from N 2 to (N/r) logr N . For N = 1024 and r = 2, the number of complex
multiplications is reduced from about 106 to about 500 × 10 = 5000. With r = 4 this is further
reduced to 256 × 5 = 1280.
7.31
An Algorithm for a Wired-in Radix-2 Processor
The following is a summary description of an algorithm and a wired-in processor for radix-2 FFT
implementation (see CORINTHIOS ’A Time Series Analyzer’)
The DFT F [k] of an N -point sequence f [k], namely,
F [k] =
N−1
X
f [n] e−j2πnk/N .
(7.204)
n=0
Writing fn ≡ f [n], Fk ≡ F [k] and constructing the vectors
f = col (f0 , f1 , . . . , fN−1 )
(7.205)
F = col (F0 , F1 , . . . , FN−1 ) .
(7.206)
The TDF may be written in the matrix form
F = TN f.
(7.207)
where the elements of the matrix TN are given by
(TN )nk = exp (−2πjnk/N ) .
(7.208)
w = e−j2π/N = cos (2π/N ) − j sin (2π/N )
(7.209)
Letting
(TN )nk = w
TN
=
w0
w0
w0
..
.
w0
w0
w1
w2
..
.
N−1
w
w0
w2
w4
..
.
nk
w0
w3
w6
..
.
w2(N−1) w3(N−1)
(7.210)
...
...
...
..
.
...
w0
wN−1
w2(N−1)
.
..
.
2
(N−1)
w
(7.211)
To reveal the symmetry in the matrix TN we re-arrange its rows by writing
TN = PN PN−1 TN = PN TN0
(7.212)
© Copyright 2026 Paperzz