Solutions Chapter 2 rvrvr PDF

Title Solutions Chapter 2 rvrvr
Course 4dp assignment
Institution King Saud University
Pages 15
File Size 412.4 KB
File Type PDF
Total Downloads 59
Total Views 145

Summary

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


Description

Chapter 2: Problem Solutions Discrete Time Processing of Continuous Time Signals

Sampling à Problem 2.1. Problem:

Consider a sinusoidal signal xt  3cos 1000t  0.1  and let us sample it at a frequency Fs  2kHz. a) Determine and expression for the sampled sequence xn   x nTs  and determine its Discrete Time Fourier Transform X  DTFTxn; b) Determine XF  FTxt; c) Recompute X from the XF and verify that you obtain the same expression as in a). Solution:

a) xn  xt tnTs  3 cos0.5n  0.1. Equivalently, using complex exponentials, xn  1.5ej0 .1 ej 0 .5 n  1.5 e j0. 1 ej0 .5n Therefore its DTFT becomes    3ej 0 .1  X  DTFTxn  3e j0 .1         2  2

with      b) Since FTej2F0 t   F  F0 then

2

Solutions_Chapter2[1].nb

X F  1.5ej0.1 F  500  1.5e j0 . 1F  500 for all F . c) Recall that X   DTFTxn and XF  FTx t are related as 

X  Fs  XF  kFs FFs 2 k 

with Fs the sampling frequency. In this case there is no aliasing, since all frequencies are contained within Fs  2  1kHz. Therefore, in the interval      we can write X  F sXF F  Fs2 with Fs  2000Hz . Substitute for X F from part b) to obtain   500  1.5ej0  .1    500 X  20001.5ej0.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    3e j0 . 1   X  3ej0 .1       2 2

same as in b). à Problem 2.2. Problem

Repeat Problem 1 when the continuous time signal is xt  3cos 3000  t Solution

Following the same steps: a) xn  3cos1.5n. Notice that now we have aliasing, since Fs   F0  1500Hz   2  1000 Hz. Therefore, as shown in the figure below, there is an aliasing at Fs  F0  2000  1500Hz  500Hz. 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 XF  FTxt shown, determine X  DTFTxn, where xn  xnTs is the sampled sequence. The Sampling frequency F s is given for each case. a) XF  F  1000, Fs  3000 Hz; b) XF  F  500  F  500, F s  1200 Hz F c) XF  3rect  1000 , Fs  2000H z; F , F  1000 H d) XF  3rect   z; s 1000 F 3000   rect F 3000 , e) XF  rect     Fs  3000Hz; 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 20002   k  c) X  2000  3  rect  1000   shown 1000   6000  rect 

below.

X ( )

 2



 2





2



2





k

k

k2 10002 1000     k  d) X  1000  3  rect  1000 1000   3000  rect 2  shown below

X ( )

 2





2





300023000 30002 3000 3000 3000   k    k  e) X  3000  rect  1000 1000   rect 1000 1000 k 

3 3  3000  rect  2  3  3k   rect  2  3  3k k 

k2  6000  rect   23  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 yn  2 cos0.3 n    4 and the sampling frequency be Fs  4kHz. 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 SF  FT st. Also sketch the frequency spectrum (magnitude only) within the frequency range Fs  F  Fs ; b) Determine the output signal yt. Solution.

From what we have seen, recall that 1 F SF  ejFFs   F s sinc  Fs Y 2FFs

From Y  2 

2





 ej4  0.3  k2  ej4  0.3  k2 we obtain

k

Y 2FFs 

F F j4 2   ej42  Fs  0.3  k2 Fs  0.3  k2  e

k



j4 F  600  k4000  Fs  2   2   e

k F  j  4 e 2  Fs

 600  k4000

and then 

 ej4F  600  k4000  SF  Fs  Tsej600k40004000sinc 600k4000 4000 k

F j4 2  600k4000 Tsej600k40004000sinc  4000 e Fs  600  k4000

where we used the fact that the ZOH has frequency response T sej FFs sinc F  Fs.

6

Solutions_Chapter2[1].nb

This can be simplified to 

3 j4 F  600  k4000  20 sinc  SF   1kej  20  ke k k

3

3  kej4 F  600  k4000 20  sinc  1 ej  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 SF  0.17ej2.827 F  3400  0.9634ej0 .1  F  600   0.9634ej0.1 F  600  0.17e j2.827F  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   600Hz, and therefore yt  IFT0.9634ej0.1  F  600  0.9634ej 0 .1 F  600   2  0.9634 cos1200t  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 xtbe xt  2cos500t  3 sin1000 t  cos 1500t

Solutions_Chapter2[1].nb

7

x[n]

x[n]

x(t )

ZOH

Fs

LPF

Fs

and let the sampling frequency be Fs  2000H z. a) Determine the continuous time signal yt after the reconstruction. b) Notice that y t is not exactly equal xt. How could we reconstruct the signal x t exactly from its samples xn? Solution

a) Recall the formula, in absence of aliasing, F XF YF  ej FF s sinc  Fs

with Fs  2000Hz 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  GF    F  2000 jF

which yields G250  0.9745 ej0.392,

G 500  0.9003e j0. 785, G750  0.784e j1.178

Finally, apply to each sinusoid to obtain. yt  2  0.9745  cos500t  0.392  3  0.9003 sin1000t  0.785  0.784cos1500t  1.178 b) In order to compensate for the distortion we can design a filter with frequency response 1  GF, 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 yt for each of the following input signals xt. Assume the sampling frequency F s  5k 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) xt  ej2000t ; b) x t  cos2000t  0.15 ; c) xt  2cos5000t; d) x t  2sin5000t; e) xt  cos2000t  0.1  cos5 500t. Solution

Recall the frequency response, in case of no aliasing, is jpF

pF ÅÅÅÅÅÅÅÅÅÅÅÅÅ Sin ÅÅÅÅÅÅÅÅ ‰- 5000 ÅÅ Å 

5000 GF = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ p ÅÅÅÅÅÅÅÅ F ÅÅÅÅÅÅÅÅ ÅÅ Å 5000

with 2500  F  2500. Then: a) G1000  0.935ej0 .628 and then yt  0.935ej  2000 t0 .628 b) Using the same number for 1000Hz we obtain yt  0.935  cos2000  t  0.15   0.628 c) G 2500  0.637ej1 .5708 , therefore y t  2  0.637cos5000t  1.5708 d) same: yt  2  0.637 sin5000 t  1.5708

Solutions_Chapter2[1].nb

9

e) the term cos2 2750 t has aliasing, since it has a frequency above 2500Hz. 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.25kHz. Therefore it is as if the input signal were xt  cos2000t  0.1  cos4500t. This yields G1000  0.935 ej0.628 and G 2250  0.699ej0.393 , and finally yt  0.935 cos2000t  0.1  0.628  0.699cos4500t  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 yt   xngt  nTs, with gt a triangular pulse as shown below; n

10

Solutions_Chapter2[1].nb

g (t )

 Ts

1

Ts

t

b) Determine an expression for YF  FTyt in terms of Y  DTFTyn and GF  FTg t; c) In the figure below, let yn  2cos0.8n , the sampling frequency Fs  10 kHz and the filter be ideal with bandwidth Fs  2. Determine the output signal yt.

y[n] FOH

LPF

y (t )

Fs Solution 

a) From the interpolation yt   xngt  nTs and the definition of the interpolating n

function gt we can see that yt is a sequence of straight lines. In particular if we look at any interval nTs  t  n  1Ts it is easy to see that only two terms in the summation are nonzero, as yt  xngt  nTs  xn  1gt  n  1 Ts , for nTs  t  n  1 T s This is shown in the figure below. Since gTs   0 we can see that the line has to go through the two points xn and xn  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 

YF  FTyt   xnGFej2FnTs n

 GFX  2 F Fs where GF  FTgt. Using the Fourier Transform tables, or the fact that (easy to verify) 1 rect t t   rect   gt     Ts  Ts Ts 2 t F F we determine GF  Tssinc  T s   Ts sinc  Fs . Fs  , since FT rect  

à Problem 2.8. Problem

In the system below, let the sampling frequency be F s  10k Hz and the digital filter have difference equation yn  0.25xn  xn  1  xn  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 xt  3cos6000t  0.1  2cos12000t Determine the output signal yt. Solution. 1 z a) The transfer function of the filter is Hz  0.251  z1  z2  z3  0.25  1 z1 , where we applied the geometric sum. Therefore the frequency response is 4

2 1e   0.25 ej1 .5 sin    H  Hz zej  0.25    1ej  sin  j4

2

whose magnitude is shown below. b) Recall that the overall frequency response is given by j F Fs YF  H  F   sinc   2FFs  e XF  Fs

In our case Fs  10 kHz, and therefore we obtain

Y F     XF 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  3kHz  Fs  2, and F2  6kHz  Fs  2, with Fs  10kHz the sampling frequency. Therefore the antialising filter is going to stop the second frequency, and the overall output is going to be yt  3  0.156 cos6000  t  0.1  0.1    0.467745 c os6000  t  0.62832 since, at F  3kHz , YF  XF  0.156ej 0.1 .

Quantization Errors à Problem 2.9 Problem

In the system below, let the signal xn be affected by some random error en 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) Hz an ideal Low Pass Filter with bandwidth   4; z b) Hz    ; z 0.5

c) yn  41 sn  sn  1  sn  2  sn  3, with sn  xn  en; d) H   e , for     . Solution.

Recall the two relationships in the frequency and time domain:     1    2 d 2         H        e2    2          

    hn 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 hn  0.5 n un therefore 





0

1  2 4 2 2     hn 2 e2    0.52n 2e    10.25 e  3 e

c) in this case n  14 en  en  1  en  2  en  3 . Therefore the impulse response is hn  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 n0

 1  2 2 w d   d) 2   e  0.3045 e   2   e    

à Problem 2.10. Problem

A continuous time signal xt has a bandwidth FB  10kHz and it is sampled at Fs  22kHz, using 8bits/sample. The signal is properly scaled so that  xn   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  xn  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...


Similar Free PDFs