Professional Documents
Culture Documents
(Download PDF) Fundamentals of Communication Systems 1st Edition Proakis Solutions Manual Full Chapter
(Download PDF) Fundamentals of Communication Systems 1st Edition Proakis Solutions Manual Full Chapter
https://testbankfan.com/product/fundamentals-of-communication-
systems-2nd-edition-proakis-solutions-manual/
https://testbankfan.com/product/contemporary-communication-
systems-1st-edition-mesiya-solutions-manual/
https://testbankfan.com/product/introduction-to-communication-
systems-1st-edition-madhow-solutions-manual/
https://testbankfan.com/product/communication-systems-analysis-
and-design-1st-edition-stern-solutions-manual/
Wireless Communication Networks and Systems 1st Edition
Beard Solutions Manual
https://testbankfan.com/product/wireless-communication-networks-
and-systems-1st-edition-beard-solutions-manual/
https://testbankfan.com/product/principles-of-electronic-
communication-systems-4th-edition-frenzel-solutions-manual/
https://testbankfan.com/product/fundamentals-of-database-
systems-6th-edition-elmasri-solutions-manual/
https://testbankfan.com/product/fundamentals-of-information-
systems-8th-edition-stair-solutions-manual/
https://testbankfan.com/product/fundamentals-of-information-
systems-9th-edition-stair-solutions-manual/
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 with
no related content on Scribd:
RITONDARE: to round or body a piece of work, e.g., of Michael
Angelo’s method of hewing his figures from the stone direct,
without recourse to the clay model. Tra. 199.
RITURARE: Tra. 18. See RISERRARE.
ROSTA: a fan or blower. Tra. 144.
ROVESCIO: the reverse of a medal.
RUBINO BALASCIA: see BALASCIA.
RUOTA: a wheel, as of the steel wheel on which diamonds are cut.
Tra. 52.
VERDEMEZZO: a term signifying not too dry nor yet too moist,
probably tacky. Tra. 104.
VERDERAME: verdigris, i.e., acetate of copper. Tra. 73, 93, 94.
VERDOGNOLO: greenish; used in describing the colour of stone.
Tra. 200.
VERMIGLIA: the vermeil. Tra. 39.
VERNICE: varnish. VERNICE ORDINARIA: described as the
ordinary varnish used for sword hilts. Tra. 155. VERNICIARE: to
varnish.
VESCICA: a crack or flaw, e.g., in glass. Tra. 65.
VESTA, VESTIRE: see TONACA.
VETRIVUOLO, VETRIVUOLO ROMANO: Roman or green vitriol,
i.e., sulphate of iron. Tra. 150, 152.
VIRTU: a word used with many and double senses. For its larger
uses see Symonds’ ‘Vita,’ passim. In its more technical uses
Cellini has virtù for the glory of a ruby. Tra. 42. VIRTU DEL
MARTELLO: excellence of hammer work. VIRTU DEI FERRI:
general technical ability with punches and chisels.
VITE: a screw. VITE FEMMINA: the female screw as used in minting
with the screw process; and termed also FEMMINA &
CHIOCCIOLA, which see.
VIVACITA: the flash and brilliancy of a stone. Tra. 66.
VOLTO: turned, bent, e.g., of the form of a semi-ring punch. Tra.
133.
Titles from the List of Illustrations and List of Diagrams have been applied to the
images as captions. The second jewellery illustration has a new caption, as the
one from the index would be confusing out of context. Illustrations that did not
have a title have had a descriptive caption added, these are indicated with
parentheses.
Obvious typographical errors and punctuation errors have been corrected after
careful comparison with other occurrences within the text and consultation of
external sources.
Some hyphens in words have been silently removed, some added, when a
predominant preference was found in the original book.
Errata listed on page 167 have been applied to the text. Except for those
changes noted below, all misspellings in the text, and inconsistent or archaic
usage, have been retained.
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.