Fundamentals of Communication Systems 1st Edition Proakis Solutions Manual PDF Download Full Book with All Chapters
Fundamentals of Communication Systems 1st Edition Proakis Solutions Manual PDF Download Full Book with All Chapters
com
https://testbankdeal.com/product/fundamentals-of-
communication-systems-1st-edition-proakis-solutions-manual/
OR CLICK HERE
DOWNLOAD NOW
https://testbankdeal.com/product/fundamentals-of-communication-
systems-2nd-edition-proakis-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/contemporary-communication-
systems-1st-edition-mesiya-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/introduction-to-communication-
systems-1st-edition-madhow-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/law-and-ethics-in-the-business-
environment-9th-edition-halbert-solutions-manual/
testbankdeal.com
Fundamentals of Organic Chemistry 7th Edition McMurry Test
Bank
https://testbankdeal.com/product/fundamentals-of-organic-
chemistry-7th-edition-mcmurry-test-bank/
testbankdeal.com
https://testbankdeal.com/product/stats-data-and-models-canadian-3rd-
edition-de-veaux-test-bank/
testbankdeal.com
https://testbankdeal.com/product/management-asia-pacific-6th-edition-
samson-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/advertising-and-imc-principles-and-
practice-10th-edition-moriarty-test-bank/
testbankdeal.com
https://testbankdeal.com/product/business-law-text-and-exercises-7th-
edition-miller-test-bank/
testbankdeal.com
Investment Banks Hedge Funds and Private Equity 3rd
Edition Stowell Solutions Manual
https://testbankdeal.com/product/investment-banks-hedge-funds-and-
private-equity-3rd-edition-stowell-solutions-manual/
testbankdeal.com
Chapter 7
Problem 7.1
The following MATLAB script finds the quantization levels as (−5.1865, −4.2168, −2.3706, 0.7228, −0.4599,
1.5101, 3.2827, 5.1865).
echo on ;
a=[−10,−5,−4,−2,0,1,3,5,10];
for i=1:length(a)−1
y(i)=centroid(’normal’,a(i),a(i+1),0.001,0,1);
echo off ;
end
In this MATLAB script the MATLAB function centroid.m given next finds the centroid of a region.
function y=centroid(funfcn,a,b,tol,p1,p2,p3)
% CENTROID Finds the centroid of a function over a region.
% Y=CENTROID(’F’,A,B,TOL,P1,P2,P3) finds the centroid of the
% function F defined in an m-file on the [A,B] region. The
% function can contain up to three parameters, P1, P2, P3.
% tol=the relative error.
args=[ ];
for n=1:nargin−4
args=[args,’,p’,int2str(n)]; 10
end
args=[args,’)’];
funfcn1=’x_fnct’;
y1=eval([’quad(funfcn1,a,b,tol,[ ],funfcn’,args]);
y2=eval([’quad(funfcn,a,b,tol,[ ]’,args]);
y=y1/y2;
MATLAB functions xfunct.m and normal.m that arse used in centroid.m are given next
args=[ ];
for nn=1:nargin−2
args=[args,’,p’,int2str(nn)];
end
args=[args,’)’] ;
y=eval([funfcn,’(x’,args,’.*x’ ]); 10
function y=normal(x,m,s)
143
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
% FUNCTION y=NORMAL(x,m,s)
% Gaussian distribution
% m=mean
% s=standard deviation
y=(1/sqrt(2*pi*sˆ2))*exp(−((x−m).ˆ2)/(2*sˆ2));
Problem 7.2
1) By the symmetry assumption the boundaries of the quantization regions are 0, ±1, ±2, ±3, ±4, and ±5.
2) The quantization regions are (−∞, −5], (−5, −4], (−4, −3], (−3, −2], (−2, −1], (−1, 0], (0, 1], (1, 2],
(2, 3], (3, 4], (4, 5], and (5, +∞).
3) The MATLAB function uq_dist.m is used to find the distortion of a uniform quantizer (it is assumed
that the quantization levels are set to the centroids of the quantization regions). uq_dist.m and the function
mse_dist.m called by uq_dist.m are given next
if (c−b<delta*(n−2))
error(’Too many levels for this range.’); return
end
if (s<b)
error(’The leftmost boundary too small.’); return 20
end
if (s+(n−2)*delta>c)
error(’The leftmost boundary too large.’); return
end
args=[ ];
for j=1:nargin−7
args=[args,’,p’,int2str(j)];
end
args=[args,’)’];
a(1)=b; 30
for i=2:n
a(i)=s+(i−2)*delta;
end
a(n+1)=c;
[y,dist]=eval([’mse_dist(funfcn,a,tol’,args]);
144
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
%MSE DIST returns the mean-squared quantization error.
% [Y,DIST]=MSE DIST(FUNFCN,A,TOL,P1,P2,P3)
% funfcn=The distribution function given
% in an m-file. It can depend on up to three
% parameters, p1,p2,p3.
% a=the vector defining the boundaries of the
% quantization regions. (Note: [a(1),a(length(a))]
% is the support of funfcn.)
% p1,p2,p3=parameters of funfcn. 10
% tol=the relative error.
args=[ ];
for n=1:nargin−3
args=[args,’,p’,int2str(n)];
end
args=[args,’)’];
for i=1:length(a)−1
y(i)=eval([’centroid(funfcn,a(i),a(i+1),tol’,args]);
end 20
dist=0;
for i=1:length(a)−1
newfun = ’x_a2_fnct’ ;
dist=dist+eval([’quad(newfun,a(i),a(i+1),tol,[ ],funfcn,’, num2str(y(i)), args]);
end
Problem 7.3
In order to design a a Lloyd-Max quantizer, the m-file lloydmax.m given next is used
function [a,y,dist]=lloydmax(funfcn,b,n,tol,p1,p2,p3)
%LLOYDMAX returns the the Lloyd-Max quantizer and the mean-squared
% quantization error for a symmetric distribution
% [A,Y,DIST]=LLOYDMAX(FUNFCN,B,N,TOL,P1,P2,P3).
% funfcn=the density function given
% in an m-file. It can depend on up to three
% parameters, p1,p2,p3.
% a=the vector giving the boundaries of the
% quantization regions.
% [-b,b] approximates support of the density function. 10
% n=the number of quantization regions.
% y=the quantization levels.
% p1,p2,p3=parameters of funfcn.
% tol=the relative error.
args=[ ];
for j=1:nargin−4
args=[args,’,p’,int2str(j)];
end
args=[args,’)’]; 20
v=eval([’variance(funfcn,-b,b,tol’,args]);
a(1)=−b;
145
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
d=2*b/n;
for i=2:n
a(i)=a(i−1)+d;
end
a(n+1)=b;
dist=v;
[y,newdist]=eval([’mse_dist(funfcn,a,tol’,args]);
while(newdist<0.99*dist), 30
for i=2:n
a(i)=(y(i−1)+y(i))/2;
end
dist=newdist;
[y,newdist]=eval([’mse_dist(funfcn,a,tol’,args]);
end
1) Using b = 10, n = 10, tol = 0.01, p1 = 0, and p2 = 1 in lloydmax.m, we obtain the quantization
boundaries and quantization levels vectors a and y as
Problem 7.4
The m-file u_pcm.m given next takes as its input a sequence of sampled values and the number of desired
quantization levels and finds the quantized sequence, the encoded sequence, and the resulting SQNR (in
decibels).
amax=max(abs(a)); 10
a quan=a/amax;
b quan=a quan;
d=2/n;
q=d.*[0:n−1];
q=q−((n−1)/2)*d;
for i=1:n
a quan(find((q(i)−d/2 <= a quan) & (a quan <= q(i)+d/2)))=. . .
q(i).*ones(1,length(find((q(i)−d/2 <= a quan) & (a quan <= q(i)+d/2))));
b quan(find( a quan==q(i) ))=(i−1).*ones(1,length(find( a quan==q(i) )));
end 20
a quan=a quan*amax;
nu=ceil(log2(n));
code=zeros(length(a),nu);
for i=1:length(a)
for j=nu:−1:0
146
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
1
8−level
0.8 16−level
0.6
amplitude 0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 2 4 6 8 10
t
Figure 119: Uniform PCM for a sinusoidal signal using 8 and 16 levels
if ( fix(b quan(i)/(2ˆj)) == 1)
code(i,(nu−j)) = 1;
b quan(i) = b quan(i) − 2ˆj;
end
end 30
end
sqnr=20*log10(norm(a)/norm(a−a quan));
1) We arbitrarily choose the duration of the signal to be 10 s. Then using the u_pcm.m m-file, we generate
the quantized signals for the two cases of 8 and 16 quantization levels. The plots are shown in Figure 119.
2) The resulting SQNRs are 18.8532 dB for the 8-level PCM and 25.1153 dB for the 16-level uniform PCM.
A MATLAB script for this problem is shown next.
147
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
3
input sequence 1
−1
−2
−3
0 100 200 300 400 500
m
[sqnr8,aquan8,code8]=u pcm(a,8);
[sqnr16,aquan16,code16]=u pcm(a,16);
pause % Press a key to see the SQNR for N = 8.
sqnr8
pause % Press a key to see the SQNR for N = 16.
sqnr16 10
pause % Press a key to see the plot of the signal and its quantized versions.
plot(t,a,’-’,t,aquan8,’-.’,t,aquan16,’-’,t,zeros(1,length(t)))
Problem 7.5
1) The plot of 500 point sequence is given in Figure 120
2) Using the MATLAB function u_pcm.m given in Computer Problem 7.4, we find the SQNR for the 64-level
quantizer to be 31.66 dB.
3) Again by using the MATLAB function u_pcm.m, the first five values of the sequence, the corresponding
quantized values, and the corresponding PCM codewords are given as
148
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
0.05
0.04
0.03
quantization error
0.02
0.01
−0.01
−0.02
−0.03
−0.04
−0.05
0 100 200 300 400 500
m
Problem 7.6
1) This question is solved by using the m-file mula_pcm.m, which is the equivalent of the m-file u_pcm.m
when using a µlaw PCM scheme. This file is given next
149
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
% a=input sequence.
% n=number of quantization levels (even).
% sqnr=output SQNR (in dB).
% a quan=quantized output before encoding.
% code=the encoded output.
[y,maximum]=mulaw(a,mu); 10
[sqnr,y q,code]=u pcm(y,n);
a quan=invmulaw(y q,mu);
a quan=maximum*a quan;
sqnr=20*log10(norm(a)/norm(a−a quan));
The two m-files mulaw.m and invmulaw.m given below implement µ-law nonlinearity and its inverse.
signum.m function that finds the signum of a vector is also given next.
function [y,a]=mulaw(x,mu)
%MULAW mu-law nonlinearity for nonuniform PCM
% Y=MULAW(X,MU).
% X=input vector.
a=max(abs(x));
y=(log(1+mu*abs(x/a))./log(1+mu)).*signum(x);
function x=invmulaw(y,mu)
%INVMULAW the inverse of mu-law nonlinearity
%X=INVMULAW(Y,MU) Y=normalized output of the mu-law nonlinearity.
x=(((1+mu).ˆ(abs(y))−1)./mu).*signum(y);
function y=signum(x)
%SIGNUM finds the signum of a vector.
% Y=SIGNUM(X)
% X=input vector
y=x;
y(find(x>0))=ones(size(find(x>0)));
y(find(x<0))=−ones(size(find(x<0)));
y(find(x==0))=zeros(size(find(x==0)));
10
Let the vector a be the vector of length 500 generated according to N (0, 1); that is, let
a = randn(1, 500)
Then by using
[dist,a_quan,code] = mula_pcm(a, 16, 255)
we can obtain the quantized sequence and the SQNR for a 16-level quantization. Plots of the input–output
relation for the quantizer and the quantization error are given in Figures 122, 123, and 124.
150
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
0.8
0.6
0.4
0.2
quantization error
−0.2
−0.4
−0.6
−0.8
−1
0 100 200 300 400 500
m
2.5
1.5
1
quantizer output
0.5
−0.5
−1
−1.5
−2
−2.5
−3 −2 −1 1510 1 2 3
quantizer input
Figure 122: Quantization error and quantizer input–output relation for a 16-level µ-law PCM
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
0.3
0.2
−0.1
−0.2
−0.3
−0.4
0 100 200 300 400 500
m
1
quantizer output
−1
−2
−3
−3 −2 −1 1520 1 2 3
quantizer input
Figure 123: Quantization error and quantizer input–output relation for a 64-level µ-law PCM
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
0.15
0.1
−0.05
−0.1
−0.15
−0.2
0 100 200 300 400 500
m
1
quantizer output
−1
−2
−3
−3 −2 −1 1530 1 2 3
quantizer input
Figure 124: Quantization error and quantizer input–output relation for a 128-level µ-law PCM
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
Using mula_perm.m, the SQNR is found to be 13.96 dB. For the case of 64 levels we obtain SQNR = 26.30
dB, and for 128 levels we have SQNR = 31.49 dB.
154
© 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws
as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in
writing from the publisher.
Another Random Document on
Scribd Without Any Related Topics
William of Bauier duke of Holland, whiche was lawfull wife to
Ihon duke of Brabant then liuyng. Which mariage was not
onely woundered at of the common people but also detested
of the nobilitie, and abhorred of the clergie. But suerly the
swete tast, of this plasant mariage, brought after a sower
sauce, bothe to the amorous housbande and to the wanton
wife. Hall.
[723] Feends. N.
[724] So in editions 1578, 87, and Niccols, but appears a
misprint for convicted.
[725] With. N.
[726] Was. N.
[727] Could wake. N.
[728] Of my false foes. N.
[729] A parliament was somoned to be kept at Bery, whether
resorted all the peres of the realme, and emongest them the
duke of Gloucester, whiche on the second daie of the session
was by the lord Beamonde, then highe constable of Englande,
accompanied with the duke of Buckyngham, and other,
arrested, apprehended, and put in warde, and all his
seruauntes sequestred from hym, and xxxii. of the chiefe of
his retinue, were sente to diuerse prisons, to the greate
admiracion of the common people. The duke the night after
hys emprisonement, was found dedde in his bed, and his body
shewed to the lordes and commons, as thoughe he had died
of a palsey or empostome: but all indifferent persons well
knewe that he died of no natural death, but of some violent
force. Hall.
[730] The vnsure. 1578.
[731] They lyue in. 1578.
[732] G. Ferrers. N.
[733] Both the realmes. 1578.
[734] Were the chiefe workers. 1578.
[735] Whan thys was sayd: “Let kyng Jamy go,” quod mayster
Ferrers, “and retourn we to our owne story, and se what
broyles wer among the nobylyty in the kynge’s mynorytye.
How that cardinall Bewford malygneth the estate of good duke
Humfrey the kynge’s vncle and protector of the realme, and by
what driftes he first banisheth his wife from him. And lastly
howe the good duke is murderously made away through
conspiracy of queene Margaret and other: both whose
tragedyes I entend at leysure to declare, for they be notable.”
“Do so, I pray you,” quod another, “but take hede ye demurre
not vpon them. And I to be occupyed the meane tyme, wyll
shew what I haue noted in the duke of Suffolke’s doynges, one
of the chefest of duke Humfrey’s destroyers, who, &c.” 1563,
71. See p. 111, note 1.
[736] Notable death, which he may lament after thys maner.
1559, 63.
[737] And sayling. 1571, 75.
[738] Lord, omitted. 1578.
[739] And procuringe the death of Duke Humfrey of Glocester,
protector of England. 1578.
[740] Anno 1450. added 1571. Anno Dom. N.
[741] Banysht, headed so, and drowned. 1559, 63.
[742] Wherfore good Baldwin. 1578.
[743]
Or in skill,
Wynne what they will and wield the world at will. 1578.
[832] Of the first sorte myselfe I count for one. 1578.
[833] Fell despyte. 1563.
[834] Of my workes never could see. 1563.
[835] Sought. 1578.
[836] Bright, and shone like a starre. 1578.
[837] By malice of me. 1563.
[838] His fame. N.
[839]
[911] But thought no whit. 1563. But little thought of. 1578.
[912] More foole hee that. 1578.
[913] The stout earle. N.
[914] Clifford couragious could not. N.
[915] Couragious Clifford could not eschewe the dart. 1578.
[916] Stafford although stout, free went not from this marte.
1563.
[917] Ralph Babthorpe sewer to the king, and Ralph his
sonne, the king’s attorney. Stowe.
[918] Was found very. 1563.
[919]
[935]
[972] To slay. N.
[973]
I by mariage,
Fowre fayre sonnes my yong wife to me bore,
Valiaunt. 1578.
[1000] Not. The text corrected by editions 1559 and 63. The
others read: no.
[1001] Came I. 1559, 63.
[1002] My. 1559, 63. Make clayme. 1571. New claime to
make. 1578.
[1003] In the kinge’s seate I boldly. 1578.
[1004] Clayming the place, whereat. 1578.
[1005] At last to my demaund agreed. 1578.
[1006] But sith Henry had raigned than so long. 1578.
[1007] And to thend to make my title strong. 1578.
[1008] My, misprint. 1571. Apparant heire of England they me.
1578. In each place heire apparant they me. N.
[1009]
[1012] Th’infant. N.
[1013]
[1014]
[1017]