VHDL Lab
VHDL Lab
Al-Husari
iii
iv CONTENTS
Chapter 7
Discrete Time Signals and
Systems
where, in general, C and α are complex numbers. The exponential term αn can
also be expressed as
αn = eβn (α = eβ or β = ln α) (7.2)
1
2 CHAPTER 7. DISCRETE TIME SIGNALS AND SYSTEMS
Locus of ejΩn
n=3
n=2
n=1
n=0
This fact shows that the magnitude and angle of ejΩn are 1 and nΩ, respectively.
Therefore, the points ej0 , ejΩ , ej2Ω , ej3Ω , · · · , ejΩn , · · · lie on a circle of unit
radius at angles 0, Ω, 2Ω, 3Ω, · · · , nΩ, · · · respectively. For each unit increase
in n, the function x[n] = ejΩn moves along the unit circle counterclockwise by
an angle Ω. Therefore, the locus of ejΩn may be viewed as a phasor rotating
counterclockwise at a uniform speed of Ω radians per unit sample interval.
This signal is closely related to the discrete time sinusoids using Euler’s formula,
ejΩn = cos Ωn + j sin Ωn
If we assume n is dimensionless, then the frequency of ejΩn is Ω and has the
units of radians. We recall that the continuous time signal x(t) = ejωt is periodic
with period T = 2π/ω for any ω. The interseting question here: is a discrete
time exponential, ejΩn , always periodic for any Ω. A discrete time signal x[n]
is said to be periodic if
x[n] = x[n + N ]
Therefore, for the case x[n] = ejΩn we must have
ejΩn = ejΩ(n+N ) = ejΩn ejΩN
This result is possible only if
ejΩN = 1
For this to hold, ΩN must be an integer multiple of 2π, so that
ΩN = 2πm m = 0, ±1, ±2, · · ·
or
Ω m
=
2π N
Because both m and N are integers, thus, x[n] is periodic only if Ω/2π is a
rational number. To compute the fundamental period N0 , we must choose
the smallest value of m that will make m(2π/Ω) an integer. For example, if
Ω = 4π/17, then the smallest value of m that will make
2π 17
m =m
Ω 2
7.2. DISCRETE-TIME SINUSOIDS 3
an integer is 2. Therefore
2π 17
N0 = m =2 = 17
Ω 2
Let Example 7.1
x[n] = ej ( )n
7π
9
We have
Ω 7
=
2π 18π
which is not rational. Thus the sequence is not periodic.
TO BE CONTINUED
where k =< N > indicates the range of summation of any N succesive integers.
The coefficients ak in the Fourier series (7.4) can be computed using (given here
without proof)
1 X
ak = x[n]e−jkΩ0 n (7.5)
N
n=<N >
7.3. FOURIER ANALYSIS OF DISCRETE TIME SYSTEMS 5
As a consequence, we have to consider values of Ω only over the range [0, 2π].
Furthermore, Ω is continuous, this fact makes the spectrum of X(Ω) continuous
and periodic function of Ω with period 2π.
To find the inverse relation between X(Ω) and x[n], we replace the variable n
in (7.6) by m to get
X∞
X(Ω) = x[m]e−jΩm
m=−∞
jΩn
Now multiply both sides by e and integrate over the range [0, 2π] to get
Z Z X∞
X(Ω)ejΩn dΩ = x[m]ejΩ(n−m) dΩ
2π 2π m=−∞
Figure 7.3 shows x[n] = αn u[n] and its spectra for α = 0.8. Observe that the
x[n]
|X(Ω)|
∠X(Ω)
frequency spectra are continuous and periodic functions of Ω with the period
2π. The magnitude spectrum is an even function and the phase specturm is an
odd function of Ω.
∞
X
X(Ω) = α|n| e−jΩn
n=−∞
−1
X ∞
X
= α−n e−jΩn + αn e−jΩn
n=−∞ n=0
∞ ∞
X n X n
= −1 + αejΩ + αe−jΩ
n=0 n=0
1 − α2
=
1 − 2α cos Ω + α2
Example 7.7 Find the inverse Fourier transform of the rectangular pulse spectrum shown in
Figure 7.4.
|X(Ω)|
x[n]
Solution Using
Z
1
x[n] = X(Ω)ejΩn dΩ
2π 2π
Z π/4
1
= ejΩn dΩ
2π −π/4
π/4
1 jΩn
= e
j2πn −π/4
sin π4 n
1 n
= = sinc
πn 4 4
7.3. FOURIER ANALYSIS OF DISCRETE TIME SYSTEMS 9
Find the discrete-time Fourier transform for the periodic signal Example 7.8
3π π π
x[n] = 2 cos n+ + 4 sin n
8 3 2
Solution First we need to determine the DTFS. The fundamental frequency
is Ω0 = π/8. Therefore, only the third and fourth harmonics exist in the DTFS
spectrum. Using Euler identities we deduce
−2/j, k = −4
−jπ/3
e , k = −3
ak = e jπ/3
, k=3
2/j,
k =4
0, otherwise for −7 ≤ k ≤ 8
Hence the DTFT over one period is
4π π −jπ/3 3π jπ/3 3π 4π π
X(Ω) = − δ Ω + +2πe δ Ω+ +2πe δ Ω− + δ Ω−
j 2 8 8 j 2
for π < Ω ≤ π.
Periodicity
We saw that the discrete-time Fourier transform is periodic in Ω with period
2π, so that
X(Ω + 2π) = X(Ω)
Linearity
Let x1 [n] and x2 [n] be two sequences with Fourier transforms X1 (Ω) and X2 (Ω),
respectively. Then
F[α1 x1 [n] + α2 x2 [n]] = α1 X1 (Ω) + α2 X2 (Ω)
10 CHAPTER 7. DISCRETE TIME SIGNALS AND SYSTEMS
then
F
x[n − n0 ] ←→ e−jΩn0 X(Ω)
and
F
ejΩ0 n x[n] ←→ X(Ω − Ω0 )
Differentiation in Frequency
dX(Ω)
F
nx[n] ←→ j
dΩ
Example 7.9 Find the discrete-time Fourier transform for the signal x[n] = nαn u[n], with
|α| < 1.
d d 1
X(Ω) = j F [αn u[n]] = j
dΩ dΩ 1 − αe−jΩ
αe−jΩ
= 2
(1 − αe−jΩ )
Convolution
F
x[n] ∗ h[n] ←→ X(Ω)H(Ω)
Multiplication
F 1
x[n].h[n] ←→ X(Ω) ∗ H(Ω)
2π
Parseval’s Theorem
∞ Z
X
21
[x[n]] = |X(Ω)|2 dΩ
n=−∞
2π 2π
Figure 7.5: (a) Signal x(t) (solid line) and modulated impulse train xs (t), and (b)
sequence of samples x[n] = x(nT ).
∞
1 X
Xs (ω) = X(ω − nωs ) (7.7)
T n=−∞
Using the shifting property the Fourier transform of the signal xs (t) is
∞ ∞
F
X X
xs (t) = x(nT )δ(t − nT ) ←→ Xs (ω) = x(nT )e−jωnT
n=−∞ n=−∞
∞ ∞
X 1 X
x[n]e−jωnT = X(ω − nωs )
n=−∞
T n=−∞
Using the definition of the DTFT in (7.6), we can state the following fundamen-
tal relation between the DTFT of a sequence of samples x[n] = x(nT ) and the
continuous-time Fourier transform of x(t) in sampling:
X(Ω) = Xs (ω)
Ω
ω= T
Thus, X(Ω) can be obtained from Xs (ω) by replacing ω with Ω/T . Therefore,
X(Ω) is identical to Xs (ω) frequency scaled by a factor T , as shown in Figure
7.6.
x(t) X(ω)
xs (t) Xs (ω)
x[n] X(Ω)
Since we now have a discrete sequence, we can take the discrete-time Fourier
transform of the sequence as
N
X −1
X(Ω) = x[n]e−jΩn
n=0
This in still not in a form suitable for digital computation, sinc Ω is a continuous
variable taking values in the range [0, 2π]. Therefore, we need to evaluate X(Ω)
at only a finite number of values, Ωk , by a process of sampling uniformly in the
range [0, 2π] as
N
X −1
X(Ωk ) = x[n]e−jΩk n , k = 0, 1, . . . , M − 1 (7.9)
n=0
where
2π
Ωk =k
M
The number of frequency samples, M , can be of any value. However, we choose
it to be the same as the number of time samples, N . With this modification,
and writing X(Ωk ) as X[k], we finally have
N −1
X 2π
X[k] = x[n]e−j N nk (7.10)
n=0
That is, X[k] is periodic with period N . Often, the length-N DFT sequence is
referred to as the N -point DFT.
It can be shown that x[n] as determined from this equation is also periodic with
period N ,
N −1
1 X 2π
x[n + N ] = X[k]ej N (n+N )k
N n=0
N −1
1 X 2π
= X[k]ej N nk
N n=0
= x[n]
That is, the IDFT operation yields a periodic sequence, of which only the first
N values, corresponding to one period, are evaluated. Thus, in all operations
involving DFT and the IDFT, we are effectively replacing finite sequence x[n]
by its periodic extension, xp [n], as shown in Figure 7.7. One would expect there
is a connection between the Fourier series expansion of periodic discrete-time
sequences discussed earlier and the DFT. A connection explored next.
Example 7.10 Suppose that x[n] = 1, 2, 2, 1, and x[n] = 0 for all other n. Compute the DFT
of x[n].
X(Ω)
x[n]
n Ω
X(Ω)
xp [n] Ωk
N n Ω
N
Figure 7.7: Periodic repetition of a signal results in sampling and periodic repetiton
of its spectrum.
7.5. THE DISCRETE FOURIER TRANSFORM 15
3
X π
X[k] = = x[n]e−j 2 nk , k = 0, 1, 2, 3
n=0
Hence,
X[0] = 1 + 2 + 2 + 1 = 6
Again consider the signal in Example 7.10 with the 4-point DFT given by Example 7.11
6, k=0
−1 − j, k = 1
X[k] =
0, k=2
−1 + j, k = 3
3
1X π
x[n] = X[k]ej 2 nk
4 n=0
1h i
= X[0] + X[1]ejπn/2 + X[2]ejπn + X[3]ejπ3n/2
4
Thus,
1
x[0] = [X[0] + X[1] + X[2] + X[3]] = 1
4
1 1
x[1] = [X[0] + jX[1] − X[2] − jX[3]] = [8] = 2
4 4
1
x[2] = [X[0] − X[1] + X[2] − X[3]] = 2
4
1 1
x[3] = [X[0] − jX[1] − X[2] + jX[3]] = [4] = 1
4 4
16 CHAPTER 7. DISCRETE TIME SIGNALS AND SYSTEMS
x[n]
X[k]
[1] Roberts, M. J., Signals and Systems: Analysis using Transform Meth-
ods and MATLAB
R
. International edition, McGraw-Hill 2003.
[2] Haykin, S., and Van Veen, B., Signals and Systems, New York, John
Wiley & Sons, 1999.
[3] Philips, C., Parr, J., and Riskin, E., Signals, Systems, and Transforms,
Upper Saddle River, NJ, Prentice-Hall, 2008.
[4] Stremler, F., Introduction to Communication Systems, Reading, MA
Addison-Wesley 1990.
19