Chapter 2: Problem Solutions: Discrete Time Processing of Continuous Time Signals
Chapter 2: Problem Solutions: Discrete Time Processing of Continuous Time Signals
Sampling
à Problem 2.1.
Problem:
Solution:
2 3e 2
j0.1
X DTFTxn 3ej0.1
with
b) Since FTej2F0 t F F0 then
2 Solutions_Chapter2[1].nb
Now recall the property of the "delta" function: for any constant a 0,
a
a
at
1 t
same as in b).
à Problem 2.2.
Problem
Solution
Fs F0 2000 1500Hz 500Hz. Therefore after sampling we have the same signal as in
Problem 1.1, and everything follows.
Solutions_Chapter2[1].nb 3
X (F )
1 .5 1.5 F (kHz )
Fs X ( F kFs )
k
à Problem 2.3.
Problem
xn xnTs is the sampled sequence. The Sampling frequency Fs is given for each case.
For each XF FTxt shown, determine X DTFTxn, where
1000 , Fs 2000Hz;
c) XF 3rect
F
1000 , Fs 1000Hz;
d) XF 3rect
F
F3000
1000 rect
e) XF rect F3000
1000 , Fs 3000Hz;
Solution
k
a) X 3000
2 1000 k3000 2
3000
3 k2;
2
k k
4 Solutions_Chapter2[1].nb
b) X 1200
2 500 k1200
1200
2 500 k1200
1200
k
2 0 k2 0 k2
2
2
2
2
X ( )
2 2
1000 rect 1000
300023000 300023000
e) X 3000 rect
1000 k
3000
1000 k
3000
k
k2
6000 rect
23
k
shown below.
X ( )
6000
2 26 2
6
2
Solutions_Chapter2[1].nb 5
à Problem 2.4.
Problem
Fs 2.
and the sampling frequency be Fs 4kHz. Also let the low pass filter be ideal, with bandwidth
s (t )
y[n] ZOH LPF y (t )
Fs
a) Determine an expression for SF FTst. Also sketch the frequency spectrum
(magnitude only) within the frequency range Fs F Fs ;
b) Determine the output signal yt.
Solution.
From Y 2 ej4 0.3 k2 ej4 0.3 k2 we obtain
Y 2FFs
k
2 ej4 2 j4 2
Fs 0.3 k2 e Fs 0.3 k2
F F
k
2
2 e
Fs j4 F 600 k4000
k
e j4 2
F
600 k4000
Fs
and then
where we used the fact that the ZOH has frequency response Ts ejFFs sincF Fs .
Fs
6 Solutions_Chapter2[1].nb
| S (F ) |
b) Since the Low Pass Filter stops all the frequencies above Fs 2 the output signal yt has only
the frequencies at F 600Hz, and therefore
yt IFT0.9634ej0.1 F 600 0.9634ej0.1 F 600
2 0.9634 cos1200t 0.1
à Problem 2.5.
Problem
We want to digitize and store a signal on a CD, and then reconstruct it at a later time. Let the signal
xtbe
xt 2cos500t 3sin1000t cos1500t
Solutions_Chapter2[1].nb 7
Fs Fs
and let the sampling frequency be Fs 2000Hz.
a) Determine the continuous time signal yt after the reconstruction.
b) Notice that yt is not exactly equal xt. How could we reconstruct the signal xt exactly
from its samples xn?
Solution
Fs XF
YF ejFFs sinc
F
mum frequency is 750Hz smaller than Fs 2 1000Hz. Therefore, each sinusoid at frequency F
with Fs 2000Hz being the sampling frequency. In this case there is no aliasing, since the maxi-
which yields
à Problem 2.6.
Problem
In the system shown below, determine the output signal yt for each of the following input signals
bandwidth Fs 2:
xt. Assume the sampling frequency Fs 5kHz and the Low Pass Filter (LPF) to be ideal with
x(t ) x[n]
ZOH LPF y (t )
Fs Fs
a) xt ej2000t ;
b) xt cos2000t 0.15;
c) xt 2cos5000t;
d) xt 2sin5000t;
e) xt cos2000t 0.1 cos5500t.
Solution
ÅÅ Å
jpF pF
‰- ÅÅÅÅÅÅÅÅ
ÅÅÅÅ Sin ÅÅÅÅÅÅÅÅ
GF = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
pÅÅÅÅÅÅÅÅ
F ÅÅÅÅÅÅÅÅÅÅ
5000
5000
ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ
5000
e) the term cos2 2750 t has aliasing, since it has a frequency above 2500Hz. From the
figure, the aliased frequency is
X (F )
X ( F Fs ) 2.75 F (kHz )
X ( F Fs )
2.75
2.75 5 2.25
Faliased 5.00 2.75 2.25kHz. Therefore it is as if the input signal were
xt cos2000t 0.1 cos4500t. This yields G1000 0.935ej0.628
and G2250 0.699ej0.393 , and finally
yt 0.935cos2000t 0.1 0.628 0.699cos4500t 1.41372
à Problem 2.7.
Problem
Suppose in the DAC we want to use a linear interpolation between samples, as shown in the figure
below. We can call this reconstructor a First Order Hold, since the equation of a line is a polynomial
of degree one.
y[n] y (t ) y (t )
y[n] FOH
Fs
Ts
n
a) Show that yt xngt nTs , with gt a triangular pulse as shown below;
n
10 Solutions_Chapter2[1].nb
g (t )
1
Ts Ts t
b) Determine an expression for YF FTyt in terms of Y DTFTyn and
GF FTgt;
y[n]
FOH LPF y (t )
Fs
Solution
a) From the interpolation yt xngt nTs and the definition of the interpolating
n
interval nTs t n 1Ts it is easy to see that only two terms in the summation are nonzero, as
function gt we can see that yt is a sequence of straight lines. In particular if we look at any
y (t )
x[n]g (t nTs )
x[ n 1]g (t ( n 1)Ts )
nTs (n 1)Ts t
Interpolation by First Order Hold (FOH)
where GF FTgt. Using the Fourier Transform tables, or the fact that (easy to verify)
gt Ts rect
Ts rect Ts
1 t t
à Problem 2.8.
Problem
In the system below, let the sampling frequency be Fs 10kHz and the digital filter have difference
equation
yn 0.25xn xn 1 xn 2 xn 3
Fs 2.
Both analog filters (Antialiasing and Reconstruction) are ideal Low Pass Filters (LPF) with bandwidth
x (t ) ADC DAC y(
x[ n] y[ n ]
LPF H ( z) ZOH LPF
anti-aliasing Ts Ts Ts reconstruction
filter filter
clock
12 Solutions_Chapter2[1].nb
a) Sketch the frequency response H of the digital filter (magnitude only);
b) Sketch the overall frequency response YF XF of the filter, in the analog domain (again
magnitude only);
c) Let the input signal be
xt 3cos6000t 0.1 2cos12000t
Determine the output signal yt.
Solution.
a) The transfer function of the filter is Hz 0.251 z1 z2 z3 0.25
4
1z , where
1z1
we applied the geometric sum. Therefore the frequency response is
H Hz zej 0.25
j4
1e
1ej 0.25 ej1.5
sin
sin2
2
YF
XF
1.4
1.2
1
0.8
0.6
0.4
0.2
F
4000 2000 2000 4000
Solutions_Chapter2[1].nb 13
c) The input signal has two frequencies: F1 3kHz Fs 2, and F2 6kHz Fs 2, with
Fs 10kHz the sampling frequency. Therefore the antialising filter is going to stop the second
frequency, and the overall output is going to be
yt 3 0.156 cos6000 t 0.1 0.1
0.467745 cos6000 t 0.62832
since, at F 3kHz, YF XF 0.156ej0.1 .
Quantization Errors
à Problem 2.9
Problem
In the system below, let the signal xn be affected by some random error en as shown. The
error is white, zero mean, with variance e2 1.0. Determine the variance of the error n after the
filter for each of the following filters Hz:
e[n]
x[n] y[n]
H (z )
e[n] [n]
H (z )
y[n]
x[n] H (z )
14 Solutions_Chapter2[1].nb
Solution.
1
2 d
Recall the two relationships in the frequency and time domain:
2
2
e
H 2
hn 2 e2
1
1 4
2 d
a) 2 2
2
e
2
2 d e
H 4 e ;
1 2
4
response is
hn
4 n n 1 n 2 n 3
1
and therefore
2
42 e 4
3
16 e
4 e
1 2 1 2 1 2
1 w
d) 2 d
n0
2 e
e 0.3045 e
2 2
à Problem 2.10.
Problem
using 8bits/sample. The signal is properly scaled so that xn 128 for all n.
A continuous time signal xt has a bandwidth FB 10kHz and it is sampled at Fs 22kHz,
a) Determine your best estimate of the variance of the quantization error e2 ;
b) We want to increase the sampling rate by 16 times. How many bits per samples you would use in
order to maintain the same level of quantization error?
Solutions_Chapter2[1].nb 15
Solution
a) Since the signal is such that 128 xn 128 it has a range VMAX 256. If we digitize it with
VMAX 2Q1 256 256 1. Therefore the variance of the noise is e2 1 12 if we assume
Q1 8 bits. we have 28 256 levels of quantization. Therefore each level has a range
uniform distribution.
b) If we increase the sampling rate as Fs2 16 Fs1 , the number of bits required for the same
quantization error becomes
Q2 Q1
1 log 1 4 6 bits sample
2 Fs2 8
Fs1
2 2