Title | Solutions Chapter 2 rvrvr |
---|---|
Course | 4dp assignment |
Institution | King Saud University |
Pages | 15 |
File Size | 412.4 KB |
File Type | |
Total Downloads | 59 |
Total Views | 145 |
Question CLO PLO Max Mark Earned Mark
Q1
Q2
Q3
Q4
Q1)
a) Consider the below integral, the value of I is
b) For a signal x(t) = u(t + 2) – 2u(t) + u(t – 2) sketch the signal x(t).
Q2)
Q3)
Plot the odd and even functions of 𝑥(𝑡) given by
Chapter 2: Problem Solutions Discrete Time Processing of Continuous Time Signals
Sampling à Problem 2.1. Problem:
Consider a sinusoidal signal xt 3cos 1000t 0.1 and let us sample it at a frequency Fs 2kHz. a) Determine and expression for the sampled sequence xn x nTs and determine its Discrete Time Fourier Transform X DTFTxn; b) Determine XF FTxt; c) Recompute X from the XF and verify that you obtain the same expression as in a). Solution:
a) xn xt tnTs 3 cos0.5n 0.1. Equivalently, using complex exponentials, xn 1.5ej0 .1 ej 0 .5 n 1.5 e j0. 1 ej0 .5n Therefore its DTFT becomes 3ej 0 .1 X DTFTxn 3e j0 .1 2 2
with b) Since FTej2F0 t F F0 then
2
Solutions_Chapter2[1].nb
X F 1.5ej0.1 F 500 1.5e j0 . 1F 500 for all F . c) Recall that X DTFTxn and XF FTx t are related as
X Fs XF kFs FFs 2 k
with Fs the sampling frequency. In this case there is no aliasing, since all frequencies are contained within Fs 2 1kHz. Therefore, in the interval we can write X F sXF F Fs2 with Fs 2000Hz . Substitute for X F from part b) to obtain 500 1.5ej0 .1 500 X 20001.5ej0.1 2000 2000 2 2
Now recall the property of the "delta" function: for any constant a 0 , 1 t at a a
Therefore we can write 3e j0 . 1 X 3ej0 .1 2 2
same as in b). à Problem 2.2. Problem
Repeat Problem 1 when the continuous time signal is xt 3cos 3000 t Solution
Following the same steps: a) xn 3cos1.5n. Notice that now we have aliasing, since Fs F0 1500Hz 2 1000 Hz. Therefore, as shown in the figure below, there is an aliasing at 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
1.5
Fs 2
0.5 0.5 Fs 2
1.0
1.5
F (kHz )
1.0
à Problem 2.3. Problem
For each XF FTxt shown, determine X DTFTxn, where xn xnTs is the sampled sequence. The Sampling frequency F s is given for each case. a) XF F 1000, Fs 3000 Hz; b) XF F 500 F 500, F s 1200 Hz F c) XF 3rect 1000 , Fs 2000H z; F , F 1000 H d) XF 3rect z; s 1000 F 3000 rect F 3000 , e) XF rect Fs 3000Hz; 1 000 1000
Solution
For all these problems use the relation
X Fs X Fs 2 kFs k
k
k
3000 1000 k3000 2 2 k2; a) X 3000 2 3
4
Solutions_Chapter2[1].nb
1200 500 k1200 1200 500 k1200 b) X 1200 2 2 k
2 0 k2 0 k2 k
0 2 500 1200 1.2;
k
k
2000 k2 20002 k c) X 2000 3 rect 1000 shown 1000 6000 rect
below.
X ( )
2
2
2
2
k
k
k2 10002 1000 k d) X 1000 3 rect 1000 1000 3000 rect 2 shown below
X ( )
2
2
300023000 30002 3000 3000 3000 k k e) X 3000 rect 1000 1000 rect 1000 1000 k
3 3 3000 rect 2 3 3k rect 2 3 3k k
k2 6000 rect 23 k
shown below.
X ( ) 6000
2
2 6
2 6
2
Solutions_Chapter2[1].nb
5
à Problem 2.4. Problem
In the system shown, let the sequence be yn 2 cos0.3 n 4 and the sampling frequency be Fs 4kHz. Also let the low pass filter be ideal, with bandwidth Fs 2.
s(t ) y[n]
ZOH
LPF
y(t )
Fs a) Determine an expression for SF FT st. Also sketch the frequency spectrum (magnitude only) within the frequency range Fs F Fs ; b) Determine the output signal yt. Solution.
From what we have seen, recall that 1 F SF ejFFs F s sinc Fs Y 2FFs
From Y 2
2
ej4 0.3 k2 ej4 0.3 k2 we obtain
k
Y 2FFs
F F j4 2 ej42 Fs 0.3 k2 Fs 0.3 k2 e
k
j4 F 600 k4000 Fs 2 2 e
k F j 4 e 2 Fs
600 k4000
and then
ej4F 600 k4000 SF Fs Tsej600k40004000sinc 600k4000 4000 k
F j4 2 600k4000 Tsej600k40004000sinc 4000 e Fs 600 k4000
where we used the fact that the ZOH has frequency response T sej FFs sinc F Fs.
6
Solutions_Chapter2[1].nb
This can be simplified to
3 j4 F 600 k4000 20 sinc SF 1kej 20 ke k k
3
3 kej4 F 600 k4000 20 sinc 1 ej 20 3
In the interval Fs 4000 F Fs 4000 we have only terms corresponding to k 1, 0, 1. The reader can verify that all other frequencies are outside this interval. Therefore, for 4000 F 4000 we have SF 0.17ej2.827 F 3400 0.9634ej0 .1 F 600 0.9634ej0.1 F 600 0.17e j2.827F 3400 shown below.
| S (F ) |
5.6 3.4
0.6
3.4
5.6 F (kHz )
b) Since the Low Pass Filter stops all the frequencies above Fs 2 the output signal y t has only the frequencies at F 600Hz, and therefore yt IFT0.9634ej0.1 F 600 0.9634ej 0 .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 3 sin1000 t cos 1500t
Solutions_Chapter2[1].nb
7
x[n]
x[n]
x(t )
ZOH
Fs
LPF
Fs
and let the sampling frequency be Fs 2000H z. a) Determine the continuous time signal yt after the reconstruction. b) Notice that y t is not exactly equal xt. How could we reconstruct the signal x t exactly from its samples xn? Solution
a) Recall the formula, in absence of aliasing, F XF YF ej FF s sinc Fs
with Fs 2000Hz being the sampling frequency. In this case there is no aliasing, since the maximum frequency is 750 Hz smaller than F s 2 1000 Hz. Therefore, each sinusoid at frequency F has magnitude and phase scaled by the above expression. Define F 2000 e sin 2000 GF F 2000 jF
which yields G250 0.9745 ej0.392,
G 500 0.9003e j0. 785, G750 0.784e j1.178
Finally, apply to each sinusoid to obtain. yt 2 0.9745 cos500t 0.392 3 0.9003 sin1000t 0.785 0.784cos1500t 1.178 b) In order to compensate for the distortion we can design a filter with frequency response 1 GF, Fs Fs when 2 F 2 .The magnitude would be as follows
8
Solutions_Chapter2[1].nb
à Problem 2.6. Problem
In the system shown below, determine the output signal yt for each of the following input signals xt. Assume the sampling frequency F s 5k Hz and the Low Pass Filter (LPF) to be ideal with bandwidth Fs 2:
x[n]
x(t )
ZOH
Fs
LPF
y(t )
Fs
a) xt ej2000t ; b) x t cos2000t 0.15 ; c) xt 2cos5000t; d) x t 2sin5000t; e) xt cos2000t 0.1 cos5 500t. Solution
Recall the frequency response, in case of no aliasing, is jpF
pF ÅÅÅÅÅÅÅÅÅÅÅÅÅ Sin ÅÅÅÅÅÅÅÅ ‰- 5000 ÅÅ Å
5000 GF = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ p ÅÅÅÅÅÅÅÅ F ÅÅÅÅÅÅÅÅ ÅÅ Å 5000
with 2500 F 2500. Then: a) G1000 0.935ej0 .628 and then yt 0.935ej 2000 t0 .628 b) Using the same number for 1000Hz we obtain yt 0.935 cos2000 t 0.15 0.628 c) G 2500 0.637ej1 .5708 , therefore y t 2 0.637cos5000t 1.5708 d) same: yt 2 0.637 sin5000 t 1.5708
Solutions_Chapter2[1].nb
9
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 F s ) 2.75
2.75
X ( F Fs )
F (kHz )
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.935 ej0.628 and G 2250 0.699ej0.393 , and finally yt 0.935 cos2000t 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[n]
y (t )
y (t ) FOH
Fs
n
Ts
a) Show that yt xngt nTs, with gt a triangular pulse as shown below; n
10
Solutions_Chapter2[1].nb
g (t )
Ts
1
Ts
t
b) Determine an expression for YF FTyt in terms of Y DTFTyn and GF FTg t; c) In the figure below, let yn 2cos0.8n , the sampling frequency Fs 10 kHz and the filter be ideal with bandwidth Fs 2. Determine the output signal yt.
y[n] FOH
LPF
y (t )
Fs Solution
a) From the interpolation yt xngt nTs and the definition of the interpolating n
function gt we can see that yt is a sequence of straight lines. In particular if we look at any interval nTs t n 1Ts it is easy to see that only two terms in the summation are nonzero, as yt xngt nTs xn 1gt n 1 Ts , for nTs t n 1 T s This is shown in the figure below. Since gTs 0 we can see that the line has to go through the two points xn and xn 1, and it yields the desired linear interpolation.
Solutions_Chapter2[1].nb
11
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)
b) Taking the Fourier Transform we obtain
YF FTyt xnGFej2FnTs n
GFX 2 F Fs where GF FTgt. Using the Fourier Transform tables, or the fact that (easy to verify) 1 rect t t rect gt Ts Ts Ts 2 t F F we determine GF Tssinc T s Ts sinc Fs . Fs , since FT rect
à Problem 2.8. Problem
In the system below, let the sampling frequency be F s 10k Hz and the digital filter have difference equation yn 0.25xn xn 1 xn 2 x n 3 Both analog filters (Antialiasing and Reconstruction) are ideal Low Pass Filters (LPF) with bandwidth Fs 2. ADC
x (t )
y[ n ] H (z)
LPF anti-aliasing filter
x[ n]
Ts
Ts clock
y(
DAC
ZOH
Ts
LPF reconstruction filter
12
Solutions_Chapter2[1].nb
a) Sketch the frequency response H of the digital filter (magnitude only); b) Sketch the overall frequency response Y F X F 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. 1 z a) The transfer function of the filter is Hz 0.251 z1 z2 z3 0.25 1 z1 , where we applied the geometric sum. Therefore the frequency response is 4
2 1e 0.25 ej1 .5 sin H Hz zej 0.25 1ej sin j4
2
whose magnitude is shown below. b) Recall that the overall frequency response is given by j F Fs YF H F sinc 2FFs e XF Fs
In our case Fs 10 kHz, and therefore we obtain
Y F 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 c os6000 t 0.62832 since, at F 3kHz , YF XF 0.156ej 0.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 2e 1.0. Determine the variance of the error n after the filter for each of the following filters H z:
e[n]
y[n]
x[n ]
H (z )
[n]
e[n] H (z ) x[n ]
H (z )
y[n]
14
Solutions_Chapter2[1].nb
a) Hz an ideal Low Pass Filter with bandwidth 4; z b) Hz ; z 0.5
c) yn 41 sn sn 1 sn 2 sn 3, with sn xn en; d) H e , for . Solution.
Recall the two relationships in the frequency and time domain: 1 2 d 2 H e2 2
hn 2 2e
4 2 1 2 1 1 2 2 2 d d H a) e e 2 4 e; 2 4 b) the impulse response in this case is hn 0.5 n un therefore
0
1 2 4 2 2 hn 2 e2 0.52n 2e 10.25 e 3 e
c) in this case n 14 en en 1 en 2 en 3 . Therefore the impulse response is hn 14 n n 1 n 2 n 3 and therefore 3
1 1 1 2 2 2 2 42 e 4 16 e 4 e n0
1 2 2 w d d) 2 e 0.3045 e 2 e
à Problem 2.10. Problem
A continuous time signal xt has a bandwidth FB 10kHz and it is sampled at Fs 22kHz, using 8bits/sample. The signal is properly scaled so that xn 128 for all n. a) Determine your best estimate of the variance of the quantization error 2e ; 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
Solution
a) Since the signal is such that 128 xn 128 it has a range VM AX 2 56. If we digitize it with Q1 8 bits. we have 28 256 levels of quantization. Therefore each level has a range VMAX 2Q1 256 256 1. Therefore the variance of the noise is 2e 1 12 if we assume uniform distribution. b) If we increase the sampling rate as Fs2 16 Fs1 , the number of bits required for the same quantization error becomes F s1 1 1 log 6 bits sample Q2 Q1 2 2 F s2 8 2 4
15...