Upload
gavie-marquos
View
219
Download
0
Embed Size (px)
Citation preview
7/30/2019 Midterm Hw123problems Hw123sol
1/23
EECE4572 Summer 2010
Communication Systems I Prof. Salehi
MIDTERM SOLUTIONS
Problem 1:
The power spectral density of a WSS information source is shown below (the unit of power
spectral density is Watts/Hz). The maximum amplitude of this signal is 200.
-
6
JJJJJ
f (Hz)
SX(f )
30003000 20002000
2
1. What is the power in this process?
2. Assume that this signal is transmitted using a uniform PCM system with 512 quantiza-
tion levels, what is the resulting SQNR in decibels and what is the minimum required
transmission bandwidth if in sampling the signal a guard band of 1 KHz is used?
3. If the available transmission bandwidth is 47 KHz, design a PCM system that achieves the
highest possible SQNR. What is the resulting SQNR and the guard band?
Solution:
1. P =
SX(f)df = 4000 2 + 2
12 2 1000 = 10000 Watts.
2. = log2 N = 9, then SQNR = 4.8+69+10log10100002002
52.8 dB, and Bt = W +2WG =
9 3000 + 4.5 1000 = 31500 Hz
3. W + 12WG 47000 or 3000 +12WG 47000. The largest integer that satisfies this
is = 15 which gives WG = 266.6 Hz and SQNR = 4.8+615+10log10100002002
88.8 dB.
Problem 2: 35 points
In the block diagram shown below X(t) denotes a zero-mean WSS (wide-sense stationary) and
white random process with power spectral density SX(f ) =N02
.
-
- 2 ddt
m+?
6
- LPF: [W , W ] -X(t) Y (t) = X(t) + 2X(t) Z(t)
7/30/2019 Midterm Hw123problems Hw123sol
2/23
The block denoted by LPF represents an ideal lowpass filter that passes all frequencies in
the frequency range from W to W and blocks all other frequencies. Answer the following
questions, your answers will be in terms of N0.
1. What is the power spectral density and the mean ofY(t)?
2. What is the power spectral density ofZ(t)?
3. Is Z(t) a WSS random process? Why?
4. What is the variance ofZ(t) ifW = 4?
5. What is the power in Y(t)?
Solution:
1. h(t) = (t) + 2(t), hence H(f) = F[h(t)] = 1 + j4f. We have mY = mXH(0) =
0 1 = 0 and SY(f ) = SX(f )|H(f)|2 =
N02 |1 + j4 f|
2 =N02 (1 + 16
2f2).
2. For the LPF H1(f ) = (f /2W ), henceSZ(f ) = SY(f )|H1(f )|2 =N02 (1+16
2f2)(f /2W ).
3. Since input is WSS and system is LTI the output will be WSS.
4. E[Z2(t)] = E[Z(t)Z(t)] = RZ(0) =
SZ(f)df =N02
44(1 + 16
2f2) df = N0(4 +13
210 2).
5. PY =
SY(f ) =
N02 (1 + 16
2f2) df = .
Problem 3: 35 points
A discrete-memoryless source X has the alphabet X = {x1, x2, x3, x4, x5, x6}, with corre-
sponding probabilities 116 ,
14 ,
18 ,
14 ,
116 ,
14
.
1. What is the entropy of this source?
2. Design a Huffman code for this source, what is the average codeword length of the Huff-
man code?
3. Can you design a more efficient Huffman code by using the second extension of this
source (i.e., designing a Huffman code for sequences of two outputs)? Why?
4. If you are asked to assign new probabilities to X (different from the ones given above)
such that the entropy is maximized, what probabilities would you assign? What is the
resulting entropy?
Solution:
1. H(X) = 6
i=1 pi log2 pi = 34 log2
14
18 log2
18
216 log2
116 = 2.375 bits/symbol.
2. Designing the Huffman code gives codewords {1110,00,110,01,1111,10} (or some equiv-
alent code) with R =
pili = 2.375 binary symbols/source symbol.
3. Since already R = H(X) no improvement is possible.
4. Equiprobable distribution has the highest entropy, hence pi = 1/6 and H(X) = log2 6 =
2.58.
7/30/2019 Midterm Hw123problems Hw123sol
3/23
Homework 1 Problems
7/30/2019 Midterm Hw123problems Hw123sol
4/23
Homework 2 Problems
Homework 3 Problems
7/30/2019 Midterm Hw123problems Hw123sol
5/23
7/30/2019 Midterm Hw123problems Hw123sol
6/23
7/30/2019 Midterm Hw123problems Hw123sol
7/23
EECE4572 Summer 2012
Communications I Prof. Salehi
Homework 1 Solution
Note: You need to use Fourier transform properties and F.T table in this HW. To prepare for this
HW read Chapters 2.
Problem 1
1. Using scaling, shift, and modulation properties of the F.T., determine the F.T. ofx(t), where
x(t) =
cos(t), 0 t 40, otherwise.
2. Derive the magnitude spectrum of this signal usingMatlab
and plot it (magnitude spectrumis the magnitude of the F.T. of a signal, i.e., |X(f)|). In your HW solutions include both the
Matlab code and the resulting plot. Is your plot symmetric (even)? Why? (Note: If you do not
know how to use Matlab to find F.T. look at Chapter 1 of the Matlab recommended book and
in particular Illustrative Problem 1.5 on page 21. The Matlab fundamentals handout posted
on the blackboard site is also useful to refresh your memory.)
3. Now let x1(t) and x2(t) be defined as
x1(t) =
cos(2 f0t), 0 t 40, otherwise. x2(t) =
cos(t), 0 t T0, otherwise.
Note that in x1(t) the width of the pulse is kept constant at 4 but the frequency f0 can change.In x2(t) the width of the pulse can change but the frequency is kept at
12
. Plot |X1(f )| for
f0 = 1, 2, 4 and |X2(f ) for the pulse durations T = 8, 16 and explain how changing f0 and T
change the magnitude spectrum of the signal.
Solution
Since the highest frequency is 4 we choose the parameter fs to be 20 which is well above twice the
highest frequency. The frequency resolution df determines how accurate you want your graph to
be, we choose df=0.001. The maximum time is 16 we choose the representation from 32 to 32 to
represent the signal precisely, the listing of the program is given below.
df=0.001;
fs=20;
ts=1/fs;
t=[-32:ts:32];
x1=zeros(size(t));
x1(641:721)=cos(pi*t(641:721));
7/30/2019 Midterm Hw123problems Hw123sol
8/23
x2=zeros(size(t));
x2(641:721)=cos(2*pi*t(641:721));
x3=zeros(size(t));
x3(641:721)=cos(4*pi*t(641:721));
x4=zeros(size(t));
x4(641:721)=cos(8*pi
*t(641:721));
x5=zeros(size(t));
x5(641:801)=cos(pi*t(641:801));
x6=zeros(size(t));
x6(641:961)=cos(pi*t(641:961));
[X1,x11,df1]=fftseq(x1,ts,df);
[X2,x21,df2]=fftseq(x2,ts,df);
[X3,x31,df3]=fftseq(x3,ts,df);
[X4,x41,df4]=fftseq(x4,ts,df);
[X5,x51,df5]=fftseq(x5,ts,df);
[X6,x61,df6]=fftseq(x6,ts,df);
X11=X1/fs;
X21=X2/fs;
X31=X3/fs;
X41=X4/fs;
X51=X5/fs;
X61=X6/fs;
f=[0:df1:df1*(length(x11)-1)]-fs/2;
plot(f,fftshift(abs(X11)))
plot(f,fftshift(abs(X21)))
plot(f,fftshift(abs(X31)))
plot(f,fftshift(abs(X41)))
plot(f,fftshift(abs(X51)))
plot(f,fftshift(abs(X61)))
The plots denoted by X1 through X6 are shown on the next page. X1 is the original plot for T = 4
and f0 = 1/2. The following table gives T and f0 for various Xs.
X T f0
X1 4 1/2
X2 4 1
X3 4 2
X4 4 4
X5 8 1/2
X6 16 1/2
As seen increasing f0 moves the peaks away from zero and locates them at the corresponding
frequencies, increasing T makes the peaks of the signals higher and more like impulses (note the
vertical scale).
7/30/2019 Midterm Hw123problems Hw123sol
9/23
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
0.5
1
1.5
2
2.5
X1
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
0.5
1
1.5
2
2.5
X2
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
0.5
1
1.5
2
2.53
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
0.5
1
1.5
2
2.54
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
0.5
1
1.5
2
2.5
3
3.5
4
4.55
10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
8
9
X6
7/30/2019 Midterm Hw123problems Hw123sol
10/23
Problem 2
Problem 2.10 parts 2, 3.
Solution
2) Using the time shift theorem, we have
F[x(t)] = F[(t 3) +(t + 3)]
= sinc(f)ej2 f3 + sinc(f)ej2f3
= 2sinc(f ) cos(23f )
3) Using time-scaling and time-shift theorems we have
F[x(t)] = F[(2t + 3) +(3t 2)]
= F[(2(t +3
2)) +(3(t
2
3)]
= 12 sinc2( f2 )e
j f3 + 13 sinc2( f3 )e
j2 f2
3
Problem 3
Problem 2.12 parts a, b, e.
Solution
a) We can write x(t) as x(t) = 2( t4 ) 2(t2 ). Then
F[x(t)] = F[2(t
4)] F[2(
t
2)] = 8sinc(4f ) 4sinc2(2f )
b)
x(t) = 2(t
4) (t) F[x(t)] = 8sinc(4f ) sinc2(f )
e) We can write x(t) as x(t) = (t + 1) +(t) +(t 1). Hence,
X(f) = sinc2(f)(1 + ej2 f + ej2f) = sinc2(f)(1 + 2cos(2f))
Another approach is to note that x(t) = 2
t2
(t), hence X(f) = 4sinc2(2f ) sinc2(f ).
Problem 4
Problem 2.26 part 5.
Solution
5) Using the convolution theorem we obtain
Y(f) = (f )(f )
Y(f) is shown below.
7/30/2019 Midterm Hw123problems Hw123sol
11/23
12
12
12
1
Y(f)
f
We notice that we can write Y(f) = 12(f ) +12(2f ), and hence y(t) =
12
sinc(t) + 14 sinc2
t2
.
Problem 5
Problem 2.17.
Solution
(Convolution theorem:)
F[x(t) y(t)] = F[x(t)]F[y(t)] = X(f)Y(f)
Thus
sinc(t) sinc(t) = F1[F[sinc(t) sinc(t)]]
= F1[F[sinc(t)] F[sinc(t)]]
= F1[(f )(f)] = F1[(f)]
= sinc(t)
Problem 6Problem 4.10, parts 1,2.
Solution
1) The random variable X is Gaussian with zero mean and variance 2 = 108. Thus p(X > x) =
Q( x) and
p(X > 104) = Q
104
104
= Q(1) = .159
p(X > 4 104) = Q
4 104
104
= Q(4) = 3.17 105
p(2 104 < X 104) = 1 Q(1) Q(2) = .8182
2)
p(X > 104X > 0) = p(X > 104, X > 0)
p(X > 0)=
p(X > 104)
p(X > 0)=
.159
.5= .318
7/30/2019 Midterm Hw123problems Hw123sol
12/23
Problem 7
X is a Gaussian random variable with mean 3 and variance 4. Find the following probabilities.
1. P(X > 0).
2. P(X < 8).
3. P (2 < X < 2).
4. P (4 < (X + 1)2 < 16).
Solution
Obviously m = 3 and = 2. We have
1. P(X > 0) = Q
032
= Q(1.5) = 1 Q(1.5) = 1 0.0668 = 0.9332.
2. P(X < 8) = Q
382
= Q(2.5) = 1 Q(2.5) = 1 0.00621 = 0.99379.
3. P (2 < X < 2) = Q32
2
Q3(2)
2
= Q(0.5) Q(2.5) = 0.308 0.0062 = 0.3018.
4. P (4 < (X+1)2 < 16) = P (2 < |X+1| < 4) = P (2 < X+1 < 4)+P (2 < X1 < 4) = P (1 < X