Você está na página 1de 966

Solution Manual

Fundamentals of Communication Systems

John G. Proakis Masoud Salehi

Second Edition

2013
Chapter 2

Problem 2.1

1.2t52t5. This indicates rst we have to plot2tand then shift it to left by


2
5
2. A plot is shown below:

2t5

-
119t

44

P1
2.tnis a sum of shifted triangular pulses. Note that the sum of the left and right side
n0
of triangular pulses that are displaced by one unit of time is equal to 1, The plot is given below

(t)
x2

1

t
1

3. It is obvious from the denition of sgntthat sgn2tsgnt. Thereforex3t0.

4.x4tis sinctcontracted by a factor of 10.

0.8

0.6

0.4

0.2

-0.2

-0.4
-1-0.8-0.6-0.4-0.200.20.40.60.81
3
Problem 2.2

1.xnsinc3n=9sincn=3.

0.8

0.6

0.4

0.2

-0.2

-0.4
-20-15-10-505101520

nn
1111
2.xn4. If4, i.e.,2n10, we havexn1.
3232

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-20-15-10-505101520

3.xnnu1n=4n1u1n=41. Forn <0,xn0, for 0n3,xnnand


444
forn4,xnnn11.
44

4
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-505101520

Problem 2.3

x1n1 andx2ncos2 n1, for alln. This shows that two signals can be dierent but

their sampled versions be the same.

Problem 2.4

Letx1nandx2nbe two periodic signals with periodsN1andN2, respectively, and letN

LCMN1; N2, and denexnx1nx2n. Then obviouslyx1nNx1nandx2nN

x2n, and hencexnxnN, i.e.,xnis periodic with periodN.

For continuous-time signalsx1tandx2twith periodsT1andT2respectively, in general we

cannot nd aTsuch thatTk1T1k2T2for integersk1andk2. This is obvious for instance if

T11 andT2. The necessary and sucient condition for the sum to be periodic is that T1be a
T2
rational number.

Problem 2.5

Using the result of problem 2.4 we have:

1.The frequencies are 2000 and 5500, their ratio (and therefore the ratio of the periods) is

rational, hence the sum is periodic.

2. The frequencies are 2000 and5500. Their ratio is not rational, hence the sum is not periodic.

3. The sum of two periodic discrete-time signal is periodic.

4.The st signal is periodic butcos11000nisnotperiodic, since there is noNsuch that

cos11000nNcos11000nfor alln. Therefore the sum cannot be periodic.

5
Problem 2.6

1)
88
>>>et>>>et
t >0t >0
><><
x1tett <0=)x1tett <0 x1t
>>>>>>
>:>:
0t00t0

Thus,x1tis an odd signal

2)x2tcos120 tis neither even nor odd. We havecos120 tcoscos120 t


333

sinsin120 t. Thereforex2etcoscos120 tandx2ot sinsin120 t.


333
(Note: This part can also be considered as a special case of part 7 of this problem)

3)

x3tejtj=)x3tejtjejtjx3t

Hence, the signalx3tis even.

4)
88
><t><0
t0t0
x4t=
>:0)x4t>:t
t <0 t <0

The signalx4tis neither even nor odd. The even part of the signal is

8
t
<t
tx4t>20jtj
x4;etx4
t
2>:t2
2 <0

The odd part is


8
t
<t
tx4t>20t
x4;otx4
t
2>:t2
2 <0

5)

x5tx1tx2t=)x5tx1tx2tx1tx2t
Clearlyx5tx5tsince otherwisex2t08t. Similarlyx5tx5tsince otherwise

x1t08t. The even and the odd parts ofx5tare given by

tx5t
x5;etx5x1t
2
tx5t
x5;otx5 x2t
2

6
Problem 2.7
Rax
For the rst two questions we will need the integralIecos2xdx.
ZZ
11
I1cos2x deaxeaxcos2xeaxsin 2x dx
aaa
11Zax
ax2
sin 2x de
aecosxa2
112Zax
ax2ax

esin 2xecos 2x dx
aecosxa2a2
112Zax
ax2ax2
esin 2xe2 cosx1 dx
aecosxa2a2
112Zax4
ax2ax

esin 2xedxI
aecosxa2a2a2

Thus,

I1acos2xsin 2x2eax
4a2a

1)

T ZT
Z
22
Exlimx2tdxlime2tcos2tdt
T!1T1T!10
2
T

hi2
lim12 cos2tsin 2t1e2t
T!180

T3
lim12 cos2sinT1eT3
T!1828

Thusx1tis an energy-type signal and the energy content is 3=8

2)

T ZT
Z
22
Exlimx2tdxlime2tcos2tdt
T!1T2T!1T
22
2ZZT3
0
2
lim4Te2tcos2tdte2tcos2tdt5
T!10
2

But,

Z0
hi0
lime2tcos2tdtlim12 cos2tsin 2t1e2t
T!1TT!18T
22

T
lim132 cos21sinT eT 1
T!182

since 2cossin >0. Thus,Ex 1since as we have seen from the rst question the second

integral is bounded. Hence, the signalx2tis not an energy-type signal. To test ifx2tis a

power-type signal we ndPx.


T
Z0Z
2
Pxlim1e2tcos2dtlim1e2tcos2dt
T!1TTT!1T0
2

7
T
R2
But limT!11e2tcos2dtis zero and
T0
Z0
T
lim1e2tcos2dtlim12 cos21sinTeT
T!1TTT!18T2
2

>lim1eT>lim11TT2 >limT 1
T!1TT!1TT!1

Thus the signalx2tis not a power-type signal.

3)

T ZTZT
Z
222
Exlimx2tdxlimsgn2tdtlimdtlimT 1
T!1T3T!1TT!1TT!1
222
T ZT
Z
22
Pxlim1sgn2tdtlim1dtlim1T1
T!1TTT!1TTT!1T
22

The signalx3tis of the power-type and the power content is 1.

4)

First note that


TZk1
Z1

2X2f
limAcos2 f tdtAcos2 f tdt0
T!1Tk1
22f
k1

so that
T ZT
Z
22
limA2cos22 f tdtlim1A2A2cos22f tdt
T!1TT!12T
22
T
Z
2
lim1A2dtlim1A2T 1
T!12TT!12
2

T
Z
2
ExlimA2cos22 f1tB2cos22 f2t2ABcos2 f1tcos2 f2tdt
T!1T
2
T ZT
Z
22
limA2cos22 f1tdtlimB2cos22 f2tdt
T!1TT!1T
22
T
Z
2
ABlimcos22 f1f2cos22 f1f2dt
T!1T
2
1101

Thus the signal is not of the energy-type. To test if the signal is of the power-type we consider two

casesf1f2andf1f2. In the rst case


T
Z
2
Pxlim1AB2cos22 f1dt
T!1TT
2
T
Z
2
lim1AB2dt1AB2
T!12TT2
2

8
Iff1f2then
T
Z
2
Pxlim1A2cos22 f1tB2cos22 f2t2ABcos2 f1tcos2 f2tdt
T!1TT
2
"#
2222
lim1ATBTAB
T!1T2222

Thus the signal is of the power-type and iff1f2the power content isAB2=2 whereas iff1f2

the power content is1A2B2


2

Problem 2.8

P1
1.Letxt2tt, thenx1txt4n. First we plotxtthen by shifting
2n1
it by multiples of 4 we can plotx1t.xtis a triangular pulse of width 4 and height 2

from which a standard triangular pulse of width 1 and height 1 is subtracted. The result is a

trapezoidal pulse, which when replicated at intervals of 4 gives the plot ofx1t.

(t)
x1
1


t
22 66

2.This is the sum of two periodic signals with periods 2and 1. Since the ratio of the two

periods is not rational the sum is not periodic (by the result of problem 2.4)

3. sinnis not periodic. There is no integerNsuch that sinnNsinnfor alln.

Problem 2.9

1)
T ZT
Z
2212
Pxlim1A2ej2 f0tdtlimA2dtlim1A2TA2
T!1TTT!1TTT!1T
22

ThusxtAej2 f0tis a power-type signal and its power content isA2.

2)
T ZTZT
Z2
2222
Pxlim1A2cos22 f0t dtlim1Adtlim1Acos4 f0t2 dt
T!1TTT!1TT2T!1TT2
222

AsT! 1, the there will be no contribution by the second integral. Thus the signal is a power-type
2
signal and its power content isA.
2

9
3)
T ZT
Z
22
Pxlim1u2tdtlim1dtlim1T1
T!1TT1T!1T0T!1T22
2
Thus the unit step signal is a power-type signal and its power content is 1=2

4)
T ZT
ZT
2211 =2
Exlimx2tdtlimK2t2dtlim2K2t2
T!1TT!10T!1
20
p1
lim2K2T2 1
T!1

Thus the signal is not an energy-type signal.

T ZT
Z
221
Pxlim1x2tdtlim1K2t2dt
T!1TTT!1T0
2

p
1T =211 1
lim12K2t2lim2K2T =22lim2K2T20
T!1T0T!1TT!1

SincePxis not bounded away from zero it follows by denition that the signal is not of the power-type

(recall that power-type signals should satisfy 0< Px<1).

Problem 2.10

88
>>>t>>>1
1;1t0t >0
><><
tt1;0t1u1t1=2t0
>>>>>>
>:>:
0;o.w.0t <0

Thus, the signalxttu1tis given by


88
>>>0>>>0
t <0t 1
>>>>>>
><1><t
=2t011t <0
xt=
>>>t)xt>>>1
1 0t1=2t0
>>>>>>
>:>:
0t10t >0

The even and the odd part ofxtare given by

xetxtxt1t
22
8
>>>0
t1
>>>
>>>t
1
>><21t <0

xotxtxt0t0
2>>>
>>>t1
>>>20< t1
>>:
0 1t

10
Problem 2.11

1) Suppose that

xtx1tx1tx2tx2t
eoeo

withx1t,x2teven signals andx1t,x1todd signals. Then,xtx1tx1tso that


eeooeo

x1txtxt
e
2
x2tx2tx2tx2t
eoeo

2
2x2tx2tx2t
eoo2

t
2xe

Thusx1tx2tandx1txtx1txtx2tx2t
eeoeeo

2) Letx1t,x2tbe two even signals andx1t,x2tbe two odd signals. Then,


eeoo

ytx1tx2t=)ytx1tx2tx1tx2tyt
eeeeee

ztx1tx2t=)ztx1tx2tx1tx2tzt
oooooo

Thus the product of two even or odd signals is an even signal. Forvtx1tx1twe have
eo

vtx1tx1tx1tx1t x1tx1t vt
eoeoeo

Thus the product of an even and an odd signal is an odd signal.


2
3) One trivial example ist1 andt.
t1

Problem 2.12

1)x1ttt. The signaltis even so thatx1t2t

. . . . . . . . . . . . . . . . . .1

11
22

11
2)

8
>>>0
; t <1=2
>>>
>>>
1=4; t 1=2
>>>
>><
t1;1=2< t0
x2ttt
>>>t
1;0t <1=2
>>>
>>>
1=4; t1=2
>>>
>>:
0;1=2< t

..
1
. . . . . . . . .....4
....
11

22

P1
3)x3tt2n
n1

1
... ...

31 31

4)x4tsgntsgn1t. Note thatx401,x411

.2
.
.
.
.1
.
.
.
.
0

5)x5tsinctsgnt. Note thatx500.

12
1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
-3-2-10123 4
-4

Problem 2.13

1) The value of the expressionsincttcan be found by examining its eect on a functiont

through the integral

Z1Z1
tsinctt0sinc0sinc0tt
11

Thus sinctthas the same eect as the function sinc0tand we conclude that

x1tsincttsinc0tt

2) sinctt3sinc3t30.

3)

1
X
x3tt ?t2n
n1
1Z1
X
t2nd
n11
1Z1
X
t2nd
n11
1
X
t2n
n1
13
4)
Z1
x4tt ? 0tt0d
1
8
>>>0
t <1
>>>
>>>1
>>>2t 1
>>>
>>>11< t <0

<

1dt0t0t0
d0>>>
>>>
1 0< t <1
>>>
>>>1
>>>2t1
>>>
:0
1< t

5)x5tcos2t3t1cos2tt1cost. Hencex5t1t.
333336

6)

x6t5t ? 4t1t ?1t1t


5420

7)
Z1
sincttdtsinc01
1

8)
Z1
sinct1tdtsinc10
1

Problem 2.14

The impulse signal can be dened in terms of the limit


jtj
tlim1e
!02

tj
Butejis an even function for everyso thattis even. Sincetis even, we obtain

tt=)0t 0t

Thus, the function0tis odd. For the functionntwe have


Z1Z1
tntdt1ntntdt
11

where we have used the dierentiation chain rule

ddd
k1k1k
dttdttdtt1t

14
Thus, ifn2l(even)
Z1Z1
tntdttntdt
11

and the functionntis even. Ifn2l1 (odd), then1n 1 and

Z1 Z1
tntdttntdt
11

from which we conclude thatntis odd.

Problem 2.15

Z1
xt ? ntxnt d
1

The signalntis even ifnis even and odd ifnis odd. Consider rst the case thatn2l. Then,

Z1
d2ldn
xt ? 2ltx2lt d12lxxt
1d2ltdtn

Ifnis odd then,

Z1
d2l1
xt ? 2l1tx12l1t d112l1x
1d2l1t
dn

xt
dtn

In both cases
n
xt ? ntdxt
dtn

The convolution ofxtwithu1tis

Z1
xt ? u1txu1td
1

Butu1t0 for > tso that

Zt
xt ? u1txd
1

Problem 2.16
1) Nonlinear, since the response toxt0 is notyt0 (this is a necessary condition for linearity

of a system, see also problem 2.21).

2) Nonlinear, if we multiply the input by constant1, the output does not change. In a linear system

the output should be scaled by1.

15
3) Linear, the output to any input zero, therefore for the inputx1tx2tthe output is zero

which can be considered asy1ty2t000. This is a linear combination of the

corresponding outputs tox1tandx2t.

4) Nonlinear, the output toxt0 is not zero.

5) Nonlinear. The system is not homogeneous for if <0 andxt >0 thenytT xt0

whereasztT xt.

6) Linear. For ifxtx1tx2tthen

T x1tx2tx1tx2tet

x1tetx2tetT x1tT x2t

7) Linear. For ifxtx1tx2tthen

T x1tx2tx1tx2tut

x1tutx2tutT x1tT x2t

8) Linear. We can write the output of this feedback system as

1
X
ytxtyt1xtn
n0

Then forxtx1tx2t

1
X
ytx1tnx2tn
n0
11
XX
x1tnx2tn
n0n0
y1ty2t

9) Linear. Assuming that only a nite number of jumps occur in the interval1; tand that the

magnitude of these jumps is nite so that the algebraic sum is well dened, we obtain

NN
XX
ytT xtJxtnJxtnT xt
n1n1

whereNis the number of jumps in1; tandJxtnis the value of the jump at time instanttn,

that is

Jxtnlimxtnxtn
!0
Forxtx1tx2twe can assume thatx1t,x2tandxthave the same number of jumps

and at the same positions. This is true since we can always add new jumps of magnitude zero to the

already existing ones. Then for eachtn,JxtnJxtnJxtnand


12

NNN
XXX
ytJxtnJxtnJxtn
12
n1n1n1

so that the system is additive.

16
Problem 2.17

Only if (=))

If the systemTis linear then

Tx1tx2tTx1tTx2t

for all,andxts. If we set0, then

Tx1tTx1t

so that the system is homogeneous. If we let1, we obtain

Tx1tx2t Tx1t Tx2t

and thus the system is additive.

If ((=)

Suppose that both conditions 1) and 2) hold. Thus the system is homogeneous and additive. Then

Tx1tx2t

Tx1t Tx2t(additive system)

Tx1tTx2t(homogeneous system)

Thus the system is linear.

Problem 2.18

1. Neither homogeneous nor additive.

2. Neither homogeneous nor additive.

3. Homogeneous and additive.

4. Neither homogeneous nor additive.

5. Neither homogeneous nor additive.

6. Homogeneous but not additive.

7. Neither homogeneous nor additive.

8. Homogeneous and additive.

9. Homogeneous and additive.

17
10. Homogeneous and additive.

11. Homogeneous and additive.

12. Homogeneous and additive.

13. Homogeneous and additive.

14. Homogeneous and additive.

Problem 2.19

We rst prove that

TnxtnTxt

forn2 N. The proof is by induction onn. Forn2 the previous equation holds since the system

is additive. Let us assume that it is true fornand prove that it holds forn1.

Tn1xt

Tnxtxt

Tnxt Txt(additive property of the system)

nTxt Txt(hypothesis, equation holds forn)

n1Txt

ThusTnxtnTxtfor everyn. Now, let

xtmyt

This implies that

Txt Tyt
m

and sinceTxt TmytmTytwe obtain

Txt1Txt
mm

Thus, for an arbitrary rationalkwe have

Tkxt TkxtkTxtkTxt

Problem 2.20
Clearly, for any
88
222
><xt><xt
x0t00x0t0
0
ytT xtxtxtT xt
>:00>:00
xt0xt0

18
Thus the system is homogeneous and if it is additive then it is linear. However, ifxtx1tx2t

thenx0tx0tx0tand
12

x1tx2t2x2tx2t
12
x0tx0tx0tx0t
1212

for somex1t,x2t. To see this letx2tc(a constant signal). Then

tc2x2t2cx1tc2
T x1tx2tx11
x0tx0t
11

and
2
t
T x1tT x2tx1
x0t
1
ThusT x1tx2tT x1tT x2tunlessc0. Hence the system is nonlinear since the

additive property has to hold for everyx1tandx2t.

As another example of a system that is homogeneous but non linear is the system described by
8
><x
txt1 xtxt1 >0
T xt
>:0
otherwise

ClearlyT xtT xtbutT x1tx2tT x1tT x2t

Problem 2.21

Any zero input signal can be written as 0xtwithxtan arbitrary signal. Then, the response

of the linear system isyt L0xtand since the system is homogeneous (linear system) we

obtain

yt L0xt0 Lxt0

Thus the response of the linear system is identically zero.

Problem 2.22

For the system to be linear we must have

Tx1tx2tTx1tTx2t

for every,andxts.
Tx1tx2tx1tx2tcos2 f0t

x1tcos2 f0tx2tcos2 f0t

Tx1tTx2t

Thus the system is linear. In order for the system to be time-invariant the response toxtt0

should beytt0whereytis the response of the system toxt. Clearlyytt0xt

t0cos2 f0tt0and the response of the system toxtt0isy0txtt0cos2 f0t.

Sincecos2 f0tt0is not equal tocos2 f0tfor allt,t0we conclude thaty0tytt0

and thus the system is time-variant.

19
Problem 2.23

1) False. For ifT1xtx3tandT2xtx1=3tthen the cascade of the two systems is

the identity systemT xtxtwhich is known to be linear. However, bothT1andT2are

nonlinear.

2) False. For if
88
><t><1
xt t0xt t0
T1xtT2xtt
>:0>:0
t0t0

ThenT2T1xtxtand the system which is the cascade ofT1followed byT2is time-

invariant , whereas bothT1andT2are time variant.

3) False. Consider the system


8
><x
t t0
ytT xt
>:1
t <0

Then the output of the systemytdepends only on the inputxfortThis means that the

system is causal. However the response to a causal signal,xt0 fort0, is nonzero for negative

values oftand thus it is not causal.

Problem 2.24

1) Time invariant: The response toxtt0is 2xtt03 which isytt0.

2) Time varying the response toxtt0ist2xtt0butytt0tt02xtt0,

obviously the two are not equal.

3) Time-varying system. The responseytt0is equal toxtt0xtt0. However the

response of the system toxtt0isztxtt0which is not equal toytt0

4) Time-varying system. Clearly

ytxtu1t=)ytt0xtt0u1tt0

However, the response of the system toxtt0isztxtt0u1twhich is not equal to

ytt0

5) Time-invariant system. Clearly

ZtZt
t0
ytxd=)ytt0xd
11

The response of the system toxtt0is

ZtZt
t0
ztxt0dxvdvytt0
11

20
where we have used the change of variablevt0.

P1
6) Time-invariant system. Writingytasxtnwe get
n1

1
X
ytt0xtt0nT xtt0
n1

Problem 2.25

The dierentiator is a LTI system (see examples 2.19 and 2.1.21 in book). It is true that the output of

a system which is the cascade of two LTI systems does not depend on the order of the systems. This

can be easily seen by the commutative property of the convolution

h1t ? h2th2t ? h1t

Leth1tbe the impulse response of a dierentiator, and letytbe the output of the systemh2t

with inputxt. Then,

zth2t ? x0th2t ? h1t ? xt

h2t ? h1t ? xth1t ? h2t ? xt

h1t ? yty0t

Problem 2.26

The integrator is is a LTI system (why?). It is true that the output of a system which is the cascade

of two LTI systems does not depend on the order of the systems. This can be easily seen by the

commutative property of the convolution

h1t ? h2th2t ? h1t

Leth1tbe the impulse response of an integrator, and letytbe the output of the systemh2t

with inputxt. Then,

Zt
zth2t ?x dh2t ? h1t ? xt
1
h2t ? h1t ? xth1t ? h2t ? xt
Zt
h1t ? yty d
1

Problem 2.27
The output of a LTI system is the convolution of the input with the impulse response of the system.

Thus,
Z1Zt
thetu1tdhetd
11

21
Dierentiating both sides with respect totwe obtain

Zt"Zt#
0ttd
tehedehed
1dt1

tethtettht

Thus

htt0t

The response of the system to the inputxtis

Z1

ytxt0td
1
Z1Z1
xtdx0td
11

xtdxt
dt

Problem 2.28

For the system to be causal the output at the time instantt0should depend only onxtfortt0.

t0TZt0Zt0T
1Z11
yt0xdxdxd
2TtT2TtT2Tt
000

We observe that the second integral on the right side of the equation depends on values ofxfor

greater thant0. Thus the system is non causal.

Problem 2.29

Consider the system


8
><x
t xt0
ytT xt
>:1
xt0

This system is causal since the output at the time instanttdepends only on values ofxfort

(actually it depends only on the value ofxfort, a stronger condition.) However, the response

of the system to the impulse signaltis one fort <0 so that the impulse response of the system

is nonzero fort <0.


Problem 2.30

1. Noncausal: Since fort <0 we do not havesinct0.

22
2.This is a rectangular signal of width 6 centered att03, for negativets it is zero, therefore

the system is causal.

3. The system is causal since for negativetsht0.

Problem 2.31

The outputytof a LTI system with impulse responsehtand input signalu1tis


Z1ZtZ1
ythu1tdhu1tdhu1td
11t

Butu1t1 for < tso that


ZtZt
hu1tdhd
11

Similarly, sinceu1t0 for < twe obtain


Z1
hu1td0
t

Combining the previous integrals we have


Z1Zt
ythu1tdhd
11

Problem 2.32

Lethtdenote the the impulse response of a dierentiator. Then for every input signal

xt ? htdxt
dt

Ifxttthen the output of the dierentiator is its impulse response. Thus,

t ? htht0t

The output of the system to an arbitrary inputxtcan be found by convolvingxtwith0t. In

this caseZ1

ytxt ? 0tx0tddxt
1dt

Assume that the impulse response of a system which delays its input byt0isht. Then the

response to the inputtis

t ? httt0

However, for everyxt

t ? xtxt

so thathttt0. The output of the system to an arbitrary inputxtis


Z1
ytxt ? tt0xtt0dxtt0
1

23
Problem 2.33

The response of the system to the signalx1tx2tis

ZtZtZt
y1tx1x2dx1dx2d
tTtTtT

Thus the system is linear. The response toxtt0is

ZtZt
t0
y1txt0dxvdvytt0
tTtt0T

where we have used the change of variablesvt0. Thus the system is time invariant. The

impulse response is obtained by applying an impulse at the input.

ZtZtZt
T
htdddu1tu1tT
tT11

Problem 2.34

1)

Z1Zt
etu1t ? etu1teu1etu1tdetd
10
8
><tt
et >0

>:0
t <0

2)
1Zt1
Z1Z
22
xtt ?ttdtdvdv
11t1
22

t 3=)xt0
2
t1t1
22
3 1Z1139

)xtv1dvv2vt2t
2< t2=21228
1
0Zt1
2
11Z
)xtv1dvv1dv

2< t2=10
t
2
1
101t23
222
t
2vvt12vv04
2
11
13Z1139
)xtv1dvv2vt2t
2< t2=12t1228
t
22
3
)xt0
2< t=

24
Thus,
8
>>>0 3
t
>>>2
>>>1
393 1
>><2t2t< t
2822

xtt231< t1
422
>>>
>>>13913
>>>2t22t82< t2
>>:3
0< t
2

Problem 2.35

The output of a LTI system with impulse responsehtis


Z1Z1
ytxthdxhtd
11

Using the rst formula for the convolution and observing thath0; <0 we obtain
Z0Z1Z1
ytxthdxthdxthd
100

Using the second formula for the convolution and writing


ZtZ1
ytxhtdxhtd
1t

we obtain
Zt
ytxhtd
1
R1
The last is true sinceht0 fort < so thatxhtd0
t

Problem 2.36

In order for the signals ntto constitute an orthonormal set of signals in; T0the following

condition should be satised


8
ZT><1
0mn
h nt; mti nt tdtmn
m
>:0

mn

But
ZT
0nm
2t1j2t
h nt; mti1pejT0peT0dt
T0T0
T0
1Zj2nmt
eT0dt
T0
2nmt
IfnmthenejT01 so that
ZT
0T0

h nt; nti 1dt1t1


T0T0

25
Whennmthen,

j2 nmT0=T0

h nt; mti 1ex0


j2 nmj2 nm=T
0

Thus,h nt; ntiwhich proves that ntconstitute an orthonormal set of signals.


mn

Problem 2.37

1) Sinceab20 we have that


22
abab
22

with equality ifab. Let


1231
232
nn2
XX
25;425
A4i B
i
i1i1

Then substitutingi=Aforaandi=Bforbin the previous inequality we obtain

ii12i12i

AB2A22B2
A
with equality ifikorikifor alli. Summing both sides fromi1 tonwe obtain
iB

nn2n2
XiXiXi

i11

i1AB2i1A22i1B2

1nX21nX211
A2B21
2A2i2B2i2A22B2
i1i1

Thus,
1231
232
nnn2
XXX
1nX42
25
4
1)5i
ABiiiii
i1i1i1i1

Equality holds ifiki, fori1; : : : ; n.

2) The second equation is trivial sincejxiyj jxijjyj. To see this writexiandyiin polar
ii

coordinates asxixejxiandyiyejyi. Then,jxiyj jejxiyij


iiixiyi xiyi
jxijjyij jxijjyj. We turn now to prove the rst inequality. Letzibe any complex with real and
i
imaginary componentszi;Randzi;Irespectively. Then,

012012
n2nn2nn
XXXXX

@zA
zizi;Rjzi;I@zi;RAi;I

i1i1i1i1i1
nn
XX
zi;Rzm;Rzi;Izm;I
i1m1

26
Sincezi;Rzm;Izm;Rzi;I20 we obtain

zi;Rzm;Rzi;Izm;I2z2z2z2z2
i;Ri;Im;Rm;I

Using this inequality in the previous equation we get

n2nn
XXX

zizi;Rzm;Rzi;Izm;I

i1i1m1
nn
XX1
1

z2z22z2z22
i;Ri;Im;Rm;I
i1m1
0101012
nnn
X1X1X1
@z222A@z222A@z222A

i;Rzi;Im;Rzm;Ii;Rzi;I
i1m1i1

Thus

012
n2nnn
XX1XX

zi@z2z22Aorzijzij

i;Ri;I

i1i1i1i1
zm;R
The inequality now follows if we substitutezixiy. Equality is obtained ifzi;Rk1or
izzm
i;I;I

\zi\zm.

3) From 2) we obtain

n2n
XX

xiyjxijjyij
i

i1i1

Butjxij,jyijare real positive numbers so from 1)

1 231
232
nnn2
XXX
4j25
jxijjyij4jxij25yij
i1i1i1

Combining the two inequalities we get

1 231

232
n2nn2
XXX

4j25
xiy4jxij25yij

i1i1i1

From part 1) equality holds ifikiorjxij kjyijand from part 2)xiy jxiyjej. Therefore,
ii
the two conditions are8
><j
xij kjyij
>:\
xi\yi

which imply that for alli,xiKyifor some complex constantK.

4) The same procedure can be used to prove the Cauchy-Schwartz inequality for integrals. An easier

approach is obtained if one considers the inequality

jxtytj 0;for all

27
Then
Z1Z1
0jxtytj2dtxtytxtytdt
11
Z1Z1Z1Z1
jxtj2dtxtytdtxtytdt jaj2jytj2dt
1111
R1R1
The inequality is true forxtytdt0. Suppose thatxtytdt0 and set
11
R1
1jxtj2dt
R1

1xtytdt

Then,
Z1R1R1
jxtj2dt2jytj2dt
0jxtj2dt11R1
1jxtytdtj2
1

and

Z1Z11Z11
22

xtytdtjxtj2dtjytj2dt

111

Equality holds ifxt yta.e. for some complex.

Problem 2.38

1)

Z12
N
2Xt
xtidt

1
i1
01
Z10N1N
@xXiA@xXtAdt
titt

1jj
i1j1
Z1Z1Z1
NN
XX
jxtj2dtitxtdttxtdt
i
11j1j
i1j1
NNZ1
XX

iitjdt
j
i1j11
Z1Z1Z1
NNN
XXX
jxtj2dtjj2txtdttxtdt
iii
11j1j
i1i1j1

Completing the square in terms ofiwe obtain

Z1Z1Z1
N2N2

22XtXt
jxtjdtxtdtixtdt

11i1i
i1i1

The rst two terms are independent ofs and the last term is always positive. Therefore the

minimum is achieved forZ1

itxtdt
1i

28
which causes the last term to vanish.

2) With this choice ofis

Z1Z1
N2

22Xt
jxtjdtxtdt

11i
i1
Z1
N
X
jxtj2dtjj2
i
1
i1

Problem 2.39

1) Using Eulers relation we have

x1tcos2 tcos4 t

1
i2 tj2 tj4 tj4 t

2eeee

Therefore forn 1;2,x1;n1and for all other values ofn,x1;n0.


2
2) Using Eulers relation we have

x2tcos2 tcos4 t =3

1
i2 tj2 tj4 t =3j4 t =3

2eeee
1111
i2 tj2 tj2 =3j4 tj2 =3j4 t

2e2e2ee2ee

from this we conclude thatx2;11andx2;2x1ej2 =3, and for all other values ofn,
22;22
x2;n0.

3) We havex3t2cos2 tsin4 t2cos2 tcos4 t =2. Using Eulers relation as

in parts 1 and 2 we see thatx3;11 andx3;2xj, and for all other values ofn,x3;n0.
3;2
4) The signalx4tis periodic with periodT02. Thus

1Z1
1Zjn1
x4;nte22tdttej ntdt
2121
0Z1
1Zj1
t1e ntdtt1ej ntdt
2120

1j10j0
j ntj ntj nt
ee

2 nte2n212 n1

1j11j1
j ntj ntj nt
ee

2 nte2n202 n0
111
j nj n
2222ee221cos n
n2nn

Whenn0 then
1
1Z1
x4;0tdt
212

29
Thus
1
X1
x4t121cos ncos nt
22n2
n1

5) The signalx5tis periodic with periodT01. Forn0

Z1
1

x5;0t1dt1t2t1
0202

Forn0

Z1
x5;nt1ej2 ntdt
0

j11j1
j2 ntj2 ntj2 nt
ee
2 nte42n202 n0
j

2n

Thus,
1
X1
x5t1sin 2 nt
2n
n1

6) The signalx6tis real even and periodic with periodT01. Hence,x6;na8;n=2 or


2f0
1
Z
4f
0
x6;n2f0cos2 f0tcos2 n2f0tdt
1

4f
0
1Z1
Z
4f4f
00
f0cos2 f012ntdtf0cos2 f012ntdt
11

4f4f
00
114f114f
12nt0sin2 f012nt0
2 12nsin2 f014f2 12n14f
00

1n11

12n12n
Problem 2.40

It follows directly from the uniqueness of the decomposition of a real signal in an even and odd part.

Nevertheless for a real periodic signal

1
Xn
xta0ancos2tbnsin2nt
2T0T0
n1

30
The even part ofxtis

xetxtxt
2
0
11Xnn
@a
ancos2tcos2t

20T0T0
n1

bnsin2ntsin2nt
T0T0

a01Xn

cos2t
2anT0
n1

The last is true sincecosis even so thatcoscos2coswhereas the oddness ofsin

provides sinsinsinsin0.

The odd part ofxtis

xotxtxt
2
1
Xn
bnsin2t

n1T0

Problem 2.41

1) The signalytxtt0is periodic with periodTT0.


T0
1Zj2nt
ynxtt0eT0dt
T0
t0T0
1Zj2n
xveT0vt0dv
T0t
0
Zt
T0
2nt010j2nv
ejT0xveT0dv
T0t
0
2nt0
xnejT0

where we used the change of variablesvtt0


2) Forytto be periodic there must existTsuch thatytmT yt. ButytT

xtT ej2 f0tej2 f0Tso thatytis periodic ifTT0(the period ofxt) andf0Tkfor some

kinZ. In this case

T0
1Zj2nt
ynxteT0ej2 f0tdt
T0
T0
1Zj2nkt
xteT0dtxn
T0k

31
3) The signalytis periodic with periodTT0=.
T
0
TZjn
1Zjn2t
ynyte2TtdtxteT0dt
TT0
T0
1Zj2nv
xveT0dvxn

T0

where we used the change of variablesvt.

Problem 2.42

T0ZT01j2 n1j2 m
1Z1XTtXTt
xtytdtxne0ye0dt
T0T0m
n1m1
11ZT
XX10j2 nm
t

xnyeT0dt
m
n1m1T0
111
XXX
xnymnxny
mn
n1m1n1

Problem 2.43

a)The signal is periodic with periodT. Thus


TZT
1Ztn1n
xneej2Ttdtej2T1tdt
T0T0

1nT 1hji

ej2T1te2 nT 1
Tj2n10j2 nT
T
1Tj2 n
TT

1e
j2 nT1eT242n2
jbn
If we writexnanwe obtain the trigonometric Fourier series expansion coecients as
2
2T4 n
an1eT; bn1eT
T242n2T242n2
b)The signal is periodic with period 2T. Since the signal is odd we obtainx00. Forn0
TZT
1Zjn1tn
xnxte22Ttdtej22Ttdt
2TT2TTT
T
1Zjn
teTtdt

2T2T
!T
1jTnT2n
jtjt
TT
e
2T2 nte2n2T
"#
1jT2T2jT2T2
j nj nj nj n
eee

2T2 ne2n2 n2n2

j
n

n1

32
The trigonometric Fourier series expansion coecients are:

2
an0; bn1n1
n

c)The signal is periodic with periodT. Forn0


T
2
1Z3
x0xtdt
TT2
2

Ifn0 then
T
2n
1Zj
xnxte2Ttdt
TT
2
Z
T T
2n4n
1Zj1
e2Ttdtej2Ttdt
TTTT
24
TT

jn2jn4
j2tj2t
TT

2 neT2 neT
24
jhjnni
nj njj
22

2 neeee
1n1n

nsin22sinc2

Note thatxn0 forneven andx211l. The trigonometric Fourier series expansion


l1
2l1
coecients are:

2
a03; ; a20; ; a21l; ; bn0;8n
ll1
2l1

d)The signal is periodic with periodT. Forn0

T
1Z2
x0xtdt
T03

Ifn0 then
T
TZ3
1Zjn13n
xnxte2Ttdttej2Ttdt
T0T0T
2TZT
3nn
1Zj13
e2Ttdtt3ej2Ttdt
TTT2TT
33
!T
3jTnT2n3
j2tj2t
TT
e
T22 nte42n20
!T
3jTnT2n
j2tj2t
TT
e
T22 nte42n22T
3
2T

jn33jTnT
j2tj2t
TT

2 neTT2 ne2T
33
32 n
cos1
22n23

33
The trigonometric Fourier series expansion coecients are:

432 n
a0; ancos1; bn0;8n
32n23

e)The signal is periodic with periodT. Since the signal is oddx0a00. Forn0

Z
T T
24n
1Z1
xnxtdtej2Ttdt
TTTT
22
T T Z
4n2n
1Z41
j2tj2t
TT

edt
TTTtedtTT
44
!T
4jTnT2n4
j2tj2t
TT
e
T22 nte42n2T
4
TT

1jTn41jTn2
j2tj2t
TT

T2 neTT2 neT
24
" n#
j2 sinjn
n2n

n1 n n1sinc2

Forneven, sincn0 andxnj. The trigonometric Fourier series expansion coecients are:
2n
8
><1
n2l
an0;8n; bn l
>:221l
2l11 2l1 n2l1

f)The signal is periodic with periodT. Forn0


T
3
1Z
x0xtdt1
TT
3

Forn0
T
0Z3
1Z3n13n
xnt2ej2Ttdtt2ej2Ttdt
TTTT0T
3
!0
3jTnT2n
j2tj2t
TT
e

T22 nte42n2T
3
!T
3jTnT2n3
j2tj2t
TT
e
T22 nte42n20
T

2jTn02jTn3
j2tj2t
TT

T2 neTT2 ne0
3
312 n12 n

22cossin
n23 n3

The trigonometric Fourier series expansion coecients are:

a02; an231cos2 n1sin2 n; bn0;8n


22
n23 n3

34
Problem 2.44

1)Hf 10f. The system is bandlimited with bandwidthW2. Thus at the output of the
4
system only the frequencies in the band2;2will be present. The gain of the lter is 10 for allf

in2;2and 5 at the edgesf 2.

a)Since the period of the signal isT1 we obtain

yt10a0a1cos2 tb1sin2 t
2
5a2cos22tb2sin22t

With
24 n
an1e1; bn1e1
142n2142n2

we obtain

yt1e12020cos2 t40sin2 t
142142
1040
cos22tsin22t

11621162

b)Since the period of the signal is 2T2 andan0, for alln, we have

1
Xn
xtbnsin2t
n12

The frequenciesnshould satisfyjnj 2 orn4. Withbn1n12we obtain


22 n

yt20sin2 t20sin2 t
22
2023t10

3sin24sin22t

c)The period of the signal isT1 and

2
a03; ; a20; ; a21l; ; bn0;8n
ll1
2l1

Hence,
1
X
xt3a2cos2 2l1t
2l1
l0

At the output of the channel only the frequencies for which 2l12 will be present so that
yt103102cos2 t
2

35
d)Sincebn0 for alln, and the period of the signal isT1, we have

1
X
xta0ancos2 nt
2
n1

Witha04andan3cos2 n1we obtain


32n23

yt2030cos21cos2 t
323
154
cos1cos22t
423
204545
cos2 tcos22t
3282

e)Withan0 for alln,T1 and

8
><1
n2l
bn l
>:221l
2l11 2l1 n2l1

we obtain

yt10b1sin2 t5b2sin2 t2t

10212sin2 t51sin2 t2t

f)Similarly with the other cases we obtain

yt1010231cos21sin2cos2 t
2
233

5231cos41sin4cos22t
422323
"p#"p#

102033cos2 t1033cos22t
22
244
2) In general
1
Xnn
ytxnHej2Tt
n1T

The DC component of the input signal and all frequencies higher than 4 will be cut o.

36
a)For this signalT1 andxn1j2 n1e1. Thus,
142n2

1j22
yt1j21e1jej2 t1e1jej22t
1421424
1j231j24
1j23t1j24t

14291eje142161eje
1j21j22

1e1jej2 t1e1jej22t
1421424
1j231j24
1j23t1j24t

14291eje142161eje
4
X2
1e1sin2 nt2 ncos2 nt
n1142n2

b)WithT2 andxnj1nwe obtain


n

81
XjXj
yt1njej nt1njej nt
n1 nn8 n
81
X1nX1

ej nt1njej nt

n1 nn8 n

c)In this case


1
x20; x21l
ll1
2l1

Hence

1
yt1jej2 t1jej23t
3
11
1jej2 tjej23t

3
11

2sin2 t6sin23t

d)x02andxn3cos2 n1. Thus


32 n23
4
X3
ytcos2 n1jej2 nt
n12 n23
1
X3
cos2 n1jej2 nt
n42 n23

e)Withxnj1nsincnwe obtain
n2

41
X1X1
yt1nsincn1nsincn
n1 n2n4 n2

37
f)Working similarly with the other cases we obtain

4
X3
yt1cos2 n1sin2 njej2 nt
22
n1n23 n3
1
X3
12 n12 n
j2 nt

22cossinje
n4n23 n3

Problem 2.45

Using Parsevals relation (Equation 2.2.38), we see that the power in the periodic signal is given by
P1
n1jxnj2. Since the signal has nite power

T0
1Z2
jxtjdtK <1
T0
P1
Thus,jxnj2K <1. The last implies thatjxnj !0 asn! 1. To see this write
n1

1MM1
XXXX
jxnj2jxnj2jxnj2jxnj2
n1n1
nMnM

Each of the previous terms is positive and bounded byK. Assume thatjxnj2does not converge to

zero asngoes to innity and choose1. Then there exists a subsequence ofxn,xn, such that
k

jxnj> 1;fornk> NM
k

Then
11
XXX
jxnj2jxnj2jxnj2 1
k
nMnNnk
P1
This contradicts our assumption thatjxnj2is nite. Thusjxnj, and consequentlyxn, should
nM
converge to zero asn! 1.

Problem 2.46

1) Using the Fourier transform pair

F221
ejtj-!
2 222
2 f42
42f

and the duality property of the Fourier transform:Xf Fxt)xf FXtwe obtain
23

21
F425ejfj
422
42t

With2we get the desired result

F1 e2jfj
1t2

38
2)

Fxt Ft3t3

sincf ej2 f3sincf ej2 f3

2sincf cos23f

3)Ft=44sinc4f , henceF4t=416sinc4f . Using modulation property of FT we

haveF4t=4cos2 f0t8 sinc4ff08 sinc4ff0.

4)

Ftsinct1Fsin tjf1f1
222

The same result is obtain if we recognize that multiplication bytresults in dierentiation in the

frequency domain. Thus

Ftsincjdf jf1f1
2df222

5)

1
Ftcos2 f0tjd1ff0ff0
2df22
j
00
ff0
4ff0

Problem 2.47

x1t xtxtcos2000 txt1cos6000 torx1txtcos2000 txtcos6000 t.

Using modulation property, we haveX1f 1Xf10001Xf10001Xf30001Xf


2222
3000. The plot is given below:

10003000
39
Problem 2.48

Z1
F1t1t11t1t1ej2 f tdt
2221222
1
j fj f

2eecos f

Using the duality property of the Fourier transform:

Xf Fxt=)xf FXt

we obtain

Fcos t Fcos t1f1f1


222

Note that sin tcos t. Thus


2

Fsin t Fcos t11f1f1ej f


2222
111111
jj
22

2ef22ef2
j1j1

2f22f2

Problem 2.49

a) We can writextasxt2t2t. Then


42

Fxt F2t F2t8sinc4f 4sinc22f


42

b)

xt2tt=) Fxt8sinc4f sinc2f


4

c)
Z1Z0Z1
Xfxtej2 f tdtt1ej2 f tdtt1ej2 f tdt
110
!0
j1j0
ej2 f tej2 f t

2 ft42f212 f1
!1
j1j1
ej2 f tej2 f t
2 ft42f202 f0

f1sin f

d) We can writextasxtt1t1. Thus

Xf sinc2f ej2 fsinc2f ej2 f2jsinc2f sin2 f

40
e) We can writextasxtt1tt1. Hence,

Xf sinc2f 1ej2 fej2 fsinc2f 12 cos2 f

f) We can writextas

" ! !#

xt2f0t12f0t1sin2 f0t
4f04f0

Then
" ! !#
21f1fj21f
Xf1sincfej4f0since4f0
2f02f02f02f0

?jff0ff0
2
!!!!
1ff0ff01ff0ff0
sincsinsincsin

2f02f02f02f02f02f0

Problem 2.50

(Convolution theorem:)

Fxt ? yt FxtFytXf Y f

Thus

sinct ?sinct F1Fsinct ?sinct

F1Fsinct Fsinct

F1f f F1f

sinct

Problem 2.51

Z1
Fxtytxtytej2 f tdt
1
Z1Z1
Xej2 tdytej2 f tdt
11
Z1Z1
Xytej2 ftdtd
11
Z1
XY fdXf ? Y f
1

41
Problem 2.52

1) Clearly

11
XX
x1tkT0xtkT0nT0xtnkT0
n1n1
1
X
xtmT0x1t
m1

where we used the change of variablemnk.

2)
1
X
x1txt ?tnT0
n1

This is because

Z1Z1
111
XXX
xtnT0dxtnT0dxtnT0
11
n1n1n1

3)

11
XX
Fx1t Fxt ?tnT0 FxtFtnT0
n1n1
11
XnXn
Xf 1f1Xfn
T0T0T0T0T0
n1n1

Problem 2.53

1) By Parsevals theorem

Z1Z1Z1
sinc5tdtsinc3tsinc2tdtf T f df
111

where

T f Fsinc3t Fsinc2tsinctf ?f

But
1Zf1
Z1Z
22
f ?ffdfdvdv
11f1
22
42
Forf 3=)T f 0
2
Zf11
2f2
39
For3< f 1=)T fv1dv1v2v1f2f
22121228
Z0Zf1
2
For1< f1=)T fv1dvv1dv
22f10
2
1
101f23
222

f
2vvf12vv04
2
Z1
1

39
For1< f3=v1dv1v2v1f2f
22)T ff12f1228
22

For3< f=)T f 0
2
Thus,
8
>>>0 3
f
>>>2
>>>1
393 1
>><2f2f< f
2822

T ff231< f1
422
>>>
>>>13913
>>>2f22f82< f2
>>:3
0< f
2
Hence,
Z0
1
Z1Z
2
393
f T f df1f2ff1dff2f1df
1122814
2
Z1
1
Z
2
3139

f2f1dff2ff1df
041228
2
41
64

2)
Z1Z1
etsinctdtetu1tsinctdt
01
1
Z1Z
121
f dfdf

1j2 f1j2 f
2
1 1=21j1
1

j2lnj2 f1=2j2lnjtan

3)
Z1Z1
etcostdtetu1tcostdt
01
1
1Z1

21j2 ff2f2dt
111

2jj22

43
Problem 2.54

Using the convolution theorem we obtain

Y f Xf Hf 11
j2 fj2 f
1111

j2 fj2 f

Thus

yt F1Y f 1etetu1t

IfthenXf Hf 1. In this case


j2 f

1
yt F1Y f F12tetu1t
j2 f

The signal is of the energy-type with energy content

T ZT
Z
22
Eylimjytj2dtlim1etet2dt
T!1TT!102
2
"T#
=2T =2T =2

12
lim11e2te2tet
T!1220200

11121

2
222

Problem 2.55

8
><x
t t < T0
xt
>:0
otherwise

Thus
Z1ZT
0
Xfxtej2 f tdtxtej2 f tdt
1

EvaluatingXf forfnwe obtain


T0

ZT
0n
2t
XnxtejT0dtT0xn
T0

wherexnare the coecients in the Fourier series expansion ofxt. ThusXnis independent of
T0
the choice of.

44
Problem 2.56

111
XX1Xjn
t
xtnTsxt ?tnTsxt ?e2Ts
n1n1Tsn1
" 1#
1Xn
F1Xff
TsTs
n1
"1#

1Xnn
F1Xf

TsTsTs
n1

11Xnjn
t
Xe2Ts
TsTs
n1

If we sett0 in the previous relation we obtain Poissons sum formula

111
XX1Xn
xnTsxmTsX
n1m1Tsn1Ts

Problem 2.57

1) We know that
F2
ejtj-!
222
4f

Applying Poissons sum formula withTs1 we obtain

11
XX2

ejnj
222
n1n14n

2) Use the Fourier transform pairt!sincf in the Poissons sum formula withTsK. Then

11
X1Xn
nKsinc
n1Kn1K

ButnK1 forn0 andnK0 forjnj 1 andK2 f1;2; : : :g. Thus the left side of the
previous relation reduces to 1 and
1
Xn
Ksinc
n1K

3) Use the Fourier transform pairt!sinc2f in the Poissons sum formula withTsK. Then

11
X1X2
nKsincn
n1Kn1K
P1
Reasoning as before we see thatnK1 since forK2 f1;2; : : :g
n1
8
><1
n0
nK
>:0
otherwise

P1
Thus,Ksinc2n
n1
K

45
Problem 2.58

LetHf be the Fourier transform ofht. Then

Hf Fetu1t Ft=)Hf 11=)Hf j2 f


j2 f

The response of the system toetcostu1tis


hi
yt F1Hf Fetcostu1t

But

1
Fetcostu1t F1etu1tejtetu1tejt
22
23
111
45

2
j2 fj2 f
22

so that23
11
5
Y f Fytj2 f4
2
j2 fj2 f
22

Using the linearity property of the Fourier transform, the Convolution theorem and the fact that
0F
t-!j2 fwe obtain

ytetcostu1tetcostu1t ? 0t

etcosttetsintu1t

tetsintu1t

Problem 2.59

1) Using the result of Problem 2.50 we have sinct ?sinctsinct.

2)

ytxt ? htxt ? t0t

xtdxt
dt

Withxtejtjwe obtainytejtjejtjsgnt.

3)
Z1
ythxtd
1
ZtZt
eetdeted

00

46
If)yttetu1t

1t1hti
)ytetetu1teetu1t

Problem 2.60

Let the response of the LTI system behtwith Fourier transformHf . Then, from the convolution

theorem we obtain

Y f Hf Xf =)f f Hf

However, this relation cannot hold sincef 0 for1<jfjwhereasf 0 for 1<jfj 1=2.
2

Problem 2.61

1) No. The inputthas a spectrum with zeros at frequenciesfk, (k0,k2 Z) and the

information about the spectrum of the system at those frequencies will not be present at the output.

The spectrum of the signalcos2 tconsists of two impulses atf 1 but we do not know the

response of the system at these frequencies.

2)

h1t ?tt ?tt

h2t ?ttcos2 t ?t
hi
t1F1f1sinc2f f1sinc2f
2
hi
t1F1f1sinc21f1sinc21
2
t

Thus both signals are candidates for the impulse response of the system.

3)Fu1t1f 1. Thus the system has a nonzero spectrum for everyfand all the
2j2 f
frequencies of the system will be excited by this input.Featu1t1. Again the spectrum
aj2 f
is nonzero for allfand the response to this signal uniquely determines the system. In general the

spectrum of the input must not vanish at any frequency. In this case the inuence of the system will

be present at the output for every frequency.


47
Problem 2.62

"#
2 f1j2 f
F\Asin2 f0t jsgnf A1ff0ej2f0ff0e2f0
2j2j

Aj2 fj2 f
ff0e2f0sgnf0ff0e2f0
2sgnf0

Aj2 fj2 f
e2f0ff0e2f0
2ff0
AFcos2 f0t

Thus,\Asin2 f0t Acos2 f0t

Problem 2.63

Taking the Fourier transform of\ej2 f0twe obtain

F\ej2 f0t jsgnf ff0 jsgnf0ff0

Thus,
\1j2 f0t
ej2 f0t Fjsgnf0ff0 jsgnf0e

Problem 2.64

23
\
d
F4xt5 F\xt ? 0t jsgnf Fxt ? 0t
dt

jsgnf j2 f Xf 2 fsgnf Xf

2jfjXf

Problem 2.65

We need to prove that[x0txt0.

F[x0t F\xt ? 0t jsgnf Fxt ? 0t jsgnf Xf j2 f

Fxtj2 f Fxt0
Taking the inverse Fourier transform of both sides of the previous relation we obtain, [0txt0
x

48
Problem 2.66

1) The spectrum of the output signalytis the product ofXf andHf . Thus,

ff00f j
Y f Hf Xf Xf Af0ejf0ff0
ytis a narrowband signal centered at frequenciesf f0. To obtain the lowpass equivalent

signal we have to shift the spectrum (positive band) ofytto the right byf0. Hence,
f 0f jjf0f 0f j
Ylf uff0Xff0Af0ejf0ff0Xlf Af0eff0
2) Taking the inverse Fourier transform of the previous relation, we obtain
h 0i
ylt F1Xlf Af0ejf0ejff jff0
Af0xlt10f j
2ff0
WithytReyltej2 f0tandxltVxtejxtwe get

ytReyltej2 f0t

ReAf0xlt10f jejf0ej2 f0t


2ff0

t10f j
ReAf0Vxt10f jej2 f0tejx2ff0
2ff0
Af0Vxttgcos2 f0tf0xt10f j
2ff0
Af0Vxttgcos2 f0tf0xt10f j
2 f02ff0
Af0Vxttgcos2 f0ttpxt10f j
2ff0
where
1 1f0 1f
tg0f j; tp
2ff02f02 fff
0

3)tgcan be considered as a time lag of the envelope of the signal, whereastpis the time

corresponding to a phase delay of1f0.


2f0

Problem 2.67

1) We can writeHf as follows

8
>>>cos
jsin f >0
><
Hf0f0cosjsgnf sin
>>>
>:
cosjsin f <0

Thus,

ht F1Hf cost1sin
t

49
2)

xtxt ? htxt ? cost1sin


t

cosxt ? tsin1? xt
t
cosxtsinxt

3)
Z1Z1
jxtj2dtjcosxtsinxtj2dt
11
Z1Z1
cos2jxtj2dtsin2jxtj2dt
11
Z1Z1
cossinxtxtdtcossinxtxtdt
11
R1R1R1
Butjxtj2dtjxtj2dtExandxtxtdt0 sincextandxtare orthogonal.
111
Thus,

ExExcos2sin2Ex

Computer Problems

Computer Problem 2.1

1) To derive the Fourier series coecients in the expansion ofxt, we have

1
1Zj
xne2 nt=4dt
41
1hji
2 n=4j2 n=4

2j nee(2.1)
1n

2sinc2(2.2)

where sincxis dened as

sincxsin x(2.3)
x

2) Obviously, all thexns are real (sincextis real and even), so


8
>>>an
nsinc
>>>2
>>>
<b0
n

>>>n (2.4)
>>>cnsinc

2
>>>
:0
n;

50
1.2
n=1
n=3
n=9
n=7
1
x(t)
n=5

0.8

0.6
n=0
x(t)
0.4

0.2

-0.2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

bura
Figure 2.1: Various Fourier series approximations for the rectangular pulse

Note that for evenns,xn0 (with the exception ofn0, wherea0c01 andx01. Using
2
these coecients, we have

1
X1
xtsincnej2 nt=4
n122

11Xnn

2sinc2cos2 t4(2.5)
n1

A plot of the Fourier series approximations to this signal over one period forn0;1;3;5;7;9 is

shown in Figure 2.1.

3) Note thatxnis always real. Therefore, depending on its sign, the phase is either zero or. The

magnitude of thexns is1sincn:The discrete and phase spectrum are shown in Figure 2.2.
22

Computer Problem 2.2

51
0.5

0.45

0.4

0.35

0.3

0.25
x(n)

0.2

0.15

0.1

0.05

0
-20-15-10-505101520
n
3.5

2.5

\x(n)
1.5

0.5

0
-20-15-10-505101520
n

Figure 2.2: The discrete and phase spectrum of the signal

52
0.5

0.45

0.4

0.35

0.3

n
0.25
x

0.2

0.15

0.1

0.05

0
-10-50510
n

Figure 2.3: The discrete spectrum of the signal

1) We have

T0=2
1Zj
xnxte2 nt=T0dt(2.6)
T0T=2
0
1
1Zj
te ntdt(2.7)
21
1
1Zj
te ntdt(2.8)
21
1
(2.9)

2Ftfn=2
1n
2

2sinc2(2.10)
(2.11)

where we have used the facts thattvanishes outside the1;1interval and that the Fourier

transform oftissinc2f . This result can also be obtained by using the expression fortand

integrating by parts. Obviously, we havexn0 for all even values ofnexcept forn0.
2) A plot of the discrete spectrum ofxtis presented in Figure 2.3

3) A plot of the discrete spectrumfyngis presented in Figure 2.4

The MATLAB script for this problem is given next.

% MATLAB script for Computer Problem 2.2.


echo on
n=[20:1:20];

53
0.5

0.45

0.4

0.35

0.3

n
0.25
y

0.2

0.15

0.1

0.05

0
-20-15-10-505101520
n

Figure 2.4: The discrete spectrum of the signal

% Fourier series coecients of x(t) vector


x=.5*(sinc(n/2)).^2;
% sampling interval
ts=1/40;
% time vector
t=[.5:ts:1.5];
% impulse response10
fs=1/ts;
h=[zeros(1,20),t(21:61),zeros(1,20)];
% transfer function
H=t(h)/fs;
% frequency resolution
df=fs/80;
f=[0:df:fs]fs/2;
% rearrange H
H1=tshift(H);
y=x.*H1(21:61);20
% Plotting commands follow.

Computer Problem 2.3

The common magnitude spectrum is presented in Figure 2.5. The two phase spectrum of the two

signals plotted on the same axes are given in Figure 2.6.

54
1.6

1.4

1.2

0.8

magnitude
0.6

0.4

0.2

0
-505
f

Figure 2.5: The common magnitude spectrum of the signalsx1tandx2t

4
X(f)
1
X(f)
3
2

-1
phase in radians

-2

-3

-4
-0.1-0.0500.050.10.15
f
Figure 2.6: The phase spectrum of the signalsx1tandx2t

55
The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 2.3.


df=0.01;
fs=10;
ts=1/fs;
t=[5:ts:5];
x1=zeros(size(t));
x1(41:51)=t(41:51)+1;
x1(52:61)=ones(size(x1(52:61)));
x2=zeros(size(t));
x2(51:71)=x1(41:61);10
[X1,x11,df1]=tseq(x1,ts,df);
[X2,x21,df2]=tseq(x2,ts,df);
X11=X1/fs;
X21=X2/fs;
f=[0:df1:df1*(length(x11)1)]fs/2;
plot(f,tshift(abs(X11)))
gure
plot(f(500:525),tshift(angle(X11(500:525))),f(500:525),tshift(angle(X21(500:525))),--)

Computer Problem 2.4

The Fourier transform of the signalxtis

1
1j2 f

Figures 2.7 and 2.8 present the magnitude and phase spectrum of the input signalxt.

2) The fourier transform of the output signalytis

8
><1
jfj 1:5
yf1j2 f
>:0
otherwise

The magnitude and phase spectrum ofytis given in Figures 2.9 and 2.10, respectively.

3) The inverse Fourier transform of the output signal is parented in Figure 2.11

The MATLAB script for this problem is given next

% MATLAB script for Computer Problem 2.4.


df= 0.01;
f=4:df:4;
xf= 1./(1+2*pi*i*f);
plot(f,abs(xf));
gure;
plot(f,angle(xf));
indH=nd(abs(f)<= 1.5);
Hf=zeros(1,length(xf));
Hf(indH) =cos(pi*f(indH)./3);10
yf=xf.*Hf;
gure;

56
16

14

12

10

8
|x(f )|

0
-4-3-2-101234
f

Figure 2.7: Magnitude spectrum ofxt

plot(f,abs(yf));
axis([1.5 1.5 0 16]);
gure;
plot(f,angle(yf));

yf(401) = 10^30;
yt=it(yf,symmetric);
gure;20
plot(yt)

Computer Problem 2.5

Choosing the sampling interval to bets0:001 s, we have a sampling frequency offs1=ts1000

Hz. Choosing a desired frequency resolution ofdf0:5 Hz, we have the following.

1) Plots of the signal and its magnitude spectrum are given in Figures 2.12 and 2.13, respectively.

Plots are generated by Matlab.

2) Choosingf0200 Hz, we nd the lowpass equivalent toxtby using the loweq.m function.

Then using tseq.m, we obtain its spectrum; we plot its magnitude spectrum in Figure 2.14. The

MATLAb functions loweq.m and tseq.m are given next.


57
2

1.5

0.5

0
\x(f )

-0.5

-1

-1.5

-2
-4-3-2-101234
f

Figure 2.8: Phase spectrum ofxt

function[M,m,df]=tseq(m,ts,df)
% [M,m,df]=tseq(m,ts,df)
% [M,m,df]=tseq(m,ts)
%FFTSEQ generates M, the FFT of the sequence m.
% The sequence is zero-padded to meet the required frequency resolution df.
% ts is the sampling interval. The output df is the nal frequency resolution.
% Output m is the zero-padded version of input m. M is the FFT.
fs=1/ts;
if nargin ==2
n1=0;10
else
n1=fs/df;
end
n2=length(m);
n=2^(max(nextpow2(n1),nextpow2(n2)));
M=t(m,n);
m=[m,zeros(1,nn2)];
df=fs/n;

function xl=loweq(x,ts,f0)
% xl=loweq(x,ts,f0)
%LOWEQ returns the lowpass equivalent of the signal x
% f0 is the center frequency.
% ts is the sampling interval.

58
16

14

12

10

8
|y(f )|

0
-1.5-1-0.500.511.5
f

Figure 2.9: Magnitude spectrum ofyt

%
t=[0:ts:ts*(length(x)1)];
z=hilbert(x);
xl=z.*exp(j*2*pi*f0*t);

It is seen that the magnitude spectrum is an even function in this case because we can write

xtResinc100tej400 t(2.12)

Comparing this to

xtRexltej2f0t(2.13)

we conclude that

xltsinc100t(2.14)

which means that the lowpass equivalent signal is a real signal in this case. This, in turn, means that

xctxltandxst0. Also, we conclude that


8
>>>V
t jxctj
><8
><0
; xct0(2.15)
>>>
>:>:
; xct <0

Plots ofxctandV tare given in Figures 2.15 and 2.16, respectively. Note that choosingf0to be

the frequency with respect to whichXf is symmetric result in these gures.

59
2

1.5

0.5

0
\y(f )

-0.5

-1

-1.5

-2
-4-3-2-101234
f

Figure 2.10: Phase spectrum ofyt

Computer Problem 2.6

The Remez algorithm requires that we specify the length of the FIR lterM, the passband edge

frequencyfp, the stopband edge frequencyfs, and the ratio2=1. Here,1and2denote passband

and stopband ripples, respectively. The lter lengthMcan be approximated using

p
M20 log1012131
14:6f

wherefis the transition bandwidthffsfp

1) Figure 2.17 shows the impulse response coecients of the FIR lter.

2) Figures 2.18 and 2.19 show the magnitude and phase of the frequency response of the lter,

respectively.

The MATLAB script for this problem is given next

% MATLAB script for Computer Problem 2.6.


fp= 0.4;
fs= 0.5;
df=fsfp;
Rp= 0.5;
As= 40;

60
27
x 10
2.5

1.5

0.5

-0.5

-1

-1.5

-2

-2.5
0100200300400500600700800900

(f )
Figure 2.11: Inverse Fourier transform

0.8

0.6

0.4

0.2

x(t)
0

-0.2

-0.4

-0.6

-0.8
-2-1.5-1-0.500.511.52
time

Figure 2.12: The signalxt

61
-3
x 10
6

3
|X(f)|

0
-5000500
frequency

Figure 2.13: The magnitude spectrum ofxt

0.012

0.01

0.008

0.006
|Xl(f)|

0.004

0.002

0
-5000500
frequency

Figure 2.14: The magnitude spectrum ofxlt

62
1

0.8

0.6

0.4

xc(t)
0.2

-0.2

-0.4
-2-1.5-1-0.500.511.52
time

Figure 2.15: The signalxCt

0.9

0.8

0.7

0.6

0.5
V(t)

0.4

0.3

0.2

0.1

0
-2-1.5-1-0.500.511.52
time

Figure 2.16: The signalV t

63
0.6

0.5

0.4

0.3

h(n)

0.2

0.1

-0.1
0510152025303540
n

Figure 2.17: Impulse response coecients of the FIR lter

delta1=(10^(Rp/20)1)/(10^(Rp/20)+1);
delta2=(1+delta1)*(10^(As/20));
%Calculate approximate lter length
Mhat=ceil((20*log10(sqrt(delta1*delta2))13)/(14.6*df)+1);10
f=[0fp fs1];
m=[1 1 0 0];
w=[delta2/delta11];
h=remez(Mhat+20,f,m,w);
[H,W]=freqz(h,[1],3000);
db= 20*log10(abs(H));
% plot results
stem(h);
gure;
plot(W/pi,db)20
gure;
plot(W/pi,angle(H));

Computer Problem 2.7

1) The impulse response coecients of the lter is presented in Figure 2.20.

2) The magnitude of the frequency response of the lter is given in Figure 2.21.

64
20

-20

-40

-60
|H|in decibels

-80

-100

-120

-140

-160
00.20.40.60.81
w/

Figure 2.18: Magnitude of the frequency response of the FIR lter

The MATLAB script for this problem is given next

% MATLAB script for Computer Problem 2.7.


f=[0 0.01 0.1 0.5 0.6 1];
m=[0 0 1 1 0 0];
delta1= 0.01;
delta2= 0.01;
df= 0.10.01;
Mhat=ceil((20*log10(sqrt(delta1*delta2))13)/(14.6*df)+1);
w=[1delta2/delta11];
h=remez(Mhat+20,f,m,w,hilbert);
10
[H,W]=freqz(h,[1],3000);
db= 20*log10(abs(H));
% plot results
stem(h);
gure;
plot(W/pi,db)
gure;
plot(W/pi,angle(H));

20

65
4

\H
0

-1

-2

-3

-4
00.20.40.60.81
w/

Figure 2.19: Phase of the frequency response of the FIR lter

Computer Problem 2.8

1) The impulse response of the lter is given in Figure 2.22.

2) The magnitude of the frequency response of the lter is presented in Figure 2.23.

3) The lter outputynandxnare presented in Figure 2.24. It should be noted thatynis the

derivative ofxn.
66
0.4

0.3

0.2

0.1

0
h(n)

-0.1

-0.2

-0.3

-0.4
051015202530354045
n

Figure 2.20: The impulse response coecients of the lter

67
20

-20

-40

|H|
-60

-80

-100

-120
00.20.40.60.81
w/

Figure 2.21: The magnitude of the frequency response of the lter

68
0.5

0.4

0.3

0.2

0.1

0
|h(n)|
-0.1

-0.2

-0.3

-0.4

-0.5
051015202530
n

Figure 2.22: Impulse response of the lter

69
10

-10

-20

-30

|H|indecibels

-40

-50

-60
00.20.40.60.81
w/

Figure 2.23: Magnitude of the frequency response of the lter

70
6
y(n)
x(n)

-2

-4

-6
020406080100
n

Figure 2.24: Signalsxnandyn

71
Chapter 3

Problem 3.1

The modulated signal is

utmtctAmtcos24103t

A2 cos2200t4 sin2250tcos24103t
3
200200
Acos2 4103tAcos2 4103t

250250
2Asin2 4103t2Asin2 4103t
33

Taking the Fourier transform of the previous relation, we obtain


"#

Uf Af200f2002ej3f2502ej3f250
jj

?1f4103f4103
2
A200200
33

2f410f410

250250
2ej6f41032ej6f4103

200200
f4103f4103

250250
2ej6f41032ej6f4103

The next gure depicts the magnitude and the phase of the spectrumUf .
. . . . . . . . . . . . . . . . . . . . . .|U (f )|
A

. . . . . . . . . . . . . . . . . . . . . . .A/2

fc250fc200fc+200fc+250fc250fc200fc+200fc+250

\U (f )

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

To nd the power content of the modulated signal we writeu2tas

200200
u2tA2cos22 4103tA2cos22 4103t

250250
4A2sin22 4103t4A2sin22 4103t
33
terms of cosine and sine functions in the rst power

72
Hence,
T
Z2
22 4A24A2
Plimu2tdtAA5A2
T!1T2222
2

Problem 3.2

utmtctAsinctsinc2tcos2 fct

Taking the Fourier transform of both sides, we obtain

Uf Af f ?ffcffc
2
A
ffcffcffc

2ffc

ffc0 forjffcj<1, whereasffc0 forjffcj<1. Hence, the bandwidth of the


2
bandpass lter is 2.

Problem 3.3

The following gure shows the modulated signals forA1 andf010. As it is observed

both signals have the same envelope but there is a phase reversal att1 for the second signal

Am2tcos2 f0t(right plot). This discontinuity is shown clearly in the next gure where we

plottedAm2tcos2 f0twithf03.

0.8

0.6

0.4

0.2

-0.2

-0.4
-0.6

-0.8

-1
0
0.20.40.60.811.21.41.61.8 2

73
1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0
0.20.40.60.811.21.41.61.8 2

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0.20.40.60.811.21.41.61.8 2
0
Problem 3.4

ytxt1x2t
2

mtcos2 fct1m2tcos22 fct2mtcos2 fct


2

mtcos2 fct1m2t11cos22fctmtcos2 fct


244

74
Taking the Fourier transform of the previous, we obtain

Y f Mf 1Mf ? Mf 1MffcMffc
22
1 11
ffcf2fcf2fc
4f2ffc8

The next gure depicts the spectrumY f

1/2

1/4
1/8

-2fc -fc -2W 2W fc 2fc

Problem 3.5

utmtct

1002 cos22000t5 cos23000tcos2 fct

Thus,

Uf 100f2000f20005f3000f3000
22
?f50000f50000

50f52000f480005f530005f47000
22

f52000f480005f530005f47000
22

A plot of the spectrum of the modulated signal is given in the next gure
........................
125

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

0-53 -52 -48 -47 47 48 52 53 KHz

Problem 3.6

The mixed signalytis given by

ytutxLtAmtcos2 fctcos2 fct


A
tcos

2mtcos22fc

75
The lowpass lter will cut-o the frequencies aboveW, whereWis the bandwidth of the message

signalmt. Thus, the output of the lowpass lter is

ztAmtcos
2
2
If the power ofmtisPM, then the power of the output signalztisPoutPMAcos2. The
4
2
power of the modulated signalutAmtcos2 fctisPUAPM. Hence,
2

Pout1
2

PU2cos

A plot ofPoutfor 0is given in the next gure.


PU

0.5

0.45

0.4

0.35

0.3

0.25

0.2

0.15

0.1

0.05

0
00.511.522.53 3.5

Theta (rad)

Problem 3.7

1)The spectrum ofutis

Uf 20ffcffc
2
2
1500ffc1500
4ffc
ffc1500ffc1500
10
3000ffc3000
4ffc
ffc3000ffc3000

The next gure depicts the spectrum ofut.

76
......................................
10

............................1/2

. . . . . . . . . . . . . . . . . . . . . . .5/2

-1030-1015-1000 -985 -970 970 9851000 10301015


0
X 100 Hz

2)The square of the modulated signal is

u2t400 cos22 fctcos22 fc1500tcos22 fc1500t

25 cos22 fc3000t25 cos22 fc3000t

terms that are multiples of cosines

If we integrateu2tfromTtoT, normalize the integral by1and take the limit asT! 1, then
22T
all the terms involving cosines tend to zero, whereas the squares of the cosines give a value of1.
2
Hence, the power content at the frequencyfc105Hz isPf400200, the power content at
c2
the frequencyPfis the same as the power content at the frequencyPfand equal to1,
c1500c15002
whereasPfPf25.
c3000c30002

3)

ut202 cos21500t10 cos23000tcos2 fct

2011cos21500t1cos23000tcos2 fct
102

This is the form of a conventional AM signal with message signal

mt1cos21500t1cos23000t
102

cos221500t1cos21500t1
102

The minimum ofgzz21z1is achieved forz 1and it ismingz 201. Since


10220400
z 1is in the range ofcos21500t, we conclude that the minimum value ofmtis201.
20400
Hence, the modulation index is
201

400

4)
ut20 cos2 fctcos2 fc1500tcos2 fc1500t

5 cos2 fc3000t5 cos2 fc3000t

The power in the sidebands is

112525
Psidebands26
2222

77
The total power isPtotalPcarrierPsidebands20026226. The ratio of the sidebands power to

the total power is


Psidebands26

Ptotal226

Problem 3.8

1)

utmtct

100cos21000t2 cos22000tcos2 fct

100 cos21000tcos2 fct200 cos22000tcos2 fct


100
1000tcos2 fc1000t

2cos2 fc
200
2000tcos2 fc2000t
2cos2 fc

Thus, the upper sideband (USB) signal is

uut50 cos2 fc1000t100 cos2 fc2000t

2)Taking the Fourier transform of both sides, we obtain

Uuf 25ffc1000ffc1000

50ffc2000ffc2000

A plot ofUuf is given in the next gure.


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25

-1002 -1001 1001 10020KHz

Problem 3.9

If we let 0101
tTptTp
44
@A
xt@TAT
pp
22
then using the results of Problem 2.56, we obtain

1
X
vtmtstmtxtnTp
n1
1
Xnn
2t
mt1XejTp
TpTp
n1

78
where
20T10T13
tptp
44
@A@A5
Xn F4T
TppTpn
22fTp

TpTpTpTp
j2 fj2 f
44

2sincf2eefn
Tp
Tpn

2sinc22jsinn2

Hence, the Fourier transform ofvtis

1
Xn
V f 1sinc2jsinnMfn
222Tp
n1

The bandpass lter will cut-o all the frequencies except the ones centered at1, that is forn 1.
Tp
Thus, the output spectrum is

Uf sinc1jMf1sinc1jMf1
2Tp2Tp

2121
jMfjMf
TpTp
"#
41111

Mf ?ff
2jTp2jTp

Taking the inverse Fourier transform of the previous expression, we obtain

ut4mtsin21t
Tp

which has the form of a DSB-SC AM signal, withct4sin21tbeing the carrier signal.
Tp

Problem 3.10
P
Assume thatstis a periodic signal with periodTp, i.e.stxtnTp. Then
n

1
X
vtmtstmtxtnTp
n1
1
Xnn
2t
mt1XejTp
TpTp
n1

11Xnj2nt
XmteTp
TpTp
n1

whereXn Fxtjn. The Fourier transform ofvtis


Tpf
Tp
"1#
Xnn
2t
V f 1FXmtejTp
TpTp
n1

11Xnn
XMf

TpTpTp
n1

79
The bandpass lter will cut-o all the frequency components except the ones centered atfc 1.
Tp
Hence, the spectrum at the output of the BPF is

Uf 1X1Mf11X1Mf1
TpTpTpTpTpTp

In the time domain the output of the BPF is given by

21t11j21t
ut1X1mtejTpXmteTp
TpTpTpTp
"#
11j21t1j21t

mtXeTpXeTp
TpTpTp

111
2ReXmtcos2t

TpTpTp

As it is observeduthas the form a modulated DSB-SC signal. The amplitude of the modulating

signal isAc12ReX1and the carrier frequencyfc1.


TpTpTp

Problem 3.11

1)The spectrum of the modulated signalAmtcos2 fctis

V f AMffcMffc
2

The spectrum of the signal at the output of the highpass lter is

Uf AMffcu1ffcMffcu1ffc
2

Multiplying the output of the HPF withAcos2 fcW tresults in the signalztwith spectrum

Zf AMffcu1ffcMffcu1ffc
2

?AffcW ffcW
2
A2

fcW u1ffcWfc
4Mffc
MffcfcW u1ffcWfc

Mf2fcW u1f2fcW

Mf2fcW u1f2fcW

A2
fW MfW u1fW
4MfW u1
Mf2fcW u1f2fcW Mf2fcW u1f2fcW

The LPF will cut-o the double frequency components, leaving the spectrum

2
Y f AMfW u1fW MfW u1fW
4

The next gure depictsY f forMf as shown in Fig. P-3.11.

80
Y(f)

-W W

2)As it is observed from the spectrumY f , the system shifts the positive frequency components to

the negative frequency axis and the negative frequency components to the positive frequency axis.

If we transmit the signalytthrough the system, then we will get a scaled version of the original

spectrumMf .

Problem 3.12

The modulated signal can be written as

utmtcos2 fct

mtcos2 fctcosmtsin2 fctsin

uctcos2 fctustsin2 fct

where we identifyuctmtcosas the in-phase component andustmtsinas the

quadrature component. The envelope of the bandpass signal is

qq
Vutu2ctu2stm2tcos2m2tsin2
q
m2t jmtj

Hence, the envelope is proportional to the absolute value of the message signal.

Problem 3.13

1)The modulated signal is

ut1001mtcos28105t

100 cos28105t100 sin2103tcos28105t

500 cos22103tcos28105t

100 cos28105t50sin2 1038105tsin2 8105103t

250cos2 21038105tcos2 81052103t


81
Taking the Fourier transform of the previous expression, we obtain

Uf 50f8105f8105
"#
1
251f8105103f8105103
jj
"#
1
251f8105103f8105103
jj
hi
125f81052103f81052103
hi
125f81052103f81052103

50f8105f8105
hi
25f8105103ej2f8105103ej2
hi
25f8105103ej2f8105103ej2
hi
125f81052103f81052103
hi
125f81052103f81052103

|U (f )|
. . . . . . . . . . . . . . . . . . . . . .125

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
. . . . . . . . . . . . . . . . . . . . . . . . . . . 25

fc+2103fc2103fc2103fcfcfc+2103

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \U (f )2

fc103fc+103

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

2)The average power in the carrier is

A21002
Pcarrierc5000
22

The power in the sidebands is

50250225022502
Psidebands65000
2222

3)The message signal can be written as

mtsin2103t5 cos22103t
10 sin2103tsin2103t5

As it is seen the minimum value ofmtis6 and is achieved forsin2103t 1 ort


31
4103103k, withk2Z. Hence, the modulation index is6.

82
4)The power delivered to the load is

jutj210021mt2cos22 fct
Pload
5050

The maximum absolute value of 1mtis 6:025 and is achieved forsin2103t1ort


20
arcsin1
20k3
2103103. Since 210fcthe peak power delivered to the load is approximately equal to

1006:0252
maxPload72:6012
50

Problem 3.14

1)

ut5 cos1800 t20 cos2000 t5 cos2200 t

2011cos200 tcos2000 t
2

The modulating signal ismtcos2100twhereas the carrier signal isct20cos21000t.

2)Since1cos2100t1, we immediately have that the modulation index is1.


2

3)The power of the carrier component isPcarrier400200, whereas the power in the sidebands is
2
2
Psidebands40050. Hence,
2
Psidebands501

Pcarrier2004

Problem 3.15

1)The modulated signal is written as

ut1002 cos2103tcos23103tcos2 fct

200 cos2103tcos2 fct100 cos23103tcos2 fct


hi
100cos2 fc103tcos2 fc103t
hi
50cos2 fc3103tcos2 fc3103t

Taking the Fourier transform of the previous expression, we obtain

h
Uf 50ffc103ffc103
i
ffc103ffc103
h
25ffc3103ffc3103
i
ffc3103ffc3103

83
The spectrum of the signal is depicted in the next gure

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

. . . . . . . . . . . . . . . . . . . .25

10031001999997 997 999 1001 1003KHz

2)The average power in the frequenciesfc1000 andfc1000 is

1002
PfPf5000
c1000c1000
2

The average power in the frequenciesfc3000 andfc3000 is

502
PfPf1250
c3000c3000
2

Problem 3.16

1)The Hilbert transform ofcos21000tissin21000t, whereas the Hilbert transform ofsin21000t

iscos21000t. Thus
mtsin21000t2 cos21000t

2)The expression for the LSSB AM signal is

ultAcmtcos2 fctAcmtsin2 fct

SubstitutingAc100,mtcos21000t2sin21000tandmtsin21000t

2 cos21000tin the previous, we obtain

ult100cos21000t2 sin21000tcos2 fct

100sin21000t2 cos21000tsin2 fct

100cos21000tcos2 fctsin21000tsin2 fct

200cos2 fctsin21000tsin2 fctcos21000t

100 cos2 fc1000t200 sin2 fc1000t

3)Taking the Fourier transform of the previous expression we obtain

Ulf 50ffc1000ffc1000

100jffc1000ffc1000

50100jffc100050100jffc1000
Hence, the magnitude spectrum is given by
p
jUlf j5021002ffc1000ffc1000
p
10125ffc1000ffc1000

84
Problem 3.17

The input to the upper LPF is

uutcos2 fmtcos2 f1t


1
fmtcos2 f1fmt
2cos2 f1

whereas the input to the lower LPF is

ultcos2 fmtsin2 f1t


1
fmtsin2 f1fmt

2sin2 f1

If we selectf1such thatjf1fmj< Wandf1fm> W, then the two lowpass lters will cut-o the

frequency components outside the intervalW ; W , so that the output of the upper and lower LPF

is

yutcos2 f1fmt

yltsin2 f1fmt

The output of the Weavers modulator is

utcos2 f1fmtcos2 f2tsin2 f1fmtsin2 f2t

which has the form of a SSB signal sincesin2 f1fmtis the Hilbert transform ofcos2 f1

fmt. If we writeutas

utcos2 f1f2fmt

then withf1f2fmfcfmwe obtain an USSB signal centered atfc, whereas withf1f2fm

fcfmwe obtain the LSSB signal. In both cases the choice offcandf1uniquely determinef2.

Problem 3.18

The signalxtismtcos2 f0t. The spectrum of this signal isXf Mf 1ff0


2
ff0and its bandwidth equals toWxf0. The signaly1tafter the Square Law Device is

y1tx2tmtcos2 f0t2

m2tcos22 f0t2mtcos2 f0t

m2t11cos22f0t2mtcos2 f0t
22

The spectrum of this signal is given by

Y1f Mf ? Mf 1f 1f2f0f2f0Mff0Mff0
24
85
and its bandwidth isW12f0. The bandpass lter will cut-o the low-frequency components

Mf ?Mf 1f and the terms with the double frequency components 1f2f0f2f0.
24
Thus the spectrumY2f is given by

Y2f Mff0Mff0

and the bandwidth ofy2tisW22W. The signaly3tis

y3t2mtcos22 f0tmtmtcos2 f0t

with spectrum

Y3tMf 1Mff0Mff0
2

and bandwidthW3f0W. The lowpass lter will eliminate the spectral components1Mf
2
f0Mff0, so thaty4tmtwith spectrumY4Mf and bandwidthW4W. The next

gure depicts the spectra of the signalsxt,y1t,y2t,y3tandy4t.

. . . . . . . . . . . . .1X(f )
2

W Wf0f0

Y1(f )

. . . . . .1
4
2f0f0Wf0+W2W2W f0W f0+W2f0

Y2(f )

f0+Wf0Wf0W f0+W

Y3(f )

W W f0+Wf0Wf0+Wf0W

Y4(f )

W W

86
Problem 3.19

1)

ytaxtbx2t

amtcos2 f0tbmtcos2 f0t2

amtbm2tacos2 f0t

bcos22 f0t2bmtcos2 f0t

2)The lter should reject the low frequency components, the terms of double frequency and pass

only the signal with spectrum centered atf0. Thus the lter should be a BPF with center frequency

f0and bandwidthWsuch thatf0WM> f0W>2WMwhereWMis the bandwidth of the message


2
signalmt.

3)The AM output signal can be written as

uta12bmtcos2 f0t
a

SinceAmmaxjmtjwe conclude that the modulation index is

2bAm

Problem 3.20

1)When USSB is employed the bandwidth of the modulated signal is the same with the bandwidth of

the message signal. Hence,

WUSSBW104Hz

2)When DSB is used, then the bandwidth of the transmitted signal is twice the bandwidth of the

message signal. Thus,

WDSB2W2104Hz

3)If conventional AM is employed, then

WAM2W2104Hz

4)Using Carsons rule, the eective bandwidth of the FM modulated signal is


!
kfmaxjmtj
Bc21W21W2kfW 140000 Hz
W

87
Problem 3.21

1)The lowpass equivalent transfer function of the system is

8
><11 W
fjfj
Hlf 2u1ffcHffc2W22
>:1W
2<fW

Taking the inverse Fourier transform, we obtain

ZW
hlt F1HlfHlf ej2 f tdf
W

2
W ZW
Z
2
21f1ej2 f tdf2ej2 f tdf
WW

2 W22
!W
W
2112122W
j2 f tj2 f tj2 f tj2 f t

eee
Wj2 tf e42t2Wj2 tWj2 tW
222
1j
j2 W t

j te2t2Wsin W t
jhji
2Wt

tsincW te

2)An expression for the modulated signal is obtained as follows

utRemt ? hltej2 fct

Remt ?jsincW tej2 W tej2 fct


t
"#

Remt ? jsincW tej2 fctmt ?1ej2 W tej2 fct


tj t

Note that

Fmt ?1ej2 W t Mf sgnfW Mf


jt

since sgnfW 1 forf < W. Thus,

utRemt ? jsincW tej2 fctmtej2 fct


t
mtcos2 fctmt ? 1sincW tsin2 fct
t

Problem 3.22

a)A DSB modulated signal is written as

utAmtcos2 f0t

Amtcoscos2 f0tAmtsinsin2 f0t

88
Hence,

xctAmtcos

xstAmtsin
q
V tA2m2tcos2sin2 jAmtj
!

tarctanAmtcosarctantan
Amtsin

b)A SSB signal has the form

uSSBtAmtcos2 f0tAmtsin2 f0t

Thus, for the USSB signal (minus sign)

xctAmt

xstAmt
qq
V tA2m2tm2tAm2tm2t

tarctanmt
mt

For the LSSB signal (plus sign)

xctAmt

xst Amt
qq
V tA2m2tm2tAm2tm2t

tarctanmt
mt

c)If conventional AM is employed, then

utA1mtcos2 f0t

A1mtcoscos2 f0tA1mtsinsin2 f0t

Hence,

xctA1mtcos

xstA1mtsin
q
V tA21mt2cos2sin2Aj1mtj
!

tarctanA1mtcosarctantan
A1mtsin
89
Problem 3.23

1)If SSB is employed, the transmitted signal is

utAmtcos2 f0tAmtsin2 f0t

Provided that the spectrum ofmtdoes not contain any impulses at the originPMP1and
M2

A2PMA2P1
PSSBMA2PM400200
222

The bandwidth of the modulated signalutis the same with that of the message signal. Hence,

WSSB10000 Hz

2)In the case of DSB-SC modulationutAmtcos2 f0t. The power content of the modulated

signal is
A2PM1
PDSB200100
22

and the bandwidthWDSB2W20000 Hz.

3)If conventional AM is employed with modulation index0:6, the transmitted signal is

utA1mtcos2 f0t

The power content is

A2A22PM
PAM2002000:620:5236
22

The bandwidth of the signal isWAM2W20000 Hz.

4)If the modulation is FM withkf50000, then

A2
PFM200
2

and the eective bandwidth is approximated by Carsons rule as

Bc21W2500001W120000 Hz
W

Problem 3.24

1)The next gure illustrates the spectrum of the SSB signal assuming that USSB is employed and

K3. Note, that only the spectrum for the positive frequencies has been plotted.
K=3

KHz211713 181410

90
2)WithLK60 the possible values of the pairL; K(orK; L) aref1;60; 2;30; 3;20; 4;15; 6;10g.

As it is seen the minimum value ofLKis achieved forL6,K10 (orL10,K6).

3)Assuming thatL6 andK10 we need 16 carriers with frequencies

fk10 KHzfk14 KHz


12

fk18 KHzfk22 KHz


34

fk26 KHzfk30 KHz


56

fk34 KHzfk38 KHz


78

fk42 KHzfk46 KHz


910

and

fl290 KHzfl330 KHz


12

fl370 KHzfl410 KHz


34

fl450 KHzfl490 KHz


56

Computer Problems

Computer Problem 3.1

1) Figures 3.1 and 3.2 present the message and modulated signals, respectively.

2) Spectrum ofmtandutare given in Figures 3.3 and 3.4, respectively.

3) Figures 3.5, 3.6, 3.7 and 3.8 present the message signal, modulated signal, spectrum of the message

signal and the spectrum of the modulated signal fort00:4.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.1.


% Matlab demonstration script for DSB-AM modulation. The message signal
% is m(t)=sinc(100t).
echoo
t0=.4;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
snr=20;% SNR in dB (logarithmic)
fs=1/ts;% sampling frequency
df=0.3;% required freq. resolution10
t=[0:ts:t0];% time vector
snrlin=10^(snr/10);% linear SNR
m=sinc(100*t);% the message signal
c=cos(2*pi*fc.*t);% the carrier signal
u=m.*c;% the DSB-AM modulated signal
[M,m,df1]=tseq(m,ts,df);% Fourier transform
91
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
Time

Figure 3.1: The message signalmt

M=M/fs;% scaling
[U,u,df1]=tseq(u,ts,df);% Fourier transform
U=U/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector20
% plot the message signal
gure;
plot(t,m(1:length(t)))
xlabel(Time)
% plot the modulated signal.
gure;
plot(t,u(1:length(t)))
xlabel(Time)
% plot the magnitude of the message and the
% modulated signal in the frequency domain.30
gure;
plot(f,abs(tshift(M)))
xlabel(Frequency)
axis([1000 1000 0 9*10^(3)]);
gure;
plot(f,abs(tshift(U)))
xlabel(Frequency)
axis([1000 1000 0 4.5*10^(3)]);

92
1

0.8

0.6

0.4

0.2

0
u(t)

-0.2

-0.4

-0.6

-0.8

-1
00.020.040.060.080.1
Time

Figure 3.2: The modulated signalut

Computer Problem 3.2

The message signalmtand the modulated signalutare presented in Figures 3.9 and 3.10,

respectively.

2)The spectrum of the message signal is presented in Figure 3.11. Figure 3.12 presents the spectrum

of the modulated signalut.

3) Figures 3.13, 3.14, 3.15 and 3.16 present the message signal, modulated signal, spectrum of the

message signal and the spectrum of the modulated signal fort00:4.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.2.


t0=.1;% signal duration
n=0:1000;
ts=0.0001;% sampling interval
df=0.2;% frequency resolution
fs=1/ts;% sampling frequency
fc=250;% carrier frequency
a=0.8;% modulation index
t=[0:ts:t0];% time vector
m=sinc(100*t);% message signal10
c=cos(2*pi*fc.*t);% carrier signal
mn=m/max(abs(m));% normalized message signal
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector
93
-3
x 10
9

|M(f )|
4

0
-1000-50005001000
Frequency

Figure 3.3: The spectrum of the message signal

94
-3
x 10
4.5

3.5

2.5

|U (f )|
2

1.5

0.5

0
-1000-50005001000
Frequency

Figure 3.4: The message of the modulated signal

95
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.050.10.150.20.250.30.350.4
Time

Figure 3.5: The message signalmtfort00:4

0.8

0.6

0.4

0.2

0
u(t)

-0.2

-0.4

-0.6

-0.8

-1
00.050.10.150.20.250.30.350.4
Time

Figure 3.6: The modulated signalutfort00:4

96
-3
x 10
9

|M(f )|
4

0
-1000-50005001000
Frequency

Figure 3.7: The spectrum of the message signal fort00:4

97
-3
x 10
4.5

3.5

2.5

|U (f )|
2

1.5

0.5

0
-1000-50005001000
Frequency

Figure 3.8: The spectrum of the modulated signal fort00:4

98
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
Time

Figure 3.9: The message signalmt

1.5

0.5

0
u(t)

-0.5

-1

-1.5

-2
00.020.040.060.080.1
Time

Figure 3.10: The modulated signalut


99
0.01

0.009

0.008

0.007

0.006

0.005
|M(f )|
0.004

0.003

0.002

0.001

0
-1000-50005001000
Frequency

Figure 3.11: The spectrum of the message signal

u=(1+a*mn).*c;% modulated signal


[U,u,df1]=tseq(u,ts,df);% Fourier transform
U=U/fs;% scaling
gure;
plot(t,m(1:length(t)))20
xlabel(Time)
gure;
plot(t,u(1:length(t)))
axis([0t02.1 2.1])
xlabel(Time)
gure;
plot(f,abs(tshift(M)))
xlabel(Frequency)
axis([1000 1000 0 0.01]);
gure;30
plot(f,abs(tshift(U)))
xlabel(Frequency)
axis([1000 1000 0 0.06]);

Computer Problem 3.3

1) Figures 3.17 and 3.18 present the message signal and its Hilbert transform, respectively. The

modulated signal is presented in Figure 3.19.

100
0.06

0.05

0.04

0.03
U (f )

0.02

0.01

0
-1000-50005001000
Frequency

Figure 3.12: The spectrum of the modulated signal

2) The spectrum of the message signalmtand the modulated LSSB signalutare presented in

Figures 3.20 and 3.21, respectively.

3) Figures 3.22, 3.23, 3.24, 3.25 and 3.26 present the message signal, its Hilbert transform, modulated

signal, spectrum of the message signal and the spectrum of the modulated signal fort00:4,

respectively.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.3.


t0=.4;% signal duration
n=0:1000;
ts=0.0001;% sampling interval
df=0.2;% frequency resolution
fs=1/ts;% sampling frequency
fc=250;% carrier frequency
t=[0:ts:t0];% time vector
m=sinc(100*t);% message signal
c=cos(2*pi*fc.*t);% carrier signal10
udsb=m.*c;% DSB modulated signal
[UDSB,udssb,df1]=tseq(udsb,ts,df);% Fourier transform
UDSB=UDSB/fs;% scaling
f=[0:df1:df1*(length(udssb)1)]fs/2;% frequency vector
n2=ceil(fc/df1);% location of carrier in freq. vector
% Remove the upper sideband from DSB.
UDSB(n2:length(UDSB)n2)=zeros(size(UDSB(n2:length(UDSB)n2)));

101
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.050.10.150.20.250.30.350.4
Time

Figure 3.13: The message signalmtfort00:4

1.5

0.5

0
u(t)

-0.5

-1

-1.5

-2
00.050.10.150.20.250.30.350.4
Time

Figure 3.14: The modulated signalutfort00:4


102
0.01

0.009

0.008

0.007

0.006

0.005
|M(f )|
0.004

0.003

0.002

0.001

0
-1000-50005001000
Frequency

Figure 3.15: The spectrum of the message signal fort00:4

ULSSB=UDSB;% Generate LSSB-AM spectrum.


[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling20
u=real(it(ULSSB))*fs;% Generate LSSB signal from spectrum.
%Plot the message signal
gure;
plot(t,m(1:length(t)))
xlabel(Time)
%Plot the Hilbert transform of the message signal
gure;
plot(t,imag(hilbert(m(1:length(t)))))
xlabel(Time);
%plot the LSSB-AM modulated signal30
gure;
plot(t,u(1:length(t)))
xlabel(Time)
% Plot the spectrum of the message signal
gure;
plot(f,abs(tshift(M)))
xlabel(Frequency)
axis([1000 1000 0 0.009]);

% Plot the spectrum of the LSSB-AM modulated signal40


gure;
plot(f,abs(tshift(ULSSB)))

103
0.06

0.05

0.04

0.03
|U (f )|

0.02

0.01

0
-1000-50005001000
Frequency

Figure 3.16: The spectrum of the modulated signal fort00:4

xlabel(Frequency)
axis([1000 1000 0 0.005]);

Computer Problem 3.4

1) The message signalmtand the modulated signalutare presented in Figures 3.27 and 3.28,

respectively.

2) The demodulation output is given in Figure 3.29 for0; =8; =4, and =2.

4) The demodulation output is given in Figure 3.30 for0; =8; =4, and =2.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.4.


t0=.1;% signal duration
n=0:1000;
ts=0.001;% sampling interval
df=0.2;% frequency resolution
fs=1/ts;% sampling frequency

104
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
Time

Figure 3.17: Message signalmt

0.5

-0.5
m(t)

-1

-1.5

-2
00.020.040.060.080.1
Time

Figure 3.18: Hilbert transform of the message signalmt

105
0.4

0.3

0.2

0.1

u(t)
-0.1

-0.2

-0.3

-0.4

-0.5
00.020.040.060.080.1
Time

Figure 3.19: Modulated signal

fc=250;% carrier frequency


t=[0:ts:t0];% time vector
m=sinc(100*t);% message signal
c=cos(2*pi*fc.*t);10
u=m.*c;% modulated signal
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling
plot(t,m(1:length(t)))
xlabel(t)
gure;
plot(t,u(1:length(t)))
xlabel(t)

% design the lter20


fs= 0.16;
fp= 0.0999;
f=[0fp fs1];
m=[1 1 0 0];
delta1= 0.0875;
delta2= 0.006;
df=fsfp;
w=[delta2/delta11];
h=remez(31,f,m,w);
30
fcuto=100;

106
-3
x 10

|M(f )|
4

0
-1000-50005001000
Frequency

Figure 3.20: Spectrum of the message signal

107
-3
x 10
5

4.5

3.5

2.5
|U (f )|
2

1.5

0.5

0
-1000-50005001000
Frequency

Figure 3.21: The spectrum of the modulated signal

108
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.050.10.150.20.250.30.350.4
Time

Figure 3.22: Message signalmtfort00:4

0.5

-0.5
m(t)

-1

-1.5

-2
00.050.10.150.20.250.30.350.4
Time

Figure 3.23: Hilbert transform of the message signal fort00:4

109
0.4

0.3

0.2

0.1

u(t)
-0.1

-0.2

-0.3

-0.4

-0.5
00.050.10.150.20.250.30.350.4
Time

Figure 3.24: Modulated signalutfort00:4

for i= 1:4
= [0pi/8pi/4pi/2];
tit= [a,b,c,d];
y=u.*cos(2*pi*fc.*t+(1));
dem=lter(h, 1,y);
gure(3);
subplot(2,2,i);
plot(t,dem(1:length(t)))
xlabel(t)40
title(a);
[Y,y,df1]=tseq(y,ts,df);
ncuto=oor(fcuto/df1);
f=[0:df1:df1*(length(y)1)]fs/2;
H=zeros(size(f));
H(1:ncuto)=2*ones(1,ncuto);
H(length(f)ncuto+1:length(f))=2*ones(1,ncuto);
Y=Y/fs;
DEM=H.*Y;
dem=real(it(DEM))*fs;50
gure(4);
subplot(2,2,i);
plot(t,dem(1:length(t)))
xlabel(t);
title(tit(i));
end

110
-3
x 10

|M(f )|
4

0
-1000-50005001000
Frequency

Figure 3.25: Spectrum of the message signal fort00:4

111
-3
x 10
5

4.5

3.5

2.5
|U (f )|
2

1.5

0.5

0
-1000-50005001000
Frequency

Figure 3.26: Spectrum of the modulated signal fort00:4

112
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
t

Figure 3.27: The message signalmt

Computer Problem 3.5

1) The message signalmt, the modulated signalutand the Hilbert transform of the message

signalmtare presented in Figures 3.31, 3.32 and 3.33, respectively.

2) The demodulation output is given in Figure 3.34 for0; =8; =4, and =2.

4) The demodulation output is given in Figure 3.35 for0; =8; =4, and =2.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.5.


t0=.1;% signal duration
ts=0.001;% sampling interval
df=0.1;% frequency resolution
fs=1/ts;% sampling frequency
fc=250;% carrier frequency
t=[0:ts:t0];% time vector
m=sinc(100*t);% message signal
mh=imag(hilbert(m));
10
u=m.*cos(2*pi*fc*t) +mh.*sin(2*pi*fc*t);

113
1

0.8

0.6

0.4

0.2

0
u(t)

-0.2

-0.4

-0.6

-0.8

-1
00.020.040.060.080.1
t

Figure 3.28: The modulated signalut

plot(t,m(1:length(t)))
xlabel(t)
gure;
plot(t,mh(1:length(t)))
xlabel(t)
gure;
plot(t,u(1:length(t)))
xlabel(t)20
% design the lter
fs= 0.16;
fp= 0.0999;

f=[0fp fs1];
m=[1 1 0 0];
delta1= 0.0875;
delta2= 0.006;
df=fsfp;
w=[delta2/delta11];30
h=remez(31,f,m,w);

fcuto=100;
for i= 1:4
= [0pi/8pi/4pi/2];
tit= [a,b,c,d];
y=u.*cos(2*pi*fc.*t+(1));

114
=0= /8
0.60.6

0.40.4

0.20.2

00

-0.2-0.2
00.050.100.050.1
tt
-16
= /4= /2
x 10
0.32

0.21

0.10

0-1

-0.1-2
00.050.100.050.1
tt

Figure 3.29: The demodulation output

115
=0= /8
11

0.50.5

00

-0.5-0.5
00.050.100.050.1
tt
= /4= /2
11

0.50.5

00

-0.5-0.5
00.050.100.050.1
tt

Figure 3.30: The demodulation output

116
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
t

Figure 3.31: The message signalmt

dem=lter(h, 1,y);
gure(4);
subplot(2,2,i);40
plot(t,dem(1:length(t)))
xlabel(t)
title(a);
[Y,y,df1]=tseq(y,ts,df);
ncuto=oor(fcuto/df1);
f=[0:df1:df1*(length(y)1)]fs/2;
H=zeros(size(f));
H(1:ncuto)=2*ones(1,ncuto);
H(length(f)ncuto+1:length(f))=2*ones(1,ncuto);
Y=Y/fs;50
DEM=H.*Y;
dem=real(it(DEM))*fs;
gure(5);
subplot(2,2,i);
plot(t,dem(1:length(t)))
xlabel(t);
title(tit(i));
end

117
1

0.8

0.6

0.4

0.2

0
u(t)

-0.2

-0.4

-0.6

-0.8

-1
00.020.040.060.080.1
t

Figure 3.32: The modulated signalut

Computer Problem 3.6

1) The message signal and modulated signal are presented in Figures 3.36 and 3.37

2) The demodulated received signal is presented in Figure 3.38

3) In the demodulation process above, we have neglected the eect of the noise-limiting lter, which

is a bandpass lter in the rst stage of any receiver. In practice, the received signal is passed

through the noise-limiting lter and then supplied to the envelope detector. In this example, since

the message bandwidth is not nite, passing the received signal through any bandpass lter will

cause distortion on the demodulated message, but it will also decrease the amount of noise in the

demodulator output.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 3.6.


t0=.1;% signal duration
n=0:1000;
a= 0.8;
ts=0.0001;% sampling interval
df=0.2;% frequency resolution
fs=1/ts;% sampling frequency
fc=250;% carrier frequency
t=[0:ts:t0];% time vector
m=sinc(100*t);% message signal10
c=cos(2*pi*fc.*t);% carrier signal
mn=m/max(abs(m));% normalized message signal
118
0.6

0.4

0.2

-0.2
m(t)

-0.4

-0.6

-0.8

-1
00.020.040.060.080.1
t

Figure 3.33: The Hilbert transform of the message signal

[M,m,df1]=tseq(m,ts,df);% Fourier transform


f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector
u=(1+a*mn).*c;% modulated signal
[U,u,df1]=tseq(u,ts,df);% Fourier transform
env=envphas(u,a);% Find the envelope.
dem1=2*(env1)/a;% Remove dc and rescale.

% plot the message signal20


plot(t,m(1:length(t)))
xlabel(Time)

% plot the modulated signal


gure;
plot(t,u(1:length(t)))
xlabel(Time)

% plot the demodulated signal


gure;30
plot(t,dem1(1:length(t)))
xlabel(Time)

119
=0=0
0.60.6

0.40.4

0.20.2

00

-0.2-0.2
00.050.100.050.1
tt
=0=0
0.60.6

0.40.4

0.20.2

00

-0.2-0.2
00.050.100.050.1
tt

Figure 3.34: The demodulation output

120
=0= /8
11

0.50.5

00

-0.5-0.5
00.050.100.050.1
tt
= /4= /2
11

0.50.5

00

-0.5-0.5
00.050.100.050.1
tt

Figure 3.35: The demodulation output

121
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.020.040.060.080.1
Time

Figure 3.36: Message signal

1.5

0.5

0
u(t)

-0.5

-1

-1.5

-2
00.020.040.060.080.1
Time

Figure 3.37: Modulated signal


122
3.5

2.5

1.5

1
demodulated signal

0.5

-0.5
00.020.040.060.080.1
Time

Figure 3.38: Demodulated signal

123
Chapter 4

Problem 4.1

1)SinceFsinc400t1f, the bandwidth of the message signal isW200 and the


400400
resulting modulation index

kfmaxjmtjkf10

f6=)kf120
WW

Hence, the modulated signal is

Zt
utAcos2 fct2 kfmd
1
Zt
100 cos2 fct 21200sinc400d
1

2)The maximum frequency deviation of the modulated signal is

fmaxW62001200
f

3)Since the modulated signal is essentially a sinusoidal signal with amplitudeA100, we have

2
PA5000
2

4)Using Carsons rule, the eective bandwidth of the modulated signal can be approximated by

Bc2f1W2612002800 Hz

Problem 4.2

1)The maximum phase deviation of the PM signal is

maxkpmaxjmtjkp

The phase of the FM modulated signal is

ZtZt
t2 kfmd2 kfmd
10
8Rt
>>>22
kfd kft0t <1
0
>>>R
>< kt
f2 kf1d kf2 kft11t <2

t
>>> kRd
f2 kf2 kf23 kf2 kft22t <3
>>>
>:
kf3t

124
The maximum value oftis achieved fort2 and is equal to 3 kf. Thus, the desired relation

betweenkpandkfis

kp3 kf

2)The instantaneous frequency for the PM modulated signal is

1d1d
fitfctfckpmt
2dt2dt

For themtgiven in Fig. P-4.2, the maximum value ofdmtis achieved fortin0;1and it is
dt
equal to one. Hence,
1
maxfitfc
2

For the FM signalfitfckfmt. Thus, the maximum instantaneous frequency is

maxfitfckffc1

Problem 4.3

For an angle modulated signal we havextAccos2 fctt, therefore The lowpass equivalent

of the signal isxltAcejtwith EnvelopeAcand phase tand in phase an quadrature

componentsAccostandAcsint, respectively. Hence we have the following

88
>>>Aenvelope>>>Aenvelope
cc
>>>>>>R
<k<2t
mtphase kfm dphase
PMpFM1Rt
>>>A>>>A
ccoskpmtin-phase comp.ccos2 kf1m din-phase comp.
>>>>>>R
:A:At
csinkpmtquadrature comp.csin2 kf1m dquadrature comp.

Problem 4.4

1)Since an angle modulated signal is essentially a sinusoidal signal with constant amplitude, we have

22
PAc=)P1005000
22

The same result is obtained if we use the expansion


1
X
utAcJncos2 fcnfmt
n1

along with the identity


1
X
J22J21
0n
n1

125
2)The maximum phase deviation is

maxmaxj4 sin2000 tj 4

3)The instantaneous frequency is

1d
fifct
2dt
4
fccos2000 t2000fc4000 cos2000 t
2

Hence, the maximum frequency deviation is

fmaxmaxjfifcj 4000

4)The angle modulated signal can be interpreted both as a PM and an FM signal. It is a PM signal

with phase deviation constantkp4 and message signalmtsin2000 tand it is an FM signal

with frequency deviation constantkf4000 and message signalmtcos2000 t.

Problem 4.5

The modulated signal can be written as

1
X
utAcJncos2 fcnfmt
n1

2
The power in the frequency componentffckfmisPkAcJ2. Hence, the power in the
2n
2
carrier isPcarrierAcJ2and in order to be zero the modulation indexshould be one of the
20
roots ofJ0x. The smallest root ofJ0xis found from tables to be equal 2:404. Thus,

min2:404

Problem 4.6

1)If the output of the narrowband FM modulator is,

utAcos2 f0tt

then the output of the upper frequency multiplier (n1) is

u1tAcos2 n1f0tn1t
126
After mixing with the output of the second frequency multiplieru2tAcos2 n2f0twe obtain

the signal

ytA2cos2 n1f0tn1tcos2 n2f0t

A2

n2f0n1tcos2 n1n2f0n1t
2cos2 n1

The bandwidth of the signal isW15 KHz, so the maximum frequency deviation isffW

0:1151:5 KHz. In order to achieve a frequency deviation off75 KHz at the output of the

wideband modulator, the frequency multipliern1should be equal to

f75
n150
f1:5

Using an up-converter the frequency modulated signal is given by

2
ytAcos2 n1n2f0n1t
2

Since the carrier frequencyfcn1n2f0is 104 MHz,n2should be such that

n1n2100104103=)n1n21040 orn2990

2)The maximum allowable drift (df) of the 100 kHz oscillator should be such that

2
n1n2df2=)df:0019 Hz
1040

Problem 4.7

The modulated PM signal is given by


hi
utAccos2 fctkpmtAcReej2 fctejkpmt
hi
AcReej2 fctejmt

The signalejmtis periodic with periodTm1and Fourier series expansion


fm

Tm
1Zj
cnemtej2 nfmtdt
Tm0
TmZT
2m
1Zj1

eej2 nfmtdtejej2 nfmtdt


Tm0TmTm
2
Tm

ej2ejTm
ej2 nfmtej2 nfmt

Tmj2 nfm0Tmj2 nfmTm


2
8
<0
1n1>
jjn2l

2
2 njee>:sin
2l11 n2l1

127
Hence,
1
X2
ejmtsin1ej2 lfmt
l1 2l1

and
23
1
hiX2
utAcReej2 fctejmtAcRe4ej2 fctsin1ej2 lfmt5
l1 2l1
1
X2
sin1
Accos2 fclfmtl

l1 2l1

wherel0 forl0 andlfor negative values ofl.

Problem 4.8

1)The instantaneous frequency is given by

1d1
fitfctfc100mt
2dt2

A plot offitis given in the next gure


fi(t)

. . . . .500
fc+
2
................
fc

. . .500
fc
2

0t

2)The peak frequency deviation is given by

fmaxkfmaxjmtj1005250
2

Problem 4.9

1)The modulation index is


kfmaxjmtjf20103
max
2

fmfm104

The modulated signaluthas the form

1
X
utAcJncos2 fcnfmtn
n1
1
X
100Jn2cos2 108n104tn
n1

128
2
The power of the unmodulated carrier signal isP1005000. The power in the frequency
2
componentffck104is
1002J22
Pfk
ckfm
2
The next table shows the values ofJk2, the frequencyfckfm, the amplitude 100Jk2and the

powerPffor various values ofk.


ckfm

IndexkJk2Frequency HzAmplitude 100Jk2PowerPf


ckfm

0.223910822.39250.63

1.576710810457.671663.1

2.3528108210435.28622.46

3.1289108310412.8983.13

4.034010841043.405.7785

As it is observed from the table the signal components that have a power level greater than

500 (10% of the power of the unmodulated signal) are those with frequencies 108104and

1082104. SinceJ2J2it is conceivable that the signal components with frequency


nn
108104and 1082104will satisfy the condition of minimum power level. Hence, there are four

signal components that have a power of at least 10% of the power of the unmodulated signal. The

components with frequencies 108104, 108104have an amplitude equal to 57:67, whereas the

signal components with frequencies 1082104, 1082104have an amplitude equal to 35:28.

2)Using Carsons rule, the approximate bandwidth of the FM signal is

Bc21fm2211046104Hz

Problem 4.10

1)

pkpmaxjmtj1:523
kfmaxjmtj30002

f6
fm1000

2)Using Carsons rule we obtain


BPM2p1fm810008000

BFM2f1fm14100014000

3)The PM modulated signal can be written as

1
X
utAJnpcos2 106n103t
n1

129
The next gure shows the amplitude of the spectrum for positive frequencies and for these compo-

nents whose frequencies lie in the interval1064103;1064103. Note thatJ03 :2601,

J130:3391,J230:4861,J330:3091 andJ430:1320.
J(3)
. . . . . . . .A2
2
. . . . .AJ4(3)
2
fHz106
03
10


8103

In the case of the FM modulated signal

utAcos2 fctfsin2000 t
1
X
AJn6cos2 106n103tn
n1

The next gure shows the amplitude of the spectrum for positive frequencies and for these compo-

nents whose frequencies lie in the interval1067103;1067103. The values ofJn6for

n0; : : : ;7 are given in the following table.

n01234567

Jn6.1506-.2767-.2429.1148.3578.3621.2458.1296

. . . . . . . . . .AJ5(6)
2



f6
10


14103

4)If the amplitude ofmtis decreased by a factor of two, thenmtcos2103tand

pkpmaxjmtj1:5
kfmaxjmtj3000

f3
fm1000

The bandwidth is determined using Carsons rule as


BPM2p1fm510005000

BFM2f1fm810008000

The amplitude spectrum of the PM and FM modulated signals is plotted in the next gure for positive

frequencies. Only those frequency components lying in the previous derived bandwidth are plotted.

Note thatJ01:5:5118,J11:5:5579 andJ21:5:2321.

130
AJ(1.5)
1
2


AJ(1.5)
22
fHz6
10


5103

AJ(3)
22
AJ(3)
42
106fHz


8103

5)If the frequency ofmtis increased by a factor of two, thenmt2 cos22103tand

pkpmaxjmtj1:523
kfmaxjmtj30002

f3
fm2000

The bandwidth is determined using Carsons rule as

BPM2p1fm8200016000

BFM2f1fm8200016000

The amplitude spectrum of the PM and FM modulated signals is plotted in the next gure for positive

frequencies. Only those frequency components lying in the previous derived bandwidth are plotted.

Note that doubling the frequency has no eect on the number of harmonics in the bandwidth of the

PM signal, whereas it decreases the number of harmonics in the bandwidth of the FM signal from 14

to 8.


2103
AJ(3)
22
AJ4(3)
2
fHz6
10


16103

131
Problem 4.11

1)The PM modulated signal is

ut100 cos2 fctcos21000t


2
1
X
100Jncos2 108n103t
n12

The next table tabulatesJnforandn0; : : : ;4.


2

n01234

Jn.4720.5668.2497.0690.0140
2
The total power of the modulated signal isPtot1005000. To nd the eective bandwidth of
2
the signal we calculate the indexksuch that

kk
X1002X

J20:995000=J20:99
n)n
nk22nk2

By trial end error we nd that the smallest indexkis 2. Hence the eective bandwidth is

Be41034000

In the the next gure we sketch the magnitude spectrum for the positive frequencies.

3
10
100
J1()
2
2


fHz108

2)Using Carsons rule, the approximate bandwidth of the PM signal is

BPM2p1fm2110005141:6
2

As it is observed, Carsons rule overestimates the eective bandwidth allowing in this way some

margin for the missing harmonics.

Problem 4.12
1)Assuming thatutis an FM signal it can be written as
Z1
ut100 cos2 fct2 kfcos2 fmd
1
kf
100 cos2 fctsin2 fmt
fm

132
k
Thus, the modulation index isff4 and the bandwidth of the transmitted signal
fm

BFM2f1fm10 KHz

2)If we double the frequency, then

ut100 cos2 fct4 sin22fmt

Using the same argument as before we nd thatf4 and

BFM2f12fm20 KHz

3)If the signalutis PM modulated, then

pmaxmax4 sin2 fmt4

The bandwidth of the modulated signal is

BPM2p1fm10 KHz

4)Iffmis doubled, thenpmaxremains unchanged whereas

BPM2p12fm20 KHz

Problem 4.13

1)If the signalmtm1tm2tDSB modulates the carrierAccos2 fctthe result is the

signal

utAcmtcos2 fct

Acm1tm2tcos2 fct

Acm1tcos2 fctAcm2tcos2 fct

u1tu2t

whereu1tandu2tare the DSB modulated signals corresponding to the message signalsm1t

andm2t. Hence, AM modulation satises the superposition principle.

2)Ifmtfrequency modulates a carrierAccos2 fctthe result is


Z1
utAccos2 fct2 kfm1m2d
1
Z1
Accos2 fct2 kfm1d
1
Z1
Accos2 fct2 kfm2d
1
u1tu2t

where the inequality follows from the nonlinearity of the cosine function. Hence, angle modulation is

not a linear modulation method.

133
Problem 4.14

The transfer function of the FM discriminator is

R
s
HsRL
RLs1s2Rs1
CsLLC

Thus,

2
42Rf2
L
jHf j2
12R
22
LC42f242Lf

As it is observedjHf j21 with equality if

f1p
2LC

Since this lter is to be used as a slope detector, we require that the frequency content of the signal,

which is806;806MHz, to fall inside the region over whichjHf jis almost linear. Such a

region can be considered the intervalf10; f90, wheref10is the frequency such thatjHf10j

10% maxjHf jandf90is the frequency such thatjHf10j 90% maxjHf j.

With maxjHf j 1,f1074106andf9086106, we obtain the system of equations

5010311
42f22 f1010:1220
10
LLC
5010311
42f22 f9010:9220
90
LLC

Solving this system, we obtain

L14:98 mHC0:018013 pF

Problem 4.15

The case oftcos2 fmthas been treated in the text, the modulated signal is

1
X
utAcJncos2 fcnfm
n1
1
X
100Jn5cos2 103n10
n1

The following table shows the values ofJn5forn0; : : : ;5.

n012345

Jn5-.178-.328.047.365.391.261

134
In the next gure we plot the magnitude and the phase spectrum for frequencies in the range

950;1050Hz. Note thatJnJnifnis even andJn Jnifnis odd.

. . . . . . . .|U (f )|
00
J4(5)
12


fHz1000 1050950

\U (f )
.......

fHz95010501000

The Fourier Series expansion ofejsin2 fmtis

5
Z
4fm
cnfmejsin2 fmtej2 nfmtdt
1
4fm
2
1Zjn

ecosujnuej2du
20
n
ej2Jn

Hence,

"1#
X
utAcRecnej2 fctej2 nfmt
n1
"1#
Xn
AcReej2 fcnfmt2
n1
The magnitude and the phase spectra ofutfor5 and frequencies in the interval950;1000

Hz are shown in the next gure. Note that the phase spectrum has been plotted modulo 2in the

interval ; .

135
. . . . . . . .|U (f )|
00
J4(5)
12


fHz1000 1050950

\U (f )

..................

.......
2

.
.
.fHz95010501000
. . . . . . . . . . . . . . . . . . ...

2

Problem 4.16

The frequency deviation is given by

fdtfitfckfmt

whereas the phase deviation is obtained from

Zt

dt2 kfmd
1

In the next gure we plot the frequency and the phase deviation whenmtis as in Fig. P-4.16 with

kf25.

d(t)fd(t)

. . . . .. . . . . . . . . . .
5050
................ . . . . . . . . .
2525
5

.................41 3 6tt1 3 4 5 6
2525

. . . . . . . . . . . . .50
Problem 4.17

136
Using Carsons rule we obtain

8
>>>20020
kf10
<
kfmaxjmtj>
Bc21W21W20200k100
f
W>>>
>:
22000kf1000

Problem 4.18

The modulation index is


kfmaxjmtj1010

fm812:5

The output of the FM modulator can be written as

Zt
ut10 cos22000t2 kf10 cos28d
1
1
X
10Jn12:5cos2 2000n8tn
n1

At the output of the BPF only the signal components with frequencies in the interval2000

32;200032will be present. These components are the terms ofutfor whichn 4; : : : ;4. The

power of the output signal is then

1024X102
22
12:52J12:5500:263013:15
2J02n
n1

2
Since the total transmitted power isPtot1050, the power at the output of the bandpass lter is
2
only 26.30% of the transmitted power.

Problem 4.19

1)The instantaneous frequency is

fitfckfm1t

The maximum offitis


maxfitmaxfckfm1t10651051:5 MHz

2)The phase of the PM modulated signal istkpm1tand the instantaneous frequency

1dkpd
fitfctfcm1t
2dt2dt

The maximum offitis achieved fortin0;1wheredm1t1. Hence,maxfit1063.


dt2

137
3)The maximum value ofm2tsinc2104tis 1 and it is achieved fort0. Hence,

maxfitmaxfckfm2t1061031:001 MHz

Since,Fsinc2104t1fthe bandwidth of the message signal isW104. Thus,


21042104
using Carsons rule, we obtain

kfmaxjmtj
B21W22 KHz
W

Problem 4.20

Since 88 MHz< fc<108 MHz and

jfcf0j 2fIFiffIF< fLO


c

we conclude that in order for the image frequencyf0to fall outside the interval88;108MHZ, the
c
minimum frequencyfIFis such that

2fIF10888=)fIF10 MHz

IffIF10 MHz, then the range offLOis8810;1081098;118MHz.

138
Computer Problems

Computer Problem 4.1

1) Figures 4.1 and 4.2 present the message signal and its integral, respectively.

2) A plot ofutis shown in Figure 4.3.

3) Using MATLABs Fourier transform routines, we obtain the expression for the spectrum of message

and modulated signals shown in Figures 4.4 and 4.5.

4)In this question, the bandwidth of the message signal is not nite, therefore to dene the index of

modulation, an approximate bandwidth for the message should be used in the expression

kfmaxjmtj

W(4.16)

dening the bandwidth as the width of the main lobe of the spectrum ofmtresults in

W20 Hz

and so
502

2010

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 4.1.


% Demonstration script for frequency modulation. The message signal
% is +1 for 0<t<t0/3, -2 for t0/3<t<2t0/3, and zero otherwise.
echo on
t0=.15;% signal duration
ts=0.0001;% sampling interval
fc=200;% carrier frequency
kf=50;% modulation index
fs=1/ts;% sampling frequency
t=[0:ts:t0-ts];% time vector10
df=0.25;% required frequency resolution
% message signal
m=[ones(1,t0/(3*ts)),2*ones(1,t0/(3*ts)),zeros(1,t0/(3*ts)+2)];
intm(1)=0;
for i=1:length(t)1% integral of m
intm(i+1)=intm(i)+m(i)*ts;
echo o ;
end
echo on ;
[M,m,df1]=tseq(m,ts,df);% Fourier transform20
M=M/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector
u=cos(2*pi*fc*t+2*pi*kf*intm);% modulated signal.
[U,u,df1]=tseq(u,ts,df);% Fourier transform
U=U/fs;% scaling
pause% Press any key to see a plot of the message and the modulated signal.
subplot(2,1,1)
plot(t,m(1:length(t)))
139
2

1.5

0.5

0
m(t)

-0.5

-1

-1.5

-2
00.050.10.15
Time

Figure 4.1: The message signal for Computer Problem 4.1

axis([0 0.152.1 2.1])


xlabel(Time)30
title(The message signal)
subplot(2,1,2)
plot(t,u(1:length(t)))
axis([0 0.152.1 2.1])
xlabel(Time)
title(The modulated signal)
pause% Press any key to see plots of the magnitude of the message and the
% modulated signal in the frequency domain.
subplot(2,1,1)
plot(f,abs(tshift(M)))40
xlabel(Frequency)
title(Magnitude spectrum of the message signal)
subplot(2,1,2)
plot(f,abs(tshift(U)))
title(Magnitude spectrum of the modulated signal)
xlabel(Frequency)

Computer Problem 4.2

1) Figures 4.6 and 4.7 present the message signal and its integral, respectively.

2) A plot ofutis shown in Figure 4.8.

140
0.06

0.04

0.02

integral ofm(t)
-0.02

-0.04

-0.06
00.020.040.060.080.10.120.140.16
Time

Figure 4.2: The integral of the message signal for Computer Problem 4.1

1.5

0.5

0
u(t)

-0.5

-1

-1.5

-2
00.050.10.15
Time

Figure 4.3: The modulated signal for Computer Problem 4.1

141
0.12

0.1

0.08

0.06
|M(f )|

0.04

0.02

0
-500005000
Frequency

Figure 4.4: The magnitude spectrum of the message signal for Computer Problem 4.1

0.03

0.025

0.02

0.015
|U (f )|

0.01

0.005

0
-500005000
Frequency

Figure 4.5: The magnitude spectrum of the modulated signal for Computer Problem 4.1

142
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
-0.1-0.0500.050.1
Time

Figure 4.6: The message signal for Computer Problem 4.2

0.8

0.6

0.4

0.2

-0.2
integral ofm(t)
-0.4

-0.6

-0.8

-1
-0.1-0.0500.050.1
Time

Figure 4.7: The integral of the message signal for Computer Problem 4.2

143
-3
x 10
12

10

u(t)
4

-2
-0.1-0.0500.050.1
Time

Figure 4.8: The modulated signal for Computer Problem 4.2

3) The spectrum of the message and the modulated signals are shown in Figures 4.9 and 4.11,

respectively.

4) The plot of the demodulated signal is shown in Figure 4.11. As you can see, the demodulated

signal is quite similar to the message signal.

The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 4.2.


% Demonstration script for frequency modulation. The message signal
% is m(t)=sinc(100t).
echo on
t0=.2;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
snr=20;% SNR in dB (logarithmic)
fs=1/ts;% sampling frequency
df=0.3;% required freq. resolution10
t=[t0/2:ts:t0/2];% time vector
kf=100;% deviation constant
df=0.25;% required frequency resolution
m=sinc(100*t);% the message signal
intm(1)=0;
for i=1:length(t)1% integral of m
intm(i+1)=intm(i)+m(i)*ts;
echo o ;

144
0.012

0.01

0.008

0.006
|M(f )|

0.004

0.002

0
-500005000
Frequency

Figure 4.9: The magnitude spectrum of the message signal for Computer Problem 4.2

0.1

0.09

0.08

0.07

0.06

0.05
|U (f )|
0.04

0.03

0.02

0.01

0
-500005000
Frequency

Figure 4.10: The magnitude spectrum of the modulated signal for Computer Problem 4.2

145
1

0.8

0.6

0.4

0.2

demodulated signal
0

-0.2

-0.4
-0.1-0.0500.050.1
Time

Figure 4.11: The demodulated signal for Computer Problem 4.2

end
echo on ;20
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector
u=cos(2*pi*fc*t+2*pi*kf*intm);% modulated signal
[U,u,df1]=tseq(u,ts,df);% Fourier transform
U=U/fs;% scaling
[v,phase]=envphas(u,ts,250);% demodulation, nd phase of u
phi=unwrap(phase);% Restore original phase.
dem=(1/(2*pi*kf))*(di(phi)/ts);% demodulator output, dierentiate and scale phase
pause% Press any key to see a plot of the message and the modulated signal.30
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel(Time)
title(The message signal)
subplot(2,1,2)
plot(t,u(1:length(t)))
xlabel(Time)
title(The modulated signal)
pause% Press any key to see plots of the magnitude of the message and the
% modulated signal in the frequency domain.40
subplot(2,1,1)
plot(f,abs(tshift(M)))
xlabel(Frequency)
title(Magnitude spectrum of the message signal)

146
subplot(2,1,2)
plot(f,abs(tshift(U)))
title(Magnitude-spectrum of the modulated signal)
xlabel(Frequency)
pause% Press any key to see plots of the message and the demodulator output with no
% noise.50
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel(Time)
title(The message signal)
subplot(2,1,2)
plot(t,dem(1:length(t)))
xlabel(Time)
title(The demodulated signal)

function[v,phi]=envphas(x,ts,f0)
% [v,phi]=envphas(x,ts,f0)
% v=envphas(x,ts,f0)
%ENVPHAS returns the envelope and the phase of the bandpass signal x
% f0 is the center frequency.
% ts is the sampling interval.
%
if nargout ==2
z=loweq(x,ts,f0);
phi=angle(z);10
end
v=abs(hilbert(x));

function xl=loweq(x,ts,f0)
% xl=loweq(x,ts,f0)
%LOWEQ returns the lowpass equivalent of the signal x
% f0 is the center frequency.
% ts is the sampling interval.
%
t=[0:ts:ts*(length(x)1)];
z=hilbert(x);
xl=z.*exp(j*2*pi*f0*t);

Computer Problem 4.3

Similar to Computer Problems 4.2 and 4.3.

147
Chapter 5

Problem 5.1

Let us denote byrn(bn) the event of drawing a red (black) ball with numbern. Then

1.E1 fr2; r4; b2g

2.E2 fr2; r3; r4g

3.E3 fr1; r2; b1; b2g

4.E4 fr1; r2; r4; b1; b2g

5.E5 fr2; r4; b2g [fr2; r3; r4g \ fr1; r2; b1; b2g

fr2; r4; b2g [ fr2g fr2; r4; b2g

Problem 5.2

Solution:

Since the seven balls equally likely to be drawn, the probability of each eventEiis proportional to its

cardinality.
33453
P E1; P E2; P E3; P E4; P E5
77777

Problem 5.3

Solution:

Let us denote byXthe event that a car is of brand X, and byRthe event that a car needs repair

during its rst year of purchase. Then

1)

P RP A; RP B; RP C; R

P RjAP AP RjBP BP RjCP C


52010301550

100100100100100100
11:5
100

2)

P AjRP A; RP RjAP A:05:20:087


P RP R:115

148
Problem 5.4

Solution:

If two events are mutually exclusive (disjoint) thenP A[BP A[P Bwhich implies that

P A\B0. If the events are independent thenP A\BP A\P B. Combining these two

conditions we obtain that two disjoint events are independent if

P A\BP AP B0

Thus, at least on of the events should be of zero probability.

Problem 5.5

Let us denote bynSthe event thatnwas produced by the source and sent over the channel, and by

nCthe event thatnwas observed at the output of the channel. Then

1)

P 1CP 1Cj1SP 1SP 1Cj0CP 0C

:8:7:2:3:62

where we have used the fact thatP 1S:7,P 0C:3,P 1Cj0C:2 andP 1Cj1S1:2:8

2)

P 1Sj1CP 1C;1SP 1Cj1SP 1S:8:7:9032


P 1CP 1C:62

Problem 5.6

1)Xcan take four dierent values. 0, if no head shows up, 1, if only one head shows up in the four

ips of the coin, 2, for two heads and 3 if the outcome of each ip is head.

2)Xfollows the binomial distribution withn3. Thus


01
8
>>>3
BCk
><@Ap3k
1pfor 0k3
P Xkk
>>>
>:
0 otherwise

3)
01
k
XB3
Cm
FXk@Ap1p3m
m0m

Hence
8
>>>0
k <0
>>>
>>>3
1pk0
>>>
>><3
1p3p1p2k1
FXk
>>>1322
p3p1p3p1p k2
>>>
>>>3
1p3p1p23p21pp31k3
>>>
>>:
1k >3

149
CDF
. . . . . . . . . . . . .1
.........

.....

1p3

43210-1

4)
01
3
XB3
Ck
P X >1@Ap1p3k3p21p1p3
k2k

Problem 5.7

1) The random variablesXandYfollow the binomial distribution withn4 andp1=4 and 1=2

respectively. Thus

0101
41044414
33BC1
C
P X0B@A8P Y0@A4
0442022
0101
41133414
334BC4
C
P X1B@A8P Y1@A4
1442122
0101
41223414
332BC6
C
P X2B@A8P Y2@A4
2442222
0101
4131414
334BC4
C
P X3B@A8P Y3@A4
3442322
0101
4140414
31BC1
C
P X4B@A8P Y4@A4
4442422

SinceXandYare independent we have


3
P XY2P X2P Y232681
28241024

2)

P XY P X0P Y0P X1P Y1P X2P Y2

P X3P Y3P X4P Y4

34334234223421886

2122122122122124096

150
3)

P X > Y P Y0P X1P X2P X3P X4

P Y1P X2P X3P X4

P Y2P X3P X4

P Y3P X4
535

4096

P5Pl
4) In generalP XY5P XlmP Ym. However it is easier to nd
l0m0
P XY5throughP XY51P XY >5because fewer terms are involved in the

calculation of the probabilityP XY >5. Note also thatP XY >5jX0P XY >5jX

10.

P XY >5P X2P Y4P X3P Y3P Y4

P X4P Y2P Y3P Y4


125

4096

Hence,P XY51P XY >51125


4096

Problem 5.8

1) Since limx!1FXx1 andFXx1 for allx1 we obtainK1.

2) The random variable is of the mixed-type since there is a discontinuity atx1.lim!FX1


0
1=2 whereas lim!FX11
0

3)
113
P 1< X1FX1FX1
2244

4)
1111
P 1< X <1FX1FX
22244

5)

P X >21P X21FX2110
151
Problem 5.9

1)

x <1)FXx0
Zx
x

1x0)FXxv1dv1v2v1x2x1
12122
Z0Zx
0x1)FXxv1dvv1dv 1x2x1
1022
1x)FXx1

2)
171
pX >11FX1
2288

and

pX >0; X <1FX1FX03
pX >0X <122
2pX <117
21pX >2

3) We nd rst the CDF

pXx; X >1
FXxX >1pXxX >12
22pX >1
2

Ifx1thenpXxX >10 since the eventsE1 fX1gandE1 fX >1gare disjoint. If


2222

x >1thenpXxX >1FXxFX1so that


222

FXxFX1
FXxX >12
21F1
X
2

Dierentiating this equation with respect toxwe obtain

8
fXx1
><x

1>2
fXxX >11FX2
2>:01
x
2
4)
Z1

EXX >1=2xfXxjX >1=2dx


1
1
1Z
xfXxdx

1FX1=21
2
Z1
11
8xx1dx81x3x2
11
2322
2

152
Problem 5.10

In general, ifXis a Gaussian RV with meanmand variance2, we have,

P X > Qm

Therefore,

P X >7Q74Q10:158
3

and using the relationP 0< X <9P X >0P X >9, we have

P 0< X <9Q04Q941Q1:33Q1:660:858
33

Problem 5.11

1) The random variableXis Gaussian with zero mean and variance2108. ThusP X > x

Qxand

!
4
P X >104Q10Q1:159
104
!
4
P X >4104Q410Q43:17105
104

P 2104< X1041Q1Q2:8182

2)
44

P X >104X >0P X >10; X >0P X >10:159:318


P X >0P X >0:5

3)ygxxux. ClearlyfYy0 andFYy0 fory <0. Ify >0, then the equation

yxuxhas a unique solutionx1y. Hence,FYyFXyandfYyfXyfory >0.

FYyis discontinuous aty0 and the jump of the discontinuity equalsFX0.

FY0FY0FX01
2

In summary the PDFfYyequals


fYyfXyuy1y
2

The general expression for ndingfYycan not be used becausegxis constant for some interval

so that there is an uncountable number of solutions forxin this interval.

153
4)
Z1
EYyfYydy
1
Z1
yfXyuy1ydy

12
12
y
1Z2
pye2dyp

2 202

5)ygx jxj. For a giveny >0 there are two solutions to the equationygx jxj, that is

x1;2 y. Hence fory >0

x1fXx2
fYyfXfXyfXy
jsgnx1jjsgnx2j
2
2y
pe22
22

Fory <0 there are no solutions to the equationy jxjandfYy0.


Z1
y2
EY 2pye22dy2p
2 202

Problem 5.12

1)ygxax2. Assume without loss of generality thata >0. Then, ify <0 the equation

yax2has no real solutions andfYy0. Ify >0 there are two solutions to the system, namely
p
x1;2y=a. Hence,

x1fXx2
fYyfX
jg0x1jjg0x2j
pp
fXy=afXy=a
pp

2ay=a2ay=a
1y
2

ppe2a
ay2 2

2) The equationygxhas no solutions ify <b. ThusFYyandfYyare zero fory <b.


Ifbyb, then for a xedy,gx < yifx < y; henceFYyFXy. Ify > bthen

gxb < yfor everyx; henceFYy1. At the pointsy b,FYyis discontinuous and the

discontinuities equal to

FYbFYbFXb

and

FYbFYb1FXb

The PDF ofygxis

fYyFXbyb1FXbybfXyu1ybu1yb
y2
Qbybyb1pe22u1ybu1yb

22

154
3) In the case of the hard limiter

P YbP X <0FX01
2

P YaP X >01FX01
2

ThusFYyis a staircase function and

fYyFX0yb1FX0ya

4) The random variableygxtakes the valuesynxnwith probability

P YynP anXan1FXan1FXan

Thus,FYyis a staircase function withFYy0 ify < x1andFYy1 ify > xN. The PDF is a

sequence of impulse functions, that is

N
X
fYyFXaiFXaiyxi
1
i1
N
Xa

QiQai1yxi
i1

Problem 5.13

The equationxtanhas a unique solution in;, that is


22

1arctanx

Furthermore
!0
sin1sin2
x011x2
coscos2cos2

Thus,
1

fXxf1
jx0j 1x2
1

We observe thatfXxis the Cauchy density. SincefXxis even we immediately getEX0.

However, the variance is

222
XEXEX
12
1Zx
dx 1

11x2

155
Problem 5.14

1)

Z1Z1
EYyfYydyyfYydy
0
Z1
yfYydyP Y

ThusP YEY =.

2) ClearlyP jXEXj> P XEX2> 2. Thus using the results of the previous question

we obtain
EXEX22
P jXEXj> P XEX2> 2
22

Problem 5.15

The characteristic function of the binomial distribution is


01
n
XBn
Ck
Xvejvk@Ap1pnk
k0k
01
n
XBn
Cj

@Apevk1pnkpejv1pn
k0k

Thus

1d1
EXm1pejv1pnnpejv1pn1pjejv
X
jdvv0jv0

np1pn1pnp
2

EX2m21dpejv1pn
X2
dvv0

hi
1dnpejv1pn1pjejv
dvv0

hi
nn1pejv1pn2p2e2jvnpejv1pn1pejv
v0
nn1p1pp2np1pp

nn1p2np

Hence the variance of the binomial distribution is

222222
EXEXnn1pnpnpnp1p

156
Problem 5.16

The characteristic function of the Poisson distribution is


11
kXejv1k
X
Xvejvkek
k0k!k0k!
P1 k
jv1
Butaeaso that Xvee. Hence
k0k!

1d1jv1
EXm1 Xveejejv
X
jdvv0jv0

2hji

v1
EX2m21d Xv1deeejvj
X2
dvv0dvv0

hji
2ev1jvejv1jv2
eeee

v0

Hence the variance of the Poisson distribution is

22222
EXEX

Problem 5.17

Fornodd,xnis odd and since the zero-mean Gaussian PDF is even their product is odd. Since the

integral of an odd function over the interval1;1is zero, we obtainEXn0 forneven. Let
R1
Inxnexpx2=22dxwithneven. Then,
1
#
1"x22
dZn1x
nx1e22xn1e22dx0
dxIn12
Z1"x#
d222n1x21x2
Innn1xn2e22xne22xn2e22dx
dx2124

2n11
nn1In2InIn20
24

Thus,
In222n1In4nn1In2
pp
with initial conditionsI02 2,I222 2. We prove now that
p
In135 n1n2 2
p
The proof is by induction onn. Forn2 it is certainly true sinceI222 2. We assume that

the relation holds fornand we will show that it is true forIn2. Using the previous recursion we

have
p
In2135 n1n22n12 2
p
135 n3n1nn242 2
p
135 n1n1n22 2

ClearlyEXn1pInand
22

EXn135 n1n

157
Problem 5.18

1)fX;Yx; yis a PDF so that its integral over the support region ofx,yshould be one.

Z1Z1Z1Z1
fX;Yx; ydxdyKxydxdy
0000
"Z1#
Z1Z1Z1
Kxdxdyydxdy
0000
"1#

111
K1x2y1y2x
200200

ThusK1.

2)

P XY >11P XY1
Z1Z1
x
1xydxdy
00
Z1Z1Z1Z1
xx
1xdydxdxydy
0000
Z1Z1
1x1xdx11x2dx
002
2

3) By exploiting the symmetry offX;Yand the fact that it has to integrate to 1, one immediately sees

that the answer to this question is 1/2. The mechanical solution is:

Z1Z1
P X > Yxydxdy
0y
Z1Z1Z1Z1
xdxdyydxdy
0y0y
Z1Z1
111

x2dyyxdy
02y0y
Z1Z1
1
1y2dyy1ydy
020
1
2

4)

P X > YjX2Y >1P X > Y ; X2Y >1=P X2Y >1

158
The region over which we integrate in order to ndP X > Y ; X2Y >1is marked with anAin the

following gure.

y(1,1)

.A
.
.
.
x
1/3x+2y=1

Thus

Z1Zx
P X > Y ; X2Y >1xydxdy
11x
32
Z1
1x11x
22

1xxxdx
3222
Z1
1511
2

1xxdx
3848
49

108
Z1Z1
P X2Y >1xydxdy
01x
2
Z1
x11x111x2dx
0222
Z1
333
x2xdx
0848
31131131
32

83x042x08x0
7

Hence,P X > YjX2Y >149=108=7=814=27

5) WhenXYthe volume under integration has measure zero and thus

P XY 0
6) Conditioned on the fact thatXY, the new p.d.f ofXis

x; x
fXjxfX;YR12x:
XY
0fX;Yx; xdx

In words, we re-normalizefX;Yx; yso that it integrates to 1 on the region characterized byXY.


R1
The result depends only onx. ThenP X >1jXYfXjxdx3=4.
21=2XY

159
7)
Z1Z1
fXxxydyxydyx1
002
Z1Z1
fYyxydxyxdxy1
002

8)FXxjX2Y >1P Xx; X2Y >1=P X2Y >1


ZxZ1
P Xx; X2Y >1vydvdy
01v
2
Zx
333
v2vdv
0848
133
32

8x8x8x

Hence,
3263
xx363
fXxjX2Y >1888x2x
P X2Y >1777

Z1
EXjX2Y >1xfXxjX2Y >1dx
0
Z1
363
x3x2x

0777
31161131117
432

74x073x072x028

Problem 5.19

1)

FYyP YyP X1y[X2y[ [Xny

Since the previous events are not necessarily disjoint, it is easier to work with the function 1

FYy1P Yyin order to take advantage of the independence ofXis. Clearly

1P YyP Y > yP X1> y\X2> y\ \Xn> y

1FXy1FXy 1FXy
12n

Dierentiating the previous with respect toywe obtain

nnn
YYY
fYyfXy1FXyfXy1FXy fXy1FXy
1i2ini
i1i2in

2)

FZzP ZzP X1z; X2z; ; Xnz

P X1zP X2z P Xnz

160
Dierentiating the previous with respect tozwe obtain

nnn
YYY
fZzfXzFXzfXzFXz fXzFXz
1i2ini
i1i2in

Problem 5.20

Z1Z1
x2x2
EXxxe22dx1x2e22dx
0220

However for the Gaussian random variable of zero mean and variance2
12
1Z2x
pxe22dx2
2 21

Since the quantity under integration is even, we obtain that


12
1Z2x1
pxe22dx2
2 202

Thus,
p1r
EX12 22
2
22

In order to ndV ARXwe rst calculateEX2.


12 Z12
1Z3xx
EX2xe22dxxde22
2

00

12
x21 Zx
x2e222xe22dx

00
Z1
xx2
022e22dx22
02

Thus,

V ARXEX2EX222222
22

Problem 5.21

LetZXY. Then,
Z1Zz
y
FZzP XYzfX;Yx; ydxdy
11

Dierentiating with respect tozwe obtain


Z1Zz
y
fZzdfX;Yx; ydxdy
1dz1
Z1
fX;Yzy; ydzydy
1dz
Z1
fX;Yzy; ydy
1
Z1
fXzyfYydy

161
where the last line follows from the independence ofXandY. ThusfZzis the convolution of

fXxandfYy. WithfXxexuxandfYyexuxwe obtain

Zz
fZzevezvdv
0

Ifthen
Zz
fZz2ezdv2zezu1z
0

Ifthen
Zz
hi
fZzezevdvezezu1z
0

Problem 5.22

1)fX;Yx; yis a PDF, hence its integral over the supporting region ofx, andyis 1.

Z1Z1Z1Z1
fX;Yx; ydxdyKexydxdy
0y0y
Z1Z1
Keyexdxdy
0y
Z1
1

Ke2ydyK1e2yK1
0202

ThusKshould be equal to 2.

2)

Zx
x

fXx2exydy2exey2ex1ex
00
Z1
1

fYy2exydy2eyex2e2y
yy

3)

fXxfYy2ex1ex2e2y2exy2ey1ex

2exyfX;Yx; y

ThusXandYare not independent.


4) Ifx < ythenfXjxjy0. Ifxy, then withuxy0 we obtain
Y

x; y2exy
fUufXjxjyfX;Yexyeu
Y
fYy2e2y

162
5)

Z1Z1
EXjYyxexydxeyxexdx
yy
"1#
Z1

eyxexexdx

yy

eyyeyeyy1

6) In this part of the problem we will use extensively the following denite integral

Z1
x1exdx11!
0

Z1Z1Z1Z1
EXYxy2exydxdy2yeyxexdxdy
0y0y
Z1Z1Z1
2yeyyeyeydy2y2e2ydy2ye2ydy
000

212!211!1
2322

Z1Z1Z1
EX2xex1exdx2xexdx2xe2xdx
000

2213
222
Z1
EY 2ye2ydy211
0222
Z1Z1Z1
EX22x2ex1exdx2x2exdx2x2e2xdx
000

22!212!7
232
Z1
EY22y2e2ydy212!1
0232

Hence,

COV X; Y EXY EXEY 1311


224

and
COV X; Y1

X;Yp
EX2EX21=2EY2EY 21=25

Problem 5.23

163
Z
EX1cosd1sin0

00
Z
EY 1sind1cos2

00
Z
EXYcossin1d
0
2
1Z1Z
sin 2dsinxdx0

2040
COV X; Y EXY EXEY 0

Thus the random variablesXandYare uncorrelated. However they are not independent since

X2Y21. To see this consider the probabilitypjXj<1=2; Y1=2. ClearlypjXj<1=2pY

1=2is dierent than zero whereaspjXj<1=2; Y1=20. This is becausejXj<1=2 implies


p
that =3< <5 =3 and for these values of,Ysin >3=2>1=2.

Problem 5.24
pp
1) ClearlyX > r,Y > rimplies thatX2> r2,Y2> r2so thatX2Y2>2r2orX2Y2>2r.
pp
Thus the eventE1r fX > r ; Y > rgis a subset of the eventE2r fX2Y2>2rX; Y >0g

andP E1r P E2r .

2) SinceXandYare independent

P E1r P X > r ; Y > r P X > r P Y > r Q2r

p
3) Using the rectangular to polar transformationVX2Y2,arctanYit is proved (see text
X
Eq. 4.1.22) that
v2
fV ;v; ve22
22

Hence, with21 we obtain

1Z22
ppZv
v
PX2Y2>2rX; Y >0pe2dvd
2r02
1221
1
v v
1Z
ve2dve2
4p2r4p
2r
12
r

4e

Combining the results of part 1), 2) and 3) we obtain

2 1r2
Q2r 1erorQre2
42

164
Problem 5.25

The following is a program written in Fortran to compute theQfunction

REAL*8x,t,a,q,pi,p,b1,b2,b3,b4,b5

PARAMETER(p=.2316419d+00, b1=.31981530d+00,

+ b2=-.356563782d+00, b3=1.781477937d+00,

+ b4=-1.821255978d+00, b5=1.330274429d+00)

C-

pi=4.*atan(1.)

C-INPUT

PRINT*,Enter -x-

READ*,x

C-

t=1./(1.+p*x)

a=b1*t + b2*t**2. + b3*t**3. + b4*t**4. + b5*t**5.

q=(exp(-x**2./2.)/sqrt(2.*pi))*a

C-OUTPUT

PRINT*,q

C-

STOP

END

The results of this approximation along with the actual values ofQx(taken from text Table 4.1)

are tabulated in the following table. As it is observed a very good approximation is achieved.

xQxApproximation

1.1:591011:587101

1.56:681026:685102

2.2:281022:276102

2.56:211036:214103

3.1:351031:351103
3.52:331042:328104

4.3:171053:171105

4.53:401063:404106

5.2:871072:874107

Problem 5.26

165
The joint distribution ofXandYis given by
801019
><2>=
0X
CBC
fX;Yx; y1exp1X YB@A@A>
2 2>:22;
0Y

The linear transformationsZXYandW2XYare written in matrix notation as


01010101
Z1 1XX
BCBCBCBC
@A@A@AA@A
W21YY

Thus,
8019
><Z>=
BC
fZ;Wz; w1exp1Z WM1@A>
2detM1=2>:2;
W

where010101
2222
02Z
CtBCBZ;WZWC
MAB@AA@A@A
02252Z2
;WZWW
p
From the last equality we identify222,252and Z1=10
ZW;W

Problem 5.27

p
x; y2 Y
fXjYxjyfX;YqexpA
fYy2
2 XY1X
;Y

where

222
ymYxmXymYymY
AxmX2
21222122212XY22
X;YXX;YYX;YY
2!
1ymY22xmXymYX
;Y
xmX2XX2
21222Y
X;YXY

1X2
xmXymY
2122Y
X;YX

Thus
(2)

fXjYxjy1qexp1xmXymYX
p22
2 X1221X;YXY
X;Y

which is a Gaussian PDF with meanmXymYX=Yand variance122. If0


X;YX
thenfXjYxjyfXxwhich implies thatYdoes not provide any information aboutXorX,Yare

independent. If 1 then the variance offXjYxjyis zero which means thatXjYis deterministic.

This is to be expected since 1 implies a linear relationXAYbso that knowledge ofY

provides all the information aboutX.

166
Problem 5.28

1)ZandWare linear combinations of jointly Gaussian RVs, therefore they are jointly Gaussian too.

2) SinceZandWare jointly Gaussian with zero-mean, they are independent if they are uncorrelated.

This implies that they are independent ifEZW 0. ButEZW EXY cos2sin2where

we have used the fact that sinceXandYare zero-mean and have the same variance we have

EX2EY2, and therefore,EY2EX2cos0. From above, in order forZandWto

be independent we must have

cos2sin20=)k; k2 Z
42

Note also that ifXandYare independent, thenEXY 0 and any rotation will produce independent

random variables again.

Problem 5.29

1)fX;Yx; yis a PDF and its integral over the supporting region ofxandyshould be one.
Z1Z1
fX;Yx; ydxdy
11
Z0Z0Z1Z1
Kx2y2Kx2y2
e2dxdye2dxdy
1100
02Z02Z12Z12
xyKxy
KZ
e2dxe2dxe2dxe2dx

1100
K1p

22 2K
2

ThusK1

2) Ifx <0 then


Z0Z0
x2y2x2y2
fXx1e2dy1e2e2dy
11
1x21p1x2
e22pe2
22

Ifx >0 then


Z1Z1
x2y2x2y2
fXx1e2dy1e2e2dy
00
1x21p1x2
e22pe2
22
2
Thus for everyx,fXx1pex2which implies thatfXxis a zero-mean Gaussian random
2
variable with variance 1. SincefX;Yx; yis symmetric to its arguments and the same is true for the

region of integration we conclude thatfYyis a zero-mean Gaussian random variable of variance 1.

167
3)fX;Yx; yhas not the same form as a binormal distribution. Forxy <0,fX;Yx; y0 but a

binormal distribution is strictly positive for everyx,y.

4) The random variablesXandYare not independent for ifxy <0 thenfXxfYy0 whereas

fX;Yx; y0.

5)
Z0Z0Z1Z1
x2y2x2y2
EXY 1XY e2dxdy1e2dxdy

1100
02Z02Z12Z12
1
xy xy
1Z
Xe2dxY e2dyXe2dxY e2dy

1100
112
11

Thus the random variablesXandYare correlated sinceEXY 0 andEXEY 0, so that

EXY EXEY 0.

x;y
6) In generalfXjx; yfX;Y. Ify >0, then
Y
fYy
8
><0
x <0
fXjx; yqx2
Y
>:2
e2x0

Ify0, then
8
><0
x >0
fXjx; yqx2
Y
>:2
e2x <0

Thuss
x2
fXjx; y2e2uxy
Y

which is not a Gaussian distribution.


Problem 5.30

()
22
fX;Yx; y1expxmy
2 222

With the transformation


pY
VX2Y2;arctan
X
we obtain

fV ;v; vfX;Yvcos; vsin


()
vvcosm2v2sin
exp

2 222
()
vv2m22mvcos

exp
2 222

168
To obtain the marginal probability density function for the magnitude, we integrate overso that

Z2
v2m2mvcos
fVvve22e2d
02 2
2
mvcos
vv2m21Z2
2

2e2ed
20
vv2m2mv
2

2e2I02

where
2
mvcos
mv1Z2
I0ed
2
20

Withm0 we obtain
8v
><v2
e22v >0
fVv2
>:
0v0

which is the Rayleigh distribution.

Problem 5.31

1)LetXibe a random variable taking the values 1, 0, with probability1and3respectively. Then,


44
Pn
mX11301. The weak law of large numbers states that the random variableY1Xi
i444ni1
has mean which converges tomXwith probability one. Using Chebychevs inequality (see Problem
i
2P2000
4.13) we haveP jYmXjYfor every >0. Hence, withn2000,ZXi,mX1
i2i1i4
we obtain

22
P jZ500j 2000Y)P 5002000Z50020001Y
22

Pn
The variance2ofY1Xiis12, where2p1p3(see Problem 4.13). Thus, with
Yni1nXiXi16
0:001 we obtain
P 480Z52013=16:063
2101
Pn
2)Using the C.L.T. the CDF of the random variableY1Xiconverges to the CDF of the random
ni1
variableNmX;p. Hence
in

0101

480520
nmXinmXi
AQ@A
Pp480Y520Q@
nn

Withn2000,mX1,2p1pwe obtain
i4n
!!

PQ480500pQ520500p
2000p1p2000p1p

12Q20p:682
375

169
Problem 5.32

The random variableXt0is uniformly distributed over1 1. Hence,

mXt0EXt0EX0

As it is observed the meanmXt0is independent of the time instantt0.

Problem 5.33

mXtEABtEAEBt0

where the last equality follows from the fact thatA,Bare uniformly distributed over1 1so that

EAEB0.

RXt1; t2EXt1Xt2EABt1ABt2

EA2EABt2EBAt1EB2t1t2

The random variablesA,Bare independent so thatEABEAEB0. Furthermore

Z1
1111
EA2EB2x2dxx3
12613

Thus
11
RXt1; t2t1t2
33

Problem 5.34

SinceXtXwith the random variable uniformly distributed over1 1we obtain

fXx1; x2; : : : ; xnfX;X;;Xx1; x2; : : : ; xn


t1;Xt2;;Xtn

for allt1; : : : ; tnandn. Hence, the statistical properties of the process are time independent and by

denition we have a stationary process.

Problem 5.35

1)f cannot be the autocorrelation function of a random process forf 00< f 1=4f01.

Thus the maximum absolute value off is not achieved at the origin0.

2)f cannot be the autocorrelation function of a random process forf 00 whereasf 0


for0. The maximum absolute value off is not achieved at the origin.

170
3)f 01 whereasf > f 0forjj>1. Thusf cannot be the autocorrelation function of a

random process.

4)f is even and the maximum is achieved at the origin (0). We can writef as

f 1:211

Taking the Fourier transform of both sides we obtain

Sf 1:2sinc2f sinc2f ej2 fej2 fsinc2f 1:22 cos2 f

As we observe the power spectrumSf can take negative values, i.e. forf0. Thusf can not

be the autocorrelation function of a random process.

Problem 5.36

The random variable!itakes the valuesf1;2; : : : ;6gwith probability1. Thus


6
Z1

EXEX2tdt
1
Z1Z1

E!2e2tu2tdtE!2e2tdt
1i10i
Z1Z1
6
X
E!2e2tdt1i2e2tdt
0i06
i1
11
91Z2911

etdte2t
60620
91

12

Thus the process is an energy-type process. However, this process is not stationary for

mXtEXtE!ietu1t21etu1t
6

is not constant.

Problem 5.37

1) We nd rst the probability of an even number of transitions in the interval0; .

pNnevenpN0pN2pN4
2
11X

11
l0
11

12
12
1
1

12

171
The probabilitypNnoddis simply 1pNneven. The random processZttakes
12
the value of 1 (at time instantt) if an even number of transitions occurred given thatZ01, or if

an odd number of transitions occurred given thatZ00. Thus,

mZtEZt1pZt10pZt0

pZt1jZ01pZ01pZt1jZ00pZ00

pNneven1pNnodd1
22
1

2) To determineRZt1; t2note thatZt1 ifZt1 and an even number of transitions

occurred in the intervalt; t, or ifZt0 and an odd number of transitions have taken place

int; t(we are assuming >0). Hence,

RZt; tEZtZt

1pZt1; Zt10pZt1; Zt0

0pZt0; Zt10pZt0; Zt0

pZt1; Zt1pZt1jZt1pZt1
11

212

As it is observedRZt; tdepends only onand thus the process is stationary. The above is for

>0, in general we have


1jj
RZ
212jj

Since the process is WSS its PSD is the Fourier transform of its autocorrelation function, nding the

Fourier transform of the autocorrelation function is not an easy task. We can use integral tables to

show that

Sf 1f 1sgnf sin fcos fcos f


Z
244
1 f f1 f f

2sinSi2cosCi

where
Zx
Sixsintdt
0t
Zx
Cix lnxcost1dt
0t

Finding the power content of the process is much easier and is done by substituting0 in the

autocorrelation function resulting inPZRZ01.


2

3) Since the process is stationary

PZRZ01
2

172
Problem 5.38

1)

mXtEXtEXcos2 f0tEYsin2 f0t

EXcos2 f0tEY sin2 f0t

where the last equality follows from the fact thatEXEY 0.

2)

RXt; tEXcos2 f0tYsin2 f0t

Xcos2 f0tYsin2 f0t

EX2cos2 f0tcos2 f0t

EXYcos2 f0tsin2 f0t

EY Xsin2 f0tcos2 f0t

EY2sin2 f0tsin2 f0t


2

2tcos2 f0

2cos2 f0
2

cos2 f02t
2cos2 f0
2
cos2 f0

where we have used the fact thatEXY 0. Thus the process is stationary forRXt; tdepends

only on.

3) The power spectral density is the Fourier transform of the autocorrelation function, hence

2
Sfff0ff0:
X
2

4) If22, then
XY

mXtEXcos2 f0tEY sin2 f0t0


173
and

RXt; tEX2cos2 f0tcos2 f0t

EY2sin2 f0tsin2 f0t


2

X
2tcos2 f0
2cos2 f0
2

Y
cos2 f02t
2cos2 f0
22

XY

2t
2cos2 f0
22

XY

2cos2 f0

The process is not stationary forRXt; tdoes not depend only onbut ontas well. However

the process is cyclostationary with periodT01. Note that ifXorYis not of zero mean then the
2f0
period of the cyclostationary process isT01.
f0

Problem 5.39

RXYt1; t2EXt1Y t2EY t2Xt1RY Xt2; t1

If we lett1t2, then using the previous result and the fact thatXt,Y tare jointly stationary,

so thatRXYt1; t2depends only on, we obtain

RXYt1; t2RXYt1t2RY Xt2t1RY X

Taking the Fourier transform of both sides of the previous relation we obtain

Sf FRXY FRY X
XY
Z1
RY Xej2 f d
1
Z1

0
RY X0ej2 fd0 Sf
1Y X

Problem 5.40

1)Sf N0,RXN0. The autocorrelation function and the power spectral density of the
X
22
output are given by

RYtRX ? h ? h;Sf Sf jHf j2


YX

WithHf fwe havejHf j22ffso that


2B2B2B

f
Sf N0
Y
22B

174
Taking the inverse Fourier transform of the previous we obtain the autocorrelation function of the

output

RY2BN0sinc2BBN0sinc2B
2

2)The output random processY tis a zero mean Gaussian process with variance

222

Y tEYtEYtRY0BN0

The correlation coecient of the jointly Gaussian processesY t,Y tis

COV Y tY tEY tY tRY

Y tY t

Y tY tBN0BN0

With1, we haveRY1sinc10 so thatY0. Hence the joint probability


2B2B tY t
density function ofY tandY tis
22
1YtYt
fYe2BN0
tY t
2 BN0

Since the processes are Gaussian and uncorrelated they are also independent.

Problem 5.41

The impulse response of a delay line that introduces a delay equal toishtt. The

output autocorrelation function is

RYRX ? h ? h

But,

Z1
h ? httdt
1
Z1
ttdt
1
Z1
t0t0dt0
1

Hence,

RYRX ? RX

This is to be expected since a delay line does not alter the spectral characteristics of the input
process.

175
Problem 5.42

The converse of the theorem is not true. Consider for example the random processXt

cos2 f0tXwhereXis a random variable. Clearly

mXtcos2 f0tmX

is a function of time. However, passing this process through the LTI system with transfer function
f

2WwithW < f0produces the stationary random processY tX.

Problem 5.43

1)Y tdXtcan be considered as the output process of a dierentiator which is known to be a


dt
LTI system with impulse responseht0t. SinceXtis stationary, its mean is constant so that

mYtmX0tmXt00

To prove thatXtanddXtare uncorrelated we have to prove thatRXX00mXtmX0t0


dt
or sincemX0t0 it suces to prove thatRXX000. But,

RXX0RX ? 0 RX ? 0 R0
X

and sinceRXRXwe obtain

RXX0 R0R0 RXX0


XX

ThusRXX0is an odd function and its value at the origin should be equal to zero

RXX000

The last proves thatXtanddXtare uncorrelated.


dt

2)The autocorrelation function of the sumZtXtdXtis


dt

RZRXRX0RXX0RX0
X

If we take the Fourier transform of both sides we obtain

Sf Sf S0f 2ReS0f
ZXXXX

But,S0f FRX ? 0 Sf j2 f so that ReS0f 0. Thus,


XXXXX

Sf Sf S0f
ZXX

3)Since the transfer function of a dierentiator isj2 f, we haveS0f 42f2Sf , hence


XX
Sf Sf 142f2
ZX

176
Problem 5.44

1)The impulse response of the system isht Lt0t0tT . It is a LTI system so

that the output process is a stationary. This is true sinceY tc LXtcfor allc, so ifXt

andXtchave the same statistical properties, so do the processesY tandY tc.

2)Sf Sf jHf j2. But,Hf j2 fj2 f ej2 f Tso that


YX

2
Sf Sf 42f21ej2 f T
YX

Sf 42f21cos2 f T 2sin22 f T
X

Sf 82f21cos2 f T
X

3)The frequencies for whichjHf j20 will not be present at the output. These frequencies are

f0, for whichf20 andf1k,k2 Z, for which cos2 f T 1.


2TT

Problem 5.45

1)Y tXt ? ttT . Hence,

Sf Sf jHf j2 Sf j1ej2 f Tj2


YXX

Sf 21cos2 f T
X

2)Y tXt ? 0tt. Hence,

Sf Sf jHf j2 Sf jj2 f1j2


YXX

Sf 142f2
X

3)Y tXt ? 0ttT . Hence,

Sf Sf jHf j2 Sf jj2 fej2 f Tj2


YXX

Sf 142f24 fsin2 f T
X

Problem 5.46
Using Schwartzs inequality

E2XtY tEX2tEY2tRX0RY0

177
where equality holds for independentXtandY t. Thus
1

jRXYj E2XtY t2R1=20R1=20


XY

The second part of the inequality follows from the fact 2aba2b2. Thus, withaR1=20and
X
bR1=20we obtain
Y

R1=20R1=201RX0RY0
XY
2

Problem 5.47

1)

RXYRX ? RX ?

ejj? ejj

RYRXY ? ejj?

ejj

2)

Z1
jvj
RXYejj? 1edv

1tv
Z1Z1
jvj
RYRXY ?1e1dsdv

11svs
(5.17)

The case ofRYcan be simplied as follows. Note thatRY F1Sf whereSf


YY
Sf jHf j2. In our case,Sf 2andjHf j22sgn2f . SinceSf does not
XX222X
4f
contain any impulses at the origin (f0) for whichjHf j20, we obtain

RY F1Sf 2ejj
Y

3)The transfer function isHf 1. Therefore


j2 f

Sf Sf jHf j2 Sf 12
YXX
2222222
4f4f
Since2aejj, applying the dierentiation in the frequency domain result we have
222
4f

d22
ajj
df242f2je

resulting in
j2 f 2
jj
2222ae
4f2

178
Now we can apply integration in the time domain result to conclude that

21Zj
uj
2222auedu
4f21

Integration of the right hand side is simple and should be carried out considering <0 and >0

separately. If we do this we will have


"#
211
RY F1jjejjejj
22222
4f22

ForSf we have
XY

Sf Sf Hf 2 2j2 f
XYX
222 2222
4fj2 f2f

or"#"#
22j2 f 2
RXY F1 F1
22222222
4f4f

The inverse Fourier transform of the rst term we have already found, for the second term we apply

the dierentiation property of the Fourier transform. We have

11d11
RXYejjjjejjejjjjejj
22d222

This simplies to
11
RXYejj jj
2

4)The systems transfer function isHf 1j2 f. Hence,


1j2 f

Sf Sf Hf 21j2 f
XYX
222
4f1j2 f
411111

121j2 f1j2 f1j2 f

Thus,

RXY F1Sf
XY
411
eu1eu1eu1
1211
22
For the output power spectral density we haveSf Sf jHf j2 Sf 14f Sf .
YXX22X
14f
Hence,

RY F1Sf ejj
X

5)The impulse response of the system isht1t. Hence,


2T2T

RXYejj?1ejj?1
2T2T2T2T
T
1Zj
evjdv
2TT

179
IfT, then
1T1
RXY ev eT eT
2TT2T

If 0 < T, then

0ZT
1Zv1
RXYedvevdv
2TT2T0
1
TT

2T 2e e

The autocorrelation of the output is given by

RYejj?1 ?1
2T2T2T2T

ejj?1
2T2T
2T
1Zjxj
1ejxjdx
2T2T2T

If2T, then
eh2i
RYeTe2T2
2T 2

If 0 <2T, then

e2T1e
RYee2
4T22T 2T224T22

Problem 5.48

Consider the random processesXtXej2 f0tandY tY ej2 f0t, whereXandYare iid random

variables uniformly distributed on0;1. Clearly

RXYt; tEXtYtEXY ej2 f0


However, bothXtandY tare nonstationary forEXtEXej2 f0tEY tEY ej2 f0t
1j2 ft
2e0are not constant, henceXtandY tcannot be stationary.

Problem 5.49
1.The power is the area under the power spectral density, which has a triangular shape with a

base of 2105and height of 4105. Therefore

Z1
PxSf df1210541054 W
X
12

180
2. The range of frequencies are105;105, hence the bandwidth is 105Hz or 100 kHz.

3. The transfer function of the ideal lowpass lter isHf f, therefore,


105
8

4105f;jfj<0:5105
ff<105
Sf Sf jHf j24105
YX
105105:0;otherwise

and the total power is the area underSf . Plot ofSf is shown below
YY

Sf
Y

4105

f
0:51050:5105

Therefore,
Z1
1
PYSf df105210510521053 W
Y
12

4.SinceXtis Gaussian,X0is a Gaussian random variable. SinceXtis zero-mean,X0has

mean equal to zero. The variance inX0isEX20which is equal toRX0, i.e, the power in

Xtwhich is 4. Therefore,X0is a Gaussian random variable with meanm0 and variance


2
4. The desired PDF is
2
fXx1pex=8
0
8

5.Since for Gaussian random variables independence means uncorrelated, we need to nd the

smallestt0such thatRXt00. But


125
RXFSf 4 sinc10
X

and its rst zero occurs at 105t01 ort0105.

Problem 5.50
1. The power isPXRX04 Watts.

2. We have

f
Sf FRX4104
X
104

181
3.Sf occupies the frequency range104;104, therefore the bandwidth is 104Hz or 10 kHZ.
X

4. We have
8

4104fjfj<5103
ff<104
Sf Sf jHf j24104
YX
104104:0 otherwise

andPYis the area underSf . The plot ofSf is shown below


YY

Sf
Y

4104

f
0:51040:5104

R1
andPYSf df1042104110421043 W
1Y2

5.SinceXtis Gaussian and zero-mean, all random variables are zero-mean Gaussian with

variancesEX20,EX2104, andEX21:5104. But all these variances are equal to


R1
RX0Sf df4, hence all random variables are distributed according aN0;4
1X
PDF.

6.The covariance betweenX0andX104isRX1040, therefore these random variables

are uncorrelated, and since they are jointly Gaussian, they are also independent. ForX0

andX1:5104the covariance isRX1:51044sinc21:560, hence the two random

variables are correlated and hence dependent.

Problem 5.51

1.The impulse response of the system is obtained by puttingxtt. The output, which is

htishtt110t1. The transfer function is


2

Hf Fht11j2 fej2 f1j f ej2 f


2

We can usemYmXH021012.
8
<10322
1f;jfj 200
2.Sf Sf jHf j2Sf 12f2
YXX
:0
;otherwise

182
3. We have

Z1Z200
2
PYSf df210312f2 df4001610652638:3 W
Y
103

4.Y tis the result of passing a WSS process through an LTI system, therefore it is WSS.

5.Y tis the result of passing a Gaussian process through an LTI system, therefore it is Gaussian.

R1

6.Y 1is a zero-mean Gaussian random variable with varianceEY21RY0Sf df


1Y
52638:3.

Problem 5.52

1.The transfer function fromXttoY tis the Fourier transform of the impulse responseht

t20t, i.e.,Hf 1j4 f. HencemYmXH00 andSf Sf jHf j2


YX
1162f2N0.
2

2.
8

N0
<122
16f;jfj W
Sf Sf f2
ZY
2W:0;otherwise

3. SinceXtis WSS and system is LTI,Ztis also WSS.

R1

4. SinceZtis zero mean, its variance isEZ2tRZ0Sf df. Hence,


1Z
Z4
2N022

Z2116f df3372:8N0
02

5. The power inY tis the integral ofSf over all frequencies which is innite.
Y

Problem 5.53

1)
Z
4
EXt4Acos2 f0td

4A4
sin2 f0t

0
4A
sin2 f0tsin2 f0t
4

Thus,EXtis periodic with periodT1.


f0

183
RXt; tEA2cos2 f0tcos2 f0t

A2
2tcos2 f0
2Ecos2 f0
A2A2
2t
2cos2 f02Ecos2 f0
4
A2A24Z
cos2 f02td

2cos2 f020

A2A2

cos2 f02tsin2 f02t

2cos2 f0

which is periodic with periodT01. Thus the process is cyclostationary with periodT1. Using
2f0f0
the results of Problem 4.48 we obtain
ZT
Sf F1RXt; tdt
X
T0
" ZT#
22
A
FAcos2 f0cos2 f02tsin2 f02tdt
2T0
"#
2
FAcos2 f0
2

A2
ff0

4ff0

2)

RXt; tEXtXtEXY XY

EX2EY2EY XEXY

EX2EY22EXY

where the last equality follows from the independence ofXandY. But,EX0 sinceXis uniform

on1;1so that
112
RXt; tEX2EY2
333

The Fourier transform ofRXt; tis the power spectral density ofXt. Thus

Sf FRXt; t2f
X
3

Problem 5.54

htetu1t)Hf 1. The power spectral density of the input process isSf


j2 fX
Fejj2. If, then
222
4f

2
Sf Sf jHf j2
YX
2222
4f

184
If, then
2
Sf Sf jHf j2
YX
222222
4f4f

Problem 5.55

1)LetY tXtNt. The processXtis the response of the systemhtto the input process

Y tso that

RRY ? h
YX

RXRNRXNRNX ? h

Also by denition

REXtNtXtRR
YXXXNX

RRN ? hRNX ? h
XX

Substituting this expression forRin the previous one, and cancelling common terms we obtain
YX

RRX ? hRXN ? h
XX

2)
hi
EXtXt2RX0R0R0R0
XXXXX
hi
We can writeEXtXt2in terms of the spectral densities as

Z1
hi
EXtXt2Sf Sf 2Sf df
X
1XXX
Z1
h
Sf Sf Sf 2ReSf jHf j2
XXNXN
1

2Sf Sf Hf df
XXN

hi
To nd theHf that minimizesEXtXt2we set the derivative of the previous expression,

with respect toHf , to zero. By doing so we obtain

f Sf
Hf SXXN
Sf Sf 2ReSf
XNXN

3)IfXtandNtare independent, then

RXNEXtNtEXtENt

SinceENt0 we obtainRXN0 and the optimum lter is

f
Hf SX
Sf N0
X
2

185
hi
The corresponding value ofEXtXt2is

Z1
hiS
f N0
EminXtXt2Xdf
12SXf N0

4)WithSf 1,Sf 1andSf 0, then


NX2XN
1f

1
f21
Hf1
112f2
1f2

Problem 5.56

1)LetXtandXtbe the outputs of the systemshtandgtwhen the inputZtis applied.

Then,

EXtXt2EXtXtXtXt2

EXtXt2EXtXt2

EXtXtXtXt

But,

EXtXtXtXt

EXtXtZt ? htgt
Z1

EXtXthgZtd
1
Z1
hi
EXtXtZthgd0
1
hi
where the last equality follows from the assumptionEXtXtZt0 for allt,. Thus,

EXtXt2EXtXt2EXtXt2

and this proves that

EXtXt2EXtXt2

2)

EXtXtZt0)EXtZtEXtZt

or in terms of crosscorrelation functionsRXZRR. However,R


XZZXZX
RZ ? hso that
RXZRZ ? hRZ ? h

3)Taking the Fourier of both sides of the previous equation we obtain

f
Sf Sf Hf orHf SXZ
XZZ
Sf
Z

186
4)
hi
E2tEXtXtXtXt

EXtXtEXtXt
Z1

RX0EZtvhvXtdv
1
Z1
RX0RZXvhvdv
1
Z1
RX0RXZvhvdv
1

where we have used the fact thatEXtXtXtEXtXtZt ? ht0

Problem 5.57

the noise equivalent bandwidth of a lter is


R1
jHf j2df
Bneq1
2H2max

If we have an ideal bandpass lter of bandwidthW, thenHf 1 forjff0j< Wwheref0is the

central frequency of the lter. Hence,


2ZW3
ZfW
1f0202
Bneq4Wdfdf5W
2ffW
00
22

Problem 5.58

1)The power spectral density of the in-phase and quadrature components is given by
8
><S
ff0 Sff0jfj<7
n
Sf Sfn
ncns
>:0
otherwise

If the passband of the ideal lter extends from 3 to 11 KHz, thenf07 KHz is the mid-band

frequency so that
8
><N
jfj<7
Sf Sf0
ncns
>:0
otherwise

The cross spectral density is given by


8
><j
Sff0 Sff0jfj<7
n
Sfn
ncns
>:0
otherwise

HoweverSff0 Sff0forjfj<7 and thereforeSf 0. It turns then that the


nnncns
crosscorrelationRnnis zero.
cs

187
2)Withf0=6 KHz
8
N0
>>>3
2<jfj<5
><
Sf SfNjfj<3
ncns0
>>>
>:
0 otherwise

The cross spectral density is given by


8
>>>jN0
25< f <3
><
SfjN03< f <5
ncns
2
>>>
>:
0 otherwise

Hence,

t4N0t4
Rnn F1jN0j
cs
2222

jN02sinc2ej24jN02sinc2ej24
22
2N0sinc2sin24

Problem 5.59

The in-phase component ofXtis

XctXtcos2 f0tXtsin2 f0t


1
X
AnptnT cos2 f0tnT
n1
1
X
AnptnT sin2 f0tnT
n1
1
X
AnptnT cos2 f0tnT ptnT sin2 f0tnT
n1
1
X
AnpctnT
n1

where we have used the factpctptcos2 f0tptsin2 f0t. Similarly for the quadrature

component
XstXtcos2 f0tXtsin2 f0t
1
X
AnptnT cos2 f0tnT
n1
1
X
AnptnT sin2 f0tnT
n1
1
X
AnptnT cos2 f0tnT ptnT sin2 f0tnT
n1
1
X

AnpstnT
n1

188
Problem 5.60

The envelopeV tof a bandpass process is dened to be

q
V tX2ctX2st

whereXctandXstare the in-phase and quadrature components ofXtrespectively. However,

both the in-phase and quadrature components are lowpass processes and this makesV ta lowpass

process independent of the choice of the center frequencyf0.

Problem 5.61

1)The power spectrum of the bandpass signal is


8
><N0
jffcj< W
Sf2
n
>:0
otherwise

Hence,
8
><N
jfj< W
Sf Sf0
ncns
>:0
otherwise

RW
The power content of the in-phase and quadrature components ofntisPnN0df2N0W
W

2)SinceSf 0, the processesNct,Nstare independent zero-mean Gaussian with variance


ncns
q
222
Pn2N0W. Hence,V tNctNstis Rayleigh distributed and the PDF is given by

8v
2
><v2
e4N0Wv0
fVv2N0W
>:
0 otherwise

3)Xtis given by

XtANctcos2 f0tNStsin2 f0t


q
The processANctis Gaussian with meanAand variance 2N0W. Hence,V tANct2N2st

follows the Rician distribution (see Problem 4.31). The density function of the envelope is given by
8v
2
><v2A
I0Ave4N0Wv0
fVv2N0W2N0W
>:
0 otherwise

where
Z
I0x1excosudu
2

189
Problem 5.62

1)The power spectral densitySf is depicted in the following gure. The output bandpass process
n
has non-zero power content for frequencies in the band 4910 6 jfj 51106. The power

content is

Z496Z516
1010
P1081fdf1081fdf
5110610849106108

49106491065110651106

11
108x1016x2108x1016x2

5110625110649106249106
2102

108

51075107108

2)The output processNtcan be written as

NtNctcos250106tNstsin250106t

whereNctandNstare the in-phase and quadrature components respectively, given by

NctNtcos250106tNtsin250106t

NstNtcos250106tNtsin250106t

The power content of the in-phase component is given by

EjNctj2EjNtj2cos2250106tEjNtj2sin2250106t

EjNtj22102

where we have used the fact thatEjNtj2EjNtj2. Similarly we nd thatEjNstj2

2102.

3)The power spectral density ofNctandNstis

8
><S
f50106 Sf50106jfj 50106
N
Sf SfN
NcNs
>:0
otherwise

Sf is depicted in the next gure. The power content ofSf can now be found easily as
NcNc
Z106
PNPN108df2102
cs
106

190
108

106106

4)The power spectral density of the output is given by

Sf Sf jHf j2jfj 491061081016jfjfor 49106 jfj 51106


YX

Hence, the power content of the output is

Z496
10
PYf491061081016f df
51106
Z516
10

f491061081016f df
49106
4
2104102
3

The power spectral density of the in-phase and quadrature components of the output process is

given by

Sf Sf f5010649106 1081016f50106
YcYs

f5010649106 1081016f50106

21016f2102

forjfj 106and zero otherwise. The power content of the in-phase and quadrature component is

Z106
PYPY21016f2102df
cs
106
66
11010
21016f3102f

31066
10
4
2104102PY
3

Computer Problems
Computer Problem 5.1

We rst generate the uniformly distributed random variableuiby using matlab function rand, then

we generate the random variableXby using


q
xi2ui(5.18)

191
Figure 5.1 presents the plot of the histogram of the 10000 randomly generated samples. It should be

noted that this histogram of the random variables is similar to linear probability density function

f x.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 5.1

S= 10000;% Number of samples


u=rand(1,S);%Generate uniformly dist. random numbers
x= 2.*sqrt(u);
N=HIST(x,20);
xa= 0:0.1:1.9;
plot(xa,N);

Computer Problem 5.2

1) The MATLAB function that implements the method given in the question is given as

function[gsrv1,gsrv2]=gngauss(m,sgma)
% [gsrv1,gsrv2]=gngauss(m,sgma)
% [gsrv1,gsrv2]=gngauss(sgma)

1200

1000

800

600

400

200

0
00.511.52

Figure 5.1: Histogram of the random variableXin Computer Problem 5.1

192
3500

3000

2500

2000

1500

1000

500

0
-6-4-20246

Figure 5.2: Histogram of the random variableXin Computer Problem 5.2

% [gsrv1,gsrv2]=gngauss
% GNGAUSS generates two independent Gaussian random variables with mean
% m and standard deviation sgma. If one of the input arguments is missing,
% it takes the mean as 0.
% If neither the mean nor the variance is given, it generates two standard
% Gaussian random variables.
if nargin ==0,10
m=0; sgma=1;
elseif nargin ==1,
sgma=m; m=0;
end;
u=rand;% a uniform random variable in (0,1)
z=sgma*(sqrt(2*log(1/(1u))));% a Rayleigh distributed random variable
u=rand;% another uniform random variable in (0,1)
gsrv1=m+z*cos(2*pi*u);
gsrv2=m+z*sin(2*pi*u);

2) Figure 5.2 presents the plot of the histogram of the 10000 randomly generated samples. It should

be noted that this histogram of the random variables is similar to the Gaussian probability density

functionfXx.

Computer Problem 5.3

1) Figure 5.3 presents the plot ofRXm.

193
0.09

0.08

0.07

0.06

0.05
(m)
x
R
0.04

0.03

0.02

0.01

-0.01
01020304050
m

Figure 5.3: The autocorrelation function in Computer Problem 5.3

2) Figure 5.4 presents the plot ofSXf .

The MATLAB script that implements the generation of the sequencefXng, the computation of the

autocorrelation, and the computation of the power spectrumSf is given next. We should note
x
that the estimates of the autocorrelation function and the power spectrum exhibit a signicant

variability. Therefore, it is necessary to average the sample autocorrelation over several realizations.
RmandS
xxf presented in Figures 5.3 and 5.4 are obtained by running this program using the
average autocorrelation over ten realizations of the random process.

% MATLAB script for Computer Problem 5.3.


echo on
N=1000;
M=50;
Rxav=zeros(1,M+1);
Sxav=zeros(1,M+1);
for j=1:10,% Take the ensemble average over ten realizations
X=rand(1,N)1/2;% N i.i.d. uniformly distributed random variables
% between -1/2 and 1/2.
Rx=Rxest(X,M);% autocorrelation of the realization10
Sx=tshift(abs(t(Rx)));% power spectrum of the realization
Rxav=Rxav+Rx;% sum of the autocorrelations
Sxav=Sxav+Sx;% sum of the spectrums
echo o ;
end;
echo on ;

194
0.14

0.12

0.1

0.08
(m)
x
S

0.06

0.04

0.02

0
-0.500.5
f

Figure 5.4: The power spectrum in Computer Problem 5.3

Rxav=Rxav/10;% ensemble average autocorrelation


Sxav=Sxav/10;% ensemble average spectrum
% Plotting comments follow

function[Rx]=Rxest(X,M)
% [Rx]=Rxest(X,M)
% RXEST estimates the autocorrelation of the sequence of random
% variables given in X. Only Rx(0), Rx(1), . . . , Rx(M) are computed.
% Note that Rx(m) actually means Rx(m-1).
N=length(X);
Rx=zeros(1,M+1);
for m=1:M+1,
for n=1:Nm+1,
Rx(m)=Rx(m)+X(n)*X(n+m1);10
end;
Rx(m)=Rx(m)/(Nm+1);
end;

Computer Problem 5.4

195
1

0.9

0.8

0.7

0.6
(f )
y
S
0.5

0.4

0.3

0.2

0.1

0
-2-1.5-1-0.500.511.52
f

Figure 5.5: Plot ofSf in Computer Problem 5.4


y

1)The frequency response of the lter is easily shown to be

Hf 1(5.19)
1j2 f

Hence,

Sf jHf j2
y
1
(5.20)

12 f 2

The graph ofSf is illustrated in Figure 5.5.


y
2) Figure 5.5 presents the plot of the autocorrelation function of the lter outputyt.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 5.4.


echoon
delta=0.01;
Fmin=2;
Fmax=2;
f=Fmin:delta:Fmax;
Sx=ones(1,length(f));
H=1./(1+(2*pi*f).^2);
Sy=Sx.*H.^2;
196
1

0.9

0.8

0.7

0.6
(m)
y
R
0.5

0.4

0.3

0.2

0.1

0
01020304050
m

Figure 5.6: Plot of the autocorrelation function of the lter outputytin Computer Problem 5.4

plot(f,Sy);10
N=256;% number of samples
deltaf=0.1;% frequency separation
f=[0:deltaf:(N/2)*deltaf,(N/21)*deltaf:deltaf:deltaf];
% Swap the rst half.
Sy=1./(1+(2*pi*f).^2);% sampled spectrum
Ry=it(Sy);% autocorrelation of Y
% Plotting command follows.
gure;
plot(tshift(real(Ry)));

Computer Problem 5.5

The MATLAB scripts for all computations are given next. Figures 5.7, 5.8, 5.9 and 5.10 illustrate

the estimates of the autocorrelation functions and the power spectra. We note that the plots of the

autocorrelation function and the power spectra are averages over ten realizations of the random

process.

% MATLAB script for Computer Problem 5.5.


N=1000;% the maximum value of n
M=50;
Rxav=zeros(1,M+1);

197
0.09

0.08

0.07

0.06

0.05
(m)
x
R
0.04

0.03

0.02

0.01

-0.01
01020304050
m

Figure 5.7: The autocorrelation functionRXmin Computer Problem 5.5

0.5

0.45

0.4

0.35

0.3
(m)
y
R
0.25

0.2

0.15

0.1

0.05

0
01020304050
m

Figure 5.8: The autocorrelation functionRYmin Computer Problem 5.5

198
0.105

0.1

0.095

(f )
x
S
0.09

0.085

0.08

0.075
-0.500.5
f

Figure 5.9: The power spectraSf in Computer Problem 5.5


X

Ryav=zeros(1,M+1);
Sxav=zeros(1,M+1);
Syav=zeros(1,M+1);
for i=1:10,% Take the ensemble average over ten realizations.
X=rand(1,N)(1/2);% Generate a uniform number sequence on (-1/2,1/2).
Y(1)=0;10
for n=2:N, Y(n)=0.9*Y(n1)+X(n); end;% Note that Y(n) means Y(n-1).
Rx=Rxest(X,M);% autocorrelation of {Xn}
Ry=Rxest(Y,M);% autocorrelation of {Yn}
Sx=tshift(abs(t(Rx)));% power spectrum of {Xn}
Sy=tshift(abs(t(Ry)));% power spectrum of {Yn}
Rxav=Rxav+Rx;
Ryav=Ryav+Ry;
Sxav=Sxav+Sx;
Syav=Syav+Sy;
echo o ;20
end;
echo on ;
Rxav=Rxav/10;
Ryav=Ryav/10;
Sxav=Sxav/10;
Syav=Syav/10;
% Plotting commands follow.

199
5

4.5

3.5

3
(f )
y
S
2.5

1.5

0.5

0
-0.500.5
f

Figure 5.10: The power spectraSf in Computer Problem 5.5


Y

Computer Problem 5.6

Figures 5.11, 5.12, and 5.13 presentRXm,RXm, andRXm, respectively.SXf ,SXf , and
cscs
SXf are presented on Figures 5.14, 5.15, and 5.16, respectively.

The MATLAB script for these computations is given next. For illustrative purposes we have

selected the lowpass ler to have transfer function

Hz1
10:9z1
% MATLAB script for Computer Problem 5.6.
N=1000;% number of samples
for i=1:2:N,
[X1(i)X1(i+1)]=gngauss;
[X2(i)X2(i+1)]=gngauss;
end;% standard Gaussian input noise processes
A=[10.9];% lowpass lter parameters
B=1;
Xc=lter(B,A,X1);
Xs=lter(B,A,X2);10
fc=1000/pi;% carrier frequency
for i=1:N,

200
5

(m)
Xc
R
2

-1
020406080100
m

Figure 5.11: The autocorrelation ofXcm

bandpassprocess(i)=Xc(i)*cos(2*pi*fc*i)Xs(i)*sin(2*pi*fc*i);
end;% T=1 is assumed.
% Determine the autocorrelation and the spectrum of the bandpass process.
M=100;
bppautocorr=Rxest(bandpassprocess,M);
bppspectrum=tshift(abs(t(bppautocorr)));

bppautocorr=Rxest(bandpassprocess,M);20
bppspectrum=tshift(abs(t(bppautocorr)));

Xcautocorr=Rxest(Xc,M);
Xcspectrum=tshift(abs(t(Xc)));

Xsautocorr=Rxest(Xs,M);
Xsspectrum=tshift(abs(t(Xs)));
% Plotting commands follow.

201
6

(m)
3
Xs
R

-1
020406080100
m

Figure 5.12: The autocorrelation ofXsm

2
(m)
X
R
1

-1

-2

-3

-4
020406080100
m

Figure 5.13: The autocorrelation ofXm


202
500

450

400

350

300
(f )
Xc
S
250

200

150

100

50

0
-0.500.5
f

Figure 5.14: The power spectrum ofXcm

203
800

700

600

500
(f )
Xs
S
400

300

200

100

0
-0.500.5
f

Figure 5.15: The power spectrum ofXsm

204
35

30

25

20
(f )
X
S

15

10

0
-0.500.5
f

Figure 5.16: The power spectrum ofXm

205
Chapter 6

Problem 6.1

The spectrum of the signal at the output of the LPF isSf Sf jfj2. Hence, the signal
s;os
2W
power is

Z1ZW
Ps;oSf dfP0df
s;o
1W1f =B2
W

P0Barctanf2P0BarctanW
BWB

Similarly, noise power at the output of the lowpass lter is

ZW
N0
Pn;odfN0W
W2

Thus, the SNR is given by

2P0BarctanW2ParctanW
SNRB0B
N0WN0W
B

In the next gure we plot SNR as a function ofWand for2P01.


BN0

0.9

0.8

0.7

0.6

SNR
0.5

0.4
0.3

0.2

0.1
0123456789 10

W/B

206
Problem 6.2

1)The transfer function of theRClter is

HsRRCs
1
CsR1RCs

withsj2 f. Hence, the magnitude frequency response is

1
!2
222
jHf j4RCf
142RC2f2

This function is plotted in the next gure forfin10;10and 42RC21.

0.9

0.8

0.7

0.6

0.5
|H(f)|
0.4

0.3

0.2

0.1

0
-10
-8-6-4-202468 10

f
2)The overall system is the cascade of theRCand the LPF lter. If the bandwidth of the LPF isW,

then the transfer function of the system is

V f j2 RCff
1j2 RCf2W

The next gure depictsjV f jforW5 and 42RC21.

207
1

0.9

0.8

0.7

0.6

0.5
|V(f)|
0.4

0.3

0.2

0.1

0
-10
-8-6-4-202468 10

3)The noise output power is


ZW
42RC2f2N0
Pndf
W142RC2f22
ZW
1
N0WN0df
2W142RC2f2

1W
N0WN0arctan2 RCf
22 RCW

N0WN0arctan2 RCW
2 RC

The output signal is a sinusoidal with frequencyfcand amplitudeAjV fcj. Sincefc< Wwe

conclude that the amplitude of the sinusoidal ouput signal is


vu
ut4222
AjHfcj ARCfc
142RC2f2c
and the output signal power
A242RC2f2
Psc
2142RC2f2
c
Thus, the SNR at the ouput of the LPF is

A242RC2f2 A2 RCf2
cc
142RC2f2N0142RC2f2
c
SNR2c
N0WN0arctan2 RCW2 RCWarctan2 RCW
2 RC

In the next gure we plot

GW 1
2 RCWarctan2 RCW

as a function ofx2 RCW, when the latter varies from 0:1 to 0:5.

208
3500

3000

2500

2000

G
1500

1000

500

0
0.1
0.150.20.250.30.350.40.45 0.5

Problem 6.3

The noise power content of the received signalr tutntis


Z1
PnSf dfN04W2N0W
n
12

If we writentas

ntnctcos2 fctnstsin2 fct

then,

ntcos2 fctnctcos22 fctnstcos2 fctsin2 fct


11

tnctcos22fctnstsin22fct
2nc2

The noise signal at the output of the LPF is1nctwith power content
2
11N0W
Pn;oPnPn
4c42

If the DSB modulated signal isutmtcos2 fct, then its autocorrelation function isRu
1
2RMcos2 fcand its power
Z1
PuRu01RM0Sf df2W P0
21u

From this relation we ndRM04W P0. The signal at the output of the LPF isyt1mtwith
2
power content
11
Ps;oEm2tRM0W P0
44

209
Hence, the SNR at the output of the demodulator is

W P02P0
SNRPs;o
Pn;oN0WN0
2

Problem 6.4

First we determine the baseband signal to noise ratioS. WithW1:5106, we obtain


Nb

SPRPRPR108

NbN0W20:510141:51061:5

Since the channel attenuation is 90 db, then

10 logPT90=)PR109PT
PR

Hence,

SPR108108109PTPT

Nb1:51:515

1)If USSB is employed, then

SS
103=)PT1510315 KWatts
No;USSBNb

2)If conventional AM is used, then

SSPT

No;AMNb15
2
where,PMn. Since, maxjmtj 1, we have
12PM
n

Z1
11
PMPMx2dx
n
123

and, therefore
0:2511
3
10:25113
3

Hence,

S1PT
3

)PT195 KWatts
No;AM131510=

3)For DSB modulation

SSPT
3

)PT15 KWatts
No;DSBNb1510=

210
Problem 6.5

1)SincejHf j 1 forf jfcfmj, the signal at the output of the noise-limiting lter is

r t1031cos2 fmtcos2 fctnt

The signal power is


T
Z
2
PRlim1061cos2 fmt2cos22 fctdt
T!1T
2
1062
6

21256:2510

The noise power at the output of the noise-limiting lter is

111N0
Pn;oPnPn22500251010
2c222

2)Multiplication ofr tby 2 cos2 fctyields

3
yt101cos2 fmt21nct2
22
double frequency terms

The LPF rejects the double frequency components and therefore, the output of the lter is

vt1031cos2 fmtnct

If the dc component is blocked, then the signal power at the output of the LPF is

106
Po0:520:125106
2

whereas, the output noise power is

Pn;oPnPn2N02000401010
c
2

where we have used the fact that the lowpass lter has a bandwidth of 1000 Hz. Hence, the output

SNR is
6
SNR0:1251031:25 14:95 db
401010

Problem 6.6

1)In the case of DSB, the output of the receiver noise-limiting lter is
r tutnt

Acmtcos2 fctct

nctcos2 fctnstsin2 fct

211
2
The power of the received signal isPsAcPm, whereas the power of the noise
2

11
Pn;oPnPnPn
2c2s
Hence, the SNR at the output of the noise-limiting lter is

SA2Pm
c

No;lim2Pn

Assuming coherent demodulation, the output of the demodulator is

yt1Acmtnc
2

The output signal power isPo1A2Pmwhereas the output noise power


4c

11
Pn;oPnPn
4c4

Hence,

SA2Pm
c

No;demPn

and the demodulation gain is given by

dem. gainNo;dem2
S
N
o;lim

2)In the case of SSB, the output of the receiver noise-limiting lter is

r tAcmtcos2 fctAcmtsin2 fctnt

The received signal power isPsA2Pm, whereas the received noise power isPn;oPn. At the output
c
of the demodulator

ytAcmt1nct
22

withPo1A2PmandPn;o1Pn1Pn. Therefore,
4c4c4

SA2P
cm
dem. gainNo;demPn1
SA2P
cm
NP
o;limn

3)In the case of conventional AM modulation, the output of the receiver noise-limiting lter is

r tAc1mntnctcos2 fctnstsin2 fct

The total pre-detection power in the signal is

A2
Psc12PM
2n
212
In this case, the demodulation gain is given by

S
22PM
dem. gainNo;demn
S2
1PM
Nn
o;lim

The highest gain is achieved for1, that is 100% modulation.

4)For an FM system, the output of the receiver front-end (bandwidthBc) is

r tAccos2 fcttnt
Zt
Accos2 fct2 kfmdnt
1

2
The total signal input power isPsAc, whereas the pre-detection noise power is
;lim
2

N0
Pn;2BcN0BcN02f1W
lim
2

Hence,

SA2
c

No;lim2N02f1W

The output (post-detection) signal to noise ratio is

S3k2fA2cPM

No;dem2N0W3

Thus, the demodulation gain is

S
32PM2f1
f
dem. gainNo;dem621PM
S2ffn
maxjmtj
N
o;lim

5)Similarly for the PM case we nd that

SA2
c
No;lim2N02p1W

and

Sk2pA2cPM

No;dem2N0W

Thus, the demodulation gain for a PM system is

S
2

pPM2p12
dem. gainNo;dem2p1PM
S2pn
maxjmtj
N
o;lim

213
Problem 6.7

1)Since the channel attenuation is 80 db, then

10 logPT80=)PR108PT108401034104Watts
PR

If the noise limiting lter has bandwidthB, then the pre-detection noise power is

ZfB
c
2
Pn2N0dfN0B21010BWatts
fcB2
2

In the case of DSB or conventional AM modulation,B2W2104Hz, whereas in SSB modulation

BW104. Thus, the pre-detection signal to noise ratio in DSB and conventional AM is

PR4104
SNRDSB;AM102
Pn210102104

and for SSB


4104
SNRSSB2102
21010104

2)For DSB, the demodulation gain (see Problem 5.7) is 2. Hence,

SNRDSB;o2SNRDSB2102
;i

3)The demodulation gain of a SSB system is 1. Thus,

SNRSSB;oSNRSSB2102
;i

4)For conventional AM with0:8 andPM0:2, we have


n

2
PM
SNRAM;onSNRAM0:11352102
12PM;i
n

Problem 6.8

1)For an FM system that utilizes the whole bandwidthBc2f1W, therefore

2f1100=)bf11:5
4

Hence,
!2

SA2fPMA2PM
3c3c2n
No;FM2maxjmtjN0W2fN0W

For an AM system

SA22PM
cn

No;AM2N0W

214
Hence,

S
N32f
o;FM

S2549:13927:3967 dB

N
o;AM

2)Since the PM and FM systems provide the same SNR

Sk2pA2cPM3k2fA2cPMS

No;PM2N0W2W2N0WNo;FM

or
k22
p1p1
=)
3k2W232W2W2
ff

Hence,
p
BWPM2p1W3f1

BWFM2f1Wf1

Problem 6.9

1)The received signal power can be found from

10 logPT80=8PT104Watts
)PR10
PR

S2PMS2PMPR
nn

No12PMNb12PMN0W
nn

Thus, withPR104,PM0:1,0:8 and


n

N0W20:5101251035109

we nd that
S
1204 30:806 db
No

2)Using Carsons rule, we obtain

Bc21W=)100103215103=)9
We check now if the threshold imposes any restrictions.

SPR104
=)999
Nb;thN0W20110125103

Since we are limited in bandwidth we choose9. The output signal to noise ratio is

SS105
320:13920:1486000 56:866 db
NoNb5

215
Problem 6.10

1)First we check whether the threshold or the bandwidth impose a restrictive bound on the modula-

tion index. By Carsons rule

Bc21W=)60103218103=)2:75

Using the relation

S
6021PM
Non

withS104andPM1we nd
Nn2
o

1043021=)6:6158

Since we are limited in bandwidth we choose2:75. Then,

SSS2104
32PM=)881:542
NonNbNb32:752

Thus,

SPR
)PR881:5422101281031:41105

NbN0W881:542=

Since the channel attenuation is 40 db, we nd

PT104PR0:141 Watts

2)If the minimum required SNR is increased to 60 db, then thefrom Carsons rule remains the

same, whereas from the relation

S
6021PM106
Non

we nd31:8531. As in part 1) we choose2:75, and therefore

S1S
8:8154104
Nb32PMNo
n

Thus,

PRN0W8:81541042101281038:81541040:0014

and
PT104PR14 Watts

3)The frequency response of the receiver (de-emphasis) lter is given by

Hdf 1
1jf
f0

216
withf012100 Hz. In this case,
275106

3
SWfS
06

10
No;PDWWNo
3arctan
f0f0

From this relation we nd

S
1:3541105=)PR9:55105
No

and therefore,

PT104PR0:955 Watts

Problem 6.11

1)In the next gure we plot a typical USSB spectrum forK3. Note that only the positive frequency

axis is shown.

USSB

f
3W2WW0

2)The bandwidth of the signalmtisWmKW.

3)The noise power at the output of the LPF of the FM demodulator is

ZW
m33
W2N0W
Pn;oSf df2N0mK3
n;o
Wm3A2c3A2c

whereAcis the amplitude of the FM signal. As it is observed the power of the noise that enters the

USSB demodulators is proportional to the cube of the number of multiplexed signals.

Theithmessage USSB signal occupies the frequency bandi1W ; iW . Since the power spectral
density of the noise at the output of the FM demodulator isSf N0f2, we conclude that the
n;o2
Ac
noise power at the output of theithUSSB demodulator is
iWiW3
11ZN0N01N0W
Pn;oPn2f2dff33i23i1
ii222
44i1WA2A3i1W6A
ccc

Hence, the noise power at the output of theithUSSB demodulator depends oni.

4)Using the results of the previous part, we obtain

Pn;o3i23i1
i

Pn;o3j23j1
j

217
A2
5)The output signal power of theithUSSB demodulator isPsiPM. Hence, the SNR at the output
i4i
of theithdemodulator is
A2
i
PM
SNRi4i
N0W3
3i23i1
6A2
c

Assuming thatPMis the same for alli, then in order to guarantee a constantSNRiwe have to select
i
A2proportional to 3i23i1.
i

Problem 6.12

1)The power is given by


2
PV
R

Hence, withR50,P20, we obtain


1
V2P R20501000=)V1000231:6228 Volts

2)The current through the load resistance is

iV31:62280:6325 Amp
R50

3)The dBm unit is dened as

dBm10 logactual power in Watts3010 logactual power in Watts


103

Hence,

P3010 log5046:9897 dBm

Problem 6.13

1)The overall loss in 200 Km is 20020400 dB. Since the line is loaded with the characteristic

impedance, the delivered power to the line is twice the power delivered to the load in absence of line

loss. Hence, the required power is 20400420 dBm.


2)Each repeater provides a gain of 20 dB, therefore the spacing between two adjacent receivers can

be up to 20=210 Km to attain a constant signal level at the input of all repeaters. This means that

a total of 200=1020 repeaters are required.

218
Problem 6.14

1)Since the noise gure is 2 dB, we have

10 log1Te2
290

and thereforeT169:62K.
e

2)To determine the output power we have

Pno GkBneqT T
e

where 10 logG 35, and therefore,G 103:53162. From this we obtain

Pno31621:38102310106169:62509:581011Watts 161:6 dBm

Problem 6.15

Using the relationPn GkBneqT TwithPn108kT0,Bneq25103,G 103andT T0,


oeo
we obtain

10825106T025106T=) T3T0
ee

The noise gure of the amplier is

F1Te134
T

Problem 6.16

The proof is by induction onm, the number of the ampliers. We assume that the physical

temperatureTis the same for all the ampliers. Form2, the overall gain of the cascade of the

two ampliers isG GG, whereas the total noise at the output of the second amplier is due to
12
the source noise amplied by two stages, the rst stage noise excess noise amplied by the second

stage, and the second stage excess noise. Hence,

Pn GGPn GPn;1Pn;2
212s2ii

GGkTBneq GGkBneqT GkBneqT


1221e12e2

The noise of a single stage model with eective noise temperatureT, and gainGGis
e12
Pn GGkBneqT T
12e

Equating the two expressions for the output noise we obtain

GGT T GGT GGT GT


12e1212e12e2

219
or

T TTe2
ee1
G
1

Assume now that if the number of the ampliers ism1, then

T
em1
T0 TTe2
ee1
GG G
11m2

Then for the cascade ofmampliers


T
T T0em
ee
G0

whereG0 G Gis the gain of them1 ampliers and we have used the results form2.
1m1
Thus,
TT
em1em
T TTe2
ee1
GG GG G
11m21m1

Proof of Fries formula follows easily with the substitutionFk1Tekinto the above equation.
T
0

Computer Problems

Computer Problem 6.1

The plot of the message signalmtand the modulated signalutare shown in Figures 6.1 and

6.2. Also Figures 6.3, 6.4 and 6.5 illustrate the modulated signalfr ngwith various channel noise

values of:0:1,1, and2, respectively.

We design a linear lowpass lter with 31 taps, cuto frequency (-3 dB) of 100 Hz and a stopband

attenuation of at least 30 dB. The frequency responce of the lter is given in Figure 6.6. The

demodulated signals for dierent values of noise are shown in Figures 6.7, 6.8 and 6.9.

The FIR lter introduces a short delay on demodulated signal. Therefore, and in order to

determine the signal to noise ratio at the output of the demodulator, one must consider this delay.

The signal to noise ratio for dierent values of the:0:1,1, and2 are SNR=3:8027
dB,7:6224 dB and11:842 dB, respectively.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 6.1.


% Matlab demonstration script for DSB-AM modulation. The message signal
% is m(t)=sinc(100t).
echoon
t0=.1;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
fs=1/ts;% sampling frequency

t=[0:ts:t0ts];% time vector10


m=sinc(100*t);% the message signal

220
c=cos(2*pi*fc.*t);% the carrier signal
u=m.*c;% the DSB-AM modulated signal

Wc=randn(1, 1000);
Ws=randn(1, 1000);
sgma= 0.1;
r01=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(3*pi*fc*t));
sgma= 1;
r1=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(3*pi*fc*t));20
sgma= 2;
r2=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(3*pi*fc*t));

fcuto=100;% the desired cuto frequency


fstopband=555;% the actual stopband frequency
fs=10000;% the sampling frequency
f1=2*fcuto/fs;% the normalized passband frequency
f2=2*fstopband/fs;% the normalized stopband frequency
N=32;% This number is found by experiment.
F=[0f1 f21];30
M=[1 1 0 0];% describes the lowpass lter
B=remez(N1,F,M);% returns the FIR tap coecients
[H,W]=freqz(B);

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.1: The message signal

221
1

0.8

0.6

0.4

0.2

0
u(t)

-0.2

-0.4

-0.6

-0.8

-1
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.2: The modulated signalut

222
1

0.5

r (t)

-0.5

-1

-1.5
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.3: The modulated signal with noise0:1

223
4

0
r (t)

-1

-2

-3

-4
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.4: The modulated signal with noise1

224
8

0
r (t)

-2

-4

-6

-8
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.5: The modulated signal with noise2

225
10

-10

-20

-30

|H(f )|
-40

-50

-60

-70

-80
00.050.10.150.20.250.30.350.40.450.5
f

Figure 6.6: Frequency response of the linear lowpass lter

226
0.6

0.5

0.4

0.3

(t)
0.2
r
m

0.1

-0.1

-0.2
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.7: The demodulated signal with noise0:1

227
1

0.5

(t)
r
m

-0.5
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.8: The demodulated signal with noise1

228
1.5

0.5

(t)
r
m

-0.5

-1
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.9: The demodulated signal with noise2

229
HindB=20*log10(abs(H));

rm01=lter(B, 1,r01.*c);
rm1=lter(B, 1,r1.*c);
rm2=lter(B, 1,r2.*c);

delayedu=lter(B, 1,u);40
p01=10*log10(spower(delayedu)/spower(rm01delayedu));
p1=10*log10(spower(delayedu)/spower(rm1delayedu));
p2=10*log10(spower(delayedu)/spower(rm2delayedu));
% Plotting command follows.

Computer Problem 6.2

The message signalmtis similar to the message signal in previous problem, which is shown in

Figure 6.1. The modulated signalutis shown in Figure 6.10. Also Figures 6.11, 6.12 and 6.13

illustrate the modulated signalfr ngwith various channel noise values of:0:1,1, and

2, respectively.

We design a linear lowpass lter with 31 taps, cuto frequency (-3 dB) of 100 Hz and a stopband

attenuation of at least 30 dB. The frequency responce of the lter is given in Figure 6.6. The

demodulated signals for dierent values of noise are shown in Figure 6.14.

The FIR lter introduces a short delay on demodulated signal. Therefore, and in order to

determine the signal to noise ratio at the output of the demodulator, one must consider this delay.

The signal to noise ratio for dierent values of the:0:1,1, and2 are SNR=3:8027

dB,7:6224 dB and11:842 dB, respectively.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 6.2.


% Matlab demonstration script for SSB-AM modulation. The message signal
% is m(t)=sinc(100t).
echoon
t0=.1;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
fs=1/ts;% sampling frequency
df=1;
t=[0:ts:t0ts];% time vector10
m=sinc(100*t);% the message signal
c=cos(2*pi*fc.*t);% the carrier signal
udsb=m.*c;% DSB modulated signal
[UDSB,udssb,df1]=tseq(udsb,ts,df);% Fourier transform
UDSB=UDSB/fs;% scaling
f=[0:df1:df1*(length(udssb)1)]fs/2;% frequency vector
n2=ceil(fc/df1);% location of carrier in freq. vector
% Remove the upper sideband from DSB.
UDSB(n2:length(UDSB)n2)=zeros(size(UDSB(n2:length(UDSB)n2)));
ULSSB=UDSB;% Generate LSSB-AM spectrum.20
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling

230
0.4

0.3

0.2

0.1

u(t)
-0.1

-0.2

-0.3

-0.4

-0.5
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.10: The modulated signalutfor SSB-AM signal

231
0.6

0.4

0.2

r (t)
-0.2

-0.4

-0.6

-0.8
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.11: The SSB-AM modulated signal with noise0:1

232
4

0
r (t)

-1

-2

-3

-4
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.12: The SSB-AM modulated signal with noise1

233
8

0
r (t)

-2

-4

-6

-8
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.13: The SSB-AM modulated signal with noise2

234
1.5
=0.1
=1
=2

0.5

(t)
0
r
m

-0.5

-1

-1.5
0200400600800100012001400160018002000
t

Figure 6.14: The SSB-AM demodulated signals with noise0:1,1 and2

235
u1=real(it(ULSSB))*fs;% Generate LSSB signal from spectrum.
u=u1(1:length(t));
signalpower=spower(udsb(1:length(t)))/2;
Wc=randn(1, 1000);
Ws=randn(1, 1000);
sgma= 1;
r1=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(3*pi*fc*t));
y1=r1.*cos(2*pi*fc*[0:ts:ts*(length(u)1)]);30
[Y1,y1,df1]=tseq(y1,ts,df);% spectrum of the output of the mixer
Y1=Y1/fs;% scaling
fcuto=150;% Choose the cuto freq. of the lter.
ncuto=oor(150/df);% Design the lter.
H=zeros(size(f));
H(1:ncuto)=4*ones(1,ncuto);
% spectrum of the lter output
H(length(f)ncuto+1:length(f))=4*ones(1,ncuto);
DEM1=H.*Y1;% spectrum of the lter output
dem1=real(it(DEM1))*fs;% lter output40

Computer Problem 6.3

Figures 6.15 and 6.16 show the message signalmtand the modulated signalut. Also Fig-

ures 6.17, 6.18 and 6.19 illustrate the modulated signalsfr ngwith various channel noise values

of:0:1,1, and2, respectively.

The demodulated signals for dierent values of noise are shown in Figures 6.20, 6.21 and 6.22.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 6.3.


% Demonstration script for DSB-AM modulation. The message signal
% is sinc(100t) for 0<t<t0 and zero otherwise.
echoon
t0=.1;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
a=0.80;% modulation index
fs=1/ts;% sampling frequency
t=[0:ts:t0ts];% time vector10
% message signal
m=sinc(100*t);
mn=m/max(abs(m));% normalized message signal
c=cos(2*pi*fc.*t);% carrier signal
u=(1+a*mn).*c;% modulated signal
gure;plot(t,m);xlabel(Time);
gure;plot(t,u);xlabel(Time);

Wc=randn(1, 1000);
Ws=randn(1, 1000);20
sgma= 1;
r1=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(3*pi*fc*t));
e1=sqrt((1+a.*m+sgma.*Wc).^2 + (sgma.*Ws).^2);

236
1

0.8

0.6

0.4

m(t)
0.2

-0.2

-0.4
00.010.020.030.040.050.060.070.080.090.1

Figure 6.15: The message signalmt

237
2

1.5

0.5

0
u(t)

-0.5

-1

-1.5

-2
00.010.020.030.040.050.060.070.080.090.1

Figure 6.16: The AM modulated signalut

238
2

1.5

0.5

-0.5

-1

The AM modulated signal with=0.1

-1.5

-2
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.17: The AM modulated signal with noise0:1

239
4

-1

-2

-3

-4
The AM modulated signal with=1

-5

-6
00.010.020.030.040.050.060.070.080.090.1

Figure 6.18: The AM modulated signal with noise1

240
8

-2

-4

-6

-8
The AM modulated signal with=2

-10

-12
00.010.020.030.040.050.060.070.080.090.1

Figure 6.19: The AM modulated signal with noise2

241
2

1.5

The demodulated signal with=0.1

0.5
00.010.020.030.040.050.060.070.080.090.1
Time
t

Figure 6.20: The demodulated signal with noise0:1

242
4.5

3.5

2.5

1.5

1
The demodulated signal with=1

0.5

0
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.21: The demodulated signal with noise1

243
8

2
The demodulated signal with=2

0
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.22: The demodulated signal with noise2

244
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector
[U,u,df1]=tseq(u,ts,df);% Fourier transform
U=U/fs;% scaling
signalpower=spower(u(1:length(t)));% power in modulated signal
% power in normalized message30
pmn=spower(m(1:length(t)))/(max(abs(m)))^2;
eta=(a^2*pmn)/(1+a^2*pmn);% modulation eciency
noisepower=eta*signalpower/snrlin;% noise power
noisestd=sqrt(noisepower);% noise standard deviation
noise=noisestd*randn(1,length(u));% Generate noise.
r=u+noise;% Add noise to the modulated signal
[R,r,df1]=tseq(r,ts,df);% Fourier transform.
R=R/fs;% scaling
pause% Press a key to show the modulated signal power.
signalpower40
pause% Press a key to show the modulation eciency.
eta
pause% Press any key to see a plot of the message.
subplot(2,2,1)
plot(t,m(1:length(t)))
axis([0 0.152.1 2.1])
xlabel(Time)
title(The message signal)
pause
pause% Press any key to see a plot of the carrier.50
subplot(2,2,2)
plot(t,c(1:length(t)))
axis([0 0.152.1 2.1])
xlabel(Time)
title(The carrier)
pause% Press any key to see a plot of the modulated signal.
subplot(2,2,3)
plot(t,u(1:length(t)))
axis([0 0.152.1 2.1])
xlabel(Time)60
title(The modulated signal)
pause% Press any key to see plots of the magnitude of the message and the
% modulated signal in the frequency domain.
subplot(2,1,1)
plot(f,abs(tshift(M)))
xlabel(Frequency)
title(Spectrum of the message signal)
subplot(2,1,2)
plot(f,abs(tshift(U)))
title(Spectrum of the modulated signal)70
xlabel(Frequency)
pause% Press a key to see a noise sample.
subplot(2,1,1)
plot(t,noise(1:length(t)))
title(Noise sample)
xlabel(Time)
pause% Press a key to see the modulated signal and noise.

245
subplot(2,1,2)
plot(t,r(1:length(t)))
title(Signal and noise)80
xlabel(Time)
pause% Press a key to see the modulated signal and noise in freq. domain.
subplot(2,1,1)
plot(f,abs(tshift(U)))
title(Signal spectrum)
xlabel(Frequency)
subplot(2,1,2)
plot(f,abs(tshift(R)))
title(Signal and noise spectrum)
xlabel(Frequency)90

Computer Problem 6.4

Figures 6.23 and 6.24 show the message signalmtand its integral signal and Figure 6.25 illustrates

the FM modulated signal. Using MATLABs Fourier transform routine, we plot the spectra ofmt

anduton Figures 6.26 and 6.27.

The impact of the channel noise on the modulated signalsfr ngfor two channel noise values of

0:1 and1 are shown in Figure 6.28. The demodulated signal are also shown in Figure 6.29.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 6.4.


% Demonstration script for frequency modulation. The message signal
% is m(t)=sinc(100t).
echoon
t0=.1;% signal duration
ts=0.0001;% sampling interval
fc=250;% carrier frequency
fs=1/ts;% sampling frequency
t=[0:ts:t0ts];% time vector
kf=10000;% deviation constant10
df=0.25;% required frequency resolution
m=sinc(100*t);% the message signal

intm(1)=0;
for i=1:length(t)1% integral of m
intm(i+1)=intm(i)+m(i)*ts;
echoo;
end
echoon;
20
gure;
plot(t,m);
xlabel(Time);ylabel(y);
gure;
plot(t,intm);
xlabel(Time);ylabel(y);

246
0.2

0.15

0.1

m(t)

0.05

-0.05
051015202530

n
t

Figure 6.23: The message signalmt

247
-3
x 10
6

3
m()d
t
R

0
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.24: The integral of the message signal

248
1

0.8

0.6

0.4
m()d
t
R
0.2
f

0
t+2 k
c
-0.2

-0.4

-0.6
u(t)=cos2 f

-0.8

-1
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.25: The FM modulated signal

249
-3
Magnitude spectrum of the message signal
x 10

|M(f )|
4

0
-500-400-300-200-1000100200300400500
f

Figure 6.26: The Fourier transform ofMf

250
0.045

0.04

0.035

0.03

0.025

|U (f )|
0.02

0.015

0.01

0.005

0
-500-400-300-200-1000100200300400500
f

Figure 6.27: The Fourier transform ofUf

251
1.5

0.5

-0.5

-1
u(t)with noise=0.1u(t)with noise=1
-1.5
00.010.020.030.040.050.060.070.080.090.1

-2

-4

-6
00.010.020.030.040.050.060.070.080.090.1
t

Figure 6.28: The FM modulated signals with noise of0:1 and1

252
0.5

u(t)with noise=0.1u(t)with noise=1


-0.5
01002003004005006007008009001000

0.5

-0.5
01002003004005006007008009001000
t

Figure 6.29: The demodulated signals with noise of0:1 and1

253
[M,m,df1]=tseq(m,ts,df);% Fourier transform
M=M/fs;% scaling
f=[0:df1:df1*(length(m)1)]fs/2;% frequency vector30
u=cos(2*pi*fc*t+2*pi*kf*intm);% modulated signal
gure;
plot(u);
xlabel(Time);ylabel(y);

Wc=randn(1, 1000);
Ws=randn(1, 1000);
sgma= 1;
r1=u+sgma*(Wc.*cos(2*pi*fc*t)Ws.*sin(2*pi*fc*t));
[U,upad,df1]=tseq(u,ts,df);% Fourier transform40
U=U/fs;% scaling

[v,phase]=envphas(u,ts,250);% demodulation, nd phase of u


phi=unwrap(phase);% Restore original phase.
dem=(1/(2*pi*kf))*(di(phi)/ts);% demodulator output, dierentiate and scale phase

[v1,phase1]=envphas(r1,ts,250);% demodulation, nd phase of u


phi1=unwrap(phase1);% Restore original phase.
dem1=(1/(2*pi*kf))*(di(phi1)/ts);% demodulator output, dierentiate and scale phase
gure;plot(dem1);50
% pause % Press any key to see a plot of the message and the modulated signal.
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel(Time)
title(The message signal)
subplot(2,1,2)
plot(t,u(1:length(t)))
xlabel(Time)
title(The modulated signal)
% pause % Press any key to see plots of the magnitude of the message and the60
% modulated signal in the frequency domain.
subplot(2,1,1)
plot(f,abs(tshift(M)))
xlabel(Frequency)
title(Magnitude spectrum of the message signal)
subplot(2,1,2)
plot(f,abs(tshift(U)))
title(Magnitude-spectrum of the modulated signal)
xlabel(Frequency)
pause% Press any key to see plots of the message and the demodulator output with no70
% noise.
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel(Time)
title(The message signal)
subplot(2,1,2)
plot(t,dem(1:length(t)))
xlabel(Time)
title(The demodulated signal);
80

254
Chapter 7

Problem 7.1

1.Since the maximum frequency inXf is is 40 KHz, the minimum sampling rate isfs2W80

KHz.

2. Herefs2WWG2401090 KHz.

3.X1f 1Xf400001Xf40000, the maximum frequency inX1f is 40000+40000=80000


22
Hz, and the minimum sampling rate isfs280000160000. From this the maximum

sampling interval isTs1=fs1=1600006:25sec.

Problem 7.2

For no aliasing to occur we must sample at the Nyquist rate

fs26000 samples/sec12000 samples/sec

With a guard band of 2000

fs2W2000=)fs14000

The reconstruction lter should not pick-up frequencies of the images of the spectrumXf . The

nearest image spectrum is centered atfsand occupies the frequency bandfsW ; fsW . Thus

the highest frequency of the reconstruction lter10000should satisfy

10000fsW=)fs16000

For the valuefs16000,Kshould be such that

Kfs1=)K160001

Problem 7.3

xtAsinc1000 t=)Xf Af
10001000

Thus the bandwidthWofxtis 1000=2500. Since we sample atfs2000 there is a gap between
the image spectra equal to

2000500W1000

255
The reconstruction lter should have a bandwidthW0such that 500< W0<1500. A lter that satisfy

these conditions is

f1f
Hf Ts
2W020002W0

and the more general reconstruction lters have the form

8
1
>>>j
2000fj<500
><
Hfarbitrary 500<jfj<1500
>>>
>:
0jfj>1500

Problem 7.4

1)

1
X
xptxnTsptnTs
n1
1
X
pt ?xnTstnTs
n1
1
X
pt ? xttnTs
n1

Thus
"1#
X
Xpf P f FxttnTs
n1
"1#
X
P f Xf ?FtnTs
n1
1
Xn
P f Xf ?1f
TsTs
n1

1 1Xn
P fXf
TsTs
n1

2) In order to avoid aliasing1>2W. Furthermore the spectrumP f should be invertible for


Ts
jfj< W.

3)Xf can be recovered using the reconstruction lterfwithW < W<1W. In this case
2WTs

Xf Xpf TsP1f f
2W

256
Problem 7.5

1)

11
XX
x1t1nxnTstnTsxt1ntnTs
n1n1
23
11
XX
xt4t2lTstTs2lTs5
l1l1

Thus

23
11Xl11Xl
X1f Xf ?4ffej2 f Ts5
2Ts2Ts2Ts2Ts
l1l1

11Xl11Xljl
Ts

XfXfe22Ts
2Ts2Ts2Ts2Ts
l1l1

11Xl11Xl
XfXf1l

2Ts2Ts2Ts2Ts
l1l1

11X1l
Xf

Ts2TsTs
l1

2) The spectrum ofxtoccupies the frequency bandW ; W . Suppose that from the periodic

spectrumX1f we isolateXkf 1Xf1k, with a bandpass lter, and we use it to


Ts2TsTs
reconstructxt. SinceXkf occupies the frequency band2kW ;2k1W , then for allk,Xkf

cannot cover the whole intervalW ; W . Thus at the output of the reconstruction lter there will

exist frequency components which are not present in the input spectrum. Hence, the reconstruction

lter has to be a time-varying lter. To see this in the time domain, note that the original spectrum

has been shifted byf01. In order to bring the spectrum back to the origin and reconstructxt
2Ts
1
tj2 W t
the sampled signalx1thas to be multiplied byej22Tse. However the system described

by

ytej2 W txt
is a time-varying system.

3) Using a time-varying system we can reconstructxtas follows. Use the bandpass lterTsfW
2W
to extract the componentXf1. InvertXf1and multiply the resultant signal byej2 W t.
2Ts2Ts
Thus

fW
xtej2 W tF1TsX1f
2W

Problem 7.6

1) The linear interpolation system can be viewed as a linear lter where the sampled signal

257
P1
xttnTsis passed through the lter with impulse response
n1
8
>>>1t

TsTsf0
><
ht1t0fT
Tss
>>>
>:
0 otherwise

To see this write


"1#1
XX
x1txttnTs? htxnTshtnTs
n1n1

Comparing this with the interpolation formula in the intervalnTs; n1Ts

tnTs
x1txnTsxn1TsxnTs
Ts

xnTs1tnTsxn1Ts1tn1Ts
TsTs
xnTshtnTsxn1Tshtn1Ts

we observe thathtdoes not extend beyondTs; Tsand in this interval its form should be the

one described above. The power spectrum ofx1tisSXf jX1f j2where


1
"1#
X
X1f Fx1t Fht ? xttnTs
n1
"1#
Xn
HfXf ?1f
TsTs
n1
1
Xn
sinc2f TsXf
n1Ts

2) The system function sinc2f Tshas zeros at the frequenciesfsuch that

f Tsk; k2 Z f0g

In order to recoverXf , the bandwidthWofxtshould be smaller than 1=Ts, so that the whole

Xf lies inside the main lobe ofsinc2f Ts. This condition is automatically satised if we choose

Tssuch that to avoid aliasing (2W <1=Ts). In this case we can recoverXf fromX1f using the

lowpass lterf.
2W
f

f sinc2f TsXf
2WX1
or
f
Xf sinc2f Ts1X1f
2W

IfTs1=W, then sinc2f Ts1 forjfj< WandXf is available usingXf fX1f .


2W

258
Problem 7.7

1)W50Hz so thatTs1=2W102sec. The reconstructed signal is

1
Xt
xtxnTssincn
n1Ts
14
XtXt
sincnsincn
n4Tsn1Ts

WithTs102andt5103we obtain

44
X1X1
x:005sincnsincn
n12n12

sinc3sinc5sinc7sinc9
2222

sinc1sinc3sinc5sinc7
2222

sinc1sinc92sin2sin9
22292
16

where we have used the fact that sinctis an even function.

2) Note that (see Problem 7.8)

Z1
sinc2W tmsinc2W tndt1mn
12W

withmnthe Kronecker delta. Thus,

Z1Z1
jxtj2dtxtxtdt
11
1Z1
X
xnTsxmTssinc2W tmsinc2W tndt
n11
1
X1
jxnTsj2
n12W

Hence
Z12143
XX4
jxtj2dt141158102
12WW
n4n1
Problem 7.8

259
1) Using Parsevals theorem we obtain

Z1
Asinc2W tmsinc2W tndt
1
Z1
Fsinc2W tmFsinc2W tndt
1
Z1
1fmn
22j2 f

e2Wdf
12W2W
W
1Zjmn1
e2 f2Wdfmn
4W2W2W

wheremnis the Kroneckers delta. The latter implies thatfsinc2W tmgform an orthogonal set

of signals. In order to generate an orthonormal set of signals we have to weight each function by
p
1=2W.

2) The bandlimited signalxtcan be written as

1
X
xtxnTssinc2W tn
n1

wherexnTsare the samples taken at the Nyquist rate. This is an orthogonal expansion relation

where the basis functionsfsinc2W tmgare weighted byxmTs.

3)

Z1Z1
1
X
xtsinc2W tndtxmTssinc2W tmsinc2W tndt
11
m1
1Z1
X
xmTssinc2W tmsinc2W tndt
m11
1
X1
1
xmTsmnxnTs
m12W2W
Problem 7.9

1)From Table 7.1 we nd that for a unit variance Gaussian process, the optimal level spacing for a 16-

level uniform quantizer is .3352. This number has to be multiplied byto provide the optimal level
p
spacing when the variance of the process is2. In our case210 and100:33521:060.

260
The quantization levels are

x1 x16 71:06011:060 7:950


2

x2 x15 61:06011:060 6:890


2

x3 x14 51:06011:060 5:830


2

x4 x13 41:06011:060 4:770


2

x5 x12 31:06011:060 3:710


2

x6 x11 21:06011:060 2:650


2

x7 x10 11:06011:060 1:590


2
1
x8 x91:060 0:530
2

The boundaries of the quantization regions are given by

a1a15 71:060 7:420

a2a14 61:060 6:360

a3a13 51:060 5:300

a4a12 41:060 4:240

a5a11 31:060 3:180

a6a10 21:060 2:120

a7a9 11:060 1:060

a80

2)The resulting distortion isD20:011540:1154.

3)Substituting210 andD0:1154 in the rate-distortion bound, we obtain

2
R1log3:2186
22D

5)The distortion of the 16-level optimal quantizer isD1620:01154 whereas that of the 8-level

optimal quantizer isD820:03744. Hence, the amount of increase in SQNR (db) is


10 logSQNR1610log0:037445:111 db
1010
SQNR80:01154

261
Problem 7.10

With 8 quantization levels and2400 we obtain

:5860200:586011:72

Hence, the quantization levels are

x1 x8 311:72111:72 41:020
2

x2 x7 211:72111:72 29:300
2

x3 x6 111:72111:72 17:580
2
1
x4 x511:72 5:860
2

The distortion of the optimum quantizer is

D20:0374414:976

As it is observed the distortion of the optimum quantizer is signicantly less than that of Example

7.2.1.

Problem 7.11

Using Table 7.2 we nd the quantization regions and the quantized values forN16. These values
p
should be multiplied byP1=210, since Table 6.3 provides the optimum values for a unit
X
variance Gaussian source.

p
a1 a15102:401 7:5926
p
a2 a14101:844 5:8312
p
a3 a13101:437 4:5442
p
a4 a12101:099 3:4753
p
a5 a11100:7996 2:5286
p
a6 a10100:5224 1:6520
p
a7 a9100:2582 0:8165

a80

262
The quantized values are

p
x1 x16102:733 8:6425
p
x2 x15102:069 6:5428
p
x3 x14101:618 5:1166
p
x4 x13101:256 3:9718
p
x5 x12100:9424 2:9801
p
x6 x11100:6568 2:0770
p
x7 x10100:3881 1:2273
p
x8 x9100:1284 0:4060

The resulting distortion isD100:0094940:09494. From Table 7.2 we nd that the minimum

number of bits per source symbol isHX3:765.

Problem 7.12

1)The area between the two squares is 442212. Hence,fX;Yx; y1. The marginal
12
R2
probabilityfXxis given byfXxfX;Yx; ydy. If2X <1, then
2

Z2
2

fXxfX;Yx; ydy1y1
21223

If1X <1, then


Z1Z2
fXx1dy1dy1
2121126

Finally, if 1X2, then

Z2
2

fXxfX;Yx; ydy1y1
21223

The next gure depicts the marginal distributionfXx.


. . . . . . . . .1/3

1/6

-2 -1 1 2

Similarly we nd that
8
1
>>>2
3y <1
><
fYy11y <1
6
>>>
>:1
31y2

2)The quantization levelsx1,x2,x3andx4are set to3,1,1and3respectively. The resulting


2222

263
distortion is

Z1Z0
DX2x32fXxdx2x12fXxdx
2212
1Z0
2Z2921
x3xdxx2xdx
324614

2139121110
3232

33x2x4x263x2x4x1
1

12

The total distortion is


111
DtotalDXDY
12126

whereas the resulting number of bits perX; Y pair

RRXRYlog4log44
22

3)Suppose that we divide the region over whichpx; y0 intoLequal subregions. The case of

L4 is depicted in the next gure.

For each subregion the quantization output vectorx;yis the centroid of the corresponding

rectangle. Since, each subregion has the same shape (uniform quantization), a rectangle with width

equal to one and length 12=L, the distortion of the vector quantizer is
12
Z1Z
L
L
Dx; y1;122dxdy
0022L12
12
1ZL
LZ112
x2y2dxdy
120022L
"#
L1211231112
12L12L31212L2

If we setD1, we obtain
6
121p
)L14412
L212=

Thus, we have to divide the area over whichpx; y0, into 12 equal subregions in order to

achieve the same distortion. In this case the resulting number of bits per source output pairX; Y

isRlog123:585.
2

264
Problem 7.13

1)The joint probability density function isfXYx; y1p1. The marginal distributionfXx
2228R
isfXxfXYx; ydy. If2x0,then
y

Zx
2

x2
fXxfX;Yx; ydy1yx2
x28x24

If 0x2,then
Zx
2

x2
fXxfX;Yx; ydy1yx2
x28x24

The next gure depictsfXx.

1
2

2 2

From the symmetry of the problem we have

8
><y2
2y <0
fYy4
>:y2
40y2

2)

Z1Z0
DX2x32fXxdx2x12fXxdx
2212
1Z0
1Z311
x2x2dxx2x2dx
222212

115339111910
432432

24x3x8x2x224xx8x2x1
1

12

The total distortion is


111
DtotalDXDY
12126

whereas the required number of bits per source output pair

RRXRYlog4log44
22

3)We divide the square over whichpx; y0 into 2416 equal square regions. The area of each

265
square is1and the resulting distortion
2

1 Z1
Zp
p
211
D162xp2yp2dxdy
8002222
1Z1
Zp
p
21
42xp2dxdy
0022
1
p
4Z21x
p2xpdx

2082
1
4111p2
px3xpx2

238220
1

12

Hence, using vector quantization and the same rate we obtain half the distortion.

Problem 7.14

XXX=2. Hence,
xmax
222
1ZX11
EX2dxx3
42416323

With8 andX21, we obtain


3

1
SQNR3484848:165db
3

Problem 7.15

1)

22A2
EXtRXj
0
2
Hence,
22
SQNR34X234X34A
x2max2A2

With SQNR60 db, we obtain

q
10 log3460=)q9:6733
10
2

The smallest integer larger thatqis 10. Hence, the required number of quantization levels is10.

2)The minimum bandwidth requirement for transmission of a binary PCM signal isBWW. Since

10, we have BW10W.

266
Problem 7.16

1)

Z0Z2
x2x2
EX2tx2dxx2dx
2404
11201122
4343

44x3x244x3x0
2

Hence,
3423452
SQNR3351227:093db
x2max22

2)If the available bandwidth of the channel is 40 KHz, then the maximum rate of transmission is

40=58. In this case the highest achievable SQNR is

3482
SQNR33276845:154db
22

3)In the case of a guard band of 2 KHz the sampling rate isfs2W200012 KHz. The highest

achievable rate is2BW6:6667 and sinceshould be an integer we set6. Thus, the


fs
achievable SQNR is
3462
SQNR3204833:11db
22

Problem 7.17

LetXX QX. Clearly ifjXj>0:5, thenpX0. IfjXj 0:5, then there are four solutions to

the equationXX QX, which are denoted byx1,x2,x3andx4. The solutionx1corresponds to

the case2X 1,x2is the solution for1X0 and so on. Hence,

x12x1:52x32x0:52
fXx1fXx3
4444
x22x0:52x42x1:52
fXx2fXx4
4444

The absolute value ofX QX0is one forXx1; : : : ; x4. Thus, forjXj 0:5

4
Xf
xi
fxX
X0
i1jxi Qxij
x1:52x0:52x0:52x1:52

4444
1

267
Problem 7.18

1)

RXt; tEXtXt

EY2cos2 f0tcos2 f0t


1
2
cos2 f02t2
2EYEcos2 f0

and since
Z2

Ecos2 f02t21cos2 f02t2d0


20

we conclude that
3
RXt; t1EY2cos2 f0cos2 f0
22

2)
!

0
10 logSQNR10 log34RX40
10102
xmax

Thus,

log44 or8
10
2

The bandwidth of the process isWf0, so that the minimum bandwidth requirement of the PCM

system is BW8f0.

3)If SQNR64 db, then


06:4
log21012
4

Thus,04 more bits are needed to increase SQNR by 24 db. The new minimum bandwidth

requirement is BW012f0.

Problem 7.19

1.The power spectral density ofthe process isSf FRX2104f, from wich
X4
10
the bandwidth of the process isW104Hz. Therefore,fs2WWG2104250022500

samples/sec. and the rate isRfs22500log128225007157500 bits/sc. We


2
also observe thatPXRX02 andxmax10, hence

SQNR(dB)4:8610 logPX4:86710 log229:8 dB


10210
xmax100

andBTR=278750 Hz.

2.Here we need to improve the SQNR by 5629:826:2 dB. Since each doubling ofNimproves

SQNR by 6 dB, we have to doubleNat least 26:2=6 or 5 times, i.e., the newNis 2532 times

the oldN, i.e.,N128324096. The resulting SQNR is 5630 dB more than the original

SQNR, i.e., 29:83059:8 dB.

268
3.UsingBTR=2fs=2WWG=2we want to nd the largest integerthat satises

9300010000WG=2Clearly9 is the answer which givesWG6000=9667 Hz.

Since9 is an increase of 2 bits/sample compared to7 the resulting SQNR is 12 dB

higher or 1229:841:8 dB. For this systemN29512 andfs2WWG20667

samples/sec.

Problem 7.20

1.PXRX04 Watts.

2.Sf FRX4104f.
X4
10

3. FromSf the range of frequencies are104;104, hence,W104.


X
8
<104f

;jfj 5000
4

4.Sf Sf jHf j2Sf f10. The plot ofSf is


YXX4Y
10:0
;otherwise
shown below

Sf
Y

4104

f
0:51040:5104

and the power is the area under the power spectral density

Z1
1
PYSf df104210410421043 W
Y
12

5.SinceXtis Gaussian and zero-mean, all random variables are zero-mean Gaussian with
variancesEX20,EX2104, andEX21:5104. But all these variances are equal to
R1
RX0Sf df4, hence all random variables are distributed according aN0;4
1X
PDF.

6.The covariance betweenX0andX104isRX1040, therefore these random variables

are uncorrelated, and since they are jointly Gaussian, they are also independent. ForX0

andX1:5104, the covariance isRX1:51044sinc21:560, hence the two random

variables are correlated and hence dependent.

269
Problem 7.21

1.fs2WWG25000200012000 samples/sec. andRfs12000log12884000


2
bps.

2. FromfXdwe nd the power as

Z0Z2
hi1
PXEX2tx2dx1x2dx4
23063

and SQNR(dB)4:8610 logPX4:84210 log4=342.


102104
xmax

3.BTR=284000=242000 Hz.

4.UsingBTR=2fs=2WWG=2we want to nd the largest integerthat satises

700005000WG=2Clearly14 is the answer which givesWG0 Hz. Since14

is an increase of 7 bits/sample compared to7 the resulting SQNR is 42 dB higher or

424284 dB.

Problem 7.22

1.The power is the integral of the power spectral density or the area below it, i.e.,PX12
2
4000600010000 W.

2.log5129, hence, SQNR4:8610logPX4:86910log10000


2102102
xmax200
4:854652:2 dB. We also havefs2WWG2300010007000 Hz, then

Rfs9700063000 andBTR=231500 Hz.

3.UsingBTR=2fs=2WWG=2we want to nd the largest integerthat satises

470003000WG=2Clearly15 is the answer which givesWG4000=15267 Hz.

Since15 is an increase of 6 bits/sample compared to9 the resulting SQNR is 36 dB

higher or 3652:288:2 dB.

Problem 7.23

R200i200
1.PX11df1tan1f1 where we have used the approximationstan1200
2001f2
200
1
2andtan1200 2. To nd the SQNR, we haveSQNRdB684:810log100
484:82032:8 dB.

270
2.To increase the SQNR by 20 dB, we need at least 4 more bits per sample (each bit improved

the SQNR by 6 dB). The new number of bits per sample is 8+4=12 bits and the new number of

levels is 2124096.

3. The minimum transmission bandwidth is obtained from BWW122002400 Hz.

Problem 7.24

R1
1.Any probability density function satisesf x dx1 here the area under the density
1
function has to be one. This is the area of the left triangle plus the area of the right rectangle

in the plot off x. Therefore, we should have


Z1
f x dx2a2a3a1)a1
123

2. The equation forf xis


8
x1
>>>;
632x <0
<
f x1;0x2
3
>>>
:0
;otherwise:

Here the density function is given therefore the power can be obtained fromEX2t
R1
1x2f x dx. We have
Z0Z2
x11
PXx2 dxx2dx
26303

11012
433

24x9x29x0
2810

999

3. Herexmax2, andN232, therefore5, and

SQNRj4:8610 logPX
dB102
xmax

4:83010 log10=9
10
4
34:810 log5
10
18

34:85:5629:24 dB

4.BTW51200060000 Hz.

5.Each extra bit improves SQNR by 6 dB, since we need an extra 20 dB, we need at least 4 more

bits (3 more bits can improve the performance by only 18 dB), therefore the newwill be

5+4=9 and the new bandwidth will beBT912000108000 Hz . Compared to the previous

required bandwidth of 60000 Hz, this is an increase of eighty per cent.

271
Problem 7.25

1.Sf is a triangle of height one extending from5000 to 5000. Therefore the area under it
X
which is the power in the process isPX5000 Watts.

2.fs2WWG25000200012000 samples [er second.

3. 2562, hence8. We have

SQNRdB4:8610 logPX4:84810 log500034:23 dB


10210
xmax360000

4.Rfs81200096000 bits/sec.

5. BWTR48000 Hz.
2

6.Since each extra bit increases the SNR by 6 dBs, for at least 25 dBs we need at least 5 extra bits.

The new value ofnuis 8+5=13, and we haveN22138192,SQNRdB34:2365

64:23, and BWTfs78000.


2

Problem 7.26

Suppose that the transmitted sequence isx. If an error occurs at theithbit of the sequence, then the

received sequencex0is

x0x0: : :010: : :0

where addition is modulo 2. Thus the error sequence isei0: : :010: : :0, which in natural binary

coding has the value 2i1. If the spacing between levels is, then the error introduced by the channel

is 2i1.

2)

X
Dchannelperror inibit2i12
i1

X1
4
pb24i1pb2
i114
41
pb2
3

3)The total distortion is


41x2
DtotalDchannelDquantiz:pb2max
33N2
4x241x2
pbmaxmax
N233N2

272
or sinceN2
x2x2
Dtotalmax14pb41max14pbN21
343N2

4)
222
SNREXEX3N
Dtotalx214pN21
maxb
2
If we letXX, thenEXEX2X2. Hence,
xmax2
xmax
222

SNR3NX34X
14pbN2114pb41

Problem 7.27

The sampling rate isfs44100 meaning that we take 44100 samples per second. Each sample is

quantized using 16 bits so the total number of bits per second is 4410016. For a music piece of

duration 50 min3000 sec the resulting number of bits per channel (left and right) is

441001630002:1168109

and the overall number of bits is

2:116810924:2336109

Computer Problems

Computer Problem 7.1

The following MATLAB script nds the quantization levels as5:1865;4:2168;2:3706;0:7228;

0:4599;1:5101;3:2827;5:1865.

% MATLAB script for Computer Problem 7.1.

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 o ;
end

In this MATLAB script the MATLAB function centroid.m given next nds the centroid of a region.
273
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) nds the centroid of the
% function F dened in an m-le on the [A,B] region. The
% function can contain up to three parameters, P1, P2, P3.
% tol=the relative error.

args=[ ];
for n=1:nargin4
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

function y=xfnct(x,funfcn,p1,p2,p3)
% y=xfnct(x,funfcn,p1,p2,p3)
% Returns the function funfcn(x) times x

args=[ ];
for nn=1:nargin2
args=[args,,p,int2str(nn)];
end
args=[args,)] ;
y=eval([funfcn,(x,args,.x]);10
*

function y=normal(x,m,s)
% FUNCTION y=NORMAL(x,m,s)
% Gaussian distribution
% m=mean
% s=standard deviation
y=(1/sqrt(2*pi*s^2))*exp(((xm).^2)/(2*s^2));

Computer 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 are1;5,5;4,4;3,3;2,2;1,1;0,0;1,

1;2,2;3,3;4,4;5, and5;1.

3) The MATLAB function uq_dist.m is used to nd 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

274
function[y,dist]=uqdist(funfcn,b,c,n,delta,s,tol,p1,p2,p3)
%UQDIST returns the distortion of a uniform quantizer
% with quantization points set to the centroids
% [Y,DIST]=UQDIST(FUNFCN,B,C,N,DELTA,S,TOL,P1,P2,P3)
% funfcn=source density function given in an m-le
% with at most three parameters, p1,p2,p3.
% [b,c]=The support of the source density function.
% n=number of levels.
% delta=level size.
% s=the leftmost quantization region boundary.10
% p1,p2,p3=parameters of the input function.
% y=quantization levels.
% dist=distortion.
% tol=the relative error.

if(cb<delta*(n2))
error(Too many levels for this range.);return
end
if(s<b)
error(The leftmost boundary too small.);return20
end
if(s+(n2)*delta>c)
error(The leftmost boundary too large.);return
end
args=[ ];
for j=1:nargin7
args=[args,,p,int2str(j)];
end
args=[args,)];
a(1)=b;30
for i=2:n
a(i)=s+(i2)*delta;
end
a(n+1)=c;
[y,dist]=eval([mse_dist(funfcn,a,tol,args]);

function[y,dist]=msedist(funfcn,a,tol,p1,p2,p3)
%MSEDIST returns the mean-squared quantization error.
% [Y,DIST]=MSEDIST(FUNFCN,A,TOL,P1,P2,P3)
% funfcn=The distribution function given
% in an m-le. It can depend on up to three
% parameters, p1,p2,p3.
% a=the vector dening 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:nargin3
args=[args,,p,int2str(n)];
end

275
args=[args,)];
for i=1:length(a)1
y(i)=eval([centroid(funfcn,a(i),a(i+1),tol,args]);
end20
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

In uq_dist.m function we can substituteb 20,c20,1,n12 ,s 5, tol = 0.001,p10,

andp22. Substituting these values into uq_dist.m, we obtain a squared error distortion of 0.0851

and quantization values of0:4897,1:4691,2:4487,3:4286,4:4089, and5:6455.

Computer Problem 7.3

In order to design a a Lloyd-Max quantizer, the m-le 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-le. 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:nargin4
args=[args,,p,int2str(j)];
end
args=[args,)];20
v=eval([variance(funfcn,-b,b,tol,args]);
a(1)=b;
d=2*b/n;
for i=2:n
a(i)=a(i1)+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(i1)+y(i))/2;
end

276
dist=newdist;
[y,newdist]=eval([mse_dist(funfcn,a,tol,args]);
end

1) Usingb10,n10, tol = 0.01,p10, andp21 in lloydmax.m, we obtain the quantization

boundaries and quantization levels vectorsaandyas

a 10;2:16;1:51;0:98;0:48;0

y 2:52;1:78;1:22;0:72;0:24

2) The mean squared distortion is found (using lloydmax.m) to be 0.02.

Computer Problem 7.4

The m-le u_pcm.m given next takes as its input a sequence of sampled values and the number

of desired quantization levels and nds the quantized sequence, the encoded sequence, and the

resulting SQNR (in decibels).

function[sqnr,aquan,code]=upcm(a,n)
%UPCM uniform PCM encoding of a sequence
% [SQNR,AQUAN,CODE]=UPCM(A,N)
% a=input sequence.
% n=number of quantization levels (even).
% sqnr=output SQNR (in dB).
% aquan=quantized output before encoding.
% code=the encoded output.

amax=max(abs(a));10
aquan=a/amax;
bquan=aquan;
d=2/n;
q=d.*[0:n1];
q=q((n1)/2)*d;
for i=1:n
aquan(nd((q(i)d/2<=aquan) & (aquan<=q(i)+d/2)))=. . .
q(i).*ones(1,length(nd((q(i)d/2<=aquan) & (aquan<=q(i)+d/2))));
bquan(nd(aquan==q(i) ))=(i1).*ones(1,length(nd(aquan==q(i) )));
end20
aquan=aquan*amax;
nu=ceil(log2(n));
code=zeros(length(a),nu);
for i=1:length(a)
for j=nu:1:0
if(x(bquan(i)/(2^j)) == 1)
code(i,(nuj)) = 1;
bquan(i) =bquan(i)2^j;
end
end30
end
sqnr=20*log10(norm(a)/norm(aaquan));

277
1
8-level
16-level
0.8

0.6

0.4

0.2

amplitude
0

-0.2

-0.4

-0.6

-0.8

-1
0246810
t

Figure 7.1: Uniform PCM for a sinusoidal signal using 8 and 16 levels

1) We arbitrarily choose the duration of the signal to be 10 s. Then using the u_pcm.m m-le, we

generate the quantized signals for the two cases of 8 and 16 quantization levels. The plots are shown

in Figure 7.1.

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.

% MATLAB script for Computer Problem 7.4.


echo on
t=[0:0.1:10];
a=sin(t);
[sqnr8,aquan8,code8]=upcm(a,8);
[sqnr16,aquan16,code16]=upcm(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.
sqnr1610

278
3

input sequence
0

-1

-2

-3
0100200300400500
m

Figure 7.2: The plot of input sequence for 64 quantization levels

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)))

Computer Problem 7.5

1) The plot of 500 point sequence is given in Figure 7.2

2) Using the MATLAB function u_pcm.m given in Computer Problem 7.4, we nd the SQNR for the

64-level quantizer to be 31.66 dB.

3) Again by using the MATLAB function u_pcm.m, the rst ve values of the sequence, the corre-

sponding quantized values, and the corresponding PCM codewords are given as

279
0.05

0.04

0.03

0.02

0.01

quantization error
0

-0.01

-0.02

-0.03

-0.04

-0.05
0100200300400500
m

Figure 7.3: Quantization error in uniform PCM for 64 quantization levels

Input0:4326;1:6656;0:1253;0:2877;1:1465(7.21)

Quantized values0:4331;1:6931;0:1181;0:2756;1:1419(7.22)
8
>>>0
11010
>>>
>>>
001010
>><

Codewords1 0 0 0 0 1(7.23)
>>>
>>>
100011
>>>
>>:
010001

4) Plot of the quantization error is shown in Figure 7.3

Computer Problem 7.6

1) This question is solved by using the m-le mula_pcm.m, which is the equivalent of the m-le
u_pcm.m when using alaw PCM scheme. This le is given next

function[sqnr,aquan,code]=mulapcm(a,n,mu)

280
%MULAPCM mu-law PCM encoding of a sequence
% [SQNR,AQUAN,CODE]=MULAPCM(A,N,MU).
% a=input sequence.
% n=number of quantization levels (even).
% sqnr=output SQNR (in dB).
% aquan=quantized output before encoding.
% code=the encoded output.

[y,maximum]=mulaw(a,mu);10
[sqnr,yq,code]=upcm(y,n);
aquan=invmulaw(yq,mu);
aquan=maximum*aquan;
sqnr=20*log10(norm(a)/norm(aaquan));

The two m-les mulaw.m and invmulaw.m given below implement-law nonlinearity and its

inverse. signum.m function that nds 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 nds the signum of a vector.
% Y=SIGNUM(X)
% X=input vector

y=x;
y(nd(x>0))=ones(size(nd(x>0)));
y(nd(x<0))=ones(size(nd(x<0)));
y(nd(x==0))=zeros(size(nd(x==0)));
10

Let the vectorabe the vector of length 500 generated according toN0;1; that is, let

arandn1;500

Then by using

dist,a_quan,codemula_pcma;16;255

281
we can obtain the quantized sequence and the SQNR for a 16-level quantization. Plots of the

inputoutput relation for the quantizer and the quantization error are given in Figures 7.4, 7.5, and

7.6.

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 SQNR31:49 dB.

282
0.8

0.6

0.4

0.2

-0.2

quantization error
-0.4

-0.6

-0.8

-1
0100200300400500
m

2.5

1.5

0.5

-0.5
quantizer output
-1

-1.5

-2

-2.5
-3-2-10123
quantizer input

Figure 7.4: Quantization error and quantizer inputoutput relation for a 16-level-law PCM
283
0.3

0.2

0.1

-0.1

quantization error
-0.2

-0.3

-0.4
0100200300400500
m

quantizer output
-1

-2

-3
-3-2-10123

quantizer input
Figure 7.5: Quantization error and quantizer inputoutput relation for a 64-level-law PCM
284
0.15

0.1

0.05

-0.05

quantization error
-0.1

-0.15

-0.2
0100200300400500
m

quantizer output
-1

-2

-3
-3-2-10123

quantizer input
Figure 7.6: Quantization error and quantizer inputoutput relation for a 128-level-law PCM
285
Chapter 8

Problem 8.1

1)To show that the waveforms nt,n1;2;3 are orthogonal we have to prove that
Z1
mt ntdt0; mn
1

Clearly,
Z1Z4
c12 1t 2tdt 1t 2tdt
10
Z2Z4
1t 2tdt 1t 2tdt

02
2Z4
1Z111

dtdt242
404244
0

Similarly,
Z1Z4
c13 1t 3tdt 1t 3tdt
10
1Z2Z3Z4
1Z111
dtdtdtdt

40414243
0

and
Z1Z4
c23 2t 3tdt 2t 3tdt
10
1Z2Z3Z4
1Z111
dtdtdtdt

40414243
0

Thus, the signals ntare orthogonal.

2)We rst determine the weighting coecients


Z1
xnxt ntdt; n1;2;3
1

Z4Z1Z2Z3Z4
x1xt 1tdt 1dt1dt1dt1dt0
020212223
Z4Z4
x2xt 2tdt1xtdt0
020
Z4Z1Z2Z3Z4
x3xt 3tdt 1dt1dt1dt1dt0
020212223

286
As it is observed,xtis orthogonal to the signal waveforms nt,n1;2;3 and thus it can not

represented as a linear combination of these functions.

Problem 8.2

1)The expansion coecientsfcng, that minimize the mean square error, satisfy

Z1Z4
cnxt ntdtsin t ntdt
104

Hence,

Z4Z2Z4
c1sin t 1tdt1sin tdt1sin tdt
04204224
2 t22 t4
coscos
4042
22
01100

Similarly,

Z4Z4
c2sin t 2tdt1sin tdt
04204
2 t4 24
cos11

40

and
Z4
c3sin t 3tdt
04
1Z2Z3Z4
1Z t1 t1 t1 t
sindtsindtsindtsindt

204214224234
0

Note thatc1,c2can be found by inspection sincesin tis even with respect to thex2 axis and
4
1t, 3tare odd with respect to the same axis.

2)The residual mean square errorEmincan be found from

Z1
3
X
Eminjxtj2dtjcij2
1
i1

Thus,

Z4Z4
22
Eminsin tdt411cos tdt16
042022

21sin t16216
2022

287
Problem 8.3

1)As an orthonormal set of basis functions we consider the set

88
><1><1
0t <1 1t <2
1t 2t
>:0>:0
o.w o.w
88
><1><1
2t <3 3t <4
3t 4t
>:0>:0
o.w o.w

In matrix notation, the four waveforms can be represented as

010101
s1t2111 1t
BCBCBC
BCBCBC
BsCB2CB C
1 1 0 2t
2tCBCBC
B
BCBCBC
BsCB1CB C
1 11CB3tC
B3tCB
@A@A@A
s4t122 2 4t

Note that the rank of the transformation matrix is 4 and therefore, the dimensionality of the

waveforms is 4

2)The representation vectors are

s12111

s22 1 1 0

s311 11

s4122 2

3)The distance between the rst and the second vector is

s
q2
p
d1;2js1s2j2422125

288
Similarly we nd that
s
q2
p
d1;3js1s3j21 02 05

s
q2
p
d1;4js1s4j21 1 1312

s
q2
p
d2;3js2s3j23 2 0 114

s
q2
p
d2;4js2s4j23 3 3231

s
q2
p
d3;4js3s4j20 1 3319

p
Thus, the minimum distance between any pair of vectors isdmin5.

Problem 8.4

As a set of orthonormal functions we consider the waveforms


888
><1><1><1
0t <1 1t <2 2t <3
1t 2t 3t
>:0>:0>:0
o.w o.w o.w

The vector representation of the signals is

s12 2 2

s22 0 0

s3022

s42 2 0

Note thats3ts2ts1tand that the dimensionality of the waveforms is 3.

Problem 8.5
Case 1:fck, wherekis a positive integer:
2Tb
ZTZT
bb
b2
E1E2s2t dt2Ecos2 fct dt
01Tb0
ZT
Ek
bb
1cos4tdt
Tb02Tb
"T#
E
bTbkb
Tbsin4t

Tb2 k2Tb
0

E
b

289
Case 2:fc6k, butfcTb1:
2Tb

ZTZT
bb
b2
cos2 fct dt
E1E2s2t dt2E
01Tb0
ZT
E
bb

1cos4 fctdt

Tb0
2"#T3
E
b1b
4T5

sin4 fct
Tbb4 fc
0
E
b
Esin4 fcTb
b
2 fcTb

Noting thatsin4 fcTb1 andfcTb1, we conclude that teh seconfd term is negligible

compared to the rst term; henceE1E2E.


b

Problem 8.6

Proof of the energy part in this problem is the same as the solution of problem 8.5. For the

orthogonality, we have

ZTZT
bb
b
s1ts2t dt2Ecos2 f1tcos2 f2tdt
0Tb0
ZT
2E
bb
cos 2f1f2tcos 2f1f2tdt

2Tb0
"#T
2Ek1k21k1k2b
b1
sin 2tsin 2t
2Tb2 f1f22Tb2 f1f22Tb
0
0

The proof for the case wheref1Tb1 andf2Tb1 is similar to the proof of case 2 in the solution

of Problem 8.5.

Problem 8.7

1)The impulse response of the lter matched tostis

htsTts3tst

where we have used the fact thatstis even with respect to thetT3axis.
22

290
2)The output of the matched lter is

Zt
ytst ? stsstd
0
8
>>>0
t <0
>>>
>>>2
At0t <1
>>>
>>>2
>>>A2t1t <2
>>>
<22
At22t <3

>>>22
A4t3t <4
>>>
>>>2
At44t <5
>>>
>>>
>>>A26t5t <6
>>>
:0
6t

A sketch ofytis depicted in the next gure

. . . . . . . . . . . . . . . .2
2A

. . . . . .2
A

1 3 5 642

3)At the output of the matched lter and fortT3 the noise is

ZT
nTnhTd
0
ZTZT
nsTTdnsd
00

The variance of the noise is


"ZT#
ZT
2

nTEnnvssvddv
00
ZTZT
ssvEnnvddv
00
ZTZT
N0

ssvvddv
200
ZT
N0
s2dN0A2
20

4)For antipodal equiprobable signals the probability of error is


s#
"

P eQS
No

291
whereSis the output SNR from the matched lter. Since
N
o

Sy2T4A4

No En2N0A2
T

we obtain
2s3
4A2
5
P eQ4
N0

Problem 8.8

1.Sinces3t s1t, it is sucient to consider justs1t,s2tands4t. By inspection, we can


8
<1
;0t <1
choose1t,2t1t1, and3t1t2. With this selection
:0
;otherwise
s11;1;0,s22;1;1,s31;1;0, ands40;0;2.

2. The constellation is shown below

s40;0;2

s11;1;0s31;1;0

21

s22;1;0
292
3. The matrix representation of the four vectors is

23
11 0
67
67
627
10
67
67
617
1 07
6
45
002

The three columns are clearly linearly independent, hence the rank of the matrix is 3. Therefore

the dimensionality of the signal space is 3.

4.We know that in generalEm ksmk2, hence,E1 ks1k22,E2 ks2k25,E3 ks3k22,


Eavg13
andE4 ks4k24. Therefore,Eavg1252413andEbavg.
44logM8
2

Problem 8.9

1)Taking the inverse Fourier transform ofHf , we obtain

"#"#
1ej2 f T
ht F1Hf F1 F1
j2 fj2 f
01
tT
2
A
sgntsgntT 2@
T

2)The signal waveform, to whichhtis matched, is

0101
TtTTt
22
A2@Aht
sthTt2@
TT

where we have used the symmetry oft2with respect to thetTaxis.


T2
Problem 8.10

IfgTtsinct, then its matched waveform ishtsinctsinct. Since, (see Problem 2.17)

sinct ?sinctsinct

the output of the matched lter is the same sinc pulse. If

gTtsinc2tT
T2

293
then the matched waveform is

htgTTtsinc2TtgTt
T2

where the last equality follows from the fact thatgTtis even with respect to thetTaxis. The
2
output of the matched lter is

yt F1gTt ? gTt
"#
T2T
F1fej2 f T
42

T2TT
t
2sincTtT2gT2

Thus the output of the matched lter is the same sinc function, scaled byTand centered attT.
2

Problem 8.11

1)The output of the integrator is

ZtZt
ytr dsind
00
ZtZt
sidnd
00

At timetTwe have

ZTZT sZT
yTsidndEbTnd
00T0

The signal energy at the output of the integrator attTis

0s12
E
b
E@TA ET
sb
T

whereas the noise power

"ZT#
ZT
PnEnnvddv
00
ZTZT
Ennvddv
00
ZTZT
N0N0
vddvT
2002

Hence, the output SNR is


2E
SNREsb
PnN0

294
2)The transfer function of the RC lter is

Hf 1
1j2 RCf

Thus, the impulse response of the lter is


t
ht1eRCu1t
RC

and the output signal is given by


Zt
t
yt1r eRCd
RC1
t
t
1Z
sineRCd
RC1
ZtZt
1t1t
RCRCRCRC
siedened

RCe0RC1

At timetTwe obtain
ZTZT
T T 1
yT 1eRCsieRCdeRCneRCd
RC0RC1

The signal energy at the output of the lter is


ZTZT
2Tv
E1eRCsisiveRCeRCddv
s
RC200
ZT!2
12TE
b

eRCeRCd
RC2T0
2T ET2
b
eRCeRC1
T
ET2
b
RC

T1e

The noise power at the output of the lter is


ZTZT
12T
PneRCEnnvddv
RC211
ZTZT
12TN0v
eRCveRCddv
RC2112
ZT
12TN02
eRCeRCd
RC212
12TN02T1N0
RCRC

2RCe2e2RC2

Hence,
4ERCT2
SNREsb1eRC
PnT N0

3)The value ofRCthat maximizes SNR, can be found by setting the partial derivative of SNR with

respect toRCequal to zero. Thus, ifaRC, then

#SNRTTTTT
aaa
#a01eae e1a1

295
Solving this transcendental equation numerically fora, we obtain

TT
)RCa
a1:26=1:26

Problem 8.12

1)The matched lter is

8
><1
t1;0t < T
h1ts1TtT
>:0
otherwise

The output of the matched lter is

Z1
y1ts1h1td
1

Ift0, theny1t0, If 0< tT, then

Z1
y1t1t1d
0TT
ZtZt
1t1

d2d
0TT2T20
t3t2

6T22T

IfTt2T, then

ZT
y1t1t1d
tTT
ZTZT
1t1

d2d
tTT2T2t
tT 3tTT

6T223

For 2T <0, we obtainy1t0. In summary

8
>>>0
t0
>>>
><t3t2
20< tT
y1t6T2T
>>>tT 3tTT
>>>6T223T < t2T
>:
0 2T < t

A sketch ofy1tis given in the next gure. As it is observed the maximum ofy1t, which isT, is
3
achieved fortT.

296
T/3

2T
T

2)The signal waveform matched tos2tis

8
><1T
;0t
h2t2
>:2T
;< tT
2

The output of the matched lter is

Z1
y2ts2h2td
1

Rt
Ift0 ort2T, theny2t0. If 0< tT, theny2t2d 2t. IfT< tT, then
202

T Zt
ZtTZ
22
y2t4d2dd7t9T
0tTT2
22

IfT < t3T, then


2

T ZtTZT
Z
22
y2t4d2dd19T7t
tTTtT2
22

For,3T< t2T, we obtain


2
ZT
y2t2d2t4T
tT

In summary
8
>>>0
t0
>>>
>>>T
2t0< t
>>>2
>><9
7tTT< tT
y2t22
>>>19T3T
>>>27t T < t2
>>>3
2t4TT< t2T
>>>2
>>:
0 2T < t

A plot ofy2tis shown in the next gure

297
5T
2

T2T
........
T

3)The signal waveform matched tos3tis


8
><2T
0t
h3t2
>:0T
2< tT

The output of the matched lter is


8
><4T
t2Tt < T
y3th3t ? s3t2
>:43T
t6T Tt
2

In the next gure we have plottedy3t.

..........
2T

3TT
2T2

Problem 8.13

Since the rate of transmission isR105bits/sec, the bit intervalTbis 105sec. The probability of

error in a binary PAM system is


s#
"

P eQ2Eb
N0

where the bit energy isEA2Tb. WithP eP2106, we obtain


b
s
2E4:752N0
b
4:75=) E0:112813
N0b2
Thus
p
A2Tb0:112813=)A0:112813105106:21

298
Problem 8.14

1)For a binary PAM system for which the two signals have unequal probability, the optimum detector

is

s1

r>N0pln1p
<4Ep
b
s2

p7
HereE=N010 andp0:3. Substituting in the above gives0:025ln0:02118.
b
3

2)The average probability of error is

P eP ejs1P s1P ejs2P s2

pP ejs11pP ejs2
ZZ1
pf rjs1dr1pf rjs1dr
1
Zrp2Z1p2
ErE
bb
p1peN0dr1p1peN0dr
1 N0 N0
Z1Z1
x21x2
p1pe2dx1ppe2dx
212
2

where
ssss
2E22E2
bb

12
N0N0N0N0

Thus,
ss#"ss#
"
22E2
P epQ2Eb1pQb
N0N0N0N0

Ifp0:3 andEb10, then


N0

P e0:3Q4:37740:7Q4:5668

3:5348106

If the symbols are equiprobable, then we have

s
p
P eQ2EbQ203:8721106
N0

Problem 8.15

299
Assuming thatEn2t2, we obtain
n

" ZT! ZT!#

En1n2Es1tntdts2vnvdv
00
ZTZT
s1ts2vEntnvdtdv
00
ZT
2

ns1ts2tdt
0
0

where the last equality follows from the orthogonality of the signal waveformss1tands2t.

Problem 8.16

1)The optimum threshold is given by

N01pN0

plnpln 2

4Ep4E
bb

2)The average probability of error is (N0pln 2)


4E
b

Z1
p
2
P epam 11perEb=N0dr

N0

Zp
2
pam11perEb=N0dr
1 N0
"p#"p#
2E1E
bb
pQp

3QN0=23N0=2
s#"sp#
"p
22N0=Eln 22E12E2N0=Eln 2
bbbb

3Q4N03QN04
rp

pr
N0=Eln 22E12E2N0=Eln 2
3)Here we havePe2Q2bbQbb, substitutingE1 and
34N03N04b
N00:1 we obtain

"p#"p#
20:2ln 2p1p0:2ln 221
PeQ2020Q4:5496Q4:3946
343433

The result isPe3:64106.

300
Problem 8.17

1)The optimal receiver (see Problem 8.11) computes the metrics


Z1Z1
Cr;smr tsmtdt1jsmtj2dtN0lnP sm
1212

and decides in favor of the signal with the largestCr;sm. Sinces1t s2t, the energy of the

two message signals is the same, and therefore the detection rule is written as

s1
Z1
N0p2
r ts1tdt>N0lnP s2ln
1<4P s14p1
s2

2)Ifs1tis transmitted, then the output of the correlator is

Z1ZTZT
r ts1tdts1t2dtnts1tdt
100
En
s

whereEis the energy of the signal andnis a zero-mean Gaussian random variable with variance
s
"ZT#
ZT
2

nEnnvs1s1vddv
00
ZTZT
s1s1vEnnvddv
00
ZTZT
N0
s1s1vvddv

200
ZT
N0N0
js1j2dE
202s

Hence, the probability of errorP ejs1is


Np
Z02
4lnpEsx2
11
P ejs1peN0Esdx
1 N0Es
ss#
"
12N0p2
Q2Esln
N04Ep1
s

Similarly we nd that
ss#
"
12N0p2
P ejs2Q2Esln
N04Ep1
s

The average probability of error is

P ep1P ejs1p2P ejs2


ss#"ss#
"
12N01p12E12N01p1
p1Q2Esln1p1Qsln
N04Ep1N04Ep1
ss

301
3)In the next gure we plot the probability of error as a function ofp1, for two values of the

SNR2Es. As it is observed the probability of error attains its maximum for equiprobable signals.
N0

-24
x10
0.168

0.147

0.126

0.15

0.084
P(e)P(e)
0.063

SNR=1 (0 db)
0.042
SNR=100 (20 db)
0.021

00
0.10.20.30.40.50.60.70.80.9 10.10.20.30.40.50.60.70.80.9 1
0
0
Probability pProbability p

Problem 8.18

1)The two equiprobable signals have the same energy and therefore the optimal receiver bases its

decisions on the rule

s1
Z1Z1
r ts1tdt>r ts2tdt
1<1
s2

2)If the message signals1tis transmitted, thenr ts1tntand the decision rule becomes

Z1
s1tnts1ts2tdt
1
Z1Z1
s1ts1ts2tdtnts1ts2tdt
11

s1
Z1
s1ts1ts2tdtn>0
1<
s2
302
wherenis a zero mean Gaussian random variable with variance
Z1Z1
2

ns1s2s1vs2vEnnvddv
11
ZTZT
s1s2s1vs2vN0vddv

002
ZT
N0
s1s22d

20
ZTZT
N02A2

200TAd

N0A2T

23

Since
Z1ZT
s1ts1ts2tdtAt2AtAdt
10TT
A2 T

the probability of errorP ejs1is given by


2
P ejs1P ATn <0
6
A2T021

6
1Z@x
q2expAdx
2
T N0
2AT N012A
66
2s3
A2T
5
Q4
6N0

Similarly we nd that
2s3
A2 T
5
P ejs2Q4
6N0

and since the two signals are equiprobable, the average probability of error is given by
1
P e1P ejs1P ejs2
22
2s3"s#
A2TE
5Qs
Q4
6N02N0

whereEis the energy of the transmitted signals.


s

Problem 8.19

For binary phase modulation, the error probability is


2s3
s#
"
A2T
5
P2Q2EbQ4
N0N0

303
WithP2106we nd from tables that
s
A2T
4:74=)A2T44:93521010
N0

If the data rate is 10 Kbps, then the bit interval isT104and therefore, the signal amplitude is
p
A44:935210101046:7034103

Similarly we nd that when the rate is 105bps and 106bps, the required amplitude of the signal is

A2:12102andA6:703102respectively.

Problem 8.20

The energy of the two signalss1tands2tis

EA2T
b

The dimensionality of the signal space is one, and by choosing the basis function as
8
><1T
p
0t <
tT2
>:1T
p
T2tT

we nd the vector representation of the signals as

p
s1;2 ATn

withna zero-mean Gaussian random variable of varianceN0. The probability of error for antipodal
2
signals is given by, whereEA2T. Hence,
b
2s3
s!

2A2T
5
P eQ2EbQ4
N0N0

Problem 8.21

Plots ofstandhtare shown on left and right, respectively.


11
T0T

304
and
ZT
ytetTe2d
For this case we havetT
ZtT
tT12
ytetTe2dee
02tT
11

1tetTet3T
etTe222
20
1Therefore8>1
Ttt

>><2eTetet0< tT
2eee>

ForT < t2Twe have the following gureyt1etT1et3TT < t2


22
>>>
>:
0 otherwise

305

T
0

The output of the matched lter is


Z1
ytsht d
1

Fort <0, there is no overlap and the integral is zero. For 0< tTwe have the following gure,

where the the product of the two signals in the overlapping region isshteeTt

etT2and the integral is the area of the shaded region.

0
T
Problem 8.22

We havePavRE2106E, hence
bb
s! s!

PbQ2EbQ2Pav106
N0RN0

Using theQ-function table (page 220) we haveQ4:77106, therefore

ss
2Pav2PavPav
Q4:77)4:772
RN02106N0106N0

From this we havePav22:753106.


N0

Problem 8.23

a)The received signal may be expressed as

8
><nt
ifs0twas transmitted
rt
>:A
ntifs1twas transmitted

Assuming thatsthas unit energy, then the sampled outputs of the crosscorrelators are

rsmn; m0;1

p
wheres00,s1ATand the noise termnis a zero-mean Gaussian random variable with variance

"ZT#
ZT
211

nEpntdtpnd
T0T0
TZT
1Z
Entndtd
T00
ZTZT
N0N0
tdtd
2T002

The probability density function for the sampled output is


2
1r
f rjs0peN0
N0
p
2
1rAT
f rjs1peN0
N0

Since the signals are equally probable, the optimal detector decides in favor ofs0if

PMr;s0f rjs0 > f rjs1PMr;s1

306
otherwise it decides in favor ofs1. The decision rule may be expressed as

s0
ppp
22
PMr;s0rATr2rAT AT
>
eN0eN01
PMr;s1<

s1

or equivalently

s1
p
r>1AT
<2

s0

p
The optimum threshold is1AT.
2
b)The average probability of error is

1
P e1P ejs0P ejs1
22
1p
1Z2AT
1Z1

f rjs0drf rjs1dr
21ApT21
2
1pp
12Z2ATr 2
1Z1r11AT
peN0drpeN0dr

21ApT N021 N0
2
rp
12
12Z2AT2
1Zr1x1N01x
pe2dxpe2dx

212ApT2212
2N
0
s#
"hi
pp
Q12ATQSNR
2N0

where
12
AT
SNR2
N0

Thus, the on-o signaling requires a factor of two more energy to achieve the same probability of

error as the antipodal signaling.

Problem 8.24

1)The impulse response of the matched lter is

8
><A
Ttcos2 fcTt0tT
stuTtT
>:0
otherwise

307
2)The output of the matched lter attTis

ZT

gT ut ? stuTsd
tT
0
ZT
A2
T2cos22 fcTd

T20
ZT
vTA2
v2cos22 fcvdv
T20
" !#T
A2v3v21vcos4 fcv
sin4 fcv

T2642 fc82 fc342 fc20


" !#
A2T3T21 Tcos4 fcT
sin4 fcT

T2642 fc82 fc3 42 fc2

3)The output of the correlator attTis

ZT
qTu2d
0
ZT
A2
22

cos2 fcd
T20

However, this is the same expression with the case of the output of the matched lter sampled at

tT. Thus, the correlator can substitute the matched lter in a demodulation system and vise

versa.

Problem 8.25

1)The signalr tcan be written as

qq
r t2Pscos2 fct2Pcsin2 fct
s!!

qP

2PcPssin2 fctantan1s
Pc
s!!

p1
2PTsin2 fctancosPc

PT

wherean 1 are the information symbols andPTis the total transmitted power. As it is observed

the signal has the form of a PM signal where

s!

Pc

nancos1
PT

Any method used to extract the carrier phase from the received signal can be employed at the

receiver. The following gure shows the structure of a receiver that employs a decision-feedback PLL.

The operation of the PLL is described in the next part.

308
t=Tb

RTbv(t)
Threshold()dt
0


DFPLL
cos(2 fct+)

2)At the receiver the signal is demodulated by crosscorrelating the received signal

s!!

p1
r t2PTsin2 fctancosPcnt
PT

with cos2 fctand sin2 fct. The sampled values at the output of the correlators are

i1
p
1h
r12PTnstsinnnctcosn
22
i1
p
1h
r22PTnstcosnnctsinn
22

wherenct,nstare the in-phase and quadrature components of the noisent. If the detector

has made the correct decision on the transmitted point, then by multiplyingr1bycosnandr2by

sinnand subtracting the results, we obtain (after ignoring the noise)

hi
1p
r1cosn2PTsincos2ncossinncosn
2
hi
1p
r2sinn2PTcoscosnsinnsinsin2n
2
1p
etr1cosnr2sinn2PTsin
2

The erroretis passed to the loop lter of the DFPLL that drives the VCO. As it is seen only the

phasenis used to estimate the carrier phase.

3)Having a correct carrier phase estimate, the output of the lowpass lter sampled attTbis

s!
p1
r 12PTsin cosPcn
2PT
s
1pPc
1n

22PTPT
s
1Pc
1n
22PTPT

wherenis a zero-mean Gaussian random variable with variance


"ZT#
ZT
b
2b

nEntncos2 fctcos2 fcdtd


00
ZT
N0b
cos22 fctdt
20
N0

309
Note thatTbhas been normalized to 1 since the problem has been stated in terms of the power of

the involved signals. The probability of error is given by


s#
"

P errorQ2PT1Pc
N0PT

The loss due to the allocation of power to the pilot signal is

SNRloss10 log1Pc
10
PT

WhenPc=PT0:1, then

SNRloss10 log0:9 0:4576 dB


10

The negative sign indicates that the SNR is decreased by 0.4576 dB.

Problem 8.26

1)If the received signal is

r t gTtcos2 fctnt

then by crosscorrelating with the signal at the output of the PLL


s

t2gttcos2 fct
E
g

we obtain
ZT sZT
r t tdt2g2tcos2 fctcos2 fctdt
0Eg0T
ZTs
nt2gttcos2 fctdt
0Eg
sZT
2g2t
T
tcosdtn

E02cos22fc
g
s
E
g

2cosn

wherenis a zero-mean Gaussian random variable with varianceN0. If we assume that the signal
2
s1tgTtcos2 fctwas transmitted, then the probability of error is
0s1
E
g
P errorjs1tP@cosn <0A
2
2v32v3
uuu
Ecos276t2Ecos27
gus
tQ
Q64545
N0N0

whereE E=2 is the energy of the transmitted signal. As it is observed the phase error
sg
reduces the SNR by a factor

SNRloss 10 logcos2
10

310
2)When45o, then the loss due to the phase error is

SNRloss 10 logcos245o 10 log13:01 dB


1010
2

Problem 8.27

1)The bandwidth of the bandpass channel is

W30006002400 Hz

Since each symbol of the QPSK constellation conveys 2 bits of information, the symbol rate of

transmission is

R24001200 symbols/sec
2

Thus, for spectral shaping we can use a signal pulse with a raised cosine spectrum and roll-o factor

1, that is

jfj
Xr cf T1cos Tjfj1cos2
224002400

If the desired spectral characteristic is split evenly between the transmitting lterGTf and the

receiving lterGRf , then

GTf GRf1cosjfj;jfj<11200
12002400T

A block diagram of the transmitter is shown in the next gure.

to ChannelGT(f )an
QPSK

cos(2 fct)

2)If the bit rate is 4800 bps, then the symbol rate is

R48002400 symbols/sec
2

In order to satisfy the Nyquist criterion, the the signal pulse used for spectral shaping, should have

the spectrum
Xf Tf
W
p
Thus, the frequency response of the transmitting lter isGTfTf.
W

311
Problem 8.28

The constellation of Fig. P-10.9(a) has four points at a distance 2Afrom the origin and four points at
p
a distance 22A. Thus, the average transmitted power of the constellation is

1h2pi2
Pa42A422A26A
8
p
The second constellation has four points at a distance7Afrom the origin, two points at a distance
p
3Aand two points at a distanceA. Thus, the average transmitted power of the second constellation

is
pp2i9
1h2
Pb47A23A2A2A2
82
SincePb< Pathe second constellation is more power ecient.

Problem 8.29

The optimum decision boundary of a point is determined by the perpendicular bisectors of each line

segment connecting the point with its neighbors. The decision regions for the V.29 constellation are

depicted in the next gure.


312
Problem 8.30

The following gure depicts a 4-cube and the way that one can traverse it in Gray-code order (see

John F. Wakerly, Digital Design Principles and Practices, Prentice Hall, 1990). Adjacent points are

connected with solid or dashed lines.

1110
1111

0110
1010
1011
0111

0010
1100
1101

0011

1000
1001
0101
0100

0000 0001

One way to label the points of the V.29 constellation using the Gray-code is depicted in the next

gure. Note that the maximum Hamming distance between points with distance between them as

large as 3 is only 2. Having labeled the innermost points, all the adjacent nodes can be found using

the previous gure.

1000

0011
1001
1011
21

1
2
1
0001
1
1
1
0101
2
1
1
1
2
0111
1111
0000
0010
0110
1
1
0100
2
1
1
2
1

1100
1110
1010

1101

313
Problem 8.31

1)Consider the QAM constellation of Fig. P-10.12. Using the Pythagorean theorem we can nd the

radius of the inner circle as

a2a2A2=)a1pA
2

The radius of the outer circle can be found using the cosine rule. Sincebis the third side of a triangle

withaandAthe two other sides and angle between then equal to75o, we obtain
p

b2a2A22aAcos 75o=)b13A
2

2)If we denote byrthe radius of the circle, then using the cosine theorem we obtain

A2r2r22rcos 45o=)rApp
22

3)The average transmitted power of the PSK constellation is

!2
2
P81App=)PAp
PSKPSK
82222

whereas the average transmitted power of the QAM constellation


p!"p#
222
P14A413A2=)P213A2
QAMQAM
8248

The relative power advantage of the PSK constellation over the QAM constellation is

gainPPSK8pp1:5927 dB
P213222
QAM

Problem 8.32

1)Although it is possible to assign three bits to each point of the 8-PSK signal constellation so that

adjacent points dier in only one bit, this is not the case for the 8-QAM constellation of Figure

P-10.12. This is because there are fully connected graphs consisted of three points. To see this

consider an equilateral triangle with vertices A, B and C. If, without loss of generality, we assign the

all zero sequencef0;0; : : : ;0gto point A, then point B andCshould have the form
B f0; : : : ;0;1;0; : : : ;0gC f0; : : : ;0;1;0; : : : ;0g

where the position of the 1 in the sequences is not the same, otherwise B=C. Thus, the sequences of

B and C dier in two bits.

2)Since each symbol conveys 3 bits of information, the resulted symbol rate is

90106
Rs30106symbols/sec
3

314
3)The probability of error for an M-ary PSK signal is

s#
"

PM2Q2Essin
N0M

whereas the probability of error for an M-ary QAM signal is upper bounded by

s#
"

PM4Q3Eav
M1N0

Since, the probability of error is dominated by the argument of theQfunction, the two signals will

achieve the same probability of error if

s
q3SNR
2SNRPSKsinQAM
MM1

WithM8 we obtain
s
q3SNR
3
2SNRPSKsinQAM=)SNRPSK1:4627
87SNRQAM720:38272

4)Assuming that the magnitude of the signal points is detected correctly, then the detector for the

8-PSK signal will make an error if the phase error (magnitude) is greater than 22:5o. In the case of

the 8-QAM constellation an error will be made if the magnitude phase error exceeds 45 o. Hence, the

QAM constellation is more immune to phase errors.

Problem 8.33

The channel bandwidth isW4000 Hz.

(1) Binary PSK with a pulse shape that has1. Hence


2

1
2T12000

and12667, the bit rate is 2667 bps.


T
(2) Four-phase PSK with a pulse shape that has1. From (a) the symbol rate is12667 and the
2T
bit rate is 5334 bps.
(3)M8 QAM with a pulse shape that has1. From (a), the symbol rate is12667 and hence
2T
the bit rate38001 bps.
T
(4) Binary FSK with noncoherent detection. Assuming that the frequency separation between the two

frequencies isf1, where1is the bit rate, the two frequencies arefc1andfc1. Since
TT2T2T
W4000 Hz, we may select11000, or, equivalently,12000. Hence, the bit rate is 2000 bps,
2TT
and the two FSK signals are orthogonal.

(5) Four FSK with noncoherent detection. In this case we need four frequencies with separation of1
T
between adjacent frequencies. We selectf1fc1:5,f2fc1,f3fc1, andf4fc1:5,
T2T2TT
where1500 Hz. Hence, the symbol rate is11000 symbols per second and since each symbol
2TT

315
carries two bits of information, the bit rate is 2000 bps.

(6)M8 FSK with noncoherent detection. In this case we require eight frequencies with frequency

separation of1500 Hz for orthogonality. Since each symbol carries 3 bits of information, the bit
T
rate is 1500 bps.

Problem 8.34

The three symbolsA, 0 andAare used with equal probability. Hence, the optimal detector uses

two thresholds, which areAandA, and it bases its decisions on the criterion
22

A:r >A
2

0 :A< r <A
22

A:r <A
2

If the variance of the AWG noise is2, then the average probability of error is
n

A2 0ZA21
Zr
2A2r
2112
P e11qe2ndr@1qe2ndrA
31 23A 2
2n22n
1rA2
1Z12
qe2ndr
3A 2
22n

1A1A1A

3Q2n32Q2n3Q2n
4A

3Q2n

Problem 8.35

1)The PDF of the noisenis

f nejnj
2
The optimal receiver uses the criterion

AA

f rjA>>
jrAjjrAj
)r0
f rj Ae<1=<

AA

316
The average probability of error is

P e1P ejA1P ej A
22
0Z1
1Z1
f rjAdrf rj Adr
2120
0Z1
1Zj1
erAjdr2ejrAjdr
21220
ZAZ1

ejxjdxejxjdx

414A

1A11
xx

4e14eA
1
A

2e

2)The variance of the noise is


Z1
2jxj2

nexdx
21
Z1
exx2dx2!2
032

Hence, the SNR is


222
SNRAA
2
22

and the probability of error is given by

pp
21
P e1e2Ae2SNR
22

ForP e105we obtain

p
ln21052SNR=)SNR58:53417:6741 dB

If the noise was Gaussian, then


s#
"hi
p
P eQ2EbQSNR
N0

where SNR is the signal to noise ratio at the output of the matched lter. WithP e105we nd
p
SNR4:26 and thereforeSNR18:147612:594 dB. Thus the required signal to noise ratio is 5

dB less when the additive noise is Gaussian.

Problem 8.36

The points in the constellation are at distanced;3d;5d; : : : ;M1dfrom the origin. Since

the square of the distance of a point in the constellation from the origin is equal to the energy of the

317
signal corresponding to that point, we have two signals with energyd2, two signals with energy 9d2,

two signals with energy 25d2,...., and two signals with energyM12d2. The average energy is

1X2d2
EavEi1925 M12
MM
i

Using the well known relation

MM12M1
122232 M2
6

we have (note thatM2kis even)


2!
MMM1M2
2242 M241222
26

subtracting the latter two series gives

MM12M1MM1M2MM21
1232 M12
666

Therefore,

2d2MM21d2M21
Eav
M63

Problem 8.37

The optimal receiver bases its decisions on the metrics

PMr;smf rjsmP sm

For an additive noise channelrsmn, so

PMr;smf nP sm

wheref nis theN-dimensional PDF for the noise channel vector. If the noise is AWG, then
jrsmj2
fn1eN0
N
N02
jrsmj2
Maximizingf rjsmP smis the same as minimizing the reciprocaleN0=P sm, or by taking the

natural logarithm, minimizing the cost

Dr;sm jrsmj2N0P sm

This is equivalent to the maximization of the quantity


1N0
Cr;smrsmjsmj2lnP sm
22

318
If the vectorsr,smcorrespond to the waveformsr tandsmt, where

N
X
r tri it
i1
N
X
smtsm it
;i
i1

then,

Z1Z1
NN
XX
r tsmtdtri itsm jtdt
;j
11
i1j1
NNZ1
XX
rism it jtdt
;j
i1j11
NNN
XXX

rismrism
;ji;j;i
i1j1i1
rsm

Similarly we obtain
Z1
jsmtj2dt jsmj2 E
sm
1

Therefore, the optimal receiver can use the costs


Z1Z1
Cr;smr tsmtdt1jsmtj2dtN0lnP sm
1212
Z1
r tsmtdtcm
1
R1
to base its decisions. This receiver can be implemented usingMcorrelators to evaluater tsmtdt.
1
The bias constantscmcan be precomputed and added to the output of the correlators. The structure

of the receiver is shown in the next gure.

c1R(
...................................... rs1
..............)dt


(t)
Selectc2R(s1
...................................... rs2
..............)dt
the
r (t)
.
(t)
....largests2
.

cMR(
......................................rsM
..............)dt


sM(t)

Parallel to the development of the optimal receiver usingNlters matched to the orthonormal

functions it,i1; : : : ; N, theMcorrelators can be replaced byMequivalent lters matched to

319
the signal waveformssmt. The output of themthmatched lterhmt, at the time instantTis

ZTZT
r hmTdr smTTd
00
ZT
r smd
0
rsm

The structure of this optimal receiver is shown in the next gure. The optimal receivers, derived

in this problem, are more costly than those derived in the text, sinceNis usually less thanM, the

number of signal waveforms. For example, in anM-ary PAM system,N1 always less thanM.

t=T
c1
rs
h1(t)=s1(Tt)1
t=T
Selectc2
rs
h2(t)=s2(Tt)2
the
r (t)
.
largest...
.

t=TcM
rs
M
hM(t)=sm(Tt)

Problem 8.38

The bandwidth required for transmission of anM-ary PAM signal is

WRbHz
2 logM
2

Since,
samplesbitsbits
Rb8103864103
secsamplesec

we obtain
8
>>>16
KHzM4
><
W10:667 KHzM8
>>>
>:
8 KHzM16

Problem 8.39

320
The vectorrr1; r2at the output of the integrators is
Z1Z2
:5
rr1; r2r tdt;r tdt
01

Ifs1tis transmitted, then


Z1Z1Z1
:5:5:5
r tdts1tntdt1ntdt
000
1n1
Z2Z2Z2
r tdts1tntdtntdt
111
n2

wheren1is a zero-mean Gaussian random variable with variance


"Z1#Z1
:5Z1:5:5
2N0

n1Ennvddvd1:5
0020

andn2is is a zero-mean Gaussian random variable with variance


"Z2#Z2
Z2
2N0

n2Ennvddvd1
1121

Thus, the vector representation of the received signal (at the output of the integrators) is

r1n1; n2

Similarly we nd that ifs2tis transmitted, then

r0:5n1;1n2

Suppose now that the detector bases its decisions on the rule

s1

r1r2>T
<

s2

The probability of errorP ejs1is obtained as

P ejs1P r1r2< Tjs1

P 1n1n2< T P n1n2< T1

Pn<T

where the random variablenn1n2is zero-mean Gaussian with variance


222
nn1n22En1n2
Z1
:5
22N0

n1n22d
12
1:5120:51:5

321
Hence,
T1x2

1Z2
P ejs1qe2ndx
2 2n1

Similarly we nd that

P ejs2P 0:5n11n2> T

P n1n2> T0:5
1x2
1Z2
qe2ndx
2 2nT0:5

The average probability of error is

1
P e1P ejs1P ejs2
22
T1x2Z1x2
1Z212
qe2ndxqe2ndx
22 2n122 2nT0:5

To nd the value ofTthat minimizes the probability of error, we set the derivative ofP ewith

respect toTequal to zero. Using the Leibnitz rule for the dierentiation of denite integrals, we

obtain
"T#
22
T0:5
#P e11
qe22ne22n0
#T 2
22n

or

T12T0:52=)T0:25

Thus, the optimal decision rule is

s1

r1r2>0:25
<

s2

Problem 8.40

1)Fornrepeaters in cascade, the probability ofiout ofnrepeaters to produce an error is given by


the binomial distribution01

n
Ci
PiB@Ap1pni
i

However, there is a bit error at the output of the terminal receiver only when an odd number of

repeaters produces an error. Hence, the overall probability of error is


01
XBn
Ci
PnPodd@Ap1pni
ioddi

322
LetPevenbe the probability that an even number of repeaters produces an error. Then

01
XBn
Ci
Peven@Ap1pni
ieveni

and therefore,
01
n
XBn
Ci
PevenPodd@Ap1pnip1pn1
i0i

One more relation betweenPevenandPoddcan be provided if we consider the dierencePevenPodd.

Clearly,

0101
XBnXBn
CiCi
PevenPodd@Ap1pni@Ap1pni
ieveniioddi
0101
nXBn
aXBCiCi

@Ap1pni@Ap1pni
ieveniioddi

1ppn12pn

where the equality (a) follows from the fact that1iis 1 forieven and1 wheniis odd. Solving

the system

PevenPodd1

PevenPodd12pn

we obtain
1
PnPodd112pn
2

2)Expanding the quantity12pn, we obtain

12pn1n2pnn12p2
2

Since,p1 we can ignore all the powers ofpwhich are greater than one. Hence,

1
Pn11n2pnp100106104
2
Problem 8.41

The overall probability of error is approximated by

s#
"

P eKQEb
N0

323
hqi
Thus, withP e106andK100, we obtain the probability of each repeaterPrQEb108.
N0
The argument of the functionQthat provides a value of 108is found from tables to be

s
E
b
5:61
N0

Hence, the requiredEbis 5:61231:47


N0

Problem 8.42

The one-sided noise equivalent bandwidth is dened as

R1
jHf j2df
Beq0
jHf j2max

It is usually convenient to substitutejHf j2forjHf j2in the denominator, since the peaking
f0max
of the magnitude transfer function may be high (especially for small) creating in this way anomalies.

On the other hand ifis less, but close, to one,jHf j2can be very well approximated by
max
jHf j2. Hence,
f0
R1
jHf j2df
Beq0
jHf j2
f0

and since

2
!2j2 f2!n!n
nK
jHf j2
!2n42f2j2 f2!n

we nd thatjH0j 1. Therefore,
Z1
BeqjHf j2df
0

For the passive second order lter


2
s2!n!n!2
HsKn
s22!n!2n
2
1

11, so that!n0 and


K1
!2
Hss2!nn
s22!n!2n

TheBeqcan be written as
j1
1Z
BeqHsHsds
4 jj1

Since,HsKGs=swe obtainlimjHsHs0. Hence, the integral forBeqcan be taken


1KGs=ssj!1
along a contour, which contains the imaginary axis and the left half plane. Furthermore, sinceGs

324
is a rational function ofs, the integral is equal to half the sum of the residues of the left half plane

poles ofHsHs. Hence,


"q
1
Beqs!n!n21HsHsp
2s!!2
nn1
#

q
s!n!n21HsHsp

s!n!n21

!n1142

848=!n
2

1!22!n22!n2
n2KK

8=!n

1!22
n2

8=!n

where we have used the approximation !n0.


K

Problem 8.43

1)The closed loop transfer function is

HsGs=sGs1p
1Gs=ssGss22s1

The poles of the system are the roots of the denominator, that is
pp
224 11

1;2pjp
222

Since the real part of the roots is negative, the poles lie in the left half plane and therefore, the

system is stable.

2)Writing the denominator in the form

Ds22!ns!2
n

we identify the natural frequency of the loop as!n1 and the damping factor as1p.
2
Problem 8.44

1)The closed loop transfer function is

K
HsGs=sGsK1
1Gs=ssGs1s2sKs21K
s

11

The gain of the system atf0 is

jH0j jHsj1
s0

325
2)The poles of the system are the roots of the denominator, that is
p
114K1
1;2
21

In order for the system to be stable the real part of the poles must be negative. SinceKis greater

than zero, the latter implies that1is positive. If in addition we require that the damping factor
1
p

21Kis less than 1, then the gainKshould satisfy the condition

K >1
41

Problem 8.45

The transfer function of the RC circuit is

R211RCs1s
GsCs22
R1R211R1R2Cs11s
Cs

From the last equality we identify the time constants as

2R2C; 1R1R2C

Problem 8.46

Assuming that the input resistance of the operational amplier is high so that no current ows

through it, then the voltage-current equations of the circuit are

V2 AV1

1
V1V2R1i
Cs
V1V0iR

where,V1,V2is the input and output voltage of the amplier respectively, andV0is the signal at the

input of the lter. EliminatingiandV1, we obtain


R11
s
V2C
R

V11R11
1Cs
AAR
If we letA! 1(ideal amplier), then

V21R1Cs12s

V1RCs1s

Hence, the constants1,2of the active lter are given by

1RC; 2R1C

326
Problem 8.47

In the non decision-directed timing recovery method we maximize the function

2y2m
m

with respect to. Thus, we obtain the condition

d2Xdym

d2ymd0
m

Suppose now that we approximate the derivative of the log-likelihood2by the nite dierence

d222
d2

Then, if we substitute the expression of2in the previous approximation, we obtain

d2
d
P2P2
mymmym

2
"Z2#
Z2

1X

2r tutmTdtr tutmTdt
m

whereutgRtis the impulse response of the matched lter in the receiver. However, this

is the expression of the early-late gate synchronizer, where the lowpass lter has been substituted

by the summation operator. Thus, the early-late gate synchronizer is a close approximation to the

timing recovery system.

Problem 8.48
p
1)ris a Gaussian random variable. IfEis the transmitted signal point, then
b

q
Er Er1Er21kEmr
b

and the variance is


2222

r1k2
The probability density function ofris
rmr2

2
f r 1pe2r
2r

327
and the probability of error is

Z0
P2f r dr
1
mr

2
1Z
prex2dx

21
0v1
uu2
mrC
tA
QB@2
r

where
m21k2E
rb
2222

r1k2

The value ofkthat maximizes this ratio is obtained by dierentiating this expression and solving for

the value ofkthat forces the derivative to zero. Thus, we obtain

2
k1
2

Note that if1> 2, thenk >1 andr2is given greater weight thanr1. On the other hand, if2> 1,

thenk <1 andr1is given greater weight thanr2. When12,k1. In this case

m22E
rb
22

r1

2)When232,k1, and
213

!
m2112Eb4E
r3b
22122

r331
191

On the other hand, ifkis set to unity we have

m24EE
rbb
2222

r1311

Therefore, the optimum weighting provides a gain of


10 log41:25 dB
3

Computer Problems

328
Computer Problem 8.1

Figure 8.1 illustrates the results of this simulation for the transmission ofN10000 bits at several

dierent values of SNR. Note the agreement between the simulation results and the theoretical value

ofP2. We should also note that a simulation ofN= 10000 data bits allows us to estimate the error

probability reliably down to aboutP2103. In other words, withN= 10000 data bits, we should

have at least ten errors for a reliable estimate ofPe. MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.1.


echo on
SNRindB1=0:1:12;
SNRindB2=0:0.1:12;
for i=1:length(SNRindB1),
% simulated error rate
smlderrprb(i)=smldPe81(SNRindB1(i));
echo o;
end;
echo on;10
for i=1:length(SNRindB2),
SNR=exp(SNRindB2(i)*log(10)/10);
% theoretical error rate

0
10
Simulation
Theoretical
-1
10

-2
10

2
P

-3
10

-4
10

-5
10
024681012
10 logE/N0
10b

Figure 8.1: Error probability from Monte Carlo simulation compared with theoretical error probability

for orthogonal signaling


329
theoerrprb(i)=Qfunct(sqrt(SNR));
echo o;
end;
echo on;
% Plotting commands follow.
semilogy(SNRindB1,smlderrprb,);
*
hold20
semilogy(SNRindB2,theoerrprb);

function[p]=smldPe81(snrindB)
% [p]=smldPe54(snrindB)
% SMLDPE81 nds the probability of error for the given
% snrindB, signal-to-noise ratio in dB.
E=1;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio
sgma=E/sqrt(2*SNR);% sigma, standard deviation of noise
N=10000;
% generation of the binary data source
for i=1:N,10
temp=rand;% a uniform random variable over (0,1)
if(temp<0.5),
dsource(i)=0;% With probability 1/2, source output is 0.
else
dsource(i)=1;% With probability 1/2, source output is 1.
end
end;
% detection, and probability of error calculation
numoferr=0;
for i=1:N,20
% matched lter outputs
if(dsource(i)==0),
r0=E+gngauss(sgma);
r1=gngauss(sgma);% if the source output is 0
else
r0=gngauss(sgma);
r1=E+gngauss(sgma);% if the source output is 1
end;
% Detector follows.
if(r0>r1),30
decis=0;% Decision is 0.
else
decis=1;% Decision is 1.
end;
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/N;% probability of error estimate

330
-1
10
Simulation
Theoretical

-2
10

-3
10

2
P

-4
10

-5
10

-6
10
0246810
10 logE/N0
10b

Figure 8.2: Error probability from Monte Carlo simulation compared with theoretical error probability

for antipodal signals

Computer Problem 8.2

Figure 8.2 illustrates the results of this simulation for the transmission of 10000 bits at several

dierent values of SNR. The theoretical value forP2is also plotted in Figure 8.2 for comparison.

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.2.


echo on
SNRindB1=0:1:10;
SNRindB2=0:0.1:10;
for i=1:length(SNRindB1),
% simulated error rate
smlderrprb(i)=smldPe82(SNRindB1(i));
echo o;
end;
echo on;10
for i=1:length(SNRindB2),
SNR=exp(SNRindB2(i)*log(10)/10);
% theoretical error rate
theoerrprb(i)=Qfunct(sqrt(2*SNR));
echo o;
end;
echo on;
% Plotting commands follow.
331
semilogy(SNRindB1,smlderrprb,);
*
hold20
semilogy(SNRindB2,theoerrprb);

function[p]=smldPe82(snrindB)
% [p]=smldPe82(snrindB)
% SMLDPE82 simulates the probability of error for the particular
% value of snrindB, signal-to-noise ratio in dB.
E=1;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio
sgma=E/sqrt(2*SNR);% sigma, standard deviation of noise
N=10000;
% Generation of the binary data source follows.
for i=1:N,10
temp=rand;% a uniform random variable over (0,1)
if(temp<0.5),
dsource(i)=0;% With probability 1/2, source output is 0.
else
dsource(i)=1;% With probability 1/2, source output is 1.
end
end;
% The detection, and probability of error calculation follows.
numoferr=0;
for i=1:N,20
% the matched lter outputs
if(dsource(i)==0),
r=E+gngauss(sgma);% if the source output is 0
else
r=E+gngauss(sgma);% if the source output is 1
end;
% Detector follows.
if(r<0),
decis=0;% Decision is 0.
else30
decis=1;% Decision is 1.
end;
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/N;% probability of error estimate

Computer Problem 8.3

Figure 8.3 illustrates the estimated error probability based on 10000 binary digits. The theoretical

error rateP2is also illustrated in this gure.

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.3.

332
0
10
Simulation
Theoretical

-1
10

-2
10

2
P

-3
10

-4
10

-5
10
051015
10 logE/N0
10b

Figure 8.3: Error probability from Monte Carlo simulation compared with theoretical error probability

for on-o signals

333
echo on
SNRindB1=0:1:15;
SNRindB2=0:0.1:15;
for i=1:length(SNRindB1),
smlderrprb(i)=smldPe83(SNRindB1(i));% simulated error rate
echo o;
end;
echo on;
for i=1:length(SNRindB2),10
SNR=exp(SNRindB2(i)*log(10)/10);% signal-to-noise ratio
theoerrprb(i)=Qfunct(sqrt(SNR/2));% theoretical error rate
echo o;
end;
echo on;
% Plotting commands follow.
semilogy(SNRindB1,smlderrprb,);
*
hold
semilogy(SNRindB2,theoerrprb);

function[p]=smldPe83(snrindB)
% [p]=smldPe83(snrindB)
% SMLDPE83 simulates the probability of error for a given
% snrindB, signal-to-noise ratio in dB.

E=1;
alphaopt=1/2;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio
sgma=E/sqrt(2*SNR);% sigma, standard deviation of noise
N=10000;10
% Generation of the binary data source follows.
for i=1:N,
temp=rand;% a uniform random variable over (0,1)
if(temp<0.5),
dsource(i)=0;% With probability 1/2, source output is 0.
else
dsource(i)=1;% With probability 1/2, source output is 1.
end
end;
% detection, and probability of error calculation20
numoferr=0;
for i=1:N,
% the matched lter outputs
if(dsource(i)==0),
r=gngauss(sgma);% if the source output is 0
else
r=E+gngauss(sgma);% if the source output is 1
end;
% Detector follows.
if(r<alphaopt),30
decis=0;% Decision is 0.
else
decis=1;% Decision is 1.

334
end;
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/N;% probability of error estimate

Computer Problem 8.4

The results of the Monte Carlo simulation are shown in Figure 8.4. Note that at a low noise power

level (small) the eect of the noise on performance (error rate) of the communication system is

small. As the noise power level increases, the noise components increase in size and cause more

errors.

The MATLAB script for this problem for0:5 is given next.

% MATLAB script for Computer Problem 8.4.


echo on
n0=.5*randn(100,1);
n1=.5*randn(100,1);
n2=.5*randn(100,1);
n3=.5*randn(100,1);
x1=1.+n0;
y1=n1;
x2=n2;
y2=1.+n3;10
plot(x1,y1,o,x2,y2,)
*
axis(square)

Computer Problem 8.5

Figure 8.5 illustrates the results of the simulation for the transmissions ofN= 10000 symbols at

dierent values of the average bit SNR. Note the agreement between the simulation results and the

theoretical values ofP4computed from

s!

32E
P4Qav(8.24)
25N0

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.5.

echo on
SNRindB1=0:1:12;
SNRindB2=0:0.1:12;
for i=1:length(SNRindB1),
% simulated error rate
smlderrprb(i)=smldPe85(SNRindB1(i));

335
=0.1

=0.3

=0.5

Figure 8.4: Received signal points at input to the detector for orthogonal signals (Monte Carlo

simulation)

336
0
10

-1
10

-2
4
10
P

-3
10

-4
10
024681012
10 logE/N0
10avb

Figure 8.5: Probability of symbol error for four-level PAM

337
echo o;
end;10
echo on;
for i=1:length(SNRindB2),
% signal-to-noise ratio
SNRperbit=exp(SNRindB2(i)*log(10)/10);
% theoretical error rate
theoerrprb(i)=(3/2)*Qfunct(sqrt((4/5)*SNRperbit));
echo o;
end;
echo on;
% Plotting commands follow.20
semilogy(SNRindB1,smlderrprb,);
*
hold
semilogy(SNRindB2,theoerrprb);

function[p]=smldPe85(snrindB)
% [p]=smldPe85(snrindB)
% SMLDPE85 simulates the probability of error for the given
% snrindB, signal to noise ratio in dB.
d=1;
SNR=exp(snrindB*log(10)/10);% signal to noise ratio per bit
sgma=sqrt((5*d^2)/(4*SNR));% sigma, standard deviation of noise
N=10000;% number of symbols being simulated
% Generation of the quaternary data source follows.
for i=1:N,10
temp=rand;% a uniform random variable over (0,1)
if(temp<0.25),
dsource(i)=0;% With probability 1/4, source output is 00.
elseif(temp<0.5),
dsource(i)=1;% With probability 1/4, source output is 01.
elseif(temp<0.75),
dsource(i)=2;% With probability 1/4, source output is 10.
else
dsource(i)=3;% With probability 1/4, source output is 11.
end20
end;
% detection, and probability of error calculation
numoferr=0;
for i=1:N,
% the matched lter outputs
if(dsource(i)==0),
r=3*d+gngauss(sgma);% if the source output is 00
elseif(dsource(i)==1),
r=d+gngauss(sgma);% if the source output is 01
elseif(dsource(i)==2)30
r=d+gngauss(sgma);% if the source output is 10
else
r=3*d+gngauss(sgma);% if the source output is 11
end;
% Detector follows.
if(r<2*d),

338
decis=0;% Decision is 00.
elseif(r<0),
decis=1;% Decision is 01.
elseif(r<2*d),40
decis=2;% Decision is 10.
else
decis=3;% Decision is 11.
end;
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/N;% probability of error estimate

Computer Problem 8.6

Figure 8.6 illustrates the measured symbol error rate for 10000 transmitted symbols and the

theoretical symbol error rate given by

s!

2M16logME
PMQ2avb(8.25)
MM21N0

whereM16:

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.6.


echo on
SNRindB1=5:1:25;
SNRindB2=5:0.1:25;
M=16;
for i=1:length(SNRindB1),
% simulated error rate
smlderrprb(i)=smldPe86(SNRindB1(i));
echo o;
end;10
echo on;
for i=1:length(SNRindB2),
SNRperbit=exp(SNRindB2(i)*log(10)/10);
% theoretical error rate
theoerrprb(i)=(2*(M1)/M)*Qfunct(sqrt((6*log2(M)/(M^21))*SNRperbit));
echo o;
end;
echo on;
% Plotting commands follow.
semilogy(SNRindB1,smlderrprb,);20
*
hold
semilogy(SNRindB2,theoerrprb);

function[p]=smldPe86(snrindB)

339
0
10
Simulation
Theoretical
-1
10
-2
10
-3
10

-4
10

-5
10

-6
10

-7
10

-8
10
510152025

/N0
Figure 8.6: Error rate from Monte Carlo simulation compared with the theoretical error probability

forM16 PAM

340
% [p]=smldPe86(snrindB)
% SMLDPE86 simulates the error probability for the given
% snrindB, signal-to-noise ratio in dB.
M=16;% 16-ary PAM
d=1;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio per bit
sgma=sqrt((85*d^2)/(8*SNR));% sigma, standard deviation of noise
N=10000;% number of symbols being simulated
% generation of the data source10
for i=1:N,
temp=rand;% a uniform random variable over (0,1)
index=oor(M*temp);% The index is an integer from 0 to M-1, where
% all the possible values are equally likely.
dsource(i)=index;
end;
% detection, and probability of error calculation
numoferr=0;
for i=1:N,
% matched lter outputs20
% (2*dsource(i)-M+1)*d is the mapping to the 16-ary constellation.
r=(2*dsource(i)M+1)*d+gngauss(sgma);
% the detector
if(r>(M2)*d),
decis=15;
elseif(r>(M4)*d),
decis=14;
elseif(r>(M6)*d),
decis=13;
elseif(r>(M8)*d),30
decis=12;
elseif(r>(M10)*d),
decis=11;
elseif(r>(M12)*d),
decis=10;
elseif(r>(M14)*d),
decis=9;
elseif(r>(M16)*d),
decis=8;
elseif(r>(M18)*d),40
decis=7;
elseif(r>(M20)*d),
decis=6;
elseif(r>(M22)*d),
decis=5;
elseif(r>(M24)*d),
decis=4;
elseif(r>(M26)*d),
decis=3;
elseif(r>(M28)*d),50
decis=2;
elseif(r>(M30)*d),
decis=1;
else
decis=0;

341
end;
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;60
p=numoferr/N;% probability of error estimate

Computer Problem 8.7

Figure 8.7 illustrates the eight waveforms for the case in whichfc6=T. The MATLAB script for this

computation is given next.

% MATLAB script for Computer Problem 8.7.


echo on
T=1;
M=8;
Es=T/2;
fc=6/T;% carrier frequency
N=100;% number of samples
deltaT=T/(N1);
t=0:deltaT:T;
u0=sqrt(2*Es/T)*cos(2*pi*fc*t);10
u1=sqrt(2*Es/T)*cos(2*pi*fc*t+2*pi/M);
u2=sqrt(2*Es/T)*cos(2*pi*fc*t+4*pi/M);
u3=sqrt(2*Es/T)*cos(2*pi*fc*t+6*pi/M);
u4=sqrt(2*Es/T)*cos(2*pi*fc*t+8*pi/M);
u5=sqrt(2*Es/T)*cos(2*pi*fc*t+10*pi/M);
u6=sqrt(2*Es/T)*cos(2*pi*fc*t+12*pi/M);
u7=sqrt(2*Es/T)*cos(2*pi*fc*t+14*pi/M);
% plotting commands follow
subplot(8,1,1);
plot(t,u0);20
subplot(8,1,2);
plot(t,u1);
subplot(8,1,3);
plot(t,u2);
subplot(8,1,4);
plot(t,u3);
subplot(8,1,5);
plot(t,u4);
subplot(8,1,6);
plot(t,u5);30
subplot(8,1,7);
plot(t,u6);
subplot(8,1,8);
plot(t,u7);

342
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
1
0
-1
00.20.40.60.81
t

Figure 8.7:M8 constant-amplitude PSK waveforms

343
Computer Problem 8.8

For convenience we setT1. The following gure illustrates the correlator outputs over the entire

signal interval for the four possible transmitted phases. Note that the double frequency terms

average out to zero, as best observed in the case where20. Secondly, we observe the eect of

the additive noise on the correlator outputs as2increases.

The MATLAB script for the problem is given below.

% MATLAB script for Computer Problem 8.8

M= 4;
Es= 1;% Energy per symbol
T= 1;
Ts= 100/T;
fc= 30/T;
t= 0:T/100:T;
lt=length(t);
gT=sqrt(2/T)*ones(1,lt);10
si1=gT.*cos(2*pi*fc*t);
si2=gT.*sin(2*pi*fc*t);
for m= 0 : 3
% Generation of the transmitted signal:
smc=sqrt(Es) *cos(2*pi*m/M);
sms=sqrt(Es) *sin(2*pi*m/M);
um=smc.*si1+sms.*si2;
var= [ 0 0.05 0.5];% Noise variance vector
if(m== 2)
gure20
end
for k= 1 :length(var)
% Generation of the noise components:
nc=sqrt(var(k))*randn(1,lt);
ns=sqrt(var(k))*randn(1,lt);
% The received signal:
r=um+nc.*cos(2*pi*fc*t)ns.*sin(2*pi*fc*t);
% The correlator outputs:
yc=zeros(1,lt);
ys=zeros(1,lt);30
for i= 1:lt
yc(i) =sum(r(1:i).*si1(1:i));
ys(i) =sum(r(1:i).*si2(1:i));
end
% Plotting the results:
subplot(3,2,2*k1+mod(m,2))
plot([0 1:length(yc)1],yc,.-)
hold
plot([0 1:length(ys)1],ys)
title([\sigma^2 = ,num2str(var(k))])40
xlabel([n (m=,num2str(m),)])
axis auto
end
end

344
22
= 0, = 0 = 0, = 90
150100
80
100
60
5040
yc(n)ys(n)
20
0
0
-50-20
01020304050607080901000102030405060708090100
nn
22
= 0, = 180 = 0, = 270
5050

00

-50-50
yc(n)ys(n)
-100-100

-150-150
01020304050607080901000102030405060708090100
nn
22
= 0.05, = 0 = 0.05, = 90
150150

100100

5050
yc(n)ys(n)
00
22
= 0.05, = 180 = 0.05, = 270
-50-50
5020
01020304050607080901000102030405060708090100
nn
0
0
-20
-50-40
yc(n)ys(n)
-60
-100
-80
-150-100
01020304050607080901000102030405060708090100
nn
22
= 0.5, = 0 = 0.5, = 90
150150

100100

5050
yc(n)ys(n)
00

-50-50
01020304050607080901000102030405060708090100
nn
22
= 0.5, = 180 = 0.5, = 270
2020
00
-20-20
-40-40
yc(n)ys(n)
-60-60
-80-80
-100-100
01020304050607080901000102030405060708090100
nn
Figure 8.8: Correlator outputs in Computer Problem 8.8

345
0
10

Simulated bit-error rate


-1
Simulated symbol-error rate
10
Theoretical bit-error rate

-2
10

-3
10

-4
10

-5
10

-6
10
012345678910
E/N0in dB
b

Figure 8.9: Performance of a four-phase PSK system from the Monte Carlo simulation

Computer Problem 8.9

Figure 8.9 illustrates the results of the Monte Carlo simulation for the transmission ofN=10000

symbols at dierent values of the SNR parameterE=N0, whereE E=2 is the bit energy. Also
bbs
shown in Figure 8.9 is the bit-error rate, which is dened asPbPM=2, and the corresponding

theoretical error probability, given by

s!

PM2Q2Essin
N0M
s!

2Q2kEbsin(8.26)
N0M

The MATLAB scripts for this Monte Carlo simulation are given next.

% MATLAB script for Computer Problem 8.9.


echo on
SNRindB1=0:2:10;
SNRindB2=0:0.1:10;
for i=1:length(SNRindB1),
[pb,ps]=cmsm32(SNRindB1(i));% simulated bit and symbol error rates

346
smldbiterrprb(i)=pb;
smldsymbolerrprb(i)=ps;
echo o;
end;10
echo on;
for i=1:length(SNRindB2),
SNR=exp(SNRindB2(i)*log(10)/10);% signal-to-noise ratio
theoerrprb(i)=Qfunct(sqrt(2*SNR));% theoretical bit-error rate
echo o;
end;
echo on;
% Plotting commands follow.
semilogy(SNRindB1,smldbiterrprb,);
*
hold20
semilogy(SNRindB1,smldsymbolerrprb,o);
semilogy(SNRindB2,theoerrprb);

function[pb,ps]=cmsm32(snrindB)
% [pb,ps]=cmsm32(snrindB)
% CMSM32 nds the probability of bit error and symbol error for the
% given value of snrindB, signal-to-noise ratio in dB.
N=10000;
E=1;% energy per symbol
snr=10^(snrindB/10);% signal-to-noise ratio
sgma=sqrt(E/snr)/2;% noise variance
% the signal mapping
s00=[1 0];10
s01=[0 1];
s11=[1 0];
s10=[01];
% generation of the data source
for i=1:N,
temp=rand;% a uniform random variable between 0 and 1
if (temp<0.25),% With probability 1/4, source output is 00.
dsource1(i)=0;
dsource2(i)=0;
elseif (temp<0.5),% With probability 1/4, source output is 01.20
dsource1(i)=0;
dsource2(i)=1;
elseif (temp<0.75),% With probability 1/4, source output is 10.
dsource1(i)=1;
dsource2(i)=0;
else% With probability 1/4, source output is 11.
dsource1(i)=1;
dsource2(i)=1;
end;
end;30
% detection and the probability of error calculation
numofsymbolerror=0;
numofbiterror=0;
for i=1:N,
% The received signal at the detector, for the ith symbol, is:

347
n(1)=gngauss(sgma);
n(2)=gngauss(sgma);
if ((dsource1(i)==0) & (dsource2(i)==0)),
r=s00+n;
elseif ((dsource1(i)==0) & (dsource2(i)==1)),40
r=s01+n;
elseif ((dsource1(i)==1) & (dsource2(i)==0)),
r=s10+n;
else
r=s11+n;
end;
% The correlation metrics are computed below.
c00=dot(r,s00);
c01=dot(r,s01);
c10=dot(r,s10);50
c11=dot(r,s11);
% The decision on the ith symbol is made next.
cmax=max([c00 c01 c10 c11]);
if (c00==cmax),
decis1=0; decis2=0;
elseif (c01==cmax),
decis1=0; decis2=1;
elseif (c10==cmax),
decis1=1; decis2=0;
else60
decis1=1; decis2=1;
end;
% Increment the error counter, if the decision is not correct.
symbolerror=0;
if (decis1=dsource1(i)),
numofbiterror=numofbiterror+1;
symbolerror=1;
end;
if (decis2=dsource2(i)),
numofbiterror=numofbiterror+1;70
symbolerror=1;
end;
if (symbolerror==1),
numofsymbolerror = numofsymbolerror+1;
end;
end;
ps=numofsymbolerror/N;% since there are totally N symbols
pb=numofbiterror/(2*N);% since 2N bits are transmitted

Computer Problem 8.10

Figure 8.10 illustrates the results of the Monte Carlo simulation for the transmission ofN=10000

symbols at dierent values of the SNR parameterE=N0, whereE E=2 is the bit energy. Also
bbs
shown in Figure 8.10 is the theoretical value of the symbol error rate based on the approximation

that the termnnis negligible. We observe from Figure 8.10 that the approximation results in an
kk1
upper bound to the error probability.

348
0
10

-1
10

-2
10

-3
10

-4
10

-5
10
024681012
E/N0in dB
b

Figure 8.10: Performance of four-phase DPSK system from Monte Carlo simulation (the solid curve is

an upper bound based on approximation that neglects the noise termnn)


lk1

349
The MATLAB scripts for this Monte Carlo simulation are given next.

% MATLAB script for Computer Problem 8.10.


echo on
SNRindB1=0:2:12;
SNRindB2=0:0.1:12;
for i=1:length(SNRindB1),
smlderrprb(i)=cmsm34(SNRindB1(i));% simulated error rate
echo o;
end;
echo on;
for i=1:length(SNRindB2),10
SNR=exp(SNRindB2(i)*log(10)/10);% signal-to-noise ratio
theoerrprb(i)=2*Qfunct(sqrt(SNR));% theoretical symbol error rate
echo o;
end;
echo on;
% Plotting commands follow
semilogy(SNRindB1,smlderrprb,);
*
hold
semilogy(SNRindB2,theoerrprb);

function[p]=cmsm34(snrindB)
% [p]=cmsm34(snrindB)
% CMSM34 nds the probability of error for the given
% value of snrindB, signal-to-noise ratio in dB.
N=10000;
E=1;% energy per symbol
snr=10^(snrindB/10);% signal-to-noise ratio
sgma=sqrt(E/(4*snr));% noise variance
% Generation of the data source follows.
for i=1:2*N,10
temp=rand;% a uniform random variable between 0 and 1
if(temp<0.5),
dsource(i)=0;% With probability 1/2, source output is 0.
else.
dsource(i)=1;% With probability 1/2, source output is 1.
end;
end;
% Dierential encoding of the data source follows.
mapping=[0 1 3 2];
M=4;20
[diencoutput] =cmdpske(E,M,mapping,dsource);
% Received signal is then
for i=1:N,
[n(1)n(2)]=gngauss(sgma);
r(i,:)=diencoutput(i,:)+n;
end;
% detection and the probability of error calculation
numoferr=0;
prevtheta=0;
for i=1:N,30

350
theta=angle(r(i,1)+j*r(i,2));
deltatheta=mod(thetaprevtheta,2*pi);
if((deltatheta<pi/4)j(deltatheta>7*pi/4)),
decis=[0 0];
elseif(deltatheta<3*pi/4),
decis=[0 1];
elseif(deltatheta<5*pi/4)
decis=[1 1];
else
decis=[1 0];40
end;
prevtheta=theta;
% Increase the error counter, if the decision is not correct.
if((decis(1)=dsource(2*i1))j(decis(2)=dsource(2*i))),
numoferr=numoferr+1;
end;
end;
p=numoferr/N;

function[enccomp] =cmdpske(E,M,mapping,sequence);
% [enccomp] = cmdpske(E,M,mapping,sequence)
% CMDPSKE dierentially encodes a sequence.
% E is the average energy, M is the number of constellation points,
% and mapping is the vector dening how the constellation points are
% allocated. Finally, sequence is the uncoded binary data sequence.
k=log2(M);
N=length(sequence);
% If N is not divisible by k, append zeros, so that it is. . .
remainder=rem(N,k);10
if(remainder=0),
for i=N+1:N+kremainder,
sequence(i)=0;
end;
N=N+kremainder;
end;
theta=0;% Initially, assume that theta=0.
for i=1:k:N,
index=0;
for j=i:i+k1,20
index=2*index+sequence(j);
end;
index=index+1;
theta=mod(2*pi*mapping(index)/M+theta,2*pi);
enccomp((i+k1)/k,1)=sqrt(E)*cos(theta);
enccomp((i+k1)/k,2)=sqrt(E)*sin(theta);
end;

351
Computer Problem 8.11
pp
The position of the eight signal points are1;1,1;1,1;1,1;1,13;0,1;3;0,
pp
0;13, and0;13. For convenience, we setT1. Figure 8.11 illustrates the correlator

outputs over the signal interval when the transmitted symbol is1;1. Note that the double

frequency terms average out to zero, as best observed in the case where20. Furthermore, we

observe the eect of the additive noise on the correlator output as2increases.

The MATLAB script for the problem is given below.

% MATLAB script for Computer Problem 8.11

M= 8;
Es= 1;% Energy oer symbol
T= 1;
Ts= 100/T;
fc= 30/T;
t= 0:T/100:T;
lt=length(t);
Amc= 1/sqrt(Es);% Signal Amplitude10
Ams=1/sqrt(Es);% Signal Amplitude
gT=sqrt(2/T)*ones(1,lt);
phi= 2*pi*rand;
si1=gT.*cos(2*pi*fc*t+phi);
si2=gT.*sin(2*pi*fc*t+phi);
var= [ 0 0.05 0.5];% Noise variance vector
for k= 1 :length(var)
% Generation of the noise components:
nc=sqrt(var(k))*randn(1,lt);
ns=sqrt(var(k))*randn(1,lt);20
noise=nc.*cos(2*pi*fc+t)ns.*sin(2*pi*fc+t);
% The received signal
r=Amc*gT.*cos(2*pi*fc*t+phi) +Ams*gT.*sin(2*pi*fc*t+phi) +noise;
% The correlator outputs:
yc=zeros(1,lt);
ys=zeros(1,lt);
for i= 1:lt
yc(i) =sum(r(1:i).*si1(1:i));
ys(i) =sum(r(1:i).*si2(1:i));
end30
% Plotting the results:
subplot(3,1,k)
plot([0 1:length(yc)1],yc,.-)
hold
plot([0 1:length(ys)1],ys)
title([\sigma^2 = ,num2str(var(k))])
xlabel(n)
axis auto
end

352
2
= 0

100

-100

020406080100
n
2
= 0.05

100

-100

020406080100
n
2
= 0.5

100

0
-100

020406080100
n
Figure 8.11: Correlator outputs in Computer Problem 8.11.

353
0
10

-1
10

-2
10

-3
10

-4
10

-5
10

-6
10

-7
10
051015
E/N0in dB
b

Figure 8.12: Performance ofM16-QAM system from the Monte Carlo simulation.

Computer Problem 8.12

Figure 8.12 illustrates the results of the Monte Carlo simulation for the transmission ofN=10000

symbols at dierent values of the SNR parameterE=N0, whereE E=4 is the bit energy. Also
bbs
shown in Figure 8.12 is the theoretical value of the symbol-error probability given by (8.27) and

(8.28).

s!

Pp211pQ3Eav(8.27)
M
MM1N0

whereE=N0is the average SNR per symbol. Therefore, the probability of a symbol error for the
av
M-ary QAM is

2
PM11Pp(8.28)
M

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 8.12.


echo on
SNRindB1=0:2:15;
SNRindB2=0:0.1:15;
M=16;
k=log2(M);
for i=1:length(SNRindB1),
smlderrprb(i)=cmsm41(SNRindB1(i));% simulated error rate
echo o;

354
end;10
echo on;
for i=1:length(SNRindB2),
SNR=exp(SNRindB2(i)*log(10)/10);% signal-to-noise ratio
% theoretical symbol error rate
theoerrprb(i)=4*Qfunct(sqrt(3*k*SNR/(M1)));
echo o;
end;
echo on;
% Plotting commands follow.
semilogy(SNRindB1,smlderrprb,);20
*
hold
semilogy(SNRindB2,theoerrprb);

function[p]=cmsm41(snrindB)
% [p]=cmsm41(snrindB)
% CMSM41 nds the probability of error for the given
% value of snrindB, SNR in dB.
N=10000;
d=1;% min. distance between symbols
Eav=10*d^2;% energy per symbol
snr=10^(snrindB/10);% SNR per bit (given)
sgma=sqrt(Eav/(8*snr));% noise variance
M=16;10
% Generation of the data source follows.
for i=1:N,
temp=rand;% a uniform R.V. between 0 and 1
dsource(i)=1+oor(M*temp);% a number between 1 and 16, uniform
end;
% Mapping to the signal constellation follows.
mapping=[3*d3*d;
d3*d;
d3*d;
3*d3*d;20
3*d d;
d d;
d d;
3*d d;
3*dd;
dd;
dd;
3*dd;
3*d3*d;
d3*d;30
d3*d;
3*d3*d];
for i=1:N,
qamsig(i,:)=mapping(dsource(i),:);
end;
% received signal
for i=1:N,
[n(1)n(2)]=gngauss(sgma);

355
r(i,:)=qamsig(i,:)+n;
end;40
% detection and error probability calculation
numoferr=0;
for i=1:N,
% Metric computation follows.
for j=1:M,
metrics(j)=(r(i,1)mapping(j,1))^2+(r(i,2)mapping(j,2))^2;
end;
[minmetric decis] =min(metrics);
if(decis=dsource(i)),
numoferr=numoferr+1;50
end;
end;
p=numoferr/(N);

Computer Problem 8.13

Figure 8.13 illustrates the correlator outputs for dierent noise variances. The MATLAB script for

the computation is given next

% MATLAB script for Computer Problem 8.13.

% Initialization:
K=20;% Number of samples
A=1;% Signal amplitude
l=0:K;
s0=A*ones(1,K);% Signal waveform
r0=zeros(1,K);% Output signal

% Case 1: noiseN(0,0)10
noise=random(Normal,0,0,1,K);
% Sub-case s = s0:
s=s0;
r=s+noise;% received signal
for n=1:K
r0(n)=sum(r(1:n).*s0(1:n));
end
% Plotting the results:
subplot(3,2,1)
plot(l,[0r0])20
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 20 0 25])
xlabel((a) \sigma^2= 0 & S_{0} is transmitted ,fontsize,10)
% text(15,3,nfontsize{10} r{0}: - & r{1}: ,hor,left)
% Sub-case s = s1:
s=s0;
r=s+noise;% received signal
for n=1:K
r0(n)=sum(r(1:n).*s0(1:n));

356
250

20!5

15!10

10!15

5!20

0!25
05Tb10Tb15Tb20Tb05Tb10Tb15Tb20Tb
(a) 2= 0 & S is transmitted (b) 2= 0 & S is transmitted
01

250

20!5

15!10

10!15

5!20

0!25
05Tb10Tb15Tb20Tb05Tb10Tb15Tb20Tb
(c) 2= 0.1 & S is transmitted (d) 2= 0.1 & S is transmitted
01

200

10!10

0!20

05Tb10Tb15Tb20Tb05Tb10Tb15Tb20Tb
22
(e) = 1 & S is transmitted (f) = 1 & S is transmitted
01

Figure 8.13: Correlator outputs in Computer Problem8.13.

357
end30
% Plotting the results:
subplot(3,2,2)
plot(l,[0r0])
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 2025 0])
xlabel((b) \sigma^2= 0 & S_{1} is transmitted ,fontsize,10)
% Case 2: noiseN(0,0.1)
noise=random(Normal,0,0.1,1,K);
% Sub-case s = s0:
s=s0;40
r=s+noise;% received signal
for n=1:K
r0(n)=sum(r(1:n).*s0(1:n));
end
% Plotting the results:
subplot(3,2,3)
plot(l,[0r0])
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 20 0 25])
xlabel((c) \sigma^2= 0.1 & S_{0} is transmitted ,fontsize,10)50
% Sub-case s = s1:
s=s0;
r=s+noise;% received signal
for n=1:K
r0(n)=sum(r(1:n).*s0(1:n));
end
% Plotting the results:
subplot(3,2,4)
plot(l,[0r0])
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})60
axis([0 2025 0])
xlabel((d) \sigma^2= 0.1 & S_{1} is transmitted ,fontsize,10)
% Case 3: noiseN(0,1)
noise=random(Normal,0,1,1,K);
% Sub-case s = s0:
s=s0;
r=s+noise;% received signal
for n=1:K
r0(n)=sum(r(1:n).*s0(1:n));
end70
% Plotting the results:
subplot(3,2,5)
plot(l,[0r0])
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 205 25])
xlabel((e) \sigma^2= 1 & S_{0} is transmitted ,fontsize,10)
% Sub-case s = s1:
s=s0;
r=s+noise;% received signal
for n=1:K80
r0(n)=sum(r(1:n).*s0(1:n));
end
% Plotting the results:

358
subplot(3,2,6)
plot(l,[0r0])
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 2025 5])
xlabel((f) \sigma^2= 1 & S_{1} is transmitted ,fontsize,10)

Computer Problem 8.14

Figure 8.14 illustrates the correlator outputs for dierent noise variances whens1tis sent. The

MATLAB script for the computation is given next

T=20;

s1=zeros(1,T);

s1(1:T/2)=1;

s2=zeros(1,T); >> s2(T/2+1:T)=1;

n1=sqrt(0.1)randn(1,20);
*
n2=sqrt(0.5)randn(1,20);
*
n3=randn(1,20);

r1=s1+n1;

r2=s1+n2;

r3=s1+n3;

for k=1:20

y11(k)=0;y12(k)=0;y13(k)=0;

y21(k)=0;y22(k)=0;y23(k)=0;

for n=1:k

y11(k)=y11(n)+0.05r1(n)s1(n);
**
y12(k)=y12(n)+0.05r2(n)s1(n);
**
y13(k)=y13(n)+0.05r3(n)s1(n);
**
y21(k)=y21(n)+0.05r1(n)s2(n);
**
y22(k)=y22(n)+0.05r2(n)s2(n);
**
y23(k)=y23(n)+0.05r3(n)s2(n);
**
end

end

subplot(3,2,1), stem(y11)
subplot(3,2,2), stem(y21)

subplot(3,2,3), stem(y12)

subplot(3,2,4), stem(y22)

subplot(3,2,5), stem(y13)

subplot(3,2,6), stem(y23)

A similar script gives the outputs whens2tis transmitted. The resulting plots are shown in

Figure 8.15.

359
1.50.15

0.1
1

0.05

0.5
0

0-0.05
0510152005101520

1.50

-0.1
1

-0.2

0.5
-0.3

0-0.4
0510152005101520

1.50

-0.1
1

-0.2

0.5
-0.3

0-0.4
0510152005101520

Figure 8.14: Correlator outputs in Computer Problem8.14 whens1tis transmitted. Left column

is the result of correlation withs1tand right column is the output of correlator withs2t. Rows

one to three correspond to20:1;0:5;1, respectively. Note that vertical scales in left and right

columns are dierent.


360
0.21

0.15

0.10.5

0.05

00
0510152005101520

0.151

0.1
0.5

0.05

0
0

-0.05-0.5
0510152005101520

0.80.8

0.60.6

0.40.4

0.20.2

00
0510152005101520

Figure 8.15: Correlator outputs in Computer Problem8.14 whens2tis transmitted. Left column

is the result of correlation withs1tand right column is the output of correlator withs2t. Rows

one to three correspond to20:1;0:5;1, respectively. Note that vertical scales in left and right

columns are dierent.

361
1

0.6

0.4

0.2

-3
x 10
-1 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1

-0.2

Figure 8.16: The raised-cosine signal

Computer Problem 8.15

The plot ofxtis given in Figure 8.16.

From Figure 8.16 it is clear that, for all practical purposes, it is sucient to consider only the

intervaljtj 0:6103, which is roughly3T ;3T. Truncating the raised-cosine pulse to this

interval and computing the autocorrelation function result in the waveform shown in Figure 8.17.

In the MATLAB script given next, the raised-cosine signal and the autocorrelation function are

rst computed and plotted. In this particular example the length of the autocorrelation function is

1201 and the maximum (i.e., the optimum sampling time) occurs at the 600thcomponent. Two cases

are examined: one when the incorrect sampling time is 700 and one when it is 500. In both cases the

early-late gate corrects the sampling time to the optimum 600.

% MATLAB script for Computer Problem 8.15


echo on
num=[0.01 1];
den=[1 1.01 1];
[a,b,c,d]=tf2ss(num,den);
dt=0.01;
u=ones(1,2000);
x=zeros(2,2001);
for i=1:2000
x(:,i+1)=x(:,i)+dt.*a*x(:,i)+dt.*b*u(i);10
y(i)=c*x(:,i);
echo o;
end
echo on;
t=[0:dt:20];
plot(t(1:2000),y)

362
-3
x 10
-1 -0.5 0.5 1

Figure 8.17: The autocorrelation function of the raised-cosine signal

363
Chapter 9

Problem 9.1

1)The rst set represents a 4-PAM signal constellation. The points of the constellation arefA;3Ag.

The second set consists of four orthogonal signals. The geometric representation of the signals is

s1A0 0 0s30 0A0

s20A0 0s40 0 0A

This set can be classied as a 4-FSK signal. The third set can be classied as a 4-QAM signal

constellation. The geometric representation of the signals is

s1ApAps3ApAp
2222
s2ApAps4ApAp
2222

2)The average transmitted energy for sets I, II and III is

4
X1
E1ksik2A29A29A2A25A2
av;I
44
i1
4
X1
E1ksik24A2A2
av;II
44
i1
4
X122
E1ksik24AAA2
av;III
4422
i1

3)The probability of error for the 4-PAM signal is given by


2s32s3
s#
"
2M16Eav;I365A232A2
5Q45
P4;IQQ4
MM21N0215N02N0

4)When coherent detection is employed, then an upper bound on the probability of error is given by
2s3
s#
"
A2
PM1QEs3Q4
4;II;coherent5
N0N0

If the detection is performed noncoherently, then the probability of error is given by


01
M1
XBM1
1
Cn
P1n1@Aes=n1
4;II;noncoherent
n1nn1

3s2s13s
234

2ee4e
222
3A2A13A
2N3N4N
000

2ee4e

364
5)It is not possible to use noncoherent detection for the signal set III. This is because all signals have

the same square amplitude for everyt20;2T .

6)The following table shows the bit rate to bandwidth ratio for the dierent types of signaling and

the results forM4.

TypeR=WM4

PAM2 logM4
2

QAMlogM2
2
M
FSK (coherent)2 log21
M
M
FSK (noncoherent)log20.5
M
To achieve a ratioRof at least 2, we have to select either the rst signal set (PAM) or the second
W
signal set (QAM).

Problem 9.2

The correlation coecient between themthand thenthsignal points is

smsn
mn
jsmjjsnj

q
wheresmsm1; sm2; : : : ; smNandsmEs. Two adjacent signal points dier in only one
j
N
coordinate, for whichsmandsnkhave opposite signs. Hence,
k

N
XX
smsnsmsnjsmsnjsmsnk
jjk
j1jk
EN2
N1EssE
NNNs
1
Furthermore,jsmj jsnj E2so that
s

N2
mn
N
The Euclidean distance between the two adjacent signal points is

r
qp2sEsE
djsmsnj22E=N4s2s
s
NN

Problem 9.3

365
The energy of the signal waveforms0tis
m

Z1Z12
M
X

E0s0t2dtsmt1sktdt

1m1M
k1
Z1Z1
MM
XX
s2tdt1sktsltdt

1mM21
k1l1
Z1Z1
1MX1MX
smtsktdtsmtsltdt
M1M1
k1l1
MM
XX2
E 1EE
M2klM
k1l1

E 1E 2E M1E
MMM

The correlation coecient is given by

R1
s0ts0tdt
mn1mn
hRi1
1

hR1i2
12
1js0mtj2dt1js0ntj2dt
0101
1MX1MX
1Z@1
@sAdt

smtsktAntslt
E01MM
k1l1
0ZZ1
M
1
111MXA
@sXs

tsntdtktsltdt
E01mM21
k1l1
0ZZ1
1MX1
11MX1
@sA
tsktdtsmtsltdt

E0M1nM1
k1l1
111
M2MEMEME 1

M1
MEM1

Problem 9.4

The biorthogonal signal set has the form

pp
s1E;0;0;0s5E;0;0;0
ss
pp
s20;E;0;0s60;E;0;0
ss
pp
s30;0;E;0s70;0;E;0
ss
pp
s40;0;0;Es80;0;0;E
ss

For each pointsi, there areM26 points at a distance

q
di;k jsiskj2E
s

366
p
and one vector (si) at a distancedi;m2E. Hence, the union bound on the probability of error
s
P ejsiis given by

s#"s#
"
M"d#
Xi;k
PUBejsiQp6QEsQ2Es
k1;ki2N0N0N0

Since all the signals are equiprobable, we nd that


s#"s#
"

PUBe6QEsQ2Es
N0N0

WithM823,E3Eand therefore,
sb
s#"s#
"

PUBe6Q3EbQ6Eb
N0N0

Problem 9.5

It is convenient to nd rst the probability of a correct decision. Since all signals are equiprobable

M
X1
P CP Cjsi
i1M

All theP Cjsi,i1; : : : ; Mare identical because of the symmetry of the constellation. By translating

the vectorsito the origin we can nd the probability of a correct decision, given thatsiwas

transmitted, as
Z1Z1Z1
P Cjsif n1dn1f n2dn2: : :f nNdnN
ddd

222

where the number of the integrals on the right side of the equation isN,dis the minimum distance

between the points and


2
1ni
f nieN0
N0

Hence,

Z1!N0Zd1N
2
P Cjsif ndn@1f ndnA
d
21
"#!N

1Qdp
2N0

and therefore, the probability of error is given by

N
M
X1"d#!
P e1P C11Qp
i1M2N0
"#!N

11Qdp
2N0

367
Note that since
NN
XXd2
Es22Nd
s
m;i
i1i124

the probability of error can be written as

s#!N
"

P e11Q2Es
NN0

Problem 9.6

Consider rst the signal


n
X
ytcktkTc
k1

The signalythas durationTnTcand its matched lter is

n
X
gtyTtynTctcknTckTct
k1
nn
XX
cni1Tctcnti1Tc
i1i1
i1i1

that is, a sequence of impulses starting att0 and weighted by the mirror image sequence offcig.

Since,
nn
XX
stckptkTcpt ?cktkTc
k1k1

the Fourier transform of the signalstis

n
X
Sf P fckej2 f kTc
k1

and therefore, the Fourier transform of the signal matched tostis

Hf Sf ej2 f TSf ej2 f nTc


n
X
Pfckej2 f kTcej2 f nTc
k1
n
X
Pfcnej2 f i1Tc
i1
i1
Pf Fgt

Thus, the matched lterHf can be considered as the cascade of a lter,with impulse response

pt, matched to the pulseptand a lter, with impulse responsegt, matched to the signal

368
Pn
ytcktkTc. The output of the matched lter attnTcis
k1

Z1Z1
n
X
jstj2c2p2tkTcdt
1k1
k1
n
X
Tcc2
k
k1

where we have used the fact thatptis a rectangular pulse of unit amplitude and durationTc.

Problem 9.7

1)The inner product ofsitandsjtis

Z1Z1
nn
XX
sitsjtdtcikptkTccjptlTcdt
l
11
k1l1
nnZ1
XX
cikcjptkTcptlTcdt

l
k1l11
nn
XX
cikcjE
lpkl
k1l1
n
X
Ecikcj
pk
k1

Pn
The quantitycikcjis the inner product of the row vectorsCandC. Since the rows of the
k1kij
matrixHnare orthogonal by construction, we obtain

Z1
n
X
sitsjtdt Ec2nE
pijpij
1ik
k1

Thus, the waveformssitandsjtare orthogonal.


2)Using the results of Problem 8.30, we obtain that the lter matched to the waveform

n
X
sitcikptkTc
k1

can be realized as the cascade of a lter matched toptfollowed by a discrete-time lter matched

to the vectorCci; : : : ; cin. Since the pulseptis common to all the signal waveformssit,
i1
we conclude that thenmatched lters can be realized by a lter matched toptfollowed byn

discrete-time lters matched to the vectorsC,i1; : : : ; n.


i

369
Problem 9.8

1) The optimal ML detector selects the sequenceCthat minimizes the quantity


i

nq
X
Dr; CrkECik2
ib
k1

The metrics of the two possible transmitted sequences are

wqnq
XX
Dr; CrkE2rkE2
1bb
k1kw1

and
wqnq
XX
Dr; CrkE2rkE2
2bb
k1kw1

Since the rst term of the right side is common for the two equations, we conclude that the optimal

ML detector can base its decisions only on the lastnwreceived elements ofr. That is

C
2
nqnq
XX>
rkE2rkE20
bb
<
kw1kw1
C
1

or equivalently

C
1
n
X>
rk0
<
kw1
C
2

p
2)SincerkECiknk, the probability of errorP ejCis
b1

01
n
qX
P ejCP@Enwnk<0A
1b
kw1
01
nq
X
P@nk<nwEA
b
kw1

Pn
The random variableunkis zero-mean Gaussian with variance2nw2. Hence
kw1u

p2s
ZE3
bnw2
Enw
b
P ejC1p2expxdxQ425
1
2 nw12 nw2

370
Similarly we nd thatP ejCP ejCand since the two sequences are equiprobable
21
2s3
Enw
b
P eQ425

nw
3)The probability of errorP eis minimized whenEbis maximized, that is forw0. This
2

implies thatC Cand thus the distance between the two sequences is the maximum possible.
12

Problem 9.9

Consider the following waveforms of the binary FSK signaling:

u1t2Ebcos2 fct
T
s

u2t2Ebcos2 fct2f t
T

The correlation of the two signals is

T
1Z
12u1tu2tdt
E0
b
T
1Z2E
b
tcos2 fct2f tdt
E0Tcos2 fc
b
TZT
1Z1
cos2f tdtcos22fct2f tdt

T0T0

Iffc1, then
T
T
1Zsin2f T
12cos2f tdt
T0 2f T

To nd the minimum value of the correlation, we set the derivative of 12with respect tofequal

to zero. Thus,
# 12cos2f T 2 Tsin2f T
2T
#f02f T 2f T 2

and therefore,

2f Ttan2f T

Solving numerically the equationxtanx, we obtainx4:4934. Thus,

2f T4:4934=)f0:7151
T

and the value of 12is0:2172. Note that when a gradient method like the Gauss-Newton is used to

solve the equationf xxtanx0, then in order to nd the smallest nonzero root, the initial

value of the algorithmx0should be selected in the range;3.


22

371
The probability of error can be expressed in terms of the distanced12between the signal points,

as2v3
uu2
d7
t12
pbQ645
2N0

The two signal vectorsu1,u2are of equal energy

ku1k2 ku2k2 E
b

and the angle12between them is such that

cos12 12

Hence,

d2 ku1k2 ku2k22ku1kku2kcos122E1 12
12s

and therefore,
s#"s#
"
1 12E10:2172
pbQ2EsQs
2N0N0

Problem 9.10

1)If the transmitted signal is

u0t2Escos2 fct;0tT
T

then the received signal is


s

r t2Escos2 fctnt
T

In the phase-coherent demodulation ofM-ary FSK signals, the received signal is correlated with each

of theM-possible received signalscos2 fct2 mf tm, wheremare the carrier phase

estimates. The output of themthcorrelator is

ZT
rmr tcos2 fct2 mf tmdt
0
ZTs
2E
s

cos2 fctcos2 fct2 mf tmdt


0T
ZT
ntcos2 fct2 mf tmdt
0
sZ
2ET1
s

t2 mf tmcos2 mf tmn
T02cos22fc
sZ
2E1T
s
cos2 mf tmdtn
T20

wherenis a zero-mean Gaussian random variable with varianceN0.


2

372
2)In order to obtain orthogonal signals at the demodulator, the expected value ofrm,Erm, should

be equal to zero for everym60. SinceEn0, the latter implies that

ZT
cos2 mf tmdt0;8m60
0

The equality is true whenmfis a multiple of1. Since the smallest value ofmis 1, the necessary
T
condition for orthogonality is

f1
T

Problem 9.11

The noise components in the sampled output of the two correlators for themthFSK signal, are given

by

ZTs
nmcnt2cos2 fct2 mf tdt
0T
ZTs
nmsnt2sin2 fct2 mf tdt
0T

Clearly,nmc,nmsare zero-mean random variables since

2Zs3
T
EnmcE4nt2cos2 fct2 mf tdt5
0T
ZTs
Ent2cos2 fct2 mf tdt0
0T
2Zs3
T
EnmsE4nt2sin2 fct2 mf tdt5
0T
ZTs
Ent2sin2 fct2 mf tdt0
0T

Furthermore,

"ZT#
ZT
EnmcnkcE2ntncos2 fct2 mf tcos2 fct2 kf dtd
00T
TZT
2Z

Entncos2 fct2 mf tcos2 fct2 kf dtd


T00
ZT
2N0
cos2 fct2 mf tcos2 fct2 kf tdt

T20
ZT
2N01
t2 mkf tcos2 mkf tdt
T202cos22fc
ZT
2N01N0
dtm
T202mk2k

373
where we have used the fact that forfc1
T
ZT
cos22fct2 mkf tdt0
0

and forf1
T
ZT
cos2 mkf tdt0; m6k
0
Thus,nmc,nkcare uncorrelated formkand since they are zero-mean Gaussian they are

independent. Similarly we obtain


"ZT#
ZT
EnmcnksE2ntncos2 fct2 mf tsin2 fct2 kf dtd
00T
TZT
2Z
Entncos2 fct2 mf tsin2 fct2 kf dtd

T00
ZT
2N0
cos2 fct2 mf tsin2 fct2 kf tdt
T20
ZT
2N01
t2 mkf tsin2 mkf tdt

T202sin22fc
0
N0
Enmsnks
2mk

Problem 9.12

1)The noncoherent envelope detector for the on-o keying signal is depicted in the next gure.

t=T

2Rt
()()d
0
rc
q2r (t)
cos(2 fct)
rT
+
V
T
2

t=TThresholdRt
2Device
()()d
0
rs

2)Ifs0tis sent, then the received signal isr tntand therefore the sampled outputsrc,rs

are zero-mean independent Gaussian random variables with varianceN0. Hence, the random variable
2
q
rr2cr2sis Rayleigh distributed and the PDF is given by
r2r2
2r
prjs0tre22eN0
2
N0

Ifs1tis transmitted, then the received signal is


s

r t2Ebcos2 fctnt
Tb

374
q
Crosscorrelatingr tby2cos2 fctand sampling the output attT, results in
T

ZTs
rcr t2cos2 fctdt
0T
ZTpZTs
2E2
b
cos2 fctcos2 fctdtntcos2 fctdt
0Tb0T
pZT
2E1
b
tcosdtnc
Tb02cos22fc
q
Ecosnc

wherencis zero-mean Gaussian random variable with varianceN0. Similarly, for the quadrature
2
component we have
q
rsEsinns
b
qq
The PDF of the random variablerr2cr2sEn2cn2sis (see Problem 4.31)
b
p!r p!
r2E2E
bb
rE2r2rE
prjs1tre22I0beN0I0b
22
N0N0

that is a Rician PDF.

3)For equiprobable signals the probability of error is given by


ZVZ1
T
P error1prjs1tdr1prjs0tdr
212V
T

Sincer >0 the expression for the probability of error takes the form
ZVZ1
T
P error1prjs1tdr1prjs0tdr
202V
T
p!Z1
VTr2E2
1ZrbrE1rr
e22I0bdre22dr

20222V2
T

The optimum threshold level is the value ofVTthat minimizes the probability of error. However,
p
whenEb1 the optimum value is close toEband we will use this threshold to simplify the
N02
analysis. The integral involving the Bessel function cannot be evaluated in closed form. Instead of

I0xwe will use the approximation


x
I0xep
2x

which is valid for largex, that is for high SNR. In this case
p
p!ZEs
VTr2Ebp
1ZrbrE12r22
e22I0bdrperEb=2dr
2022202 2E
b

This integral is further simplied if we observe that for high SNR, the integrand is dominant in the
p
vicinity ofEand therefore, the lower limit can be substituted by1. Also
b
s
s
r1
p2
2 2E2
b

375
and therefore,
pp
spEsp
E
Zb
b
22
1Zr221122
perEb=2drerEb=2dr
202 2E212 2
b
s#
"
1E
b

2Q2N0

Finally
s#Z2
"1
12rr
P error1QEbpeN0dr
22N02EbN0
2
s#
"E
1E1b
b
4N
0

2Q2N02e

Problem 9.13

(a) Four phase PSK

If we use a pulse shape having a raised cosine spectrum with a rollo, the symbol rate is determined

from the relation


1
2T150000
Hence,
1105
T1

whereW105Hz is the channel bandwidth. The bit rate is

22105
T1bps

(b) Binary FSK with noncoherent detection

In this case we select the two frequencies to have a frequency separation of1, where1is the symbol
TT
rate. Hence
1
f1fc
2T

f2fc1
2T

wherefcis the carrier in the center of the channel band. Thus, we have

1
2T50000

or equivalently
1
5
T10

Hence, the bit rate is 105bps.

(c)M4 FSK with noncoherent detection

In this case we require four frequencies with adjacent frequencies separation of1. Hence, we select
T

111:5
f1fc j1:5; f2fc; f3fc; f4fc
T2T2TT

376
wherefcis the carrier frequency and125000, or, equivalently,
2T

1
T50000

Since the symbol rate is 50000 symbols per second and each symbol conveys 2 bits, the bit rate is

105bps.

Problem 9.14

We assume that the input bits 0, 1 are mapped to the symbols -1 and 1 respectively. The terminal

phase of an MSK signal at time instantnis given by

k
X
n;aak0
2
k0

where0is the initial phase andakis1 depending on the input bit at the time instantk. The

following table showsn;afor two dierent values of0(0; ), and the four input pairs of data:

f00;01;10;11g.

0b0b1a0a1n;a

00 0-1 -1

00 1-1 10

01 01 -10

01 11 1

0 0-1 -10

0 1-1 1

1 01 -1

1 11 12

Problem 9.15

1)The envelope of the signal is

q
jstjjsctj2 jsstj2
s
2E t2E t
bb2
cos2sin
Tb2TbTb2Tb
s
2E
b

Tb

Thus, the signal has constant amplitude.

377
2)The signalsthas the form of the four-phase PSK signal with

gTtcos t;0t2Tb
2Tb

Hence, it is an MSK signal. A block diagram of the modulator for synthesizing the signal is given in

the next gure.

a2n



s(t)eeDSerial /Serial
t
+cos(2 fct)cos(2T)Parallel
bemuxdataan

22




a2n+
1

3)A sketch of the demodulator is shown in the next gure.

t=2Tb

R2Tb
()dtThreshold
0


ec ter (t)Parallel to
)cos(2 fct))
os(2TbSerial


t=2Tb22

R2Tb
()dtThreshold
0

Problem 9.16

Sincep2,mis odd (m1) andM2, there are

Ns2pM8

phase states, which we denote asSnn; an1. The 2p4 phase states corresponding tonare

s0;; ;
22

and therefore, the 8 statesSnare

0;1; 0;1;;1;;1; ;1; ;1;3;1;3;1


2222

Having at our disposal the staten; an1and the transmitted symbolan, we can nd the new

phase state as
an

n; an1-!nan1; ann1; an
2

378
The following gure shows one frame of the phase-trellis of the partial response CPM signal.

(n+, an)(n, an)


11

.(0,1)(0,1)
.
.
.
.
.
.........(0,1)(0,1)
..........
..........(,1)(,1)
22
.............
...........
,1)(,1)
............(22
.........
..
..........( ,1)( ,1)
.
..........
...
............( ,1)( ,1)
........
..........33
........(2,1)(2,1)
........
.......(3,1)(3,1)
22

The following is a sketch of the state diagram of the partial response CPM signal.

( ,1)

13
,1)(,1)
1(22
1


1
1 -11

-1
1(0,1)(0,1)
-1
-1
11-1
-

1
-(3,1)
(,1)2
2

( ,1)
Problem 9.17

1)For a full response CPFSK signal,Lis equal to 1. Ifh2, then sincemis even, there arep
3
terminal phase states. Ifh3, the number of states isNs2p.
4

2)WithL3 andh2, the number of states isNsp2212. WhenL3 andh3, the number
34
of states isNs2p2232.

379
0
10
Simulation
Theoretical
-1
10

-2
10

-3
b
10
P

-4
10

-5
10

-6
10
0246810
10 logE/N0
10b

Figure 9.1: Bit-error probability forM4 orthogonal signals from a Monte Carlo simulation compared

with theoretical error probability

Computer Problems

Computer Problem 9.1

Figure 9.1 illustrates the results of the simulation for the transmission of 20000 bits at several

dierent values of the SNRE=N0. Note the agreement between the simulation results and the
b
theoretical value ofPbgiven by

2k1
PbPM(9.29)
2k1

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 9.1.


echoon
clear all;
tolerance=1e8;% Tolerance used for the integration
minusinf=100000000;% This is practically -innity
plusinf=100000000;% This is practically innity
SNRindB=0:1:10;
for i=1:length(SNRindB),

380
% simulated error rate
smlderrprb(i)=smldP87(SNRindB(i));10
echoo;
end;
for i=1:length(SNRindB),
snr=10^(SNRindB(i)/10);
% theoretical error rate
theoerrprb(i)=(2/3)*quad8(bdt_int,minusinf,plusinf,tolerance,[ ],snr,4);
echoo;
end;

echoon;20
% Plotting commands follow
semilogy(SNRindB,smlderrprb,);
*
hold
semilogy(SNRindB,theoerrprb);
legend(Simulation,Theoretical);

function[p]=smldP87(snrindB)
% [p]=smldP87(snrindB)
% SMLDP87 simulates the probability of error for the given
% snrindB, signal-to-noise ratio in dB.
M=4;% quaternary orthogonal signaling
E=1;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio per bit
sgma=sqrt(E^2/(4*SNR));% sigma, standard deviation of noise
N=10000;% number of symbols being simulated
% generation of the quaternary data source10
for i=1:N,
temp=rand;% a uniform random variable over (0,1)
if(temp<0.25),
dsource1(i)=0;
dsource2(i)=0;
elseif(temp<0.5),
dsource1(i)=0;
dsource2(i)=1;
elseif(temp<0.75),
dsource1(i)=1;20
dsource2(i)=0;
else
dsource1(i)=1;
dsource2(i)=1;
end
end;
% detection, and probability of error calculation
numoferr=0;
for i=1:N,
% matched lter outputs30
if((dsource1(i)==0) & (dsource2(i)==0)),
r0=sqrt(E)+gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);

381
r3=gngauss(sgma);
elseif((dsource1(i)==0) & (dsource2(i)==1)),
r0=gngauss(sgma);
r1=sqrt(E)+gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);40
elseif((dsource1(i)==1) & (dsource2(i)==0)),
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=sqrt(E)+gngauss(sgma);
r3=gngauss(sgma);
else
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=sqrt(E)+gngauss(sgma);50
end;
% the detector
maxr=max([r0 r1 r2 r3]);
if(r0==maxr),
decis1=0;
decis2=0;
elseif(r1==maxr),
decis1=0;
decis2=1;
elseif(r2==maxr),60
decis1=1;
decis2=0;
else
decis1=1;
decis2=1;
end;
% Count the number of bit errors made in this decision.
if(decis1=dsource1(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;70
if(decis2=dsource2(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/(2*N);% bit error probability estimate

Computer Problem 9.2

Figure 9.2 illustrates the results of the simulation for the transmission of 20000 bits at several

dierent values of the SNRE=N0. Note the agreement between the simulation results and the
b
theoretical value ofPbgiven by

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 9.2.

382
0
10
Simulation
Theoretical
-1
10
-2
10
-3
10

-4
b
10
P

-5
10

-6
10
-7
10
-8
10
0246810
10 logE/N0
10b

Figure 9.2: Bit-error probability forM8 orthogonal signals from a Monte Carlo simulation compared

with theoretical error probability

383
clear all;
tolerance=1e15;% Tolerance used for the integration
minusinf=60;% This is practically -innity
plusinf=60;% This is practically innity
SNRindB=0:1:10;
for i=1:length(SNRindB),
% simulated error rate
smlderrprb(i)=smldP88(SNRindB(i));
end;10
for i=1:length(SNRindB),
snr=10^(SNRindB(i)/10);
% theoretical error rate
theoerrprb(i)=(4/7)*quad8(bdt_int,minusinf,plusinf,tolerance,[ ],snr,8);
end;
%Plotting commands follow
semilogy(SNRindB,smlderrprb,);
*
holdon;
semilogy(SNRindB,theoerrprb);
legend(Simulation,Theoretical);20
holdon;

function[p]=smldP87(snrindB)
% [p]=smldP87(snrindB)
% SMLDP87 simulates the probability of error for the given
% snrindB, signal-to-noise ratio in dB.
M=8;% quaternary orthogonal signaling
E=1;
numoferr= 0;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio per bit
sgma=sqrt(E^2/(6*SNR));% sigma, standard deviation of noise
N=10000;% number of symbols being simulated10
% generation of the quaternary data source
for i=1:N,
temp=rand;% a uniform random variable over (0,1)
if(temp<1/8),
dsource1(i)=0;
dsource2(i)=0;
dsource3(i)=0;
elseif(temp<2/8),
dsource1(i)=0;
dsource2(i)=0;20
dsource3(i)=1;
elseif(temp<3/8),
dsource1(i)=0;
dsource2(i)=1;
dsource3(i)=0;
elseif(temp<4/8),
dsource1(i)=0;
dsource2(i)=1;
dsource3(i)=1;
elseif(temp<5/8),30
dsource1(i)=1;

384
dsource2(i)=0;
dsource3(i)=0;
elseif(temp<6/8),
dsource1(i)=1;
dsource2(i)=0;
dsource3(i)=1;
elseif(temp<7/8),
dsource1(i)=1;
dsource2(i)=1;40
dsource3(i)=0;
else
dsource1(i)=1;
dsource2(i)=1;
dsource3(i)=1;
end
end;
% detection, and probability of error calculation
numoferr=0;
for i=1:N,50
% matched lter outputs
if((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==0)),
r0=sqrt(E)+gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);
r4=gngauss(sgma);
r5=gngauss(sgma);
r6=gngauss(sgma);
r7=gngauss(sgma);60
elseif((dsource1(i)==0) & (dsource2(i)==0) & (dsource3(i)==1)),
r0=gngauss(sgma);
r1=sqrt(E)+gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);
r4=gngauss(sgma);
r5=gngauss(sgma);
r6=gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==0)),70
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=sqrt(E)+gngauss(sgma);
r3=gngauss(sgma);
r4=gngauss(sgma);
r5=gngauss(sgma);
r6=gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==0) & (dsource2(i)==1) & (dsource3(i)==1)),
r0=gngauss(sgma);80
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=sqrt(E)+gngauss(sgma);
r4=gngauss(sgma);
r5=gngauss(sgma);

385
r6=gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==1) & (dsource2(i)==0) & (dsource3(i)==0)),
r0=gngauss(sgma);
r1=gngauss(sgma);90
r2=gngauss(sgma);
r3=gngauss(sgma);
r4=sqrt(E)+gngauss(sgma);
r5=gngauss(sgma);
r6=gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==1) & (dsource2(i)==0) & (dsource3(i)==1)),
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);100
r3=gngauss(sgma);
r4=gngauss(sgma);
r5=sqrt(E)+gngauss(sgma);
r6=gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==1) & (dsource2(i)==1) & (dsource3(i)==0)),
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);110
r4=gngauss(sgma);
r5=gngauss(sgma);
r6=sqrt(E)+gngauss(sgma);
r7=gngauss(sgma);
elseif((dsource1(i)==1) & (dsource2(i)==1) & (dsource3(i)==1)),
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);
r4=gngauss(sgma);120
r5=gngauss(sgma);
r6=gngauss(sgma);
r7=sqrt(E)+gngauss(sgma);
else
r0=gngauss(sgma);
r1=gngauss(sgma);
r2=gngauss(sgma);
r3=gngauss(sgma);
r4=gngauss(sgma);
r5=gngauss(sgma);130
r6=gngauss(sgma);
r7=sqrt(E)+gngauss(sgma);
end;
% the detector
maxr=max([r0 r1 r2 r3 r4 r5 r6 r7]);
if(r0==maxr),
decis1=0;
decis2=0;
decis3=0;

386
elseif(r1==maxr),140
decis1=0;
decis2=0;
decis3=1;
elseif(r2==maxr),
decis1=0;
decis2=1;
decis3=0;
elseif(r3==maxr)
decis1=0;
decis2=1;150
decis3=1;
elseif(r4==maxr)
decis1=1;
decis2=0;
decis3=0;
elseif(r5==maxr)
decis1=1;
decis2=0;
decis3=1;
elseif(r6==maxr)160
decis1=1;
decis2=1;
decis3=0;
else
decis1=1;
decis2=1;
decis3=1;
end;
% Count the number of bit errors made in this decision.
if(decis1=dsource1(i)),% If it is an error, increase the error counter.170
numoferr=numoferr+1;
end;
if(decis2=dsource2(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
if(decis3=dsource3(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/(3*N);% bit error probability estimate180

Computer Problem 9.3

Figure 9.3 illustrates the outputs of the two correlators for dierent noise variances and transmitted

signals. The MATLAB script for the computation is given next.

% MATLAB script for Computer Problem 9.3.

% Initialization:

387
2020

1010

00

10 10

20 20

05Tb10Tb15Tb20Tb20Tb25Tb30Tb35Tb40Tb
(a) 2= 0 & y(kT)(b) 2= 0 & y(kT)
0b1b

2020

1010

00

10 10

20 20

05Tb10Tb15Tb20Tb20Tb25Tb30Tb35Tb40Tb
(c) 2= 0.1 & y(kT)(d) 2= 0.1 & y(kT)
0b1b

2020

00

20 20

05Tb10Tb15Tb20Tb20Tb25Tb30Tb35Tb40Tb
22
(e) = 1 & y(kT)(f) = 1 & y(kT)
0b1b

Figure 9.3: Correlator outputs in Computer Problem 9.3. Solid, dashed, dotted, and dash-dotted plots

correspond to transmission ofs0t,s1t,s2t, ands3t, respectively.


388
K=40;% Number of samples
A=1;% Signal amplitude
m=0:K/2;
n=K/2:K;
% Dening signal waveforms:
s0=[A*ones(1,K/2)zeros(1,K/2)];
s1=[zeros(1,K/2)A*ones(1,K/2)];10
s2=[A*ones(1,K/2)zeros(1,K/2)];
s3=[zeros(1,K/2)A*ones(1,K/2)];
% Initializing Outputs:
y00=zeros(1,K);
y01=zeros(1,K);
y02=zeros(1,K);
y03=zeros(1,K);
y10=zeros(1,K);
y11=zeros(1,K);
y12=zeros(1,K);20
y13=zeros(1,K);

% Case 1: noiseN(0,0)
noise=random(Normal,0,0,1,K);
r0=s0+noise;r1=s1+noise;% received signals
r2=s2+noise;r3=s3+noise;% received signals
for k=1:K/2
y00(k)=sum(r0(1:k).*s0(1:k));
y01(k)=sum(r1(1:k).*s0(1:k));
y02(k)=sum(r2(1:k).*s0(1:k));30
y03(k)=sum(r3(1:k).*s0(1:k));
l=K/2+k;
y10(l)=sum(r0(21:l).*s1(21:l));
y11(l)=sum(r1(21:l).*s1(21:l));
y12(l)=sum(r2(21:l).*s1(21:l));
y13(l)=sum(r3(21:l).*s1(21:l));
end
% Plotting the results:
subplot(3,2,1)
plot(m,[0y00(1:K/2)],-bo,m,[0y01(1:K/2)],--b,. . .40
*
m,[0y02(1:K/2)],:b.,m,[0y03(1:K/2)],-.)
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 2025 25])
xlabel((a) \sigma^2= 0 & y_{0}(kT_{b}),fontsize,10)
subplot(3,2,2)
plot(n,[0y10(K/2+1:K)],-bo,n,[0y11(K/2+1:K)],--b,. . .
*
n,[0y12(K/2+1:K)],:b.,n,[0y13(K/2+1:K)],-.)
set(gca,XTickLabel,{20Tb,25Tb,30Tb,35Tb,40Tb})
axis([20 4025 25])
xlabel((b) \sigma^2= 0 & y_{1}(kT_{b}),fontsize,10)50
% Case 2: noiseN(0,0.1)
noise=random(Normal,0,0.1,4,K);
r0=s0+noise(1,:);r1=s1+noise(2,:);% received signals
r2=s2+noise(3,:);r3=s3+noise(4,:);% received signals
for k=1:K/2
y00(k)=sum(r0(1:k).*s0(1:k));
y01(k)=sum(r1(1:k).*s0(1:k));

389
y02(k)=sum(r2(1:k).*s0(1:k));
y03(k)=sum(r3(1:k).*s0(1:k));
l=K/2+k;60
y10(l)=sum(r0(21:l).*s1(21:l));
y11(l)=sum(r1(21:l).*s1(21:l));
y12(l)=sum(r2(21:l).*s1(21:l));
y13(l)=sum(r3(21:l).*s1(21:l));
end
% Plotting the results:
subplot(3,2,3)
plot(m,[0y00(1:K/2)],-bo,m,[0y01(1:K/2)],--b. . .
*
,m,[0y02(1:K/2)],:b.,m,[0y03(1:K/2)],-.)
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})70
axis([0 2025 25])
xlabel((c) \sigma^2= 0.1 & y_{0}(kT_{b}),fontsize,10)
subplot(3,2,4)
plot(n,[0y10(K/2+1:K)],-bo,n,[0y11(K/2+1:K)],--b,. . .
*
n,[0y12(K/2+1:K)],:b.,n,[0y13(K/2+1:K)],-.)
set(gca,XTickLabel,{20Tb,25Tb,30Tb,35Tb,40Tb})
axis([20 4025 25])
xlabel((d) \sigma^2= 0.1 & y_{1}(kT_{b}),fontsize,10)

% Case 3: noiseN(0,1)80
noise=random(Normal,0,1,4,K);
r0=s0+noise(1,:);r1=s1+noise(2,:);% received signals
r2=s2+noise(3,:);r3=s3+noise(4,:);% received signals
for k=1:K/2
y00(k)=sum(r0(1:k).*s0(1:k));
y01(k)=sum(r1(1:k).*s0(1:k));
y02(k)=sum(r2(1:k).*s0(1:k));
y03(k)=sum(r3(1:k).*s0(1:k));
l=K/2+k;
y10(l)=sum(r0(21:l).*s1(21:l));90
y11(l)=sum(r1(21:l).*s1(21:l));
y12(l)=sum(r2(21:l).*s1(21:l));
y13(l)=sum(r3(21:l).*s1(21:l));
end
% Plotting the results:
subplot(3,2,5)
plot(m,[0y00(1:K/2)],-bo,m,[0y01(1:K/2)],--b,. . .
*
m,[0y02(1:K/2)],:b.,m,[0y03(1:K/2)],-.)
set(gca,XTickLabel,{0,5Tb,10Tb,15Tb,20Tb})
axis([0 2030 30])100
xlabel((e) \sigma^2= 1 & y_{0}(kT_{b}),fontsize,10)
subplot(3,2,6)
plot(n,[0y10(K/2+1:K)],-bo,n,[0y11(K/2+1:K)],--b,. . .
*
n,[0y12(K/2+1:K)],:b.,n,[0y13(K/2+1:K)],-.)
set(gca,XTickLabel,{20Tb,25Tb,30Tb,35Tb,40Tb})
axis([20 4030 30])
xlabel((f) \sigma^2= 1 & y_{1}(kT_{b}),fontsize,10)

390
0
10
Simulation
Theoretical
-1
10

-2
10

-3
4
10
P

-4
10

-5
10

-6
10
0246810
10 logE/N0
10b

Figure 9.4: Symbol-error probability forM4 biorthogonal signals from Monte Carlo simulation

compared with theoretical error probability

Computer Problem 9.4

Figure 9.4 illustrates the results of the simulation for the transmission of 20000 bits at several

dierent values of the SNRE=N0. Note the agreement between the simulation results and the
b
theoretical value ofP4given by (9.30) and (9.31).

PM1Pc(9.30)

wherePcis given by

M1
Z12Zrp3
10=EN0=22
pex=2dx5pr dr(9.31)
Pc4p
00
02r0=EN0=2

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 9.4.


echo on
SNRindB=0:2:10;
for i=1:length(SNRindB),
% simulated error rate
smlderrprb(i)=smldP89(SNRindB(i));
echo o;
end;

391
echo on ;
% Plotting commands follow.10

function[p]=smldP89(snrindB)
% [p]=smldP89(snrindB)
% SMLDP89 simulates the probability of error for the given
% snrindB, signal-to-noise ratio in dB, for the system
% described in Computer Problem 9.4.
M=4;% quaternary biorthogonal signaling
E=1;
SNR=exp(snrindB*log(10)/10);% signal-to-noise ratio per bit
sgma=sqrt(E^2/(4*SNR));% sigma, standard deviation of noise
N=10000;% number of symbols being simulated10
% generation of the quaternary data source
for i=1:N,
temp=rand;% uniform random variable over (0,1)
if(temp<0.25),
dsource(i)=0;
elseif(temp<0.5),
dsource(i)=1;
elseif(temp<0.75),
dsource(i)=2;
else20
dsource(i)=3;
end
end;
% detection, and error probability computation
numoferr=0;
for i=1:N,
% the matched lter outputs
if(dsource(i)==0)
r0=sqrt(E)+gngauss(sgma);
r1=gngauss(sgma);30
elseif(dsource(i)==1)
r0=gngauss(sgma);
r1=sqrt(E)+gngauss(sgma);
elseif(dsource(i)==2)
r0=sqrt(E)+gngauss(sgma);
r1=gngauss(sgma);
else
r0=gngauss(sgma);
r1=sqrt(E)+gngauss(sgma);
end;40
% detector follows
if(r0>abs(r1)),
decis=0;
elseif(r1>abs(r0)),
decis=1;
elseif(r0<abs(r1)),
decis=2;
else
decis=3;

392
3000
y
1c
y
2500
1s
y
2c
y
2000
2s

1500

1000

500

-500
010002000300040005000
k

Figure 9.5: Correlator outputs for cos2 f1t

end;50
if(decis=dsource(i)),% If it is an error, increase the error counter.
numoferr=numoferr+1;
end;
end;
p=numoferr/N;% bit error probability estimate

Computer Problem 9.5

Figures 9.5 and 9.6 present the correlator outputs forcos2 f1tandcos2 f2t, respectively.

y16:2525e006 andy21 for cos2 f1t.y11 andy26:2525e006 for cos2 f2t.

The MATLAB script for this problem is given next.

% MATLAB script for Computer Problem 9.5.


Tb=1;
f1=1000/Tb;
f2=f1+1/Tb;
phi=pi/4;
N=5000;% number of samples
t=0:Tb/(N1):Tb;
u1=cos(2*pi*f1*t);
u2=cos(2*pi*f2*t);
% Assuming that the received signa is r = cos(2*pi*f1*t)10
sgma=1;
for i=1:N,
r(i)=cos(2*pi*f1*t(i));

393
3000

y
1c
2500
y
1s
y
2c
2000
y
2s
1500

1000

500

-500

-1000
010002000300040005000
k

Figure 9.6: Correlator outputs for cos2 f2t

end;
% The correlator outputs are computed next.
v1=sin(2*pi*f1*t);
v2=sin(2*pi*f2*t);
y1c(1)=r(1)*u1(1);
y1s(1)=r(1)*v1(1);
y2c(1)=r(1)*u2(1);20
y2s(1)=r(1)*v2(1);
fork=2:N,
y1c(k)=y1c(k1)+r(k)*u1(k);
y1s(k)=y1s(k1)+r(k)*v1(k);
y2c(k)=y2c(k1)+r(k)*u2(k);
y2s(k)=y2s(k1)+r(k)*v2(k);
end;
% decision variables
y1=y1c(5000)^2+y1s(5000)^2
y2=y2c(5000)^2+y2s(5000)^230
% Plotting commands follow.
plot(y1c,-);
holdon;
plot(y1s,-.);
holdon;
plot(y2c,--);
holdon;
plot(y2s,-.);
legend(y_{1c},y_{1s},y_{2c},y_{2s});
xlabel(k);40

394
0
10

-1
10

-2
10

-3
10

-4
10
024681012
E/N0in dB
b

Figure 9.7: Theoretical error probability and Monte Carlo simulation results for a binary FSK system

Computer Problem 9.6

Figure 9.7 presents the measured error rate and compares it with the theoretical error probability.

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 9.6.


echoon
SNRindB1=0:2:12;
SNRindB2=0:0.1:12;
for i=1:length(SNRindB1),
smlderrprb(i)=cmsm52(SNRindB1(i));% simulated error rate
echoo;
end;
echoon;
for i=1:length(SNRindB2),10
SNR=exp(SNRindB2(i)*log(10)/10);% signal-to-noise ratio
theoerrprb(i)=(1/2)*exp(SNR/2);% theoretical symbol error rate
echoo;
end;
echoon;
% Plotting commands follow.
semilogy(SNRindB1,smlderrprb,);
*
holdon;
semilogy(SNRindB2,theoerrprb);

395
function[p]=cmsm52(snrindB)
% [p]=cmsm52(snrindB)
% CMSM52 Returns the probability of error for the given
% value of snrindB, signal-to-noise ratio in dB.
N=10000;
Eb=1;
d=1;
snr=10^(snrindB/10);% signal-to-noise ratio per bit
sgma=sqrt(Eb/(2*snr));% noise variance
phi=0;10
% Generation of the data source follows.
for i=1:N,
temp=rand;% a uniform random variable between 0 and 1
if(temp<0.5),
dsource(i)=0;
else
dsource(i)=1;
end;
end;
% detection and the probability of error calculation20
numoferr=0;
for i=1:N,
% demodulator output
if(dsource(i)==0),
y0c=sqrt(Eb)*cos(phi)+gngauss(sgma);
y0s=sqrt(Eb)*sin(phi)+gngauss(sgma);
y1c=gngauss(sgma);
y1s=gngauss(sgma);
else
y0c=gngauss(sgma);30
y0s=gngauss(sgma);
y1c=sqrt(Eb)*cos(phi)+gngauss(sgma);
y1s=sqrt(Eb)*sin(phi)+gngauss(sgma);
end;
% square-law detector outputs
y0=y0c^2+y0s^2;
y1=y1c^2+y1s^2;
% Decision is made next.
if(y0>y1),
decis=0;40
else
decis=1;
end;
% If the decision is not correct the error counter is increased.
if(decis=dsource(i)),
numoferr=numoferr+1;
end;
end;
p=numoferr/(N);

396
Chapter 10

Problem 10.1

1)The following table shows the values ofEW =Tobtained using an adaptive recursive Newton-
h
Cotes numerical integration rule.

W T0.51.01.52.02.53.0

EW =T0.22530.34420.37300.37480.34790.3750
h

A plot ofEW =Tas a function ofW Tis given in the next gure
h

0.4

0.35

0.3

0.25

0.2
Energy / T

0.15

0.1

0.05
0
0.511.522.53 3.5

WT

2)The value ofEW asW! 1is


h
Z1ZT
limEWg2tdtg2tdt
W!1h1T0T
T2
1Z2T
1costdt

40T2
T
T1Z2T

costdt
420T2
T
1Z2T

1cos2tdt
80T2
TT3T

4880:3750T

397
Problem 10.2

We have
8
>>>a11
nwith Prob.
24
><
yan1with Prob.1
24
>>>
>:1
anwith Prob.
2

By symmetry,PeP eja1P eja 1, hence,

PeP eja 11Pn1>01Pn3>01Pn1>0


24242
111311

2Qn4Q2n4Q2n

Problem 10.3

1)If the transmitted signal is


1
X
r tanhtnT nt
n1

then the output of the receiving lter is

1
X
ytanxtnT t
n1

wherextht ? htandtnt ? ht. If the sampling time is o by 10%, then the samples

at the output of the correlator are taken attm1T. Assuming thattm1Twithout


1010
loss of generality, then the sampled sequence is

1
X1
ymanxmTnT m1T
n11010

P1
If the signal pulse is rectangular with amplitudeAand durationT, thenanxm1TnT
n1
10
is nonzero only fornmandnm1 and therefore, the sampled sequence is given by

ymamx1T am1xT1T m1T


101010
911
A2Tam1A2TmT
10am1010

The power spectral density of the noise at the output of the correlator is

N0
Sf Sf jHf j2A2T2sinc2f T
n
2

398
Thus, the variance of the noise is
Z1
N0N01N0

nu2A2T2sinc2f T dfA2T2A2T
122T2

and therefore, the SNR is

22 22
SNR92AT812AT
10N0A2T100N0

As it is observed, there is a loss of 10 log81 0:9151 dB due to the mistiming.


10100

2)Recall from part a) that the sampled sequence is

91
ymamA2Tam1A2Tm
1010
2
The termam1ATexpresses the ISI introduced to the system. Ifam1 is transmitted, then the
10
probability of error is

P ejam11P ejam1; am111P ejam1; am1 1


22
82
A2T2Z10AT2
1ZN1
pe0A2TdpeN0A2Td
2 N0A2T12 N0A2T1
2s32v3
t822A2T
12A2T1u5
45Q4

2QN0210N0

Since the symbols of the binary PAM system are equiprobable the previous derived expression is

the probability of error when a symbol by symbol detector is employed. Comparing this with the

probability of error of a system with no ISI, we observe that there is an increase of the probability of

error by
2v32s3
ut2
82A2T12A2T
Pe1Q4Q4
di525
210N0N0

Problem 10.4
1)Taking the inverse Fourier transform ofHf , we obtain

ht F1Hf ttt0tt0
22

Hence,

ytst ? htststt0stt0
22

2)If the signalstis used to modulate the sequencefang, then the transmitted signal is

1
X
utanstnT
n1

399
The received signal is the convolution ofutwithht. Hence,
1 !
X
ytut ? htanstnT?ttt0tt0
n122
111
XXX
anstnTanstt0nTanstt0nT
n1 2n1 2n1

Thus, the output of the matched lterstat the time instantt1is

1Z1
X
wt1ansnT st1d
n11
1Z1
X

st0nT st1d

2an1
n1
1Z1
X

st0nT st1d
2an1
n1

If we denote the signalst ? stbyxt, then the output of the matched lter att1kTis

1
X
wkTanxkTnT
n1
11
XX

xkTt0nTanxkTt0nT
2an 2
n1n1

3)Witht0Tandknin the previous equation, we obtain


X
wkakx0anxk
n
nk
XX

x1anxkakx1anxk
2ak2n122n1
nknk

akx0x1x1anxkxkxk
22n2n12n1
nk
The terms under the summation is the ISI introduced by the channel.

Problem 10.5

The pulsexthaving the raised cosine spectrum is

xtsinct=T cos t=T


142t2=T2

The function sinct=T is 1 whent0 and 0 whentnT. On the other hand


8
><1
t0
gtcos t=T
142t2=T2>:bounded
t60

400
The functiongtneeds to be checked only for those values oftsuch that 42t2=T21 ortT.
2
However,
cosx
limcos t=Tlim2
t!T 142t2=T2x!11x
2

and by using LHospitals rule

cosx
lim2limsinx<1
x!11xx!1222

Hence,
8
><1
n0
xnT
>:0
n0

meaning that the pulsextsatises the Nyquist criterion.

Problem 10.6

Substituting the expression ofXr cf in the desired integral, we obtain

1Z1
Z1Z
2T2T
Xr cf dfT1cos Tf1dfT df
1122T1
2T2T
1
Z
2T
T T1

1cosfdf
1
22T
2T
1Z1
Z
2T2T
T1T

1 dfT1df

2T 2T2T2
1 Z1
Z
2T2T
T1 T1

1 cosfdf1cosfdf

2T 2T2T2T

Z0Z
T
1cos Txdxcos Txdx

T0

Z
T
1cos Txdx101

Problem 10.7

LetXf be such that

88
><T1><V1
f T Uf jfj< f jfj<
ReXfTImXfT
>:0>:0
otherwise otherwise

401
withUf even with respect to 0 and odd with respect tof1Sincextis real,V f is odd with
2T
respect to 0 and by assumption it is even with respect tof1. Then,
2T

xt F1Xf
1Z1Z1
Z
2T2TT
j2 f tj2 f tj2 f t

1 Xf edf1Xf edf1Xf edf


T2T2T
1Z1
Z
2TT
j2 f tj2 f t

1 T edf1Uf jV f edf
2TT
1
Z
T
sinct=TUf jV f ej2 f tdf
1

1
RT
Consider rst the integral1Uf ej2 f tdf. Clearly,
T

1Z0Z1
Z
TT
j2 f tj2 f tj2 f t
1Uf edf1Uf edfUf edf

TT0

and by using the change of variablesf0f1andf0f1for the two integrals on the right
2T2T
hand side respectively, we obtain
1
Z
T
j2 f t
1 Uf edf
T
1 Z1
Z
2T2T

1010
ejTtUf0ej2 ftdf0ejTtUf0ej2 ftdf0
11

2T 2T2T2T
1
Z
a2T1j0
ejTtejTtUf0e2 ftdf0
1

2T 2T
1
Z
2T
10
2jsintUf0ej2 ftdf0
T12T
2T

where for step (a) we used the odd symmetry ofUf0with respect tof01, that is
2T

11
Uf0 Uf0
2T2T
1
RT
For the integral1V f ej2 f tdfwe have
T

1
Z
T
j2 f t
1 V f edf
T
1
Z0Z
j2 f tTj2 f t

1 V f edfV f edf

T0
1Z1
Z
2T2T

1010
ejTtV f0ej2 ftdf0ejTtV f0ej2 ftdf0
11

2T 2T2T2T

402
However,V f is odd with respect to 0 and sinceV f01andV f01are even, the translated
2T2T
spectra satisfy
1 Z1
Z
2T2T
01j2 f0t001j2 f0t0
1V fedf1V fedf

2T 2T2T2T

Hence,
1
Z
2T
10
xtsinct=T 2jsintUf0ej2 ftdf0
T12T
2T
1
Z
2T
10
2 sintUf0ej2 ftdf0
T12T
2T

and therefore,
8
><1
n0
xnT
>:0
n0

Thus, the signalxtsatises the Nyquist criterion.

Problem 10.8

The bandwidth of the channel is 1400 Hz. Since the minimum transmission bandwidth required

for baseband signaling isR=2, whereRis the symbol rate, we conclude that the maximum value

of the symbol rate for the given channel isRmax2800. If anM-ary PAM modulation is used for

transmission, then in order to achieve a bit-rate of 9600 bps, with maximum symbol rate ofRmax,

the minimum size of the constellation isM2k16. In this case, the symbol rate is

R96002400 symbols/sec
k

and the symbol intervalT11sec. The roll-o factorof the raised cosine pulse used for
R2400
transmission is determined by noting that 120011400, and hence,0:166. Therefore, the

squared root raised cosine pulse can have a roll-o of0:166.


Problem 10.9

Since the bandwidth of the ideal lowpass channel isW2400 Hz, the rate of transmission is

R224004800 symbols/sec

The number of bits per symbol is

k144003
4800

403
Hence, the number of transmitted symbols is 238. If a duobinary pulse is used for transmission,

then the number of possible transmitted symbols is 2M115. These symbols have the form

bn0;2d;4d; : : : ;12d

where 2dis the minimum distance between the points of the 8-PAM constellation. The probability

mass function of the received symbols is

P b2md8 jmj; m0;1; : : : ;7


64

An upper bound of the probability of error is given by (see (9.3.33))

2v3

ut2
6kEb;av
PM<211Q425
M24M1N0

WithPM106andM8 we obtain

kE
b;av3
1:319310=) E0:088
N0b;av

Problem 10.10

1)If the power spectral density of the additive noise isSf , then the PSD of the noise at the output
n
of the prewhitening lter is

Sf Sf jHpf j2
n

In order forSf to be at (white noise),Hpf should be such that

Hpf 1q
Sf
n

2)Lethptbe the impulse response of the prewhitening lterHpf . That is,hpt F1Hpf .

Then, the input to the matched lter is the signalstst ? hpt. The frequency response of the

lter matched tostis

j2 f t0j2 f t0
SmfSf eSf Hf e
p
wheret0is some nominal time-delay at which we sample the lter output.

3)The frequency response of the overall system, prewhitening lter followed by the matched lter, is

Sf
Gf Smf Hpf Sf jHpf j2ej2 f t0 ej2 f t0
Sf
n

404
4)The variance of the noise at the output of the generalized matched lter is

Z1Z1
22jSf j2
Sf jGf jdf df
n
11Snf

At the sampling instanttt0T, the signal component at the output of the matched lter is

Z1Z1
yTY f ej2 f TdfsgTd
11
Z1Z1
2
Sf Sf dfjSf j df
1 Snf1Snf

Hence, the output SNR is


2Z12
SNRyTjSf j df
2

1Snf

Problem 10.11

The roll-o factoris related to the bandwidth by the expression12W, or equivalently


T
R12W. The following table shows the symbol rate for the various values of the excess

bandwidth and forW1500 Hz.

.25.33.50.67.751.00

R240022562000179617141500

Problem 10.12

The following table shows the precoded sequence, the transmitted amplitude levels, the received

signal levels and the decoded sequence, when the data sequence 10010110010 modulates a duobinary

transmitting lter.

Data seq.dn:1 0 0 1 0 1 1 0 0 1 0

Precoded seq.pn:0 1 1 1 0 0 1 0 0 0 1 1

Transmitted seq.an:-1 1 1 1 -1 -1 1 -1 -1 -1 1 1

Received seq.bn:0 2 2 0 -2 0 0 -2 -2 0 2
Decoded seq.dn:1 0 0 1 0 1 1 0 0 1 0

Problem 10.13

405
The following table shows the precoded sequence, the transmitted amplitude levels, the received

signal levels and the decoded sequence, when the data sequence 10010110010 modulates a modied

duobinary transmitting lter.

Data seq.dn:1 0 0 1 0 1 1 0 0 1 0

Precoded seq.pn:0 0 1 0 1 1 1 0 0 0 0 1 0

Transmitted seq.an:-1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 -1

Received seq.bn:2 0 0 2 0 -2 -2 0 0 2 0

Decoded seq.dn:1 0 0 1 0 1 1 0 0 1 0

Problem 10.14

LetXzdenote theZ-transform of the sequencexn, that is


X
Xzxnzn
n

Then the precoding operation can be described as

P zDzmodM
Xz

whereDzandP zare theZ-transforms of the data and precoded sequences respectively. For

example, ifM2 andXz1z1(duobinary signaling), then

P zDz=)P zDzz1P z
1z1

which in the time domain is written as

pndnpn1

and the subtraction is mod-2.

However, the inverse lter1exists only ifx0, the rst coecient ofXzis relatively prime
Xz
withM. If this is not the case, then the precoded symbolspncannot be determined uniquely from

the data sequencedn.

Problem 10.15

1)The dimensionality of the signal space is two. An orthonormal basis set for the signal space is

formed by the signals


8q8q
><2T><2T
;0t <;t < T
1tT2 2tT2
>:0>:0
;otherwise;otherwise

406
2)The optimal receiver is shown in the next gure
t=T
2
r1T
1(t)Select
r (t)
2
the
t=T
2(Tt) largestr2

3)Assuming that the signals1tis transmitted, the received vector at the output of the samplers is
s
2
rATn1; n2
2

wheren1,n2are zero mean Gaussian random variables with varianceN0. The probability of error
2
P ejs1is
s
2
P ejs1P n2n1>AT
2
2s3
12
x2
1Z2AT
5
pAeN0dxQ4

2 N02T2N0
2

where we have used the fact thenn2n1is a zero-mean Gaussian random variable with variance
r
2
N0. Similarly we nd thatP ejs1QAT, so that
2N0
2s3
1A2T
5
P e1P ejs1P ejs2Q4
222N0

4)The signal waveform 1Ttmatched to 1tis exactly the same with the signal waveform
2
2Ttmatched to 2t. That is,
8q
2T
<;
T>T0t <2
1t 2Tt 1t
2>:0
;otherwise

Thus, the optimal receiver can be implemented by using just one lter followed by a sampler which

samples the output of the matched lter attTandtTto produce the random variablesr1and
2
r2respectively.

5)If the signals1tis transmitted, then the received signalr tis

r ts1t1s1tTnt
22

The output of the sampler attTandtTis given by


2
s
ss
5A2T
r1A2T3A2Tn1n1
T42T428
s
s
A2T1A2T
r2n2n2
2T428

407
If the optimal receiver uses a thresholdVto base its decisions, that is

s1

r1r2>V
<

s2

then the probability of errorP ejs1is

2s3
s
22
5
P ejs1P n2n1>2ATV Q42ATVp
88N0N0

Ifs2tis transmitted, then

r ts2t1s2tTnt
22

The output of the sampler attTandtTis given by


2

r1n1
ss

r2A2T3A2Tn2
T42T4
s
5A2T

28n2

The probability of errorP ejs2is

2s3
s
22
5ATV
5
p
P ejs2P n1n2>5ATV Q4
2828N0N0

Thus, the average probability of error is given by

1
P e1P ejs1P ejs2
22
2s32s3
1A2TV15A2TV
42p5Q4p5

2Q8N0N0228N0N0
The optimal value ofVcan be found by setting#P eequal to zero. Using Leibnitz rule to dierentiate
#V
denite integrals, we obtain

0s120s12
#P eA2TV5A2TV
@2pA@pA

#V08N0N028N0N0

or by solving in terms ofV


s
2
V 1AT
82

408
6)Letabe xed to some value between 0 and 1. Then, if we argue as in part 5) we obtain
s
2
P ejs1; aP n2n1>2ATV a
8
s
2
P ejs2; aP n1n2> a2ATV a
8

and the probability of error is

P eja1P ejs1; a1P ejs2; a


22

For a givena, the optimal value ofV ais found by setting#P ejaequal to zero. By doing so we
#V a
nd thats
2
V a aAT
42

The mean square estimation ofV ais

Z1s2Z1s2
VV af ada 1ATada 1AT
042082

Problem 10.16

The precoding for the duobinary signaling is given by

pmdm pm1

The corresponding trellis has two states associated with the binary values of the historypm1. For

the modied duobinary signaling the precoding is

pmdmpm2

Hence, the corresponding trellis has four states depending on the values of the pairpm2; pm1.

The two trellises are depicted in the next gure. The branches have been labelled asx=y, where

xis the binary input datadmandyis the actual transmitted symbol. Note that the trellis for the

modied duobinary signal has more states, but the minimum free distance between the paths is

d3, whereas the minimum free distance between paths for the duobinary signal is 2.
free

(pm, pm)Modied Duobinary


21
0/-1
00
1/1Duobinary
1
pm0/-1

010
1/1

1/1
10
1
0/-1


11

409
Problem 10.17

1)The spectrum of the baseband signal is

1
Sf 1Sf jXr cf j2jXr cf j2
Va
TT

whereT1and
2400
8
>>>T 1
0 jfj
4T
><
Xr cfT1cos2 T jfj 11 jfj 3
24T4T4T
>>>
>:
0 otherwise

If the carrier signal has the formctAcos2 fct, then the spectrum of the DSB-SC modulated

signal,Sf , is
U

Sf ASffc Sffc
UVV
2

A sketch ofSf is shown in the next gure.


U

2
AT

-fc-3/4T -fc+3/4T fcfc-3/4T fc+3/4T-fc

2)Assuming bandpass coherent demodulation using a matched lter, the received signalr tis rst

passed through a linear lter with impulse response

gRtAxr cTtcos2 fcTt

The output of the matched lter is sampled attTand the samples are passed to the detector. The

detector is a simple threshold device that decides if a binary 1 or 0 was transmitted depending on

the sign of the input samples. The following gure shows a block diagram of the optimum bandpass

coherent demodulator.
Detectort=TBandpass
r (t)
........(Thresholdmatched lter
.....
(t)
device)gR

410
Problem 10.18

1)The bandwidth of the bandpass channel is

W30006002400 Hz

Since each symbol of the QPSK constellation conveys 2 bits of information, the symbol rate of

transmission is

R24001200 symbols/sec
2

Thus, for spectral shaping we can use a signal pulse with a raised cosine spectrum and roll-o factor

1, that is

jfj
Xr cf T1cos Tjfj1cos2
224002400

If the desired spectral characteristic is split evenly between the transmitting lterGTf and the

receiving lterGRf , then

GTf GRf1cosjfj;jfj<11200
12002400T

A block diagram of the transmitter is shown in the next gure.

to ChannelGT(f )an
QPSK

cos(2 fct)

2)If the bit rate is 4800 bps, then the symbol rate is

R48002400 symbols/sec
2

In order to satisfy the Nyquist criterion, the the signal pulse used for spectral shaping, should have

the spectrum

Xf Tf
W
p
Thus, the frequency response of the transmitting lter isGTfTf.
W

Problem 10.19
The bandwidth of the bandpass channel is

W33003003000 Hz

In order to transmit 9600 bps with a symbol rateR2400 symbols per second, the number of

information bits per symbol should be

k96004
2400

411
Hence, a 2416 QAM signal constellation is needed. The carrier frequencyfcis set to 1800 Hz,

which is the mid-frequency of the frequency band that the bandpass channel occupies. If a pulse

with raised cosine spectrum and roll-o factoris used for spectral shaping, then for the bandpass

signal with bandwidthW

R120011500

and

0:25

A sketch of the spectrum of the transmitted signal pulse is shown in the next gure.

1/2T

f
-3300300
-3003300
600
1800
-1800
3000

Problem 10.20

1)The number of bits per symbol is

k480048002
R2400

Thus, a 4-QAM constellation is used for transmission. The probability of error for an M-ary QAM

system withM2k, is

s#!2
"

PM11211pQ3kEb
MM1N0

WithPM105andk2 we obtain

s#
"

Q2Eb5106=)Eb9:7682
N0N0

2If the bit rate of transmission is 9600 bps, then


k96004
2400

In this case a 16-QAM constellation is used and the probability of error is

s#!2
"

PM11211Q34 Eb
415N0

412
Thus,
s#
"
1E
Q3 Eb105=b25:3688
15N03)N0

3If the bit rate of transmission is 19200 bps, then

k192008
2400

In this case a 256-QAM constellation is used and the probability of error is

s#!2
"

PM11211Q38 Eb
16255N0

WithPM105we obtain
E
b
659:8922
N0

4)The following table gives the SNR per bit and the corresponding number of bits per symbol for the

constellations used in parts a)-c).

k248

SNR (db)9.8914.0428.19

As it is observed there is an increase in transmitted power of approximately 3 dB per additional bit

per symbol.

Problem 10.21

The channel bandwidth isW4000 Hz.

(1) Binary PSK with a pulse shape that has1. Hence


2

1
2T12000

and12667, the bit rate is 2667 bps.


T
(2) Four-phase PSK with a pulse shape that has1. From (a) the symbol rate is12667 and the
2T
bit rate is 5334 bps.
(3)M8 QAM with a pulse shape that has1. From (a), the symbol rate is12667 and hence
2T
the bit rate38001 bps.
T
(4) Binary FSK with noncoherent detection. Assuming that the frequency separation between the two

frequencies isf1, where1is the bit rate, the two frequencies arefc1andfc1. Since
TT2T2T
W4000 Hz, we may select11000, or, equivalently,12000. Hence, the bit rate is 2000 bps,
2TT
and the two FSK signals are orthogonal.

(5) Four FSK with noncoherent detection. In this case we need four frequencies with separation of1
T

413
between adjacent frequencies. We selectf1fc1:5,f2fc1,f3fc1, andf4fc1:5,
T2T2TT
where1500 Hz. Hence, the symbol rate is11000 symbols per second and since each symbol
2TT
carries two bits of information, the bit rate is 2000 bps.

(6)M8 FSK with noncoherent detection. In this case we require eight frequencies with frequency

separation of1500 Hz for orthogonality. Since each symbol carries 3 bits of information, the bit
T
rate is 1500 bps.

Problem 10.22

1)The output of the matched lter demodulator is

1Z1
X
ytakgTkTbgRtdt
k11
1
X
akxtkTbt
k1

where,
sin tcos t
xtgTt ? gRtTT
tt2
T14T2

Hence,

1
X
ymTbakxmTbkTbvmTb
k1
11
amam1am1mTb

The term1am11am1represents the ISI introduced by doubling the symbol rate of transmission.

2)In the next gure we show one trellis stage for the ML sequence detector. Since there is postcursor

ISI, we delay the received signal, used by the ML decoder to form the metrics, by one sample. Thus,

the states of the trellis correspond to the sequenceam1; am, and the transition labels correspond

to the symbolam1. Two branches originate from each state. The upper branch is associated with

the transmission of1, whereas the lower branch is associated with the transmission of 1.

am+
1
(am, am)
-11
-1 -1

-11-1 1
1
-1
11 -1
-1

11 1

414
Problem 10.23

1)The output of the matched lter at the time instantmTis

X1
ymamxkmamam1m
m
k4

The autocorrelation function of the noise samplesmis

N0
Ekxk
jj
2

Thus, the variance of the noise is

2N0N0

2x02
p
If a symbol by symbol detector is employed and we assume that the symbolsamam1E
b
p
have been transmitted, then the probability of errorP ejamam1Eis
b

qq
P ejamam1EP ym<0jamam1E
bb
5p
q1Z4E2
bm
P m<5EpeN0dm
4b N01
r
#
52E "
bs

N2
1Z052E
p4e2dQb

214N0

p
If howeveram1E, then
b

"#
q q 3q3s2
P ejamE; am1EPE<0QEb
bbbm
44N0

pp
Since the two symbolsE,Eare used with equal probability, we conclude that
bb
qq
P eP ejamEP ejamE
bb
s#"s#
"
152E132E
bb

2Q4N02Q4N0

2)In the next gure we plot the error probability obtained in part (a) (logP e) vs. the SNR per bit
10
and the error probability for the case of no ISI. As it observed from the gure, the relative dierence

in SNR of the error probability of 106is 2 dB.

415
-2

-2.5

-3

-3.5

-4

-4.5

log(P(e)
-5

-5.5

-6

-6.5

-7
78910111213 14
6

SNR/bit, dB

Problem 10.24

The frequency response of the RC lter is

1
2 RCf1
Cfj
R11j2 RCf
j2 RCf

The amplitude and the phase spectrum of the lter are


1
!2
jCf j1;cf arctan2 RCf
142RC2f2

The envelope delay is

f 12 RCRC
Tcf 1dc
2 df2142RC2f2142RC2f2

where we have used the formula


d1du
dxarctanu1u2dx

Problem 10.25

416
1)The envelope delay of the RC lter is (see Problem 9.19)

Tcf RC
142RC2f2

A plot ofT f withRC106is shown in the next gure

-7
x10
10

9.999

9.998

9.997

9.996

9.995
Tc(f)
9.994

9.993

9.992

9.991

9.99
050010001500200025003000350040004500 5000

Frequency (f)

2)The following gure is a plot of the amplitude characteristics of the RC lter,jCf j. The values
of the vertical axis indicate thatjCf jcan be considered constant for frequencies up to 2000 Hz.

Since the same is true for the envelope delay, we conclude that a lowpass signal of bandwidthf1

KHz will not be distorted if it passes the RC lter.

417
1

|C(f)|

0.999
50010001500200025003000350040004500 5000
0

Frequency (f)

Problem 10.26

LetGTf andGRf be the frequency response of the transmitting and receiving lter. Then, the

condition for zero ISI implies

8
>>>T 1
0 jfj
4T
><
GTf Cf GRf Xr cfT1cos2 T jfj 11 jfj 3
2T4T4T
>>>
>:3
0jfj>
4T

Since the additive noise is white, the optimum transmitting and receiving lter characteristics are

given by (see Example 8.6.1)


11
f j2 jXr cf j2
jGTf j jXr c;jGRf j
11
jCf j2jCf j2
Thus,
8hi1
>>>T2
>>>10 jfj 1
0:3 cos 2 f T4T
<1
1
jGTf j jGRf jT 1cos2 T jfjT21 3
>>>2 jfj
10:3 cos 2 f T4T4T
>>>
:0
otherwise

418
Problem 10.27

A 4-PAM modulation can accommodatek2 bits per transmitted symbol. Thus, the symbol interval

duration is

Tk1sec
96004800

Since, the channels bandwidth isW24001, in order to achieve the maximum rate of
2T
transmission,Rmax1, the spectrum of the signal pulse should be
2T

Xf Tf
2W

Then, the magnitude frequency response of the optimum transmitting and receiving lter is (see

Example 9.4.1)

81
1
"2#4>><f24

;jfj<2400
jGTf j jGRf j1ff12400
24002W>>:
0 otherwise

Problem 10.28

1)The equivalent discrete-time impulse response of the channel is

1
X
hthntnT 0:3tT 0:9t0:3tT
n1

If byfcngwe denote the coecients of the FIR equalizer, then the equalized signal is

1
X
qmcnhmn
n1

which in matrix notation is written as

010101
0:9 0:3 0:c10
BCBCBC
BCBCBC
B0CBcCB1C
:3 0:9 0:3CB0
BCBC
@A@A@A
0:0:3 0:9c10
The coecients of the zero-force equalizer can be found by solving the previous matrix equation.

Thus,
0101
c10:4762
BCBC
BCBC
BcCB1C
:4286C
0CB
B
@A@A
c10:4762

419
2)The values ofqmform 2;3 are given by

1
X
q2cnh2nc1h1 0:1429
n1
1
X
q2cnh2nc1h1 0:1429
n1
1
X
q3cnh3n0
n1
1
X
q3cnh3n0
n1

Problem 10.29

1)The output of the zero-force equalizer is

1
X
qmcnxm
n
n1

Withq01 andqm0 form0, we obtain the system


010101
1:0 0:10:5c10
BCBCBC
BCBCBC
B0CBcCB1C
:2 1:0 0:1CB0
BCBC
@A@A@A
0:050:2 1:0c10

Solving the previous system in terms of the equalizers coecients, we obtain


0101
c10:000
BCBC
BCBC
BcCB0C
:980C
0CB
B
@A@A
c10:196

2)The output of the equalizer is


8
>>>0
m4
>>>
>>>c
1x20m 3
>>>
>>>
c1x1c0x2 0:49m 2
>>>
>>>
>>>0m 1
<
qm1m0
>>>
>>>
0m1
>>>
>>>
>>>c0x2x1c10:0098m2
>>>
>>>c
1x20:0098m3
>>>
:0
m4

420
Hence, the residual ISI sequence is

residual ISI f: : : ;0;0:49;0;0;0;0:0098;0:0098;0; : : :g

and its span is 6 symbols.

Problem 10.30

The MSE performance index at the time instantkis

23
N
X

JckE4ck;nykak625
n

nN

If we dene the gradient vectorgkas


@Jck
gk
2@ck

then itslthelement is
2013
@Jck1NXA5
gk;lE42@ck;nykakyk
2@ck;l2nl
nN

Eekyk Eekyk
ll

Thus, the vectorgkis


01
Eekyk
N
BC
B.C
.CC E
gkBB.ekyk
@A
Eekyk
N

whereykis the vectorykyk ykT. Sincegk ekyk, its expected value is


NN

EgkEekyk Eekykgk

Problem 10.31

Iffcngdenote the coecients of the zero-force equalizer andfqmgis the sequence of the equalizers
output samples, then
1
X
qmcnxmn
n1

wherefxkgis the noise free response of the matched lter demodulator sampled attkT. With

q10,q0q1 E, we obtain the system


b
010101
E0:9E0:1Ec10
bbb
BCBCBC
BCBCBC
B0CBcCBEC
:9EE0:9E
0CBbC
BbbbCB
@A@A@A
0:1E0:9EEc1E
bbbb

421
The solution to the system is

c1c0c10:21370:3846 1:3248

Problem 10.32

The optimum tap coecients of the zero-force equalizer can be found by solving the system

010101
1:0 0:3 0:0c10
BCBCBC
BCBCBC
B0CBcCB1C
:2 1:0 0:3CB0
BCBC
@A@A@A
0:0 0:2 1:0c10

Hence,
0101
c10:3409
BCBC
BCBC
BcCB1C
:1364C
0CB
B
@A@A
c10:2273

b)The output of the equalizer is

8
>>>0
m3
>>>
>>>
c1x1 0:1023m 2
>>>
>>>
>>>0m 1
<
qm1m0
>>>
>>>
0m1
>>>
>>>
>>>c1x1 0:0455m2
>>>
:0
m3

Hence, the residual ISI sequence is

residual ISI f: : : ;0;0:1023;0;0;0;0:0455;0; : : :g

Problem 10.33

422
1)If we assume that the signal pulse has durationT, then the output of the matched lter at the

time instanttTis
ZT
yTr sd
0
ZT
ssT nsd
0
ZTZT
s2dnsd
00
En
s

whereEis the energy of the signal pulse andnis a zero-mean Gaussian random variable with
s
E
variance2N0s. Similarly, the output of the matched lter att2Tis
n2
ZTZT
y2Ts2dnsd
00
En
s

2)If the transmitted sequence is


1
X
xtanstnT
n1

withantaking the values 1;1 with equal probability, then the output of the demodulator at the

time instanttkTis

ykakEakEnk
s1s

The termakEexpresses the ISI due to the signal reection. If a symbol by symbol detector is
1s
employed and the ISI is ignored, then the probability of error is

P e1P errorjan1; an111P errorjan1; an1 1


22
11
nk<0P 1Enk<0

2P 1Es2s
2s32s3
1212E1212E
ss
45Q45

2QN02N0

3)To nd the error rate performance of the DFE, we assume that the estimation of the parameter

is correct and that the probability of error at each time instant is the same. Since the transmitted

symbols are equiprobable, we obtain


P eP error atkjak1

P error atk1P error atkjak1;error atk1

P no error atk1P error atkjak1;no error atk1

P eP error atkjak1;error atk1

1P eP error atkjak1;no error atk1

P ep1P eq

423
where

pP error atkjak1;error atk1


1
1; ak1;error atk1
2P error atkjak1
1
1; ak 1;error atk1
2P error atkjak1
11
nk<0P 12Enk<0
2P 12Es2s
2s32s3
12122E12122E
ss
45Q45

2QN02N0

and

qP error atkjak1;no error atk1


s#
"

P Enk<0Q2Es
s
N0

Solving forP e, we obtain


hqi
Q2Es
rhqi
P eqN0r
1pq121222
1212E2E
1QEsQsQs
2N02N0N0

A sketch of the detector structure is shown in the next gure.

Input
Threshold
rk+Outputak
+
device

DelayEstimate

Problem 10.34

A discrete time transversal lter equivalent to the cascade of the transmitting ltergTt, the channel
ct, the matched lter at the receivergRtand the sampler, has tap gain coecientsfymg, where
8
>>>0
:9m0
><
ym0:3m 1
>>>
>:
0 otherwise

The noisek, at the output of the sampler, is a zero-mean Gaussian sequence with autocorrelation

function

Ek2yk;jklj 1
ll

424
If theZ-transform of the sequencefymg,Y z, assumes the factorization

Y zF zFz1

then the lter 1=Fz1can follow the sampler to white the noise sequencek. In this case the

output of the whitening lter, and input to the MSE equalizer, is the sequence

X
unakfnnk
k
k

wherenkis zero mean Gaussian with variance2. The optimum coecients of the MSE equalizer,

ck, satisfy (see (9.4.32))


1
X
cnRunkRuak; k0;1
n1

where

1
X
RunkEululfmfm2
knnkn;k
m0
8
><y2
nkn;k;jnkj 1

>:0
otherwise
8
><f
k;1k0
RuakEanun
k
>:0
otherwise

With

Y z0:3z0:90:3z1f0f1z1f0f1z

we obtain the parametersf0andf1as

8p8p
><0><0
:7854:1146
f0; f1
pp
>:0>:0
:1146:7854

The parametersf0andf1should have the same sign sincef0f10:3. However, the sign itself does

not play any role if the data are dierentially encoded. To have a stable inverse system 1=Fz1,

we selectf0andf1in such a way that the zero of the systemFz1f0f1zis inside the unit
pp
circle. Thus, we choosef00:1146andf10:7854and therefore, the desired system for the

equalizers coecients is

01010p1
0:90:1 0:3 0:0c10:7854
BCBCBC
BCBCBpC
B0CBcCB0C
:3 0:90:1 0:3CB0:1146C
BCB
@A@A@A
0:0 0:3 0:90:1c10

Solving this system, we obtain

c10:8596; c00:0886; c1 0:0266

425
Problem 10.35

The power spectral density of the noise at the output of the matched lter is

N0 N01 f
Sf Sf jGRf j2jXf jcos
n
22W2W

Hence, the autocorrelation function of the output noise is


Z1
1f
R F1Sf N0cosej2 f df

21W2W
Z1
N01 f f 1
jj2 f
2W4W

21Wcos2Weedf
Z1
N0 1

Xf ej2 f4Wdf
21
N01

2x4W

and therefore,

R0N0x1N0sinc1sinc12N0
24W222

RT R1N0sinc3sinc12N0
2W2223

Since the noise is of zero mean, the covariance matrix of the noise is given by
0101
R0 RT2N11
C0B3C
CB@A@1A
RT R01
3

Problem 10.36

a)Each segment of the wire-line can be considered as a bandpass lter with bandwidthW1200 Hz.

Thus, the highest bit rate that can be transmitted without ISI by means of binary PAM is

R2W2400 bps

b)The probability of error for binary PAM transmission is


s#
"
P2Q2Eb
N0

Hence, using mathematical tables for the functionQ, we nd thatP2107is obtained for
s
2EE
bb
5:2=)13:5211:30 dB
N0N0

426
c)The received powerPRis related to the desired SNR per bit through the relation

PRE
Rb
N0N0

Hence, withN04:11021we obtain

PR4:11021120013:526:65181017 161:77 dBW

Since the power loss of each segment is

Ls50 Km1 dB/Km50 dB

the transmitted power at each repeater should be

PTPRLs 161:7750 111:77 dBW

Problem 10.37

1) The alternative expression forstcan be rewritten as

"#
X
stRea0QtnT
n
n
"#
X
Reanej2 fcnTgtnT cos 2 fctnT jsin 2 fctnT
n
"#
X
ReangtnT cos 2 fcnTjsin 2 fcnT cos 2 fctnT jsin 2 fctnT
n
"
X
ReangtnT cos 2 fcnTcos 2 fctnT sin 2 fcnTsin 2 fctnT
n
#

jsin 2 fcnTcos 2 fctnT jcos 2 fcnTsin 2 fctnT

"#
X
ReangtnT cos 2 fctjsin 2 fct
n
"#
X
ReangtnT ej2 fct
n
st

so indeed the alternative expression forstis a valid one.

2)

427
j2fnT
j2fnT
-
e
q(t)
e
q(t)

a
a'
nr
+

+nr
+
a'
-
a
ni
ni

^
^
q(t)
q(t)

Modulator Demodulator

(with phase rotator)(with phase derotator)


Problem 10.38

1) The impulse response of the pulse having a square-root raised cosine characteristic, is an even

function, i.e.,xSQtxSQt, i.e., the pulsegtis an even function. We know that the product of

an even function times an even function is an even function, while the product of an even function

times an odd function is an odd function. Henceqtis even whileqtis odd and their product

qtqthas odd symmetry. Therefore,

Z1Z1
=2T
qtqt dtqtqt dt0
11=2T

2) We notice that whenfck=T, wherekis an integer, then the rotator/derotator of a carrierless

QAM system (described in Problem 10.22) gives a trivial rotation of an integer number of full circles

(2 kn), and the carrierless QAM/PSK is equivalent to CAP.

Computer Problems

Computer Problem 10.1

The impulse response and the frequency response of a lengthN41 FIR lter that meets these

specications is illustrated in Figures 10.1, 10.2, and 10.3 . SinceNis odd, the delay through the lter

isN1=2 taps, which corresponds to a time delay ofN1=20 ms at the sampling rate ofFs10

KHz. In this example, the FIR lter was designed in MATLAB using the Chebyshev approximation

method (Remez algorithm).

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 10.1.

428
0.6

0.5

0.4

0.3

h(m)

0.2

0.1

-0.1
051015202530354045
m

Figure 10.1: Impulse response of linear phase FIR lter in Computer Problem 10.1

echo on
fcuto=2000;% the desired cuto frequency
fstopband=2500;% the actual stopband frequency
fs=10000;% the sampling frequency
f1=2*fcuto/fs;% the normalized passband frequency
f2=2*fstopband/fs;% the normalized stopband frequency
N=41;% This number is found by experiment.
F=[0f1 f21];
M=[1 1 0 0];% describes the lowpass lter10
B=remez(N1,F,M);% returns the FIR tap coecients
% Plotting command follows.
gure(1);
[H,W]=freqz(B);
HindB=20*log10(abs(H));
plot(W/(2*pi),HindB);
gure(2);
plot(W/(2*pi),(180/pi)*unwrap(angle(H)));
% Plot of the impulse response follows.
gure(3);20
plot(zeros(size([0:N1])));
hold;
stem([0:N1],B);

429
10

-10

-20

-30
|H|

-40

-50

-60

-70

-80
00.10.20.30.40.5

Figure 10.2: Frequency response of linear phase FIR lter in Computer Problem 10.1

430
0

-200

-400

-600

-800
H|
\
|
-1000

-1200

-1400

-1600

-1800

-2000
00.10.20.30.40.5

Figure 10.3: Phase response of linear phase FIR lter in Computer Problem 10.1

431
Computer Problem 10.2

For Channel 1, the received signal sequenceynin the absence of noise is shown in Figure 10.4(a),

and with additive white Gaussian noise having a variance of20:1, the received signal sequence is

shown in Figure 10.4(b). We note that in the absence of noise, the ISI alone does not cause errors at

the detector that compares the received signal sequenceynwith the threshold set to zero. Hence,

the eye diagram is open in the absence of noise. However, when the additive noise is suciently

large, errors will occur.

In the case of Channel 2, the noise-free and noisy20:1sequenceynis illustrated in

Figure 10.5. Now, we observe that the ISI can cause errors at the detector that compares the received

sequenceynwith the threshold set at zero, even in the absence of noise. Thus, for this channel

characteristic, the eye is completely closed.

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 10.2

% channel 1
xch1= [ 0.10.25 10.25 0.1];
% channel 2
xch2= [0.2 0.5 1 0.50.2];

noisevar=0.1;
sigma=sqrt(noisevar);
10
forak=1:2:1
for i=0:15
a=dec2bin(i,4);
%Output of channel 1
yk1(i+1) =ak+xch1(4)*(2*str2num(a(1))1) +xch1(2)*(2*str2num(a(2))1) + . . .
xch1(5)*(2*str2num(a(3))1) +xch1(1) * (2*str2num(a(4))1);
yk1noise(i+1) =yk1(i+1) +gngauss(sigma);
%Output of channel 2
yk2(i+1) =ak+xch2(4)*(2*str2num(a(1))1) +xch2(2)*(2*str2num(a(2))1) + . . .
xch2(5)*(2*str2num(a(3))1) +xch2(1) * (2*str2num(a(4))1);20
yk2noise(i+1) =yk2(i+1) +gngauss(sigma);
end
if(ak==1)
gure(1);
plot(yk1, 0,x)
axis([2 2 0 1]);
holdon;
gure(2);
plot(yk1noise, 0,x)
axis([2 2 0 1]);30
holdon;
gure(3);
plot(yk2, 0,x)
axis([2 2 0 1]);
holdon;
gure(4);
plot(yk2noise, 0,x)
axis([2 2 0 1]);

432
1

1 is transmitted
0.9

-1 is transmitted
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-2-1.5-1-0.500.511.52

(a)

1 is transmitted
0.9

-1 is transmitted
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-2-1.5-1-0.500.511.52

(b)

Figure 10.4: Output of channel model 1 without and with AWGN. (a) No noise. (b) Additive Gaussian

noise with20:1

433
1

0.9

1 is transmitted

-1 is transmitted
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-2.5-2-1.5-1-0.500.511.522.5

(a)

0.9

1 is transmitted

-1 is transmitted
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
-3-2-10123

(b)

Figure 10.5: Output of channel model 2 without and with AWGN. (a) No noise. (b) Additive Gaussian

noise with variance20:1

434
holdon;
else40
gure(1);
plot(yk1, 0,o)
axis([2 2 0 1]);
gure(2);
plot(yk1noise, 0,o)
axis([2 2 0 1]);
gure(3);
plot(yk2, 0,o)
axis([2 2 0 1]);
gure(4);50
plot(yk2noise, 0,o)
axis([2 2 0 1]);
end
end

Computer Problem 10.3

Figure 10.6 illustrates the impulse response of the transmitter ltergTnN1,n0;1; :::; N1 for
2
1

4andN31. The corresponding frequency response characteristics are shown in Figure 10.7.
Note that the frequency response is no longer zero forjfj 1=T, because the digital lter has

nite duration. However, the sidelobes in the spectrum are relatively small. Further reduction in the

sidelobes may be achieved by increasingN.

Also in Figure 10.8, we compare thejGTf j2andXr cf . Finally we repeat the rst three parts

usingN41. Figure 10.9 illustrates the impulse response of the transmitter ltergTnN1
2
forN41. The corresponding frequency response characteristics are shown in Figure 10.10. Note

that the sidelobes in the spectrum became smaller by increasingNfromN31 toN41. In

Figure 10.11, we compare thejGTf j2andXr cf and in Figure 10.12, we compare the frequency

response characteristics of the lter for dierent values ofN.

The MATLAB script is given next.

% MATLAB script for Computer Problem 10.3.


echoon
N=31;
T=1/1800;
alpha=1/4;
n=(N1)/2:(N1)/2;% the indices for gT
% The expression for gT is obtained next.
for i=1:length(n),
gT(i)=0;
form=(N1)/2:(N1)/2,10
gT(i)=gT(i)+sqrt(xrc(4*m/(N*T),alpha,T))*exp(j*2*pi*m*n(i)/N);
echoo;
end;
end;
echoon;
gT=real(gT) ;% The imaginary part is due to the nite machine precision
% Derive gT(n-(N-1)/2).

435
0.2

0.15

)
0.1
2
N1

(n
T
0.05
g

-0.05
051015202530

Figure 10.6: Impulse response of truncated discrete-time FIR lter at transmitter

n2=0:N1;
% Get the frequency response characteristics.
[GT,W]=freqz(gT,1);20
% normalized magnitude response
magGTindB=20*log10(abs(GT)/max(abs(GT)));
GT2indB=20*log10(abs(GT).*abs(GT)/max(abs(GT).*abs(GT)));

forl=1:length(W),
Xrc(l) =xrc(W(l)/(2*T),alpha,T);
end;
XrcindB= 20*log10(Xrc/T);

% impulse response of the cascade of the transmitter and the receiver lters30
gR=gT;
imprespofcascade=conv(gR,gT);
% Plotting commands follow.

Computer Problem 10.4

Figure 10.13 illustratesgTnN1,n0;1; :::; N1 forW1800 andN31. The corresponding


2

436
0

-10

-20

-30
2

(f )|
T
|G
-40

-50

-60

-70
00.050.10.150.20.250.30.350.40.450.5
f

Figure 10.7: Frequency response of truncated discrete-time FIR lter at transmitter

frequency response characteristic is shown in Figure 10.14. Finally in Figure 10.15, we show the

impulse response of the cascade of the transmitter and receiver FIR lters. This impulse response

may be compared with the ideal impulse response obtained by samplingxtat a rateFs4=T8W.

Note that the frequency response is no longer zero forjfj Wbecause the digital lter has nite

duration. However, the sidelobes in the spectrum are relatively small.

The MATLAB script is given next.

% MATLAB script for Computer Problem 10.4.


echoon
N=31;
W=1800;
T=1/(2*W);
n=(N1)/2:(N1)/2;% the indices for gT
% The expression for gT is obtained next.
for i=1:length(n),
gT(i)=0;
form=(N1)/2:(N1)/2,10
if(abs((4*m)/(N*T))<=W),
gT(i)=gT(i)+sqrt((1/W)*cos((2*pi*m)/(N*T*W)))*exp(j*2*pi*m*n(i)/N);
end;
echoo;

437
0

|G(f)|
(f)
rc
-20

-40

(f )|
rc
-60

-80
(f )|vs.|X
T
|G
-100

-120

-140
00.050.10.150.20.250.30.350.40.450.5

Figure 10.8:jGTf j2andXr cf

end;
end;
echoon;
gT=real(gT) ;% The imaginary part is due to the nite machine precision
% Obtain gT(n-(N-1)/2).
n2=0:N1;20
% Obtain the frequency response characteristics.
[GT,Wf]=freqz(gT,1);
% normalized magnitude response
magGTindB=20*log10(abs(GT)/max(abs(GT)));
GT2=abs(GT).*abs(GT);
GT2indB= 20*log10(GT2/max(GT2));
form=1:length(Wf),
f=4*W*m/length(Wf);
if(f<W)
X(m) = (1/W)*cos(pi*f/(2*W));30
else
X(m)=0;
end
end;
X=X/max(abs(X));
X= 20.*log10(abs(X));

438
0.3

0.25

0.2

0.15
),N=41
2
N1
0.1

(n
T
g
0.05

-0.05
0510152025303540

Figure 10.9: Impulse response of truncated discrete-time FIR lter at transmitterN41

439
0

-20

-40

-60
(f )|
T
|G

-80

-100

-120
00.050.10.150.20.250.30.350.40.450.5
f

Figure 10.10: Frequency response of truncated discrete-time FIR lter at transmitterN41

440
0

N=41

-50

-100

vs. Ideal lter


2
-150
(f )|
T
|G

-200

-250
00.050.10.150.20.250.30.350.40.450.5

Figure 10.11:jGTf j2andXr cf

441
0

N=31

-20

-40

-60

N=31 vs.N=41
2

(f )|
-80
T
|G

-100

-120
00.050.10.150.20.250.30.350.40.450.5
f

Figure 10.12:jGTf j2forN31 andN41

442
0.14

0.12

0.1

0.08
)
2
N1
0.06

(n
T
g
0.04

0.02

-0.02
051015202530

Figure 10.13: Impulse response of truncated discrete-time duobinary FIR lter at the transmitter

% impulse response of the cascade of the transmitter and the receiver lters
gR=gT;
imprespofcascade=conv(gR,gT);
% Plotting commands follow.40

Computer Problem 10.5

The MATLAB script for this question is given below.

% MATLAB script for Computer Problem 10.5


echoon
d= [1 0 0 1 0 1 1 1 0 1 1 0];
p(1)=0;
for i=1:length(d)
p(i+1)=rem(p(i)+d(i),2);
echoo;
end
echoon;
a=2.*p1;10
b(1)=0;

443
0

-10

-20

-30
2

(f )|
T
|G
-40

-50

-60

-70
00.050.10.150.20.250.30.350.40.450.5
f

Figure 10.14: Frequency response of truncated discrete-time duobinary FIR lter at the transmitter

444
0

N=31

-20

-40

-60

-80

forN=31 vs. Ideal lter


2

-100
(f )|
T
|G

-120

-140
00.050.10.150.20.250.30.350.40.450.5

Figure 10.15:jGTf jand idealXf

445
dd(1)=0;
for i=1:length(d)
b(i+1)=a(i+1)+a(i);
dout(i+1)=rem(b(i+1)/2+1,2);
echoo;
end
echoon;
dout=dout(2:length(d)+1);

Computer Problem 10.6

Figure 10.16 illustrates the error probability of the receiver for dierent values of20:1,20:5

and21. Inter Symbol Interference (ISI) causes degradation in the performance of the system.
0
10

with ISI

-1
10

-2
b
10
P

-3
10

-4
10
012345678910
10log12

Figure 10.16: Bit Error Probability of duobinary system using binary PAM with and without ISI

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 10.6


echoon
L=100000;

446
N=100;
noisevar=0.1;
sigma=sqrt(noisevar);% standard deviation of the noise
errors= 0;

form=1:L,
d=zeros(1,N);10
d(nd(rand(1,N)<0.5 ) )=1;
p(1)=0;
for i=1:length(d)
p(i+1)=rem(p(i)+d(i),2);
echoo;
end
echoon;
a=2.*p1;

for i=1:N,20
noise(i)=gngauss(0,sigma);% channel noise
echoo;
end;

b(1)=0;
dd(1)=0;

for i=1:length(d)
b(i+1)=a(i+1) +a(i) +noise(i);
if(b(i+1)<1)30
brec(i+1)=2;
elseif(b(i+1)<1)
brec(i+1)=0;
else
brec(i+1)=2;
end;
dout(i+1) =rem(brec(i+1)/2+1,2);
echoo;
end
40
echoon;
dout=dout(2:length(d)+1);
errors=errors+sum(abs(doutd));
end

[errors,errors/(N*L) ]

Computer Problem 10.7

The equation
2
XnT
qmTcnxmT
n22

447
1

0.9

0.8

0.7

0.6

x
0.5

0.4

0.3

0.2

0.1

0
0510152025
n
(b)
Figure 10.17: Original pulse

may be expressed in matrix form asXcq, whereXis a2K12K1matrix with elements

xmTn,cis the2K1coecient vector, andqis the2K1column vector with one nonzero

element. Thus, we obtain a set of 2K1 linear equations for the coecients of the zero-forcing

equalizer using following equation

coptX1q

Figure 10.17 illustrates the original pulsext. Figures 10.18, 10.19, and 10.20 present the

equalized pulse forK2,K4, andK6, respectively. We should emphasize that the FIR

zero-forcing equalizer does not completely eliminate ISI for K = 2. However, asKis increased, the

residual ISI is reduced.

The MATLAB scripts for this problem are given next.

% MATLAB script for Computer Problem 10.7


T= 1;
Fs=2/T;
Ts=1/Fs;
t=5*T:T/2:5*T;
x=1./(1+((2/T)*t).^2);% sampled pulse
stem(x);
forK= 2:2:6
X=zeros(2*K+1, 2*K+1);
m=K;10
448
1.2

0.8

0.6

0.4

0.2

-0.2
02468101214
n
(b)
Figure 10.18: Equalized pulse forK2

449
1.4

1.2

0.8

0.6

0.4

0.2

0
02468101214
n
(b)
Figure 10.19: Equalized pulse forK4

450
1.2

0.8

0.6

0.4

0.2

-0.2
02468101214
n
(b)
Figure 10.20: Equalized pulse forK6

for i=1:2*K+1
n=K;
for j= 1:2*K+1
X(i,j) = 1/(1+(2*(m*Tn*(T/2))/T)^2);
n=n+1;
end
m=m+1;
end
q=zeros(1, 2*K+1);
q(K+1)=1;20
copt=inv(X) *q
equalizedx=lter(copt,1,[xzeros(1,K)]);% since there will be a delay of two samples at the output
% to take care of the delay
equalizedx=equalizedx(K+1:length(equalizedx));
% Now, let us downsample the equalizer output.
for i=1:2:length(equalizedx),
downsampledequalizeroutput((i+1)/2)=equalizedx(i);
end;
gure;
stem(downsampledequalizeroutput);30
end

451
Computer Problem 10.8

The error in MSE equalizer is dened as dierence betweenamand the equalized symbolzmT .

The mean square error (MSE) between the actual output symbolzmT and the desired valuesamis

MSEEjzmT amj2(10.32)
K

X2
EcnymTn(10.33)
nK
KKK
XXX

cnckRynk2ckRaykEjamj2(10.34)
nKKkK

where the correlations are dened as

RynkEymTnymTk(10.35)

RaykEymTka(10.36)
m

and the expectation is taken with respect to the random information sequencefamgand the additive

noise.

The MSE solution is obtained by dierentiating with respect to the equalizer coecientsfcng.

Thus we obtain the necessary conditions for minimum MSE as

K
X
cnRynkRayk; ; k0;1;2; :::;K(10.37)
nK

or

RycRay

coptR1Ray
y

First we construct the matrixRyand vectorRay, then we determine the lter coecient using

coptR1Ray. For K=2, the matrixRywith elementsRynkis simply


y

RyXtXN0I
2

whereXis given in previous problem andIis identity matrix. The vector with elementsRaykis

given as
23
1
5
67
617
67
627
67
Ray66177
67
617
627
45
1
5

452
The equalizer coecients obtained by inverting the matrixRyand the results are as follows
23
0:0956
67
67
60:73477
67
67
coptX1q661:676177
67
607
6:73477
45
0:0956

Figure 10.21 presents the equalized pulse. Note the small amount of residual ISI in the equalized

pulse. Using a MSE linear equalizer with higher number of taps, a better equalization can be achieved.

Figures 10.22 and 10.23 illustrates the equalized pulse for linear lters withK4 andK6. Note

that there is no or little residual ISI in the equalized pulse.

1.2

0.8

0.6

0.4

x(nT )withK=2

0.2

-0.2
-4-3-2-101234

Figure 10.21: Graph of equalized signal by MSE linear equalizerK2

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 10.8.


echoon
T=1;
K=6;
N0=0.01;% assuming that N0=0.01
% XX and Ry

453
1.2

0.8

0.6

0.4

x(nT )withK=4

0.2

-0.2
-5-4-3-2-1012345

Figure 10.22: Graph of equalized signal by MSE linear equalizerK4

forn=K:K,
fork=K:K,
temp=0;
for i=K:K,temp=temp+(1/(1+(ni)^2))*(1/(1+(ki)^2));end;10
XX(k+K+1,n+K+1)=temp;
echoo;
end;
end;
echoon;
Ry=XX+(N0/2)*eye(2*K+1);
% Riy
t=K:K;
Riy= (1 ./ (1+(t./T).^2)).;
20
copt=inv(Ry)*Riy;% optimal tap coecients
% nd the equalized pulse. . .
t=3:1/2:3;
x=1./(1+(2*t/T).^2);% sampled pulse
equalizedpulse=conv(x,copt);
% Decimate the pulse to get the samples at the symbol rate.
decimatedequalizedpulse=equalizedpulse(1:2:length(equalizedpulse));
% Plotting command follows.

454
1.2

0.8

0.6

0.4

x(nT )withK=6

0.2

-0.2
-6-4-20246

Figure 10.23: Graph of equalized signal by MSE linear equalizerK6

Computer Problem 10.9

The bit error probability of the adaptive equalizer for various values of2versus AWGN channel

without ISI is shown is Figure 10.24.

The MATLAB script for this question is given next.

% MATLAB script for Computer Problem 10.9


T= 1;
Fs=2/T;
Ts=1/Fs;
t=5*T:T/2:5*T;
x=1./(1+((2/T)*t).^2);% sampled pulse
stem(x);
forK= 2:2:6
X=zeros(2*K+1, 2*K+1);
m=K;10
for i=1:2*K+1
n=K;

455
0
10

-1
10

-2
b
10
P

-3
10

Adaptive LMS equalizer

-4
10
0246810121416
10log12

Figure 10.24: Symbol error probability of LMS adaptive equalizer for20:01,20:1 and21

for j= 1:2*K+1
X(i,j) = 1/(1+(2*(m*Tn*(T/2))/T)^2);
n=n+1;
end
m=m+1;
end
q=zeros(1, 2*K+1);
q(K+1)=1;20
copt=inv(X) *q
equalizedx=lter(copt,1,[xzeros(1,K)]);% since there will be a delay of two samples at the output
% to take care of the delay
equalizedx=equalizedx(K+1:length(equalizedx));
% Now, let us downsample the equalizer output.
for i=1:2:length(equalizedx),
downsampledequalizeroutput((i+1)/2)=equalizedx(i);
end;
gure;
stem(downsampledequalizeroutput);30
end

456
Chapter 11

Problem 11.1

The analog signal is


N1
X
xt1pXkej2 kt=T;0t < T
N
k0

The subcarrier frequencies are:Fkk=T ; k0;1; : : : ;N, and, hence, the maximum frequency in the

analog signal is:N=T. If we sample at the Nyquist rate: 2N=TN=T, we obtain the discrete-time

sequence:

N1N1
X1X
xnxtnT =N1pXkej2 knT =N=TpXkej2 kn=N; n0;10; : : : ; N1
NN
k0k0

which is simply the IDFT of the information sequencefXkg.

To show thatxtis a real-valued signal, we make use of the condition:XNX, for


k
k
k1:2: : : : ;N1. By combining the pairs of complex conjugate terms, we obtain fork1;2; : : : ;N1

Xkej2 kt=TXej2 kt=T2jXkjcos2 ktk


k
T

whereXk jXkjejk. We also note thatX0andXare real. Hence,xtis a real-valued signal.


N

Problem 11.2

The lter with system functionHnzhas the impulse responsehkej2 nk=N; k0;1; : : : :If we

pass the sequencefXk; k0;1; : : : ; N1gthrough such a lter, we obtain the sequenceynm,

given as

m
X
ynmXkhmk; m0;1; : : :
k0
m
X
Xkej2 nmk=N
k0

PNPN
AtmN, whereynNXkej2 nk=N1Xkej2 nk=N, sinceXN0. Therefore, the
k0k0
IDFT offXkgcan be computed by passingfXkgthrough theNltersHnzand sampling their

outputs atmN.

457
Problem 11.3

IfTis the time duration of the symbols on each subcarrier andTcis the ime duration of the channel

impulse response, then the cyclic prex (or time-guard interval) must spanTcseconds. Equivalently,

ifNis the number of signal samples in the time intervalTandmis the number of samples in the

cyclic prex, then:

(a) The channel bandwidth is expanded by the precentage 100m=N% or 100Tc=T%.

(b) The transmitted signal energy is expanded by the same percentage.

Problem 11.4

The DFT ofxnis


N1
X
Xkej2 nk=N;0kN1
n0

Dene
8
<x
n;for 0nN1
yn
:0
;forNnNL1

The DFT ofynis

NL1
X
X0kynej2 nk=NL;0kNL1
n0

PNPNPN
Then,X01xnandX00L1yn1xnX0
n0n0n0
To determine the relationship betweenXkandX0k, we begin by computing the Fourier

transform ofxn,
N1
X
Xfxnej2 f n
n0

The DFTfXkgis simply the sampled version ofXf at the frequenciesfkk=N, 0kN1.

The DFTfX0kgis the sampled version ofXf at the frequenciesfkk=NL, 0kNL1.

In general,Xk6X0k, except fork0. Note that ifLis selected asLN, thenXkX02k,

0kN1.
Computer Problems

458
Computer Problem 11.1
p
From Equation (11.2.1) we haveU62=T X6. Since the channel is noise free,R6C6U6.Y6is

obtained by demodulation through correlating with signals given in Equation (11.2.4) and then

sampling at timeT. Since 1tand 2thave the channel phase in them, the correlation and
pj
sampling process is equivalent to multiplyingR6byT =2e\C6. Therefore,
pjpj
Y6R6T =2e\C6T =2e\C6C6U6ej\C6C6X6 jC6jX6

from which we have


Y6
X6
jC6j

for this problemX63jandC61j, andT50. Hence,U613jandR6113j.


2510
From this we haveY6 5jR613jand sincejC6j 1, we haveY6=jC6j 3jwhich is clearly
22
equal toX6.

Computer Problem 11.2

HereK10 andN20. The plot is shown below and the MATLAB script for this problem is given

next.

0
020406080100

echo on
K=10;N=2*K;T=100;
a=rand(1,36);
a=sign(a0.5);
b=reshape(a,9,4);
% Generate the 16QAM points
XXX=2*b(:,1)+b(:,2)+j*(2*b(:,3)+b(:,4));
XX=XXX;
X=[0XX0conj(XX(9:1:1))];

459
xt=zeros(1,101);10
for t=0:100
for k=0:N1
xt(1,t+1)=xt(1,t+1)+1/sqrt(N)*X(k+1)*exp(j*2*pi*k*t/T);
echo o
end
end
echo on
xn=zeros(1,N);
for n=0:N1
for k=0:N120
xn(n+1)=xn(n+1)+1/sqrt(N)*X(k+1)*exp(j*2*pi*n*k/N);
echo o
end
end
echo on
pause% press any key to see a plot of x(t)
plot([0:100],abs(xt))
% Check the dierence between xn and samples of x(t)
for n=0:N1
d(n+1)=xt(T/N*n+1)xn(1+n);30
echo o
end
echo on
e=norm(d);
Y=zeros(1,10);
for k=1:9
for n=0:N1
Y(1,k+1)=Y(1,k+1)+1/sqrt(N)*xn(n+1)*exp(j*2*pi*k*n/N);
echo o
end40
end
echo on
dd=Y(1:10)X(1:10);
ee=norm(dd);

Computer Problem 11.3

The solution is similar to the solution of Computer Problem 11.2.

Computer Problem 11.4

HereN2K32 andXks are selected from a QPSK constellation, i.e.,1j. Let us assume we

have selected the following values forXk, 0k15,f1j;1j;1j;1j;1j;1j;1

j;1j;1j;1j;1j;1j;1j;1j;1j;1jg. Note that here we have not assumed

thatX00. Using Equation (11.3.5) we computexnvalues using the following Matlab code

460
X=[1+j,-1+j,-1-j,1-j,1+j,1+j,-1-j,1-j,1-j,1+j,-1+j,-1-j,1-j,1-j,1+j,-1+j];

Xp=[real(X(1)),X(2:16),conj(X(16:-1:2)),imag(X(1))];

x(1:32)=0;

for n=1:32

for k=1:32

x(n)=x(n)+1/sqrt(32)Xp(k)exp(2pi(k-1)(n-1)j/32);
******
end

end

and then computeXf and plot its magnitude using the following Matlab code

f=[0:0.005:pi];

Xf=zeros(size(f));

for m=1:32

Xf=Xf+x(m)exp(-j2pi(m-1)f);
*****
end

plot(f,abs(Xf))

The plot is shown below

14

12

10

8
j

f
jX
6

f
0
0:511:522:533:5
461
Computer Problem 11.5

In this problemK10 andN20. The signal values from theN-point DFT arex0; x1; : : : ; x19. To

this sequence, we append the valuesx16; x17; x18;andx19at the front end, prior tox0. Thus, the

transmitted signal sequence at the input of the D/A converter is

x16; x17; x18; x19; x0; x1; : : : ; x19

The modication to the MATLAB script is given below.

echo on
K=10;N=2*K;T=100;m=4;
a=rand(1,36);
a=sign(a0.5);
b=reshape(a,9,4);
% Generate the 16QAM points
XXX=2*b(:,1)+b(:,2)+1i*(2*b(:,3)+b(:,4));
XX=XXX;
X=[0XX0conj(XX(9:1:1))];10
xt=zeros(1,101);
for t=0:100
for k=0:N1
xt(1,t+1)=xt(1,t+1)+1/sqrt(N)*X(k+1)*exp(1i*2*pi*k*t/T);
echo o
end
end
echo on
xn=zeros(1,N+m);
for n=0:N120
for k=0:N1
xn(n+m+1)=xn(n+1)+1/sqrt(N)*X(k+1)*exp(1i*2*pi*n*k/N);
echo o
end
end
xn(1:m)=xn(Nm+1:N);
echo on
pause% press any key to see a plot of x(t)
plot([0:100],abs(xt))
% Check the dierence between xn and samples of x(t)30
for n=0:N1
d(n+1)=xt(T/N*n+1)xn(1+n+m);
echo o
end
echo on
e=norm(d);
Y=zeros(1,10);
for k=1:9
for n=0:N1
Y(1,k+1)=Y(1,k+1)+1/sqrt(N)*xn(n+m+1)*exp(1i*2*pi*k*n/N);40
echo o
end
end
echo on

462
dd=Y(1:10)X(1:10);
ee=norm(dd);

Computer Problem 11.6


p
The Fourier transform ofxkt2=Tcos2 fktfor 0tTmay be expressed as the convolution

ofGf withV f where

V f 1ffkffk$cos 2 fkt
2
p
Gf2T ej f T =2sincf T

Hence,
s

jUkf jTsincffkTsincffkT
2

The plot ofjUkf jis shown below. Note the large spectral overlap of the main lobes of each

jUkf j. Also note that the rst sidelobe in the spectrum is only 13 dB down from the main lobe.

Therefore, there is a signicant amount of spectral overlap among the signals transmitted on dierent

subcarriers. Nevertheless, these signals are orthogonal when transmitted synchronously in time.
20

-20

-40

-60

-80
(f)| (dB)
k
|U
-100

-120

-140

-160

-180
00.511.522.533.54
f

The MATLAB script for the problem is given below.

T= 1;
k= 0 : 5;
fk=k/T;
f=4/T: 0.01*4/T: 4/T;
Ukabs=zeros(length(k),length(f));
for i= 1 :length(k)
Ukabs(i,:) =abs(sqrt(T/2)*(sinc((ffk(i))*T) +sinc((f+fk(i))*T)));
end

463
plot(f,Ukabs(1,:),.-,f,Ukabs(2,:),--,f,Ukabs(3,:),c-,f,Ukabs(4,:),.,f,Ukabs(5,:),f,Ukabs(6,:))10
xlabel(f)
ylabel(|U_k(f)|)

Computer Problem 11.7

The average power of the samplefxngis

1199X2
Pavx
200n
n0

and the peak power is

Ppeakmaxfx2g
nn

Hence, the PARPpeak=Pav. The plot of the PAR is shown here.


12

10

6
PAR

0
2468101214161820
Realization

The MATLAB script for the problem is given below.

T= 1;
Fs= 200;
t= 0 : 1/(Fs*T) :T1/(Fs*T);
K= 32;
k= 1 :K1;
rlz= 20;% No. of realizations
PAR=zeros(1,rlz);% Initialization for speed
for j= 1 :rlz
theta=pi*oor(rand(1,length(k))/0.25)/2;10
x=zeros(1,Fs);% Initialization for speed
echo o;
for i= 1 :Fs

464
for l= 1 :K1
x(i) =x(i) +cos(2*pi*l*t(i)/T+theta(l));
end
end
echo on;
% Calculation of the PAR:
Ppeak=max(x.^2);20
Pav=sum(x.^2)/Fs;
PAR(j) =Ppeak/Pav;
end
% Plotting the results:
stem(PAR)
axis([1 20min(PAR)max(PAR)])
xlabel(Realization)
ylabel(PAR)

Computer Problem 11.8

Solution is similar to Computer Problem 11.7.

Computer Problem 11.9

The plot of the signal distortionDis shown below

20

18

16

14

12

10

8
Distortion (D)

0
2468101214161820
Realization

The MATLAB script for the problem is given below.

T= 1;
Fs= 200;

465
t= 0 : 1/(Fs*T) :T1/(Fs*T);
K= 32;
k= 1 :K1;
rlz= 20;% No. of realizations
% Initialization for speed:
PAR=zeros(1,rlz);
PARdB=zeros(1,rlz);10
D=zeros(1,rlz);
echo o;
for j= 1 :rlz
theta=pi*oor(rand(1,length(k))/0.25)/2;
x=zeros(1,Fs);% Initialization for speed
for i= 1 :Fs
for l= 1 :K1
x(i) =x(i) +cos(2*pi*l*t(i)/T+theta(l));
end
end20
xh=x;
% Calculation of the PAR:
[Ppeak idx] =max(x.^2);
Pav=sum(x.^2)/Fs;
PAR(j) =Ppeak/Pav;
PARdB(j) = 10*log10(PAR(j));
% Clipping the peak:
if Ppeak/Pav>1.9953
while Ppeak/Pav>1.9953
xh(idx) =sqrt(10^0.3*Pav);30
[Ppeak idx] =max(xh.^2);
Pav=sum(xh.^2)/Fs;
PARdB(j) = 10*log10(Ppeak/Pav);
end
end
D(j) =sum((xxh).^2)/Fs;% Distortion
end
echo on;
% Plotting the results:
stem(D)40
axis([1 20min(D)max(D)])
xlabel(Realization)
ylabel(Distortion (D))

Computer Problem 11.10

This is similar to Computer Problem 11.9.

Computer Problem 11.11

The plot of the PAR is shown below.

466
9

8.5

7.5

7
PAR

6.5

5.5

5
5101520
Realization
The MATLAB script for the problem is given below.

T= 1;
Fs= 200;
t= 0 : 1/(Fs*T) :T1/(Fs*T);
K= 32;
k= 1 :K1;
rlz= 20;% No. of realizations
PAR=zeros(1,rlz);% Initialization for speed
echo o;
for j= 1 :rlz10
theta=pi*oor(rand(1,length(k))/0.25)/2;
phi= 2*pi*rand(4,length(k));
PARphi=zeros(1,size(phi,1));% Initialization for speed
for m= 1 :size(phi,1)
x=zeros(1,Fs);% Initialization for speed
for i= 1 :Fs
for l= 1 :K1
x(i) =x(i) +cos(2*pi*l*t(i)/T+theta(l)+phi(m,l));
end
end20
% Calculation of the PAR:
Ppeak=max(x.^2);
Pav=sum(x.^2)/Fs;
PARphi(m) =Ppeak/Pav;
end
[PAR(j)idxtheta]=min(PARphi);
end
echo on;
467
% Plotting the results:
stem(PAR)30
axis([1 20min(PAR)max(PAR)])
xlabel(Realization)
ylabel(PAR)

Computer Problem 11.12

This is similar to Computer Problem 11.11.

468
Chapter 12

Problem 12.1

6
X
HXpilogpi 0:1 log0:10:2 log0:2
222
i1
0:3 log0:30:05 log0:050:15 log0:150:2 log0:2
2222

2:4087 bits/symbol

If the source symbols are equiprobable, thenpi1and


6

6
X1
HuXpilogpi loglog62:5850 bits/symbol
222
i16

As it is observed the entropy of the source is less than that of a uniformly distributed source.

Problem 12.2

If the source is uniformly distributed with sizeN, thenpi1fori1; : : : ; N. Hence,


N

NN
XX1
HXpilogpilog1
22
i1i1NN
11

N
NNlog2Nlog2

Problem 12.3

XX1
HXpilogpipilog
iipi

By denition the probabilitiespisatisfy 0< pi1 so that11 andlog10. It turns out that
pipi
each term under summation is positive and thusHX0. IfXis deterministic, thenpk1 for

somekandpi0 for allik. Hence,

X
HXpilogpi pklog 1 pk00
i

Note thatlimx!xlogx0 so if we allow source symbols with probability zero, they contribute
0
nothing in the entropy.

469
Problem 12.4

1)

1
X
HXp1pk1logp1pk1
2
k1
11
XX
plogp1pk1plog1pk11pk1
22
k1k1

plogp1plog1p1p
22
11p11p2

logp1plog1p
22
p

2)ClearlypXkjX > K0 forkK. Ifk > K, then

k1
pXkjX > KpXk; X > Kp1p
pX > KpX > K

But,

01
11K
XXX
pX > Kp1pk1p@1pk11pk1A
kK1k1k1
!
K
p111p1pK
11p11p

so that
k1
pXkjX > Kp1p
1pK

If we letkKlwithl1;2; : : :, then

Kl1
pXkjX > Kp1p1pp1pl1
1pK

that ispXkjX > Kis the geometrically distributed. Hence, using the results of the rst part we

obtain

1
X
HXjX > Kp1pl1logp1pl1
2
l1
logp1plog1p
22
p

470
Problem 12.5

HX; Y HX; gXHXHgXjX

HgXHXjgX

But,HgXjX0, sincegis deterministic. Therefore,

HXHgXHXjgX

Since each term in the previous equation is non-negative we obtain

HXHgX

Equality holds whenHXjgX0. This means that the valuesgXuniquely determineX, or that

gis a one to one mapping.

Problem 12.6

The entropy of the source is

6
X
HXpilogpi2:4087 bits/symbol
2
i1

The sampling rate is

fs20002600014000 Hz

This means that 14000 samples are taken per each second. Hence, the entropy of the source in bits

per second is given by

HX2:408714000bits/symbolsymbols/sec33721:8 bits/second

Problem 12.7

Consider the functionf xx1lnx. Forx >1,

df x1
dx1x>0

Thus, the function is monotonically increasing. Since,f 10, the latter implies that ifx >1 then,

f x > f 10 or lnx < x1. If 0< x <1, then

df x1
dx1x<0

which means that the function is monotonically decreasing. Hence, forx <1,f x > f 10 or
lnx < x1. Therefore, for everyx >0,

lnxx1

471
with equality ifx0. Applying the inequality withx1=N, we obtain
pi

1=N
ln1lnpi1
Npi

Multiplying the previous bypiand adding, we obtain

NNN
X1XX1
pilnpilnpipi0
i1Ni1i1N

Hence,
NN
X1X
HXpilnlnNpilnN
i1Ni1

But,lnNis the entropy (in nats/symbol) of the source when it is uniformly distributed (see Problem

12.2). Hence, for equiprobable symbols the entropy of the source achieves its maximum.

Problem 12.8

Suppose thatqiis a distribution over 1;2;3; : : :and that

1
X
iqim
i1

i1
Letvi111and apply the inequality lnxx1 (see Problem 12.7) tovi. Then,
qimm
"i#i
11
11
ln111lnqi11
mmqimm

Multiplying the previous byqiand adding, we obtain

1"i1#111
X1XX1X
qiln11qilnqi11i1qi0
i1mmi1i1mmi1

But,

1"i1#1
X1X1
qiln11qilni1ln11
i1mmi1mm
1
X
ln1ln11i1qi
mm
i1
23
11
XX
ln1ln114iqiqi5
mm
i1i1

ln1ln11m1 Hp
mm

whereHpis the entropy of the geometric distribution (see Problem 12.4). Hence,

1
X
Hpqilnqi0=)HqHp
i1

472
Problem 12.9

1)

HX :05 log:05:1 log:1:1 log:1:15 log:15


2222

:05 log:05:25 log:25:3 log:32:5282


222

2)After quantization, the new alphabet isB f4;0;4gand the corresponding symbol probabilities

are given by

p4p5p3:05:1:15

p0p1p0p1:1:15:05:3

p4p3p5:25:3:55

Hence,HQX1:4060. As it is observed quantization decreases the entropy of the source.

Problem 12.10

Using the rst denition of the entropy rate, we have

HlimHXnjX1; : : : Xn1
n!1
limHX1; X2; : : : ; XnHX1; X2; : : : ; Xn1
n!1

However,X1,X2,: : : Xnare independent, so that


01
nn1
XX
Hlim@HXiHXiAlimHXnHX
n!1n!1
i1i1

where the last equality follows from the fact thatX1; : : : ; Xnare identically distributed.

Using the second denition of the entropy rate, we obtain

Hlim1HX1; X2; : : : ; Xn
n!1
n
n
X
lim1HXi
n!1
n
i1

lim1nHXHX
n!1
n

The second line of the previous relation follows from the independence ofX1,X2,: : : Xn, whereas
the third line from the fact that for a DMS the random variablesX1; : : : Xnare identically distributed

independent ofn.

473
Problem 12.11

HlimHXnjX1; : : : ; Xn1
n!1
23
X
lim4px1; : : : ; xnlogpxnjx1; : : : ; xn15
n!12
x1;:::;xn
23
X
lim4px1; : : : ; xnlogpxnjxn15
n!12
x1;:::;xn
23
X
lim4pxn; xn1logpxnjxn15
n!12
xn;xn1

limHXnjXn1
n!1

However, for a stationary processpxn; xn1andpxnjxn1are independent ofn, so that

HlimHXnjXn1HXnjXn1
n!1

Problem 12.12

XX
HXjYpx; ylogpxjypxjypylogpxjy
x;yx;y
!
XXX
pypxjylogpxjypyHXjYy
yxy

Problem 12.13
P
1)The marginal distributionpxis given bypxpx; y. Hence,
y
X XX
HXpxlogpxpx; ylogpx
xxy
X
px; ylogpx
x;y
P
Similarly it is proved thatHYpx; ylogpy.
x;y
2)Using the inequality lnww1 (see Problem 12.7) withwpxpy, we obtain
px;y

lnpxpypxpy1
px; ypx; y

Multiplying the previous bypx; yand adding overx,y, we obtain


XXXX
px; ylnpxpypx; ylnpx; ypxpypx; y0
x;yx;yx;yx;y

474
Hence,
XX
HX; Ypx; ylnpxpypx; ylnpxlnpy
x;yx;y
XX

px; ylnpxpx; ylnpyHXHY


x;yx;y

Equality holds whenpxpy1, i.e whenX,Yare independent.


px;y

Problem 12.14

HX; Y HXHYjXHY HXjY

Also, from Problem 12.15,HX; Y HXHY . Combining the two relations, we obtain

HY HXjY HXHY =)HXjY HX

Suppose now that the previous relation holds with equality. Then,

X XXp
pxlogpxjypxlogpx)pxlogx0
xxxpxjy

However,pxis always greater or equal topxjy, so thatlogpx=pxjyis non-negative. Since

px >0, the above equality holds if and only iflogpx=pxjy0 or equivalently if and only if

px=pxjy1. This implies thatpxjypxmeaning thatXandYare independent.

Problem 12.15

Letpixibe the marginal distribution of the random variableXi. Then,


23
nn
XXX
HXi4pixilogpixi5
i1i1xi
01
n
XX XY
px1; x2; ; xnlog@pixiA
x1x2xn
i1

Therefore,

n
X
HXiHX1; X2; Xn
i1
!
XX Xp
; x2; ; xn
px1; x2; ; xnlogx1Qn
x1x2xni1pixi
Qn!
XX Xi
pixi
px1; x2; ; xn11
x1x2xnpx1; x2; ; xn
XX XXX X
px1; x2; ; xnp1x1p2x2 pnxn

x1x2xnx1x2xn
110

475
where we have used the inequalitylnx11. This inequality is obtained by substitutingy1=x
x
into lnyy1 (see Problem 12.7). Hence,

n
X
HX1; X2; XnHXi
i1
Qn
with equality ifpixipx1; ; xn, i.e. a memoryless source.
i1

Problem 12.16

1)The probability of an all zero sequence is

n
pX10; X20; ; Xn0pX10pX20 pXn01
2

2)Similarly with the previous case

n
pX11; X21; ; Xn1pX11pX21 pXn11
2

3)

pX11; ; Xk1; Xk0; Xn0


1

pX11 pXk1pXk0 pXn0


1

1k1nk1n

222

4)The number of zeros or ones follows the binomial distribution. Hence


0101
n1knkn1n
1BC
C
pkonesB@A@A
k22k2

5)In case thatpXi1p, the answers of the previous questions change as follows

pX10; X20; ; Xn01pn

pX11; X21; ; Xn1pn

prstkones;nextnkzerospk1pnk
01
n
Ck
pkonesB@Ap1pnk
k

476
Problem 12.17

From the discussion in the beginning of Section 12.2 it follows that the total number of sequences

of lengthnof a binary DMS source producing the symbols 0 and 1 with probabilitypand 1p

respectively is 2nHp. Thus ifp0:3, we will observe sequences havingnp3000 zeros and

n1p7000 ones. Therefore,

# sequences with 3000 zeros28813

Another approach to the problem is via the Stirlings approximation. In general the number of binary

sequences of lengthnwithkzeros andnkones is the binomial coecient

01
nn!
BC
@A
kk!nk!

To get an estimate whennandkare large numbers we can use Stirlings approximation

pnn
n!2 n
e

Hence,

# sequences with 3000 zeros10000!1p1010000


3000!7000!2123070

Problem 12.18

1)The total number of typical sequences is approximately 2 nHXwheren1000 and

X
HXpilogpi1:4855
2
i

Hence,

# typical sequences21485:5

2)The number of all sequences of lengthnisNn, whereNis the size of the source alphabet. Hence,

# typical sequences2nHX
1:1451030
# non-typical sequencesNn2nHX

3)The typical sequences are almost equiprobable. Thus,

pXx;xtypical2nHX21485:5
4)Since the number of the total sequences is 2nHXthe number of bits required to represent these

sequences isnHX1486.

477
5)The most probable sequence is the one with alla3s that isfa3; a3; : : : ; a3g. The probability of this

sequence is

n1000
pfa3; a3; : : : ; a3g11
22

6)The most probable sequence of the previous question is not a typical sequence. In general in a

typical sequence, symbola1is repeated 1000pa1200 times, symbola2is repeated approximately

1000pa2300 times and symbola3is repeated almost 1000pa3500 times.

Problem 12.19

1)The entropy of the source is

4
X
HXpailogpai1:8464 bits/output
2
i1

2)The average codeword length is lower bounded by the entropy of the source for error free

reconstruction. Hence, the minimum possible average codeword length isHX1:8464.

3)The following gure depicts the Human coding scheme of the source. The average codeword

length is
RX3:2:12:3:41:9

00.4

10.3
0
.6
11001.2

1.3
1111.1

4)For the second extension of the source the alphabet of the source becomesA2 fa1; a1; a1; a2; : : : a4; a4g

and the probability of each pair is the product of the probabilities of each component, i.e.pa1; a2

:2. A Human code for this source is depicted in the next gure. The average codeword length in

bits per pair of source output is

RX3:494:325:166:033:7300
2

The average codeword length in bits per each source output isR1XR2X=21:865.
5)Human coding of the original source requires 1.9 bits per source output letter whereas Human

coding of the second extension of the source requires 1.865 bits per source output letter and thus it

is more ecient.

478
; a4.16
0000a4

0010a4; a3.12
0
; a4.12
0100a3

0110a3; a3.09
0

00010a4; a2.08

1
; a4.08
110011a2

; a2.06
00110a3
0
; a3.06
01010a2

11
1110a4; a1.04
01

01110a2; a2.04

1
01111a1; a4.04
1

; a1.03
110110a3

1
10111a1; a3.03

011110a2; a1.02

01111110a1; a2.02
1
1111111a1; a1.01

Problem 12.20

The following gure shows the design of the Human code. Note that at each step of the algorithm

the branches with the lowest probabilities (that merge together) are those at the bottom of the tree.
479
01
02

101
04
1
..
1
..

..
0

11...101
02n2
111...1011
02n1
111...1111
12n1
The entropy of the source is

n1
X1
1
HXlog2ilog2n1
i2n12
i122
n1
X1
1

iilog22n1n1log22
i122
n1
Xi
n1

in1
i122

In the way that the code is constructed, the rst codeword (0) has length one, the second codeword

(10) has length two and so on until the last two codewords (111...10, 111...11) which have length

n1. Thus, the average codeword length is

n1
in1
RXpxlxX
1
x2Xi12i2n

211=2n1HX
Problem 12.21

The following gure shows the position of the codewords (black lled circles) in a binary tree.

Although the prex condition is not violated the code is not optimum in the sense that it uses

more bits that is necessary. For example the upper two codewords in the tree (0001, 0011) can be

substituted by the codewords (000, 001) (un-lled circles) reducing in this way the average codeword

length. Similarly codewords 1111 and 1110 can be substituted by codewords 111 and 110.

480
0
6
?
1

Problem 12.22

The following gure depicts the design of a ternary Human code.

00.22

100.18

1111.50.17

122.15

200.13

2112.28.1

222.05

The average codeword length is

RXXpxlx:222:18:17:15:13:10:05
x
1:78ternary symbols/output

For a fair comparison of the average codeword length with the entropy of the source, we compute

the latter with logarithms in base 3. Hence,

X
HXpxlogpx1:7047
3
x

As it is expectedHXRX.

481
Problem 12.23

IfDis the size of the code alphabet, then the Human coding scheme takesDsource outputs and it

merges them to 1 symbol. Hence, we have a decrease of output symbols byD1. InKsteps of the

algorithm the decrease of the source outputs isKD1. If the number of the source outputs is

KD1D, for someK, then we are in a good position since we will be left withDsymbols for

which we assign the symbols 0;1; : : : ; D1. To meet the above condition with a ternary code the

number of the source outputs should be 2K3. In our case that the number of source outputs is six

we can add a dummy symbol with zero probability so that 7223. The following gure shows

the design of the ternary Human code.

.40
0
.171
1
.1520
0
.1321
1
.122002
.052211
2
.02202

Problem 12.24

1. Designing Human code

3 0.4 00 0.4

-3 0
1
00.35

0 101
1
0.6

-1 1
0 10.25

0.13

1 10

10.05

2
1

results in

R0:4130:20:150:1240:0850:030:022:38

P7
2.HXpilogpi2:327 bits andHX0:977
i12
R

482
3. We have
8
>>>P
X 20:20:080:28
<
P X00:120:150:030:3
>>>
:P
X20:020:40:42

andHX 0:28 log0:280:3 log0:30:42 log0:421:56 bits.


222

4. There are a total of 310000sequences of which roughly 2 10000HX215600are typical.

5.In general for the second extension we haveHXR < HX1and therefore 2:327
2
R <2:827. But in this case since the second extension will not perform worse than the rst

extension, the upper bound is theRwe derived in part 1. Therefore, the tightest bounds are

2:327R2:38.

Problem 12.25

1.

0
0
x3;1
2

010
x6;1
4

10110
x2;11
82

x4;11101110
16
4

x1;111011110
328

1111111
x5;1
3216
1

The average codeword length isR1213141521115.


248163216

2. We rst nd the entropy of the source


HX 1log11log11log11log12log1115
222424828162163223216

Since the average codeword length is already equal to the entropy no improvement is possible

3.No, in general entropy is the lower limit for the average codeword length and no improvement

for lossless coding is possible.

483
Problem 12.26

1.

HX 0:1 log0:10:2 log0:20:05 log0:050:3 log0:30:35 log0:352:064 bits=symbol


22222

Since the entropy exceeds 2, lossless encoding of this source at 2 bits per symbol is impossible.

2.The size of the source alphabet is 5, therefore 5100021000 log2522322sequences of length

1000 are possible

3. The number of typical sequences is 21000HX22064.

4.The process of merging should be done such that the entropy of the resulting sources (with

an alphabet of size 4) is less than 1.5 bits per symbol. To minimize the entropy by combining

two letters we have to combine the two letters that have the maximum contribution to the

entropy. These area4anda4with probabilities of 0.3 and 0.35, respectively. Combining these

two results in a single letterbwith probability of 0.65. The entropy of the resulting source

would be

HY 0:1 log0:10:2 log0:20:05 log0:050:65 log0:651:417 bits=symbol


2222

Since the entropy is less than 1.5, it is possible to transmit this source at a rate of 1.5 bits per

symbol.

Problem 12.27

P
1.The minimum rate is equal to the entropy of the source, given byHXpilogpi, and
i2
this is given by

HX 20:11 log0:110:18 log0:180:1 log0:10:2 log0:2


2222

0:215 log0:250:05 log0:052:66 bits/symbol


22
2. Following the algorithm for designing Human codes we have

484
0.25
00a5

0.2
0a4
0.58
0
0.18
a
00102
0.42
1
0.11
0
1a1
0.22
0
0.33
111
a
17
1
0.10
0110a
3

0.15

0.05
0111a
6

The average codeword length is

RXpl
ii
i

0:2520:220:1830:1130:1130:140:054

0:50:40:540:330:330:40:22:7 binary symbols/source output

the inequalityHXR < HX1 is satised, as required.

3.HereP b1P a1P a20:29; P b2P a3P a40:2; P b3P a5P a6


P4
0:3; P b4P a70:11, andHBP bilogP bi1:91 bits/symbol.
i12

Problem 12.28

Parsing the sequence by the rules of the Lempel-Ziv coding scheme we obtain the phrases
0, 00, 1, 001, 000, 0001, 10, 00010, 0000, 0010, 00000, 101, 00001,

000000, 11, 01, 0000000, 110, 0, ...

The number of the phrases is 19. For each phrase we need 5 bits plus an extra bit to represent the

new source output.

485
DictionaryDictionaryCodeword

LocationContents

1 00001000000 0

2 000100000001 0

3 00011100000 1

4 0010000100010 1

5 0010100000010 0

6 00110000100101 1

7 001111000011 0

8 010000001000110 0

9 01001000000101 0

10 01010001000100 0

11 010110000001001 0

12 0110010100111 1

13 011010000101001 1

14 0111000000001011 0

15 011111100011 1

16 100000100001 1

17 10001000000001110 0

18 1001011001111 0

19000000

Problem 12.29

IX;Y HXHXjY
XX
pxlogpxpx; ylogpxjy
xx;y
XX
px; ylogpxpx; ylogpxjy
x;yx;y
XpXp
px; ylogxjypx; ylogx; y
x;ypxx;ypxpy

Using the inequalitylnyy1 (see Problem 12.7) withy1, we obtainlnx11. Applying


xx

486
this inequality withxpx;ywe obtain
pxpy

Xp
IX;Ypx; ylogx; y
x;ypxpy
!
XpXX
px; y1xpypx; ypxpy0
x;ypx; yx;yx;y

lnx11holds with equality ifx1. This means thatIX;Y 0 ifpx; ypxpyor in


x
other words ifXandYare independent.

Problem 12.30

1)IX;Y HXHXjY . Since in general,HXjY 0, we haveIX;Y HX. Also (see

Problem 12.33),IX;Y HY HYjXfrom which we obtainIX;Y HY . Combining the two

inequalities, we obtain

IX;Y minfHX; HY g

2)It can be shown (see Problem 12.7), that ifXandZare two random variables over the same set

XandZis uniformly distributed, thenHXHZ. FurthermoreHZlogjXj, wherejXjis

the size of the setX(see Problem 6.2). Hence,HXlogjXjand similarly we can prove that

HY logjYj. Using the result of the rst part of the problem, we obtain

IX;Y minfHX; HY g minflogjXj;logjYjg

Problem 12.31

By denitionIX;Y HXHXjY andHX; Y HXHYjXHY HXjY . Combining

the two equations we obtain

IX;Y HXHXjY HXHX; Y HY

HXHY HX; Y HY HX; Y HX

HY HYjXIY;X

Problem 12.32

1)The joint probability density is given by


pY1; X0pY1jX0pX0p

pY0; X1pY0jX1pX11p

pY1; X111p

pY0; X01p

487
The marginal distribution ofYis

pY1p11p12pp

pY01p1pp2p

Hence,

HX plogp1plog1p
22

HY 12pplog12pp
2

p2plogp2p
2
X
HYjXpx; ylogpyjx plog1plog
222
x;y

11plog11plog1
22

log1log1
22

HX; Y HXHYjX

plogp1plog1plog1log1
2222

HXjY HX; Y HY

plogp1plog1plog1log1
2222

12pplog12pp
2

p2plogp2p
2

IX;Y HXHXjY HY HYjX

log1log1
22

12pplog12pp
2

p2plogp2p
2

2)The mutual information isIX;Y HY HYjX. As it was shown in the rst question

HYjX log1log1and thus it does not depend onp. Hence,IX;Y is


22
maximized whenHY is maximized. However,HY is the binary entropy function with probability

q12pp, that is

HY HbqHb12pp
Hbqachieves its maximum value, which is one, forq1. Thus,
2

12pp1=)p1
22

3)SinceIX;Y 0, the minimum value ofIX;Y is zero and it is obtained for independentXand

Y. In this case

pY1; X0pY1pX0=)p12ppp

488
or1. This value of epsilon also satises
2

pY0; X0pY0pX0

pY1; X1pY1pX1

pY0; X1pY0pX1

resulting in independentXandY.

Problem 12.33

IX;Y ZW IY ZW;XHY ZW HY ZWjX

HY HZjY HWjY Z

HYjXHZjXY HWjXY Z

HY HYjXHZjY HZjY X

HWjY ZHWjXY Z

IX;Y IZjY;XIWjZY;X

IX;Y IX;ZjY IX;WjZY

This result can be interpreted as follows: The information that the triplet of random variables

(Y ; Z; W) gives about the random variableXis equal to the information thatYgives aboutXplus the

information thatZgives aboutX, whenYis already known, plus the information thatWprovides

aboutXwhenZ,Yare already known.

Problem 12.34

1)Using Bayes rule, we obtainpx; y; zpzpxjzpyjx; z. Comparing this form with the one

given in the rst part of the problem we conclude thatpyjx; zpyjx. This implies thatYand

Zare independent givenXso that,IY;ZjX0. Hence,

IY;ZXIY;ZIY;XjZ

IY;XIY;ZjXIY;X

SinceIY;Z0, we have

IY;XjZIY;X
2)Comparingpx; y; zpxpyjxpzjx; ywith the given form ofpx; y; zwe observe that

pyjxpyor, in other words, random variablesXandYare independent. Hence,

IY;ZXIY;ZIY;XjZ

IY;XIY;ZjXIY;ZjX

489
Since in generalIY;XjZ0, we have

IY;ZIY;ZjX

3)For the rst case consider three random variablesX,YandZ, taking the values 0, 1 with equal

probability and such thatXYZ. Then,IY;XjZHYjZHYjZX000, whereas

IY;XHY HYjX101. Hence,IY;XjZ < IX;Y . For the second case consider

two independent random variablesX,Y, taking the values 0, 1 with equal probability and a random

variableZwhich is the sum ofXandY(ZXY.) Then,IY;ZHY HYjZ110,

whereasIY;ZjXHYjXHYjZX101. Thus,IY;Z < IY;ZjX.

Problem 12.35

The capacity of the channel is dened as

CmaxIX;Y maxHY HYjX


pxpx

The conditional entropyHYjXis

HYjXpXaHYjXapXbHYjXbpXcHYjXc

However,

X
HYjXapYkjXalogP YkjXa
k
0:2 log 0:20:3 log 0:30:5 log 0:5

HYjXbHYjXc1:4855

and therefore,
X
HYjXpXkHYjXk1:4855
k

Thus,

IX;Y HY 1:4855

To maximizeIX;Y , it remains to maximizeHY . However,HY is maximized whenYis a

uniformly distributed random variable, if such a distribution can be achieved by an appropriate

input distribution. Using the symmetry of the channel, we observe that a uniform input distribution

produces a uniform output. Thus, the maximum ofIX;Y is achieved whenpXapXb

pXc1and the channel capacity is


3
Clog3HYjX0:0995 bits/transmission
2

490
Problem 12.36

The capacity of the channel is dened as

CmaxIX;Y maxHY HYjX


pxpx

If the probability distributionpxthat achieves capacity is

8
><p
X0
pX
>:1
p X1

then,

HYjXpHYjX01pHYjX1

ph1phh

wherehis the binary entropy function. As it is seenHYjXis independent onpand therefore

IX;Y is maximized whenHY is maximized. To nd the distributionpxthat maximizes the

entropyHY we reduce rst the number of possible outputs as follows. LetVbe a function of the

output dened as
8
><1
YE
V
>:0
otherwise

ClearlyHVjY 0 sinceVis a deterministic function ofY. Therefore,

HY ; V HY HVjY HY

HV HYjV

To ndHV note thatP V1P YEp1p. Thus,HV h, the binary

entropy function at. To ndHYjV we write

HYjV pV0HYjV0pV1HYjV1

ButHYjV10 since there is no ambiguity on the output whenV1, and

X
HYjV0pYkjV0logpYkjV0
2
k0;1

Using Bayes rule, we write the conditional probabilityP Y0jV0as

P Y0jV0P Y0; V0p1p


pV01
Thus,HYjV0ishpandHYjV 1hp. The capacity is now written as

CmaxHV HYjV h
px

maxHYjV max1hp1
pxpx

491
and it is achieved forp1. The next gure shows the capacity of the channel as a function of.
2

C
1

10

Problem 12.37

The overall channel is a binary symmetric channel with crossover probabilityp. To ndpnote that

an error occurs if an odd number of channels produce an error. Thus,


01
XBn
Ck
p@A1nk
koddk

Using the results of Problem 11.24, we nd that


hi
p11122
2

and therefore,

C1hp

Ifn! 1, then12n!0 andp!1. In this case


2

ClimCn1h10
n!1
2

Problem 12.38
ppp
Denoting1, we haven!2 nnnen,n!2 nnnen, andn!2 nnnen
!
nn!
nn!n!
p
2 nnnen
pp

2 nnnen2 nnnen
1
p

2 nnn

From above
!
1n 1
2 nloglog
nlog2n2nlog222

! loglogasn! 1
22

Hb

This shows that asn! 1,n2nHb.


n

492
Problem 12.39

Due to the symmetry in channel, the capacity is achieved for uniform input distribution, i.e., for

pXApX A1. For this input distribution, the output distribution is given by
2

22122
py1peyA=2peyA=2
22 222 2

and the mutual information between the input and the output is

Z1
IX;Y 1pyjXAlogpyjXAdy
212py
1
1ZpyjX A
pyjX Alogdy

212py
11

2I12I2

where
Z1
I1pyjXAlogpyjXAdy
12py
Z1
I2pyjX AlogpyjX Ady
12py

Now consider the rst term in the above expression. Substituting forpyjXAandpy, we

obtain,
A2
Z11py22
2e
1yA 2
I1pe22log2dy
22
12 221yA1yA
p22p22
ee
2 22 2
Z1
2
1y=A=2
pe2logdy

12 221e2yA=2
using the change of variableuy=and denotingA=byawe obtain

Z1
1ua22
I1pe2logdu
1221e2ua

A similar approach can be applied toI2, the second term in the expression forIX;Y , resulting in
IX;Y 1fA1fA
22

where
Z1
22
f a1peua=2logdu
1221e2au

493
Problem 12.40

The capacity of the channel is dened as

CmaxIX;Y maxHY HYjX


pxpx

However,
XX
HYjXpxHYjXxpxHRHR
xx

whereHRis the entropy of a source with symbols having probabilities the elements of a row of the

probability transition matrix. The last equality in the previous equation follows from the fact that

HRis the same for each row since the channel is symmetric. Thus

CmaxHY HR
px

HY is maximized whenYis a uniform random variable. With a symmetric channel we can always

nd an input distribution that makesYuniformly distributed, and thus maximizeHY . To see this,

let
X
pYypxP YyjXx
x

Ifpx1, wherejXjis the cardinality ofX, then


jXj

X
pYy1P YyjXx
jXj
x
P
ButP YyjXxis the same for eachysince the columns of a symmetric channel are
x
permutations of each other. Thus,

ClogjYj HR

wherejYjis the cardinality of the output alphabet.

Problem 12.41

a)The capacity of the channel is

C1maxHY HYjX
px

But,HYjX0 and therefore,C1maxpHY 1 which is achieved forp0p11.


x
2

b)Letqbe the probability of the input symbol 0, and thus1qthe probability of the input symbol
1. Then,

X
HYjXpxHYjXx
x
qHYjX01qHYjX1

1qHYjX11qh0:51q

494
The probability mass function of the output symbols is

P YcqpYcjX01qpYcjX1

q1q0:50:50:5q

pYd1q0:50:50:5q

Hence,

C2maxh0:50:5q1q
q

To nd the probabilityqthat achieves the maximum, we set the derivative ofC2with respect toq

equal to 0. Thus,

"#
@C20:51
0:50:5q0:50:5q
@q010:5 log20:50:5qln 2
"#

0:5 log0:50:5q0:50:5q0:51
2
0:50:5qln 2

10:5 log0:50:5q0:5 log0:50:5q


22

Therefore,

3
log0:50:5q 2=
2)q
0:50:5q5

and the channel capacity is

C2h120:3219
55

3)The transition probability matrix of the third channel can be written as

1
Q1Q1Q2
22

whereQ1,Q2are the transition probability matrices of channel 1 and channel 2 respectively. We

have assumed that the output space of both channels has been augmented by adding two new

symbols so that the size of the matricesQ,Q1andQ2is the same. The transition probabilities to
these newly added output symbols is equal to zero. Now we show that in general, the capacity of

a channel is a convex function of the probability transition of the channel, in other words for any

two probability transition matricesQ1andQ2and any 01, if we deneQQ11Q2,

thenCQCQ1CQ, whereCQmaxpIp;Qiis the channel capacity when the transition


12i

495
probability isQi. To show this we have (note that1)

Ip;Q1Q2Ip;Q1Ip;Q2
XXp
yjxp2yjx
pxp1yjxp2yjxlog1P
xyxpxp1yjxp2yjx
XXp
yjx
pxp1yjxlog1P
xyxpxp1yjx
XXp
yjx
pxp2yjxlog2P
xyxpxp2yjx
"P#
XXp
yjxp2yjxpxp1yjx
pxp1yjxlog1Px
xyxpxp1yjxp2yjxp1yjx
"P#
XXp
yjxp2yjxpxp2yjx
pxp2yjxlog1Px
xyxpxp1yjxp2yjxp2yjx
"P#
XXp
yjxp2yjxpxp1yjx
pxp1yjx1Px1
xyxpxp1yjxp2yjxp1yjx
"P#
XXp
yjxp2yjxpxp2yjx
pxp2yjx1Px1
xyxpxp1yjxp2yjxp2yjx
PX
Xx
pxp1yjxp1yjxp2yjx
Ppxp1yjx

yxpxp1yjxp2yjxxp1yjx
XX
pxp1yjx
xy
PX
Xx
pxp2yjxp1yjxp2yjx
Ppxp2yjx

yxpxp1yjxp2yjxxp2yjx
X
Xp
xp2yjx
xy
0

From which we conclude thatCQCQ1CQ. Putting1, we haveC <1C1C2


1222
(SinceQ1andQ2are dierent, the inequality is strict.)
Problem 12.42

The capacity of a channel is

CmaxIX;Y maxHY HYjXmaxHXHXjY


pxpxpx

Since in generalHXjY 0 andHYjX0, we obtain

CminfmaxHY ;maxHXg

However, the maximum ofHXis attained whenXis uniformly distributed, in which case

maxHXlogjXj. SimilarlymaxHY logjYjand by substituting in the previous inequality,

496
we obtain

CminfmaxHY ;maxHXg minflogjYj;logjXjg

minflogM;logNg

Problem 12.43

1)Letqbe the probability of the input symbol 0, and therefore1qthe probability of the input

symbol 1. Then,

X
HYjXpxHYjXx
x
qHYjX01qHYjX1

1qHYjX11qh

The probability mass function of the output symbols is

pY0qpY0jX01qpY0jX1

q1q11q

pY11qq

Hence,

Cmaxhq1qh
q

To nd the probabilityqthat achieves the maximum, we set the derivative ofCwith respect toq

equal to 0. Thus,
@C
qlog1q
@q0hlog22

Therefore,
h

logq h=)q21
2h
1q
12

and the channel capacity is


0h1h
2h2
Ch@hAh
1212

2)If!0, then using LHospitals rule we nd that


h
limh 1;limh20
!0!0

and therefore

limCh00
!0

497
If0:5, thenh1 andCh120:3219. In this case the probability of the input symbol
55
0 is
h

q210:50:250:513
h
120:510:255

If1, thenCh0:51. The input distribution that achieves capacity isp0p10:5.

3)The following gure shows the topology of the cascade channels. If we start at the input labelled

0, then the output will be 0. If however we transmit a 1, then the output will be zero with probability

pY0jX11121

112
n
111n
1

Thus, the resulting system is equivalent to aZchannel with1n.

111
00

111
...

11

4)Asn! 1,n!0 and the capacity of the channel goes to 0.

Problem 12.44

The capacity of Channel A satises (see Problem 12.44)

CAminflogM;logNg
22

whereM,Nis the size of the output and input alphabet respectively. SinceM2<3N, we

conclude thatCAlog21. With input distributionpApB0:5 andpC0, we have a


2
noiseless channel, thereforeCA1. Similarly, we nd thatCB1, which is achieved when

pa0pb00:5;

achieved when interpretingB0andC0as a single output. Therefore, the capacity of the cascade

channel isCAB1.
Problem 12.45

The SNR is

SNR2PP10104
N02W2W109106

498
Thus the capacity of the channel is

CWlog1P106log11000013:2879106bits/sec
22
N0W

Problem 12.46

The capacity of the additive white Gaussian channel is

C1log1P
2N0W

For the nonwhite Gaussian noise channel, although the noise power is equal to the noise power in

the white Gaussian noise channel, the capacity is higher, The reason is that since noise samples are

correlated, knowledge of the previous noise samples provides partial information on the future noise

samples and therefore reduces their eective variance.

Problem 12.47

The capacity of the channel of the channel is given by

CmaxIX;Y maxHY HYjX


pxpx

Let the probability of the inputsC,BandAbep,qand 1pqrespectively. From the symmetry

of the nodesB,Cwe expect that the optimum distributionpxwill satisfypBpCp. The

entropyHYjXis given by

X
HYjXpxHYjXx12pHYjXA2pHYjXB

02ph0:52p

The probability mass function of the output is

X
pY1pxpY1jXx12pp1p
X
pY2pxpY2jXx0:5p0:5pp

Therefore,

CmaxHY HYjXmaxhp2p
pp

To nd the optimum value ofpthat maximizesIX;Y , we set the derivative ofCwith respect top
equal to zero. Thus,

@C11
pplog1p1p2
@p0 log2pln221pln2
log1plogp2
22

499
and therefore

log1p2=)1p4=)p1
2
pp5

The capacity of the channel is

Ch120:72190:40:3219 bits/transmission
55

Problem 12.48

The capacity of the product channel is given by

CmaxIX1X2;Y1Y2
px1;x2

However,

IX1X2;Y1Y2HY1Y2HY1Y2jX1X2

HY1Y2HY1jX1HY2jX2

HY1HY2HY1jX1HY2jX2

IX1;Y1IX2;Y2

and therefore,

CmaxIX1X2;Y1Y2maxIX1;Y1IX2;Y2
px1;x2px1;x2

maxIX1;Y1maxIX2;Y2
px1px2
C1C2

The upper bound is achievable by choosing the input joint probability densitypx1; x2, in such a

way that

px1; x2px1px2

wherepx1,px2are the input distributions that achieve the capacity of the rst and second

channel respectively.

Problem 12.49

1)LetX X X,Y Y Yand


1212
8
><p
y1jx1ifx2 X
pyjx1
>:p
y2jx2ifx2 X
2
the conditional probability density function ofYandX. We dene a new random variableMtaking

the values 1;2 depending on the indexiofX. Note thatMis a function ofXorY. This is because

500
X\ Xand therefore, knowingXwe know the channel used for transmission. The capacity of
12
the sum channel is

CmaxIX;Y maxHY HYjXmaxHY HYjX; M


pxpxpx

maxHY pM1HYjX; M1pM2HYjX; M2


px

maxHY HY1jX11HY2jX2
px

wherepM1. Also,

HY HY ; MHMHYjM

HHY11HY2

SubstitutingHY in the previous expression for the channel capacity, we obtain

CmaxIX;Y
px

maxHHY11HY2HY1jX11HY2jX2
px

maxHIX1;Y11IX2;Y2
px

Sincepxis function of,px1andpx2, the maximization overpxcan be substituted by a

joint maximization over,px1andpx2. Furthermore, sinceand 1are nonnegative, we let

px1to maximizeIX1;Y1andpx2to maximizeIX2;Y2. Thus,

CmaxHC11C2

To nd the value ofthat maximizesC, we set the derivative ofCwith respect toequal to zero.

Hence,
dC2C1
log1C1C2=)
d0 log222C12C2
Substituting this value ofin the expression forC, we obtain

!!
C1C1C1
CH22C112C2
2C12C22C12C22C12C2
!!!
2C12C12C12C1
log1log
22
2C12C22C12C22C12C22C12C2
!
2C12C1
C11C2

2C12C22C12C2
2C12C2
log2C12C2log2C12C2
22
2C12C22C12C2
log2C12C2
2

Hence

Clog2C12C2=)2C2C12C2
2

501
2)

2C20202=)C1

Thus, the capacity of the sum channel is nonzero although the component channels have zero

capacity. In this case the information is transmitted through the process of selecting a channel.

3)The channel can be considered as the sum of two channels. The rst channel has capacity

C1log10 and the second channel is BSC with capacityC21h0:50. Thus


2

Clog2C12C2log21
22

Problem 12.50

1)The entropy of the source is

HXh0:30:8813

and the capacity of the channel

C1h0:110:4690:531

If the source is directly connected to the channel, then the probability of error at the destination is

P errorpX0pY1jX0pX1pY0jX1

0:30:10:70:10:1

2)For reliable transmission we must haveHXC1h. Hence, withHX0:8813 we

obtain

0:88131h=) <0:016 or >0:984

Computer Problems

Computer Problem 12.1

1) Figure 12.1 shows the Human code tree

2) The average codeword length for this code is


L20:230:150:130:120:140:090:080:070:06

3:1 bits per source output

502
3) The entropy of the source is given as

9
X
HXpilogpi3:0371 bits per source output
i1

We observe thatL > HX, as expected.

The MATLAB function entropy.m given next calculates the entropy of a probability vectorp.

function h=entropy(p)
% H=ENTROPY(P) returns the entropy function of
% the probability vector p.
if length(nd(p<0))=0,
error(Not a prob. vector, negative component(s))
end
if abs(sum(p)1)>10e10,
error(Not a prob. vector, components do not add up to 1)
end
h=sum(p.*log2(p));10

Computer Problem 12.2

1) The entropy of the source is derived via the entropy.m function and is found to be 2.3549 bits per

source symbol.

Codewords

x10:20000

x20:15100100

x30:130:420110110

x40:120:32Prob. = 101010010
0:22
0:5801
x30:11011011

0:26
x60:091110101010
0:17
101
x70:0810111011

x80:0711101110
0:13
111
x90:0611111111

Figure 12.1: Human code tree


503
2) We can solve this problem using the MATLAB function human.m, which designs a Human code

for a discrete-memoryless source with probability vectorpand returns both the codewords and the

average codeword length. human.m function is given next.

function[h,l]=human(p);
%HUFFMAN Human code generator
% [h,l]=human(p), Human code generator
% returns h the Human code matrix, and l the
% average codeword length for a source with
% probability vector p.

if length(nd(p<0))=0,
error(Not a prob. vector, negative component(s))
end10
if abs(sum(p)1)>10e10,
error(Not a prob. vector, components do not add up to 1)
end
n=length(p);
q=p;
m=zeros(n1,n);
for i=1:n1
[q,l]=sort(q);
m(i,:)=[l(1:ni+1),zeros(1,i1)];
q=[q(1)+q(2),q(3:n),1];20
end
for i=1:n1
c(i,:)=blanks(n*n);
end
c(n1,n)=0;
c(n1,2*n)=1;
for i=2:n1
c(ni,1:n1)=c(ni+1,n*(nd(m(ni+1,:)==1)). . .
(n2):n*(nd(m(ni+1,:)==1)));
c(ni,n)=0;30
c(ni,n+1:2*n1)=c(ni,1:n1);
c(ni,2*n)=1;
for j=1:i1
c(ni,(j+1)*n+1:(j+2)*n)=c(ni+1,. . .
n*(nd(m(ni+1,:)==j+1)1)+1:n*nd(m(ni+1,:)==j+1));
end
end
for i=1:n
h(i,1:n)=c(1,n*(nd(m(1,:)==i)1)+1:nd(m(1,:)==i)*n);
l1(i)=length(nd(abs(h(i,:))=32));40
end
l=sum(p.*l1);

Using this function, the codewords are found to be 010, 11, 0110, 0111, 00, and 10.

3) The average codeword length for this code is found to be 2.38 binary symbols per source

output. Therefore, the eciency of this code is

2:3549

10:9895
2:38

504
4) A new source whose outputs are letter pairs of the original source has 36 output letters of the

formfxi; xjg6. Since the source is memoryless, the probability of each pair is the product of
i;j1
the individual letter probabilities. Thus, in order to obtain the probability vector for the extended

source, we must generate a vector with 36 components, each component being the product of two

probabilities in the original probability vectorp. This can be done by employing the MATLAB function

kron.m in the form of kronp; p. The Human codewords are given by

1110000, 01110, 10110111, 1011001, 111001, 00101, 01111, 000, 011010, 00111, 1001, 1100,

11101110, 011011, 111011110, 111011111, 1110001, 001000, 1011010, 01100, 10110110, 1011000,

101110, 111110, 111010, 1010, 1110110, 101111, 11110, 0100, 00110, 1101, 001001, 111111, 0101,

1000

The average codeword length for the extended source is 4.7420. The entropy of the extended source

is found to be 4.7097, so the eciency of this Human code is

4:7097

20:9932
4:7420

which shows an improvement compared to the eciency of the Human code designed in part 2.

Computer Problem 12.3

1) We use the human.m function to determine a Human code. The resulting codewords are 1, 01,
001, 0001, 00001, 000001, 0000001, 00000000, and 00000001. The gure below presents the code

tree.

505
1
1/2

1
01
1/4

1/2
001
0
1/8

1/4
0001
1/16
00

1/8
00001
1/32

1/16
000001
1/64

1/32
0000001

1/64
00000001
1/256

1/128
1/256

2) The average codeword length is found to be 1.9922 binary symbols per source output by using

human.m function. If we nd the entropy of the source using the entropy.m function, we see that

the entropy of the source is also 1.9922 bits per source output; hence the eciency of this code is 1.

3) For the eciency of the Human code to be equal to one, the source must have a diadic distribution,

i.e., all probabilities be powers of1.


2

Computer Problem 12.4

1) The entropy is found to be 3.7179 using the Matlab function entropy.m introduced in Computer

Problem 12.1.

2) We design a Human code using the Matlab function human.m. that was presented in Computer

Problem 12.2. This function generates the resulting code words 1011, 100000, 00000, 10100,

010, 110011, 100001, 0001, 0111, 11000000111 11000001, 10101, 110010, 0110, 1001, 100010,

1100000010, 0010, 0011, 1101, 00001, 1100001, 110001, 110000000, 100011, 11000000110, 111.

3) The average code word is found to be 4.1195. In this case eciency of the code is

3:7179

4:11950:9025

506
The MATLAB script for this problem follows.

% MATLAB script for Computer Problem 12.4.


A= 0.0642;B= 0.0127;C= 0.0218;
D= 0.0317;E= 0.1031;F= 0.0208;
G= 0.0152;H= 0.0467;I= 0.0575;
J= 0.0008;K= 0.0049;L= 0.0321;
M= 0.0198;N= 0.0574;O= 0.0632;
P= 0.0152;Q= 0.0008;R= 0.0484;
S= 0.0514;T= 0.0796;U= 0.0228;
V= 0.0083;W= 0.0175;X= 0.0013;
Y= 0.0164;Z= 0.0005;Space= 0.1859;10
p= [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Space];
% Compute the entropy
H=entropy(p)
% Design a Human code
[h l] =human(p);

Computer Problem 12.5

1. The error probability of the BPSK with optimal detection is given by

q
pQ2 (12.38)

The corresponding plot is shown below.

0.45

0.4

0.35

0.3

0.25

0.2

0.15

0.1

0.05

-20 -10 0 10 20

(dB)

507
2. Here we use the relation

C1Hbp

q
1HbQ2 (12.39)

to obtain a plot ofCversus . This plot is shown below.

1
C(bits/transmission)

0.8

0.6

0.4

0.2

-20-1001020

(dB)

The MATLAB script for this problem is given next.

echo on
gammadb=[20:0.1:20];
gamma=10.^(gammadb./10);
perror=q(sqrt(2.*gamma));
capacity=1.entropy2(perror);
pause% Press a key to see a plot of error probability vs. SNR/bit.
clf
semilogx(gamma,perror)
xlabel(SNR/bit)
title(Error probability versus SNR/bit)10
ylabel(Error Prob.)
pause% Press a key to see a plot of channel capacity vs. SNR/bit.
clf
semilogx(gamma,capacity)
xlabel(SNR/bit)
title(Channel capacity versus SNR/bit)
ylabel(Channel capacity)

508
Computer Problem 12.6

Due to the symmetry in the problem, the capacity is achieved for uniform input distributionthat is,

forpXApX A1. For this input distribution, the output distribution is given by
2

22122
py1peyA=2peyA=2(12.40)
22 222 2

and the mutual information between the input and the output is given by

Z1
IX;Y 1pyjXAlogpyjXAdy
212py
1
1ZpyjX A
pyjX Alogdy(12.41)
212py

Simple integration and change of variables result in

IX;Y fA(12.42)

whereZ1
22
f a1peua=2logdu(12.43)
1221e2au

Using these relations we can calculateIX;Y for various values ofA=and plot the result. A plot

of the resulting curve is shown below.

1
C(bits/transmission)

0.8

0.6

0.4

0.2

0
-2-1012
1010101010
A/

The MATLAB script for this problem follows.

echo on
adb=[20:0.2:20];
a=10.^(adb/10);
for i=1:201

509
f(i)=quad(il3_8fun,a(i)5,a(i)+5,1e3,[ ],a(i));

g(i)=quad(il3_8fun,a(i)5,a(i)+5,1e3,[ ],a(i));

c(i)=0.5*f(i)+0.5*g(i);

echo o;

end

echo on;10

pause% Press a key to see capacity vs. SNR plot.

semilogx(a,c)

title(Capacity versus SNR in binary input AWGN channel)

xlabel(SNR)

ylabel(Capacity (bits/transmission))

Computer Problem 12.7

1) The desired plot is given below.

1400

1200

1000

800

600

Capacity (bits/second)
400

200

0
-2-10123
101010101010
P/N (dB)
0

2) The capacity as a function of bandwidth is plotted here.

510
500

450

400

350

300

250

200
Capacity (bits/second)
150

100

50

0
012345
101010101010
W (Hz)

As is seen in the plots, when eitherP =N0orWtend to zero, the capacity of the channel also tends

to zero. However, whenP =N0orWtends to innity, the capacity behaves dierently. WhenP =N0

tends to innity, the capacity also tends to innity, as shown in the rst gure. However, whenW

tends to innity, the capacity does go to a certain limit, which is determined byP =N0. To determine

this limiting value, we have

limWlog1PP(12.44)
W!12N0WN0ln 2

1:4427P(12.45)
N0

The MATLAB script for this problem is given next.

% MATLAB script for Computer Problem 12.7.


echo on
pn0db=[20:0.1:30];
pn0=10.^(pn0db./10);
capacity=3000.*log2(1+pn0/3000);
pause% Press a key to see a plot of channel capacity vs. P/N0.
clf
semilogx(pn0,capacity)
title(Capacity vs. P/N0 in an AWGN channel)
xlabel(P/N0)10
ylabel(Capacity (bits/second))
clear
w=[1:10,12:2:100,105:5:500,510:10:5000,5025:25:20000,20050:50:100000];
pn0db=25;
pn0=10^(pn0db/10);
capacity=w.*log2(1+pn0./w);
pause% Press a key to see a plot of channel capacity vs. bandwidth.
clf
semilogx(w,capacity)
title(Capacity vs. bandwidth in an AWGN channel)20
xlabel(Bandwidth (Hz))

511
ylabel(Capacity (bits/second))

Computer Problem 12.8

This gure presents the normalized capacityC=Was a function of 10 logE=N0.


10b

10

5
C/W

0
-50510152025
10 logE/N0
10b

The MATLAB script for this problem is given next.

% MATLAB script for Computer Problem 12.8


CW= 0.1:0.05:10;% CW= C/W;
EbNo= ((2.^CW)1) ./CW;% EbNo = Eb/No
EbNoindB= 10*log10(EbNo);
plot(EbNoindB,CW);

512
Chapter 13

Problem 13.1

The codewords of the linear code of Example 13.2.1 are

c10 0 0 0 0

c21 0 1 0 0

c30 1 1 1 1

c41 1 0 1 1

Since the code is linear the minimum distance of the code is equal to the minimum weight of the

codewords. Thus,

dminwmin2

There is only one codeword with weight equal to 2 and this isc2.

Problem 13.2

The parity check matrix of the code in Example 13.2.3 is


01
11100
BC
BC
HBB0 1 0 1 0CC
@A
01001

The codewords of the code are

c10 0 0 0 0

c21 0 1 0 0

c30 1 1 1 1

c41 1 0 1 1

Any of the previous codewords when postmultiplied byHtproduces an all-zero vector of length 3.

For example

c2Ht11 0 00 0 0

c4Ht11 11 110 0 0
513
Problem 13.3

The following table lists all the codewords of the (7,4) Hamming code along with their weight. Since

the Hamming codes are lineardminwmin. As it is observed from the table the minimum weight is

3 and thereforedmin3.

No.CodewordsWeight

100000000

210001103

301000113

400101013

500011114

611001014

710100114

810010013

901101104

1001011003

1100110103

1211100003

1311010104

1410111004

1501110014

1611111117

Problem 13.4

The parity check matrixHof the (15,11) Hamming code consists of all binary sequences of length 4,

except the all zero sequence. The systematic form of the matrixHis

01
B C 1
1 1 0 0 0 1 1 1 0 11 0 0 0C
B
BC
BC
BC
BC
B 1 0 0 1 1 0 1 1 0 1 10 1 0 0C
C

C
HPtjIBBC
4BBC
0
B C
1 0 1 0 1 1 0 1 1 10 0 1 0C
B
BC
BC
BC
@A
0 0 1 0 1 1 0 1 1 1 10 0 0 1

514
The corresponding generator matrix is

01
11 1 0 0
BC
BC
B1C
1010

BC
BC
B1C
01 0 0 1C
B
BC
BC
B10 1 1 0C

BC
BC
B10 1 0 1C

BC
BC
GIjPBB10 0 1 1CC
11

BC
B1C

B1 1 1 0C
BC
BC
B11 1 0 1C
BC
BC
B0C
11 0 1 1
BC
BC
B1C
0 1 1 1C
B
@A
11 1 1 1

Problem 13.5

LetCbe ann; klinear block code with parity check matrixH. We can express the parity check

matrix in the form

Hhh h
12n

wherehiis annkdimensional column vector. Letcc1 cnbe a codeword of the codeC


withlnonzero elements which we denote asci,ci,: : :,ci. Clearlycici: : :ci1 and since
12l12l
cis a codeword

cHt0c1h1c2h2 cnhn

cihicihi cihi
1122ll

hihi hi0
12l

This proves thatlcolumn vectors of the matrixHare linear dependent. Since for a linear code the

minimum value ofliswminandwmindmin, we conclude that there existdminlinear dependent

column vectors of the matrixH.

Now we assume that the minimum number of column vectors of the matrixHthat are linear

dependent isdminand we will prove that the minimum weight of the code isdmin. Lethi,hi,: : :,
12
hdbe a set of linear dependent column vectors. If we form a vectorcwith non-zero components
min
at positionsi1,i2,: : :,id, then
min

cHtcihi ci0
11d
min

which implies thatcis a codeword with weightdmin. Therefore, the minimum distance of a code is

equal to the minimum number of columns of its parity check matrix that are linear dependent.

515
For a Hamming code the columns of the matrixHare non-zero and distinct. Thus, no two

columnshi,hjadd to zero and sinceHconsists of all thenktuples as its columns, the sum

hihjhmshould also be a column ofH. Then,

hihjhm0

and therefore the minimum distance of the Hamming code is 3.

Problem 13.6

The generator matrix of then;1repetition code is a 1nmatrix, consisted of the non-zero

codeword. Thus,

G1j1 1

This generator matrix is already in systematic form, so that the parity check matrix is given by

01
11 0 0

BC
BC
B10 1 0C

HBBB.CCC
.......
B....C

@A
10 0 1

Problem 13.7

1)The parity check matrixHeof the extended code is ann1kn1matrix. The codewords

of the extended code have the form

cecjx
;ii

wherexis 0 if the weight ofciis even and 1 if the weight ofciis odd. SinceceHtcijxHt0
;iee
andciHt0, the rstnkcolumns ofHtcan be selected as the columns ofHtwith a zero added
e
in the last row. In this way the choice ofxis immaterial. The last column ofHtis selected in such
e
a way that the even-parity condition is satised for every codewordce. Note that ifcehas even
;i;i
weight, then

cece ce0=)ce1 1 1t0


;i1;i2;in1;i

for everyi. Therefore the last column ofHtis the all-one vector and the parity check matrix of the
e

516
extended code has the form

01t
1101
BC
BC
B1C
011
BC01
BC
B0C1
1 1 1CB 1 0 1 0 0 0
BC
BCBC
BCBC

1 0 0 1CB1 0 1 0 1 0 0
tBBCC
HeHtBBCC
eBC
B0 1 0 1CB0 1 1 0 0 1 0
C
BC@A
BC
B0C1
011111111
BC
BC
BC
BC
@A
0001

2)The original code has minimum distance equal to 3. But for those codewords with weight equal to

the minimum distance, a 1 is appended at the end of the codewords to produce even parity. Thus,

the minimum weight of the extended code is 4 and since the extended code is linear, the minimum

distance isde;minwe;min4.

3)The coding gain of the extended code is

GdeRc431:7143
coding;min
7

Problem 13.8

If no coding is employed, we have


s#"s#
"

pbQ2EbQP
N0RN0
where
P106
5
RN010421011

Thus,
p
pbQ51:2682102

and therefore, the error probability for 11 bits is

P11pb110:1310
error in 11 bits

If coding is employed, then since the minimum distance of the15;11Hamming code is 3,


s#"s#
"
E3E
peM1Qdmins10Qs
N0N0

where
EEP11
sb
RcRc53:6667
N0N0RN015

517
Thus
hpi
pe10Q33:66674:560103

As it is observed the probability of error decreases by a factor of 28. If hard decision is employed,

then
01
dmin
XBd
minCi
peM1@Ap1pbdmini
ib
idmin1
2

hqi
whereM10,dmin3 andpbQRcP2:777102. Hence,
RN0

pe103p21pbp30:0227
bb

In this case coding has decreased the error probability by a factor of 6.

Problem 13.9

1)The encoder for the3;1convolutional code is depicted in the next gure.

k=1

.n=3
+

2)The state transition diagram for this code is depicted in the next gure.

.............0/000
........ .
00

0/0111/111

0/001
0110

1/100
0/0101/110
1
..................... 1
1/101

3)In the next gure we draw two frames of the trellis associated with the code. Solid lines indicate

an input equal to 0, whereas dotted lines correspond to an input equal to 1.

518
..000
..00
..111
..
011
......
....01100
..
....
..
....
....001
..
......
..10110
..
..
..
..
..010
..
.. . . . . . .. . . . . . ..
11
101

4)The diagram used to nd the transfer function is shown in the next gure.

Xd
D2NJ
DJ

D2JDJD3NJ

XcXbXaXa
DNJ

Using the ow graph results, we obtain the system

XcD3NJXa0DNJXb

XbDJXcDJXd

XdD2NJXcD2NJXd

Xa00D2JXb

EliminatingXb,XcandXdresults in

D6NJ3
00
T D; N; JXa
Xa01D2NJD2NJ2

To nd the free distance of the code we setNJ1 in the transfer function, so that

6
T1DT D; N; JjDD62D84D10
NJ1
12D2
Hence,d6
free

5)Since there is no self loop corresponding to an input equal to 1 such that the output is the all zero

sequence, the code is not catastrophic.

Problem 13.10

The number of branches leaving each state correspond to the number possible dierent inputs to the

encoder. Since the encoder at each state takeskbinary symbols at its input, the number of branches

leaving each state of the trellis is 2k. The number of branches entering each state is the number of

possiblekLcontents of the encoder shift register that have their rstkL1bits corresponding to

that particular state (note that the destination state for a branch is determined by the contents of

the rstkL1bits of the shift register). This means that the number of branches is equal to the

number of possible dierent contents of the lastkbits of the encoder, i.e., 2k.

519
Problem 13.11

1.

00
10
1/0101/101

0000
11000/0001/0010/1111/110

0/100
01

2.

DD

22
3
aDDD
abc

D2

we have the following equations

XbD2XaD2Xc

XcD3XbDXd

XdDXdDXb

Xa0D2Xc

from which we obtain


0D6D7D8
T DXa
Xa1DD4D5D6

520
3. ExpandingT Dwe have

T DD62D7D8: : :

Thereforedfree6.

4.

Received
sequence110 110 110 111 010 101 101
00024 5 5 3 5 7000000 000 000 000 000
??
101 101 101101 101
??
011 011 011 011 011
53343
110 110 110

111 111 111111111

435 4
100 100 100 100?
010 010010 010

001 001 001?


3345

From this gure we see that there are many options, one is the sequence 0101000, in which the

two last bits are the additional two zeros to reset the memory. Therefore (one of the) most

likely transmitted sequences is 01010. Other options are 10101 and 11000. All these sequences

result in codewords that are at a Hamming distance of 7 from the received sequence.

5. In general we have to use Equation (13.3.23)

1@T2D; N
Pbp
k@NN1;D4p1p

But herep105is very small, therefore the dominating term in the expansion on the right

side of the inequality will be the rst term in expansion ofT2D; Ncorresponding todfree.

This term inT2D; NisD6N, since the path with weight 6 at the output corresponds to the

input sequence 100, which is of weight 1. Therefore

1@D6N13
Pb4105110521014
k@Np3
N1;D4p1p

Problem 13.12

1.
521
00
10
1/0101/111

0000
11000/0001/0010/1011/100

0/1100/011
01

2.

ND

D2ND

322
D
aNDD
abc

ND

From the gure we have the following equations

XbND3XaNDXc

XcD2XbD2Xd

XdNDXdNDXb

Xa0D2Xc

From which we obtain


7
T2D; NND
1NDND3
7
SubstitutingN1 we haveT DD.
1DD3

3. ExpandingT2N; Dwe have

T2N; DND7N2D8N3D9: : :

and thereforedfree7. This path corresponds to the sequence 100. The path is highlighted

below

522
000000000

111 111 111


011

101

4. From the trellis diagram shown below

Received
sequence111 111 111 111 111 111
00036 2 4 5 4000000 000 000 000

111 111 111111


011 011 011 011
3431
100 100

101 101 101101

332
110 110 110
010 010010

001 001
245

We see that the best matching path through the trellis is the highlighted path corresponding to

100100. Therefore the information sequence is 1001.

Problem 13.13

The code of Problem 13.11 is a3;1convolutional code withL3. The length of the received

sequenceyis 15. This means that 5 symbols have been transmitted, and since we assume that the

information sequence has been padded by two 0s, the actual length of the information sequence is

3. The following gure depicts 5 frames of the trellis used by the Viterbi decoder. The numbers on

the nodes denote the metric (Hamming distance) of the survivor paths. In the case of a tie of two

merging paths at a node, we have purged the lower path.


523
111110011001101
...63132
00
......X000000000000
...X
...X01151
....1111117
.01
..
.......X
....001
....X0441
.......X01
..10
..
...1
..10
..64
..
.. . . . . . ..
X11
101

The decoded sequence isf111;001;011;000;000gand corresponds to the information sequence

f1;0;0gfollowed by two zeros.

Problem 13.14

1)The encoder for the3;1convolutional code is depicted in the next gure.


+

k=1

n=3
+

2)The state transition diagram for this code is shown below

.............0/000
........ .
00

0/0111/111
0/101
0110

1/100
0/1101/010
1
..................... 1

1/001

3)In the next gure we draw two frames of the trellis associated with the code. Solid lines indicate

an input equal to 0, whereas dotted lines correspond to an input equal to 1.

524
..000
..00
..111
..
011
......
....01100
..
....
..
....
....101
..
......
..10010
..
..
..
..
..110
..
.. . . . . . .. . . . . . ..
11
001

4)The diagram used to nd the transfer function is shown in the next gure.

Xd
DNJ
D2J

D2JD2JD3NJ

XcXbXaXa
DNJ

Using the ow graph results, we obtain the system

XcD3NJXa0DNJXb

XbD2JXcD2JXd

XdDNJXcDNJXd

Xa00D2JXb

EliminatingXb,XcandXdresults in

D7NJ3
00
T D; N; JXa
Xa01DNJD3NJ2

To nd the free distance of the code we setNJ1 in the transfer function, so that

7
T1DT D; N; JjDD7D8D9
NJ1
1DD3
Hence,d7
free

5)Since there is no self loop corresponding to an input equal to 1 such that the output is the all zero

sequence, the code is not catastrophic.

Problem 13.15

Using the diagram of Figure 13.13, we see that there are only two ways to go from stateXa0to

stateXa00with a total number of ones (sum of the exponents ofD) equal to 6. The corresponding

transitions are:

D2DDD2
Path 1:Xa0!Xc!Xd!Xb!Xa00
D2DDD2
Path 2:Xa0!Xc!Xb!Xc!Xb!Xa00
525
These two paths correspond to the codewords

c10;0;1;0;1;0;1;1;0;0;0;0; : : :

c20;0;0;1;0;0;0;1;1;1;0;0; : : :

Problem 13.16

1)The state transition diagram and the ow diagram used to nd the transfer function for this code

are depicted in the next gure.

.............0/00
........ .
00

0/101/01

0/01DNJ
0110X
d
1/11NJ2
DJ
0/111/00
1 DJDJDNJ
..................... 1XcXXaXa
b
1/10D2NJ

Thus,

XcDNJXa0D2NJXb

XbDJXcD2JXd

XdNJXcDNJXd

Xa00DJXb

and by eliminatingXb,XcandXd, we obtain

D3NJ3
00
T D; N; JXa
Xa01DNJD3NJ2

To nd the transfer function of the code in the formT D; N, we setJ1 inT D; N; J. Hence,

3
T D; NDN
1DND3N

2)To nd the free distance of the code we setN1 in the transfer functionT D; N, so that

3
T1DT D; NjDD3D4D52D6
N1
1DD3

Hence,d3
free

3)An upper bound on the bit error probability, when hard decision decoding is used, is given by

P1@T D; N
bp
k@NN1;D4p1p

526
Since
@T D; N@D3ND3

@NN1@N1DD3NN11DD32

withk1,p106we obtain

3
PD8:0321109
bp
1DD32D4p1p

Problem 13.17

1)Let the decoding rule be that the rst codeword is decoded whenyiis received if

pyijx1 > pyijx2

The set ofyithat decode intox1is

Y1yi:pyijx1 > pyijx2

The characteristic function of this set1yiis by denition equal to 0 ifyi62Y1and equal to 1 if

yi2Y1. The characteristic function can be bounded as (see Problem 9.40)


1
!2
pyijx2
11yi
pyijx1

Given that the rst codeword is sent, then the probability of error is
XX
P errorjx1pyijx1pyijx111yi
yi2YY1yi2Y
!2
Xp1X
yijx2q
pyijx1pyijx1pyijx2
yi2Ypyijx1yi2Y
2nq
X
pyijx1pyijx2
i1

whereYdenotes the set of all possible sequencesyi. Since, each element of the vectoryican take

two values, the cardinality of the setYis 2n.

2)Using the results of the previous part we have

2nq2ns
XXpsp
yijx1yijx2
P errorpyijx1pyijx2pyi
i1i1pyipyi
2ns2nq
XpspX
x1jyix2jyi
pyi2pyipx1jyipx2jyi

i1px1px2i1

However, given the vectoryi, the probability of error depends only on those values thatx1andx2

are dierent. In other words, ifx1x2, then no matter what value is thekthelement ofyi, it will
;k;k
not produce an error. Thus, if bydwe denote the Hamming distance betweenx1andx2, then

px1jyipx2jyipd1pd

527
and sincepyi1n, we obtain
2

ddd
P errorP d2p21p24p1p2

3)Assuming codewordcis sent, letd1; d2; : : : ; dM1denote its Hamming distance from other

codewords, then by the union bound

M1
dd
Xi
min

P Errorjc4p1p2M14p1p2
i1

where in the last step we have used the fact that since 0p1, then 4p1p1, and
di
forx1 the functionxpis a decreasing function ofp. Therefore sincedminwe have
22
dd
imin

4p1p24p1p2.

Problem 13.18

1)

Z1
v2
Qx1pe2dv
2x
pZ1
v2t1t2
pedt
x
p

2
1
12Zt2
edt
2xp
2
1x
p

2erfc2

2)The average bit error probability can be bounded as (see (13.3.16))

s#1

1"Xq
P1Xaf dQ2RdEb1af dQ2Rd
bdcdcb
kN0k
ddfreeddfree
q
11X
f derfcRcd b
2kad
ddfree
q
11X

f ddfreeerfcRcddfree b
2kaddfree
d1
1
X
1qR
dfree badf ddfreeecd b
2kerfcRcdfree
d1

But,
11
XX
T D; NadDdNf dadDddfreeNf ddfree
dfree
ddfreed1

528
and therefore,

@T D; N1Xd

adDdfreef ddfree
@NN1dfree
d1
1
X
DdfreeadDdf ddfree
dfree
d1

SettingDeRc bin the previous and substituting in the expression for the average bit error

probability, we obtain

q#
T D; N
P1erfcRd eRcdfree b
bcfreeb
2k#NN1;DeRc b

Problem 13.19

1.For the Hamming codedmind13 and for the second code simple inspection shows

dmind24. Therefore for the product code we havedmind1d23412.


jk
1
2.ecdmin5.
2

3.For Hamming code we use the result of Example 13.2.4 and for the6;2code use the given

generator matrix to obtain


23
1111111
67
67
617
1 1 1 1 1 17
6
67
67
61 1 1 1 1 1 17
67
67
60 0 0 0 0 0 07
67
67
607
000000
67
45
1111111

4.The Hamming code can correct all single errors and the other code, with minimum distance of
4 can also correct all single errors. For three errors, if they are on dierent rows and columns,

they can obviously been corrected. If all three are in a single row, then in each column we do

not have more than one error, and the errors can all be corrected, similarly for the case when

all errors are in a single column. If two errors are in a row and two errors are in a column, like

the gure below

1111111

1 1X1X1 1

1111111

0000000

0 0 0 0X0 0

1111111

529
then we can rst correct the single error in the fth row, and then the single errors in the

columns. A four error pattern shown below cannot be corrected by applying hard decision to

the rows and columns separately (but can be corrected by applying the optimal hard decision

decoding to the product code)

1111111

1 1X1X1 1

1111111

0000000

0 0X0X0 0

1111111

Problem 13.20

By denitionmaxfx; yg lnexey, ifxythe conclusion is obvious, otherwise, ifx > ywe

have

maxfx; yg lnex1eyx

lnexln1ejyxj

maxfx; yg ln1ejyxj

and the result is proved, fory > xwe can similarly show the result.

For the second relation, we denewlnexeymaxfx; yg, then

maxfx; y; zg lnexeyez

lnewez

maxfw; zg

maxfmaxfx; yg; zg

Problem 13.21
The partition of the 8-PAM constellation in four subsets is depicted in the gure below.

530
1 3 5 7-1-3-5-7

10

1 5-3-773-1-5

110
0

3-57-15-3-7 1

2)The next gure shows one frame of the trellis used to decode the received sequence. Each branch

consists of two transitions which correspond to elements in the same coset in the nal partition

level.

-7,1
-5,3
-5,3
-
7,1
-3,5
-1,7
-1,7
-3,5

The operation of the Viterbi algorithm for the decoding of the sequencef:2;1:1;6;4;3;4:8;3:3g

is shown schematically in the next gure. It has been assumed that we start at the all zero state and

that a sequence of zeros terminates the input bit stream in order to clear the encoder. The numbers

at the nodes indicate the minimum Euclidean distance, and the branches have been marked with the

decoded transmitted symbol. The paths that have been purged are marked with an X.

1.13.3-4.8-346-.2
14.3811.0915.457.0526.451.451.44
XXXX111
X
-533
33
X3-511.0515.0510.455.0510.24
X-515
X5
-3
11.0511.456.0525.45
4.295
XX1-17-1
XX1
7.057.056.054.65
X-35

Transmitted sequence:

1 3 5 3 -5 -3 3
531
Computer Problems

Computer Problem 13.1

We derivepefor values ofnfrom 1 to 61. The error probability is given by

n
Xn!
pe0:3k0:7nk
kn1=2k

and the resulting plot is shown below. The MATLAB script le for this problem is given next.

echo on
ep=0.3;
for i=1:2:61
p(i)=0;
for j=(i+1)/2:i
p(i)=p(i)+prod(1:i)/(prod(1:j)*prod(1:(ij)))*ep^j*(1ep)^(ij);
echo o;
end
end
echo on;10
pause% Press a key to see the plot.
stem((3:2:41),p(3:2:41))
xlabel(n)
ylabel(pe)
title(Error probability as a function of n in simple repetition code)

0.25

0.2

0.15

pe

0.1

0.05

0
051015202530354045
n

532
Computer Problem 13.2

In order to obtain all codewords, we have to use all information sequences of length 4 and nd the

corresponding encoded sequences. Since there is a total of 16 binary sequences of length 4, there

will be 16 codewords. LetUdenote a 2kkmatrix whose rows are all possible binary sequences of

lengthk, starting from the all-0 sequence and ending with the all-1 sequence. The rows are chosen in

such a way that the decimal representation of each row is smaller than the decimal representation of

all rows below it. For the case ofk4, the matrixUis given by

23
0000
67
67
607
001
67
67
607
6 0 1 07
67
67
60 0 1 17
67
67
607
100
67
67
607
1 0 17
6
67
67
60 1 1 07
67
67
607
111
7
U667(13.46)
617
0 0 07
6
67
67
61 0 0 17
67
67
617
010
67
67
617
0 1 17
6
67
67
61 1 0 07
67
67
61 1 0 17
67
67
617
1 1 07
6
45
1111

We have

CUG(13.47)

whereCis the matrix of codewords, which in this case is a 1610 matrix whose rows are the

533
codewords. The matrix of codewords is given by
23
0000
67
67
607
001
67
67
607
6 0 1 07
67
67
60 0 1 17
67
67
607
100
67
67
607
1 0 17
6
6723
67
60 1 1 071 0 0 1 1 1 0 1 1 1
6767
6767
607617
111110001110
767
C66767
617607
0 0 076 1 1 0 1 1 0 1 0 17
6
6745
67
61 0 0 171 1 0 1 1 1 1 0 0 1
67
67
617
010
67
67
617
0 1 17
6
67
67
61 1 0 07
67
67
61 1 0 17
67
67
617
1 1 07
6
45
3
1 1 1 12
0000000000
67
67
617
101111001
67
67
607
6 1 1 0 1 1 0 1 0 17
67
67
61 0 1 1 0 0 1 1 0 07
67
67
617
110001110
67
67
607
0 1 1 1 1 0 1 1 17
6
67
67
61 0 0 0 1 1 1 0 1 17
67
67
607
101000010
67
67

617
0 0 1 1 1 0 1 1 17
6
67
67
60 1 0 0 0 0 1 1 1 07
67
67
617
111000010
67
67
607
0 1 0 1 1 1 0 1 17
6
67
67
60 1 1 1 1 1 1 0 0 17
67
67
61 0 1 0 0 0 0 0 0 07
67
67
607
0 0 1 0 0 1 1 0 07
6
45
1100110101

A close inspection of the codewords shows that the minimum distance of the code is

534
dmin2:

The MATLAB script le for this problem is given next.

% Generate U, denoting all information sequences.

k=4;

for i=1:2^k

for j=k:1:1

if rem(i1,2^(j+k+1))>=2^(j+k)

u(i,j)=1;

else

u(i,j)=0;

end

echo o;10

end

end

echo on;

% Dene G, the generator matrix.

g=[1 0 0 1 1 1 0 1 1 1;

1 1 1 0 0 0 1 1 1 0;

0 1 1 0 1 1 0 1 0 1;

1 1 0 1 1 1 1 0 0 1];

% Generate codewords.

c=rem(u*g,2);20

% Find the minimum distance.

wmin=min(sum((c(2:2^k,:))));

Computer Problem 13.3

Here

23
100110101111000
67
67
617
10001110110100
7
H667(13.48)
607
1 1 1 0 0 1 1 1 0 1 0 0 1 07
6
45
001011011110001

535
and, therefore,

23
100000000001100
67
67
607
10000000000110
67
67
607
0 1 0 0 0 0 0 0 0 0 0 0 1 17
6
67
67
60 0 0 1 0 0 0 0 0 0 0 1 0 1 07
67
67
60 0 0 0 1 0 0 0 0 0 0 1 0 0 17
67
67
G660 0 0 0 0 1 0 0 0 0 0 0 1 0 177(13.49)
67
607
6 0 0 0 0 0 1 0 0 0 0 1 1 1 07
67
67
60 0 0 0 0 0 0 1 0 0 0 0 1 1 17
67
67
607
00000001001011
67
67
607
0 0 0 0 0 0 0 0 1 0 1 1 0 17
6
45
000000000011111

There is a total of 2112048 codewords, each of length 15. The rate of the code is110:733.
15
In order to verify the minimum distance of the code, we use a MATLAB script similar to the one used

in Computer Problem 13.2. The MATLAB script is given next, and it results indmin3.
echo on
k=11;
for i=1:2^k
for j=k:1:1
if rem(i1,2^(j+k+1))>=2^(j+k)
u(i,j)=1;
else
u(i,j)=0;
end
echo o ;10
end
end
echo on ;

g=[1 0 0 0 0 0 0 0 0 0 0 1 1 0 0;
0 1 0 0 0 0 0 0 0 0 0 0 1 1 0;
0 0 1 0 0 0 0 0 0 0 0 0 0 1 1;
0 0 0 1 0 0 0 0 0 0 0 1 0 1 0;
0 0 0 0 1 0 0 0 0 0 0 1 0 0 1;
0 0 0 0 0 1 0 0 0 0 0 0 1 0 1;20
0 0 0 0 0 0 1 0 0 0 0 1 1 1 0;
0 0 0 0 0 0 0 1 0 0 0 0 1 1 1;
0 0 0 0 0 0 0 0 1 0 0 1 0 1 1;
0 0 0 0 0 0 0 0 0 1 0 1 1 0 1;
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1];

c=rem(u*g,2);
wmin=min(sum((c(2:2^k,:))));

536
30

Computer Problem 13.4

Since the minimum distance of Hamming codes is 3, we have

=2
pe21114p1pdmin
s! s!!#1
" :5

20474Q1:466Eb1Q1:466Eb(13.50)
N0N0

The resulting plot is shown below.


-2
10
-4
10
-6
10
-8
10
-10
e
10
P
-12
10
-14
10
-16
10
-18
10
10111213141516
(dB)
b

The MATLAB function for computing the bound on message-error probability of a linear block

code when hard-decision decoding and antipodal signaling are employed is given next.

function[perr,gammadb]=pehda(gammadbl,gammadbh,k,n,dmin)
% pehda.m Matlab function for computing error probability in
% hard-decision decoding of a linear block code
% when antipodal signaling is used.
% [perr,gammadb]=pehda(gammadbl,gammadbh,k,n,dmin)
% gammadbl=lower Eb/N0
% gammadbh=higher Eb/N0
% k=number of information bits in the code
% n=code block length
% dmin=minimum distance of the code10

gammadb=[gammadbl:(gammadbhgammadbl)/20:gammadbh];
gammab=10.^(gammadb/10);
537
Rc=k/n;
pb=q(sqrt(2.*Rc.*gammab));
perr=(2^k1).*(4*pb.*(1pb)).^(dmin/2);

In the MATLAB script given next, the preceding MATLAB function is employed to plot error

probability versus b.

[perrha,gammab]=pehda(10,16,11,15,3);
semilogy(gammab,perrha)

Computer Problem 13.5

In the problem under study,dmin3,Rc11;andM21112047:Therefore, we have


15
s!

Pe2047Q22Eb(13.51)
5N0

The corresponding plots are shown below.


5
10

0
10

-5
10

e
P
-10
10

-15
10

-20
10
78910111213141516
(dB)
b

Two MATLAB functions for computing the error probability for antipodal signaling when soft-

decision decoding is employed, are given next

function[perr,gammadb]=pesda(gammadbl,gammadbh,k,n,dmin)
% pesda.m Matlab function for computing error probability in
% soft-decision decoding of a linear block code
% when antipodal signaling is used.
% [perr,gammadb]=pesda(gammadbl,gammadbh,k,n,dmin)
% gammadbl=lower Eb/N0
% gammadbh=higher Eb/N0

538
% k=number of information bits in the code
% n=code block length
% dmin=minimum distance of the code10

gammadb=[gammadbl:(gammadbhgammadbl)/20:gammadbh];
gammab=10.^(gammadb/10);
Rc=k/n;
perr=(2^k1).*q(sqrt(2.*dmin.*Rc.*gammab));

In the MATLAB script given next, the preceding MATLAB function is employed to plot error

probability versus b.

[perrha,gammab]=pesda(7,13,11,15,3);
semilogy(gammab,perrha)

Computer Problem 13.6

Here, the length of the information sequence is 17, which is not a multiple ofk02; therefore, extra

zero-padding will be done. In this case it is sucient to add one 0, which gives a length of 18. Thus,

we have the following information sequence:

100111001100001110

Now, since we have


23
00101001
67
67
G660 0 0 0 0 0 0 177
45
10000001

we obtainn03 andL4. The length of the output sequence is, therefore,

18
241336

The zero-padding required to make sure that the encoder starts from the all-0 state and returns to

the all-0 state addsL1k00s to the beginning and end of the input sequence. Therefore, the

sequence under study becomes

000000100111001100001110000000

Using the function cnv_encd.m, we nd the output sequence to be

000001101111101011100110100100111111

The MATLAB script and the function cnv_encd.m to solve this problem is given next.

k0= 2;
g= [0 0 1 0 1 0 0 1; 0 0 0 0 0 0 0 1; 1 0 0 0 0 0 0 1];

539
input= [1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1 1];
output=cnvencd(g,k0,input)

function output=cnvencd(g,k0,input)
% cnvencd(g,k0,input)
% determines the output sequence of a binary convolutional encoder
% g is the generator matrix of the convolutional code
% with n0 rows and l*k0 columns. Its rows are g1,g2,. . .,gn.
% k0 is the number of bits entering the encoder at each clock cycle.
% input the binary input seq.

% Check to see if extra zero-padding is necessary.


if rem(length(input),k0)>010
input=[input,zeros(size(1:k0rem(length(input),k0)))];
end
n=length(input)/k0;
% Check the size of matrix g.
if rem(size(g,2),k0)>0
error(Error, g is not of the right size.)
end
% Determine l and n0.
l=size(g,2)/k0;
n0=size(g,1);20
% add extra zeros
u=[zeros(size(1:(l1)*k0)),input,zeros(size(1:(l1)*k0))];
% Generate uu, a matrix whose columns are the contents of
% conv. encoder at various clock cycles.
u1=u(l*k0:1:1);
for i=1:n+l2
u1=[u1,u((i+l)*k0:1:i*k0+1)];
end
uu=reshape(u1,l*k0,n+l1);
% Determine the output.30
output=reshape(rem(g*uu,2),1,n0*(l+n1));

Computer Problem 13.7

The code is a2;1code withL3. The length of the received sequenceyis 14. This means that

m7, and we have to draw a trellis of depth 7. Also note that since the input information sequence

is padded withk0L12 0s, for the nal two stages of the trellis we will draw only the branches

corresponding to all-0 inputs. This also means that the actual length of the input sequence is 5,

which, after padding with two 0s, has increased to 7. The trellis diagram for this case is shown

below.

540
Received

01 10 11 11 01 00 01
1232334
000000 00 00 00 00
a
1111111111

111111 11 11
32334
b
?
00 00 00
?
?
01
0101 0101
?

2233
10 10 10
10
10101010
?
d
?
01 01 01
1233

The parsed received sequenceyis also shown in this gure. Note that in drawing the trellis in

the last two stages, we have considered only the 0 inputs to the encoder (notice that in the nal two

stages, there exist no dashed lines corresponding to 1 inputs). Now the metric of the initial all-0

state is set to 0 and the metrics of the next stage are computed. In this step there is only one branch

entering each state; therefore, there is no comparison, and the metrics (which are the Hamming

distances between that part of the received sequence and the branches of the trellis) are added to the

metric of the previous state. In the next stage there exists no comparison either. In the fourth stage,

for the rst time we have two branches entering each state. This means that a comparison has to be

made here, and survivors are to be chosen. From the two branches that enter each state, one that

corresponds to the least total accumulated metric remains as a survivor, and the other branches are

deleted (marked by a small circle on the trellis). If at any stage two paths result in the same metric,

each one of them can be a survivor. Such cases have been marked by a question mark in the trellis

diagram. The procedure is continued to the nal all-0 state of the trellis; then, starting from that

state we move along the surviving paths to the initial all-0 state. This path, which is denoted by a

heavy path through the trellis, is the optimal path. The input-bit sequence corresponding to this path

is 1100000, where the last two 0s are not information bits but were added to return the encoder to

the all-0 state. Therefore, the information sequence is 11000. The corresponding codeword for the

selected path is 11101011000000, which is at Hamming distance 4 from the received sequence. All
other paths through the trellis correspond to codewords that are at greater Hamming distance from

the received sequence.

For soft-decision decoding a similar procedure is followed, with squared Euclidean distances

substituted for Hamming distances.

The MATLAB function viterbi.m given next employs the Viterbi algorithm to decode a channel

output. This algorithm can be used for both soft-decision and hard-decision decoding of convolutional

codes. The separate le metric.m denes the metric used in the decoding process. For hard-decision

decoding this metric is the Hamming distance, and for soft-decision decoding it is the Euclidean

distance. For cases where the channel output is quantized, the metric is usually the negative of the

log-likelihood,logpchannel outputjchannel inputA number of short m-les called by viterbi.m

are also given next.

function[decoderoutput,survivorstate,cumulatedmetric]=viterbi(G,k,channeloutput)
%VITERBI The Viterbi decoder for convolutional codes

541
% [decoderoutput,survivorstate,cumulatedmetric]=viterbi(G,k,channeloutput)
% G is a n x Lk matrix each row of which
% determines the connections from the shift register to the
% n-th output of the code, k/n is the rate of the code.
% survivorstate is a matrix showing the optimal path through
% the trellis. The metric is given in a separate function metric(x,y)
% and can be specied to accommodate hard and soft decision.
% This algorithm minimizes the metric rather than maximizing10
% the likelihood.

n=size(G,1);
% check the sizes
if rem(size(G,2),k) =0
error(Size of G and k do not agree)
end
if rem(size(channeloutput,2),n) =0
error(channel output not of the right size)
end20
L=size(G,2)/k;
numberofstates=2^((L1)*k);
% Generate state transition matrix, output matrix, and input matrix.
for j=0:numberofstates1
for l=0:2^k1
[nextstate,memorycontents]=nxtstat(j,l,L,k);
input(j+1,nextstate+1)=l;
branchoutput=rem(memorycontents*G,2);
nextstate(j+1,l+1)=nextstate;
output(j+1,l+1)=bin2deci(branchoutput);30
end
end
statemetric=zeros(numberofstates,2);
depthoftrellis=length(channeloutput)/n;
channeloutputmatrix=reshape(channeloutput,n,depthoftrellis);
survivorstate=zeros(numberofstates,depthoftrellis+1);
% Start decoding of non-tail channel outputs.
for i=1:depthoftrellisL+1
ag=zeros(1,numberofstates);
if i<=L40
step=2^((Li)*k);
else
step=1;
end
for j=0:step:numberofstates1
for l=0:2^k1
branchmetric=0;
binaryoutput=deci2bin(output(j+1,l+1),n);
for ll=1:n
branchmetric=branchmetric+metric(channeloutputmatrix(ll,i),binaryoutput(ll));50
end
if((statemetric(nextstate(j+1,l+1)+1,2)>statemetric(j+1,1). . .
+branchmetric)jag(nextstate(j+1,l+1)+1)==0)
statemetric(nextstate(j+1,l+1)+1,2) =statemetric(j+1,1)+branchmetric;
survivorstate(nextstate(j+1,l+1)+1,i+1)=j;
ag(nextstate(j+1,l+1)+1)=1;

542
end
end
end
statemetric=statemetric(:,2:1:1);60
end
% Start decoding of the tail channel outputs.
for i=depthoftrellisL+2:depthoftrellis
ag=zeros(1,numberofstates);
laststop=numberofstates/(2^((idepthoftrellis+L2)*k));
for j=0:laststop1
branchmetric=0;
binaryoutput=deci2bin(output(j+1,1),n);
for ll=1:n
branchmetric=branchmetric+metric(channeloutputmatrix(ll,i),binaryoutput(ll));70
end
if((statemetric(nextstate(j+1,1)+1,2)>statemetric(j+1,1). . .
+branchmetric)jag(nextstate(j+1,1)+1)==0)
statemetric(nextstate(j+1,1)+1,2) =statemetric(j+1,1)+branchmetric;
survivorstate(nextstate(j+1,1)+1,i+1)=j;
ag(nextstate(j+1,1)+1)=1;
end
end
statemetric=statemetric(:,2:1:1);
end80
% Generate the decoder output from the optimal path.
statesequence=zeros(1,depthoftrellis+1);
statesequence(1,depthoftrellis)=survivorstate(1,depthoftrellis+1);
for i=1:depthoftrellis
statesequence(1,depthoftrellisi+1)=survivorstate((statesequence(1,depthoftrellis+2i). . .
+1),depthoftrellisi+2);
end
decodederoutputmatrix=zeros(k,depthoftrellisL+1);
for i=1:depthoftrellisL+1
decoutputdeci=input(statesequence(1,i)+1,statesequence(1,i+1)+1);90
decoutputbin=deci2bin(decoutputdeci,k);
decoderoutputmatrix(:,i)=decoutputbin(k:1:1);
end
decoderoutput=reshape(decoderoutputmatrix,1,k*(depthoftrellisL+1));
cumulatedmetric=statemetric(1,1);

function distance=metric(x,y)
if x==y
distance=0;
else
distance=1;
end

function[nextstate,memorycontents]=nxtstat(currentstate,input,L,k)
binarystate=deci2bin(currentstate,k*(L1));
binaryinput=deci2bin(input,k);
nextstatebinary=[binaryinput,binarystate(1:(L2)*k)];

543
nextstate=bin2deci(nextstatebinary);
memorycontents=[binaryinput,binarystate];

function y=bin2deci(x)
l=length(x);
y=(l1:1:0);
y=2.^y;
y=x*y;

function y=deci2bin(x,l)
y=zeros(1,l);
i= 1;
while x>=0 &i<=l
y(i)=rem(x,2);
x=(xy(i))/2;
i=i+1;
end
y=y(l:1:1);

Computer Problem 13.8

The parity-check bits are given by

c20 1 1 1 1 1 1 0 1 0 0 0 1 1 1 1 1 1 0 0

and the MATLAB le for the encoder is given next.

function[csys,cpc]=RSCC57Encoder(u);
% RSCC57Encoder Encoder for 5/7 RSCC
% [csys,cpc]=RSCC57Encoder(u)
% returns csys the systematic bits and
% cpc, the parity check bits of the code
% when input is u and the encoder is
% initiated at 0-state.
u= [0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 1 1];
L=length(u);
l= 1;10
% Initializing the values of the shift register:
r1= 0;
r2= 0;
r3= 0;
while l<=L
ut=u(l);
% Generating the systematic bits:
c1(l) =ut;
% Updating the values of the shift register:
r1t=mod(mod(r3+r2,2) +ut,2);20

544
r3=r2;
r2=r1;
r1=r1t;
% Generating the parity check bits:
c2(l) =mod(r1+r3,2);
l=l+ 1;
end
ccys=c1;
cpc=c2;

Computer Problem 13.9

zThe MATLAB script for the problem is given next.

function alpha=forwardrecursion(gamma);
% FORWARDRECURSION computing alpha for 5/7 RSCC
% alpha=forwardrecursion(gamma);
% returns alpha in the form of a matrix.
% gamma is a 16XN matrix of gammai(sigma(i-1),sigmi)

N=size(gamma,2);% Assuming gamma is given


Ns= 4;% Number of states
% Initialization:
alpha=zeros(Ns,N);10
alpha0= 1;
i= 1;% Time index
simgai= [1 3];% Set of states at i=1
alpha(simgai(1),i) =gamma(1,i);
alpha(simgai(2),i) =gamma(3,i);
i= 2;
simgai= [1 2 3 4];% Set of states at i=2
alpha(simgai(1),i) =gamma(1,i) *alpha(1,i1);
alpha(simgai(2),i) =gamma(10,i)*alpha(3,i1);
alpha(simgai(3),i) =gamma(3,i) *alpha(1,i1);20
alpha(simgai(4),i) =gamma(12,i)*alpha(3,i1);
for i= 3:N2
alpha(simgai(1),i) =gamma(1,i) *alpha(1,i1) +gamma(5,i) *alpha(2,i1);
alpha(simgai(2),i) =gamma(10,i)*alpha(3,i1) +gamma(14,i)*alpha(4,i1);
alpha(simgai(3),i) =gamma(3,i) *alpha(1,i1) +gamma(7,i) *alpha(2,i1);
alpha(simgai(4),i) =gamma(12,i)*alpha(3,i1) +gamma(16,i)*alpha(4,i1);
end
i=N1;% Set of states at i=N-1
simgai= [1 2];
alpha(simgai(1),i) =gamma(1,i) *alpha(1,i1) +gamma(5,i) *alpha(2,i1);30
alpha(simgai(2),i) =gamma(10,i)*alpha(3,i1) +gamma(14,i)*alpha(4,i1);
i=N;
simgai= 1;% Set of states at i=N
alpha(simgai(1),i) =gamma(1,i) *alpha(1,i1) +gamma(5,i) *alpha(2,i1);
alpha=[[1 0 0 0],alpha];

545
Computer Problem 13.10

zThe MATLAB script for the problem is given below.

function beta=backwardrecursion(gamma);
% BACKWARDRECURSION computing beta for 5/7 RSCC
% beta=backwardrecursion(gamma);
% beta in the form of a matrix
% gamma is a 16XN matrix of gammai(sigma(i-1),sigmi)
N=size(gamma,2);% Assuming gamma is given
Ns= 4;% Number of states
% Initialization:
beta=zeros(Ns,N);
beta(1,N) = 1;10
i=N;% Time index
simgai1= [1 2];% Set of states at i=N
beta(simgai1(1),i1) =gamma(1,i);
beta(simgai1(2),i1) =gamma(5,i);
i=N1;
simgai1= [1 2 3 4];% Set of states at i=N-1
beta(simgai1(1),i1) =gamma(1,N)*gamma(1,i);
beta(simgai1(2),i1) =gamma(1,N)*gamma(5,i);
beta(simgai1(3),i1) =gamma(5,N)*gamma(10,i);
beta(simgai1(4),i1) =gamma(5,N)*gamma(14,i);20
for i=N2:1:3
beta(simgai1(1),i1) =beta(1,i)*gamma(1,i) +beta(3,i)*gamma(3,i);
beta(simgai1(2),i1) =beta(1,i)*gamma(5,i) +beta(3,i)*gamma(7,i);
beta(simgai1(3),i1) =beta(2,i)*gamma(10,i) +beta(4,i)*gamma(12,i);
beta(simgai1(4),i1) =beta(4,i)*gamma(16,i) +beta(2,i)*gamma(14,i);
end
i= 2;% Set of states at i=2
simgai1= [1 3];
beta(simgai1(1),i1) =beta(1,i)*gamma(1,i) +beta(3,i)*gamma(3,i);
beta(simgai1(2),i1) =beta(2,i)*gamma(10,i) +beta(4,i)*gamma(12,i);30
i= 1;
simgai1= 1;% Set of states at i=1
beta0(simgai1(1)) =beta(1,i)*gamma(1,i) +beta(3,i)*gamma(3,i);

Computer Problem 13.11

The MATLAB scripts for the problem are given next.

function[c check] =spdecoder(H,y,maxit,E,EbN0dB)


%SPDECODER is the Sum-Product decoder for a linear block code code with BPSK modulation
% [c check] = spdecoder(H,y,maxit,N0)
% y channel output
% H parity-check matrix of the code
% maxit maximum number of iterations

546
% E symbol energy
% EbN0dB SNR/bit (in dB)
% c decoder output
% check is 0 if c is a codeword and is 1 otherwise10

n=size(H,2);% Length of the code


f=size(H,1);% Number of parity checks
R= (nf)/n;% Rate
Eb=E/R;% Energy/bit
N0=Eb*10^(EbN0dB/10);% one-sided noise PSD
Li= 4*sqrt(E)*y/N0;
[j i] =nd(H);
nz=length(nd(H));
Lj2i=zeros(f,n);20
Li2j=repmat(Li,f,1) .*H;
Li2jvec=Li+sum(Lj2i,1);
% Decision making:
Litotal=Li2jvec;
for l= 1:n
if Litotal(l)<= 0
ch(l) = 1;
else
ch(l) = 0;
end30
end
s=mod(ch*H,2);
if nnz(s) == 0
c=ch;
else
it= 1;
while((it<=maxit) && (nnz(s)=0))
% Variable node updates:
for idx= 1:nz
Li2j(j(idx),i(idx)) =Li2jvec(i(idx))Lj2i(j(idx),i(idx));40
end
% Check node updates:
for q= 1:f
F=nd(H(q,:));
Lj2ivec(q) =prod(tanh(0.5*Li2j(q,F(:))),2);
end
for idx= 1:nz
Lj2i(j(idx),i(idx)) = 2*atanh(Lj2ivec(j(idx)) /. . .
tanh(0.5*Li2j(j(idx),i(idx))));
end50
Li2jvec=Li+sum(Lj2i,1);
% Decision making:
Litotal=Li2jvec;
for l= 1:n
if Litotal(l)<= 0
ch(l) = 1;
else
ch(l) = 0;
end
end60

547
s=mod(ch*H,2);
it=it+ 1;
end
end
c=ch;
check=nnz(s);
if(check>0)
check= 1;
end

548
Chapter 14

Problem 14.1

1)The wavelengthis
31083
mm
10910

Hence, the Doppler frequency shift is

u 100 Km/hr 10010310


fDHz 92:5926 Hz
3

10m33600

The plus sign holds when the vehicle travels towards the transmitter whereas the minus sign holds

when the vehicle moves away from the transmitter.

2)The maximum dierence in the Doppler frequency shift, when the vehicle travels at speed 100

km/hr andf1 GHz, is

fD2fD185:1852 Hz
max

This should be the bandwidth of the Doppler frequency tracking loop.

3)The maximum Doppler frequency shift is obtain whenf1GHz1MHzand the vehicle moves

towards the transmitter. In this case

3108

minm0:2997 m
109106

and therefore
100103
fD92:6853 Hz
max
0:29973600

Thus, the Doppler frequency spread isBd2fD185:3706 Hz.


max

Problem 14.2
1)SinceTm1 second, the coherence bandwidth

1
Bc0:5 Hz
b
2Tm

and withBd0:01 Hz, the coherence time is

1
Tct100=250 seconds
2Bd

2)Since the channel bandwidthWbc, the channel is frequency selective.


b
3)Since the signal durationTTct, the channel is slowly fading.

549
4)The ratioW =Bc10. Hence, in principle up to tenth order diversity is available by subdividing
b
the channel bandwidth into 10 subchannels, each of width 0.5 Hz. If we employ binary PSK with

symbol durationT10 seconds, then the channel bandwidth can be subdivided into 25 subchannels,

each of bandwidth20:2 Hz. We may choose to have 5thorder frequency diversity and for each
T
transmission, thus, have 5 parallel transmissions. Thus, we would have a data rate of 5 bits per

signal interval, i.e., a bit rate of 1=2 bps. By reducing the order of diversity, we may increase the data

rate, for example, with no diversity, the data rate becomes 2.5 bps.

5)To answer the question we may use the approximate relation for the error probability given by

(11.1.32), or we may use the results in the graph shown in Figure 11.5. For example, for binary

PSK withD4, the SNR per bit required to achieve an error probability of 106is 18 dB. This the

total SNR per bit for the four channels (with maximal ration combining). Hence, the SNR per bit per

channel is reduced to 12 dB (a factor of four smaller).

Problem 14.3

The signal bandwidth isW100 kHz. Therefore, the time resolution is

r10sec.
W

and, hence, the multipath component is resolvable. The appropriate channel model is

input signal

str

c1c1

output signal

c1stc2str

Problem 14.4
The signal bandwidth isW10 kHz. Therefore, the time resolution is

r100sec.
W

in this case, the multipath component is not resolvable. The appropriate channel model is

550
input signaloutput signal

stcst

Problem 14.5

The Rayleigh distribution is


8
><e22
=2

; >0
p2
>:0
;otherwise

Hence, the probability of error for the binary FSK and DPSK with noncoherent detection averaged

over all possible values ofis

Z12
1cEb22
P2eN0e=2d
022

12cEb1

1ZN
2
e02d
220

But,
Z1
2 n!
x2n1eaxdx; a >0
02an1

so that withn0 we obtain

12cEb1

1ZN11
2
P2e02d
22022cEb1
22
N0
2
11

222cb1
2cEb1
N0
221
wherebEb. Withc1 (DPSK) andc(FSK) we have
N02

8
><1
;DPSK

P221b
>:1
2b;FSK

Problem 14.6

1)

551
cos 2 f1t

2
Matched Filter 1( )


+

2
Matched Filter 1( )


sin 2 f1t

r1(t)
cos 2 f2t

2
Matched Filter 2( )


++

2
Matched Filter 2( )


sin 2 f2t
sample att=kT
cos 2 f1t
Detector
utput
2selecto
Matched Filter 1( )
the larger

+

2
Matched Filter 1( )


sin 2 f1t

r2(t)+
cos 2 f2t

2
Matched Filter 2( )


+

2
Matched Filter 2( )

sin 2 f2t

2)The probability of error for binary FSK with square-law combining forD2 is given in Figure

14.14. The probability of error forD1 is also given in Figure 14.14. Note that an increase in SNR

by a factor of 10 reduces the error probability by a factor of 10 whenD1 and by a factor of 100

whenD2.

Problem 14.7

552
p
1)ris a Gaussian random variable. IfEis the transmitted signal point, then
b
q
Er Er1Er21kEmr
b

and the variance is


2222

r1k2

The probability density function ofris


rmr2

2
f r 1pe2r
2r

and the probability of error is

Z0
P2f r dr
1
mr

2
1Z
prex2dx

21
0v1
uu2
mrC
tA
QB@2
r

where
m21k2E
rb
2222

r1k2

The value ofkthat maximizes this ratio is obtained by dierentiating this expression and solving for

the value ofkthat forces the derivative to zero. Thus, we obtain

2
k1
2

Note that if1> 2, thenk >1 andr2is given greater weight thanr1. On the other hand, if2> 1,

thenk <1 andr1is given greater weight thanr2. When12,k1. In this case

m22E
rb
22

r1
2)When232,k1, and
213
!
m2112Eb4E
r3b
22122

r331
191

On the other hand, ifkis set to unity we have

m24EE
rbb
2222

r1311

Therefore, the optimum weighting provides a gain of

10 log41:25 dB
3

553
Problem 14.8

1)The probability of error for a xed value ofais

0s1
2a2E
A
PeaQ@
N0

since the givenatakes two possible values, namelya0 anda2 with probabilities 0:1 and 0:9,

respectively, the average probability of error is

s! s!

0:18E8E
PeQ0:05Q
2N0N0

AsE! 1,Pe!0:05
N0

3)The probability of error for xed values ofa1anda2is

0v1
uu2
2aa2E
t12CA
Pea1; a2QB@
N0

In this case we have four possible values for the paira1; a2, namely,0;0; 0;2; 2;0, and2;2,

with corresponding probabilities ).01, 0.09, 0.09 and 0.81. Hence, the average probability of error is

s! s!

0:018E16E
Pe0:18Q0:81Q
2N0N0

4)AsE! 1,Pe!0:005, which is a factor of 10 smaller than in (2).


N0

Problem 14.9

a)

Nq
X
Ec1pcEEn1En2c
NEbkk
b
k1

sincen1andn2are zero-mean random variables.


kk

554
b)In order to nd the variance of the estimate we rst needEc2. Note that
012

q
hi1NX
Ec2E@cEn1n2A
N2Ebkk
b
k1
012
NN
1qA
@NXnXn

N2EEcEb1k2j
b
k1j1
1h2i
222

NN
N2ENcEb
b
1h2i
2
NN0

N2ENcEb
b
N0
c2
NE
b

where we have used the facts thatEn1n10 forj6kbecausen1andn1are independent


jkkk
and zero-mean,En1n20 for alli; j, andEn2En22N0=2. From above
jk
1k2k

VarcEc2Ec2c2N0c2N0which goes to 0 asNincreases.


NENE
bb

c)2N0, therefore 1=2NEb, which increases linearly with bothNandE


cNEcNb
b0

Problem 14.10

Channel bandwidth isB3200 Hz.

1.To achieve a rate of 4800 bps, we may useM4 PSK with a symbol rate ofTs1=2400 sec.,

which is 0.42 milliseconds. SinceTm5 msec., andTs< Tm, an equalizer is needed to combat

ISI.

2.To achieve a rate of 20 nits per second, we may use BPSK with a symbol rate ofTs1=2050

msec. SinceTm5 msec., andTsTm, no equalizer is needed. However, a time guard band
ofTmmay ne used to avoid ISI.

Problem 14.11

For a train traveling at 200 km/ht, the vehicle speed isv56 m/sec. At a carrier offc1 GHz, the

maximum Doppler frequency is

fmvfc=c

56109=3108

186 Hz

The Doppler power spectrum is


8
1
>><r;
jfj 186
f2

Sf1861186
>>:
0;jfj>186

555
Problem 14.12

We may select the symbol durationT100sec. to satisfy the bandwidth loss constraint. Then,

f1110 kHz and the number of subcarriers isN80080. The coherence time is
T10410
Tct1100 msec. Therefore,TctT. The coherence bandwidth isBc1100 kHz. To
BdTm
combat signal fading in any subchannel, we may transmit the same symbol on multiple subcarriers

having a frequency separation of at least 100 kHz.

The symbol throughput rate achieved on this channel is

N80800
Rsk symbols/sec
T D104DD

whereDis the order of diversity.

Problem 14.13

We haveTTm1, thenT WTmWW1. Therefore,T W1.


BcnBc
b

Problem 14.14

The matrixGis given by


23
s1s2s30
67
67
6s7
2s10s37
G667
6s7
630s1s27
45
0sss1
32

To show that the code has full diversity (in this case 4) we need to show that the matrix

DGG0

has full rank; whereG0is similar toGbut is obtained by using the triplets0; s0; s0instead of
123
s;s2; s3, wheres0; s0; s06s;s2; s3. Simple substitution gives
123
23
s1s0s2s0s3s00
123
67
607
6s007
62s2s1s10s3s37
DGG067
6s0007
63s30s1s1s2s27
45
0ss0ss0s1s0
33221

To show that this matrix is full rank, we can show that its determinant is nonzero unlesss1; s2; s3

s0; s0; s0. It is easily veried that


123

DHDjs1s0j2 js2s0j2 js3s0j2I4


123

556
from which we conclude that ifs0; s0; s06s;s2; s3, thenGhas full rank, and hence the code has
123
full diversity.

The orthogonality of code is easy to verify by computingGHGand showing that

GHGjs1j2 js2j2 js3j2I4

Problem 14.15

1)The antenna gain for a parabolic antenna of diameterDis

D2
GR

If we assume that the eciency factor is 0:5, then with

c3108

0:3 mD30:3048 m
f109

we obtain

GRGT45:845816:61 dB

2)The eective radiated power is

EIRPPTGTGT16:61 dB

3)The received power is

PTGTGR
PR2:995109 85:23 dB 55:23 dBm
4 d2

Note that

dBm10 logactual power in Watts3010 logpower in Watts


1010
103

Problem 14.16

1)The antenna gain for a parabolic antenna of diameterDis

D2
GR

If we assume that the eciency factor is 0:5, then with

c3108

0:3 m andD1 m
f109

557
we obtain

GRGT54:8317:39 dB

2)The eective radiated power is

EIRPPTGT0:154:837:39 dB

3)The received power is

PTGTGR
PR1:9041010 97:20 dB 67:20 dBm
4 d2

Problem 14.17

The wavelength of the transmitted signal is

3108
0:03 m
10109

The gain of the parabolic antenna is

D2102
GR0:66:5810558:18 dB
0:03

The received power at the output of the receiver antenna is

PTGTGR3101:56:58105
PR2:221013 126:53 dB
7
4d243:141594102

0:03

Problem 14.18

1)SinceT3000K, it follows that

N0kT1:3810233004:141021W/Hz

If we assume that the receiving antenna has an eciency0:5, then its gain is given by
012

D23:1415950
GR0:5@3A5:48310557:39 dB
108

2109

Hence, the received power level is


PTGTGR10105:483105
PR7:81251013 121:07 dB
8
4d243:14159102

0:15

2)IfEb10 dB10, then


N0

E17:81251013
RPRb1011:887110718:871 Mbits/sec
N0N04:141021

558
Problem 14.19

The overall gain of the system is

GtotGaGosGBPFGa10512529 dB
12

Hence, the power of the signal at the input of the demodulator is

P1133029 114 dB
s;dem

The noise-gure for the cascade of the rst amplier and the multiplier is

1100:51
F1FaFos100:53:3785
1
Ga10
1

We assume thatF1is the spot noise-gure and therefore, it measures the ratio of the available PSD

out of the two devices to the available PSD out of an ideal device with the same available gain. That

is,
Sf
F1n;o
Sf GaGos
n;i1

whereSf is the power spectral density of the noise at the input of the bandpass lter and
n;o
Sf is the power spectral density at the input of the overall system. Hence,
n;i

17530
Sf 101010100:53:37853:37851020
n;o

The noise-gure of the cascade of the bandpass lter and the second amplier is

Fa1100:51
F2FBPF2100:24:307
GBPF100:1

Hence, the power of the noise at the output of the system is

P2Sf BGBPFGaF27:311012 111:36 dB


n;demn;o2

The signal to noise ratio at the output of the system (input to the demodulator) is

P
SNRs;dem 114111:36 2:64 dB
P
n;dem

Problem 14.20

The wavelength of the transmission is


c3108

0:75 m
f4109

559
If 1 MHz is the passband bandwidth, then the rate of binary transmission isRbW106bps.

Hence, withN04:11021W/Hz we obtain

PRE
Rbb=)1064:11021101:51:29651013
N0N0

The transmitted power is related to the received power through the relation

PTGTGRPRd2
PR=)PT4
4d2GTGR

Substituting in this expression the valuesGT100:6,GR105,d36106and0:75 we obtain

PT0:1185 9:26 dBW

Problem 14.21

SinceT29001503050K, it follows that

N0kT1:3810233054:211021W/Hz

The transmitting wavelengthis

c3108
0:130 m
f2:3109

Hence, the gain of the receiving antenna is

D23:14159642
GR0:551:315610661:19 dB
0:130

and therefore, the received power level is

PTGTGR17102:71:3156106
PR4:6861012 113:29 dB
11
4d243:141591:6102
0:130

IfE=N06 dB100:6, then


b

E14:6861012
RPRb100:64:43121094:4312 Gbits/sec
N0N04:211021
Computer Problems

560
Computer Problem 14.1

Figures 14.1 and 14.2 presentjc1njandjc2njforW10 kHz, respectively. The channel output

jynjfor input sequencexn1 is presented in Figure 14.3 for20;0:5;1 forW10 kHz.


w
jc1njandjc2njforW5 kHz are presented in Figures 14.4 and 14.5, respectively. The channel

output forW5kHz is presented in Figure 14.6.

The MATLAB script for this problem is given next.

% MATLAB script for Computer Problem 14.1

W= 5 * 10^3;% Signal bandwidth

Td= 10^(3);

timeResolution= 1/W;

delaySamples=Td/timeResolution;

% generate tap weights

% MATLAB script for Computer Problem 14.1

c1(1) =randn+j*randn;

c2(1) =randn+j*randn;

forn= 2:100010

c1(n) = 0.9*c1(n1)+randn+j*randn;

c2(n) = 0.9*c2(n1)+randn+j*randn;

end

x=ones(1,1000);

i= 0;

forvariance= 0:0.5:1.5

i=i+ 1;

c2delayed=zeros(1,n);

c2delayed(delaySamples+1:1000) =c2(1:1000delaySamples);

y(i, :) = (x.*c1+x.*c2delayed) + (sqrt(variance) * (randn(1,1000) +j*randn(1,1000)));20

end

% Plotting commands follow.

Computer Problem 14.2

The following gure illustrates the result of the Monte Carlo simulation and the comparison with the
theoretical error probability.

561
9

(n)|
5
1
|c
4

0
02004006008001000
n

Figure 14.1: The tap weight sequencesjc1njforW10kHz

(n)|
5
2
|c
4

0
02004006008001000
n

Figure 14.2: The tap weight sequencesjc2njforW10kHz

562
2

w=0
20

10

0
02004006008001000
2

w=0.5
20

10

0
02004006008001000
2

w=1
20

10

0
02004006008001000
n

Figure 14.3: Channel outputs for20;0:5;1 forW10kHz


w

563
9

(n)|
5
1
|c
4

0
02004006008001000
n

Figure 14.4: The tap weight sequencesjc1njforW5kHz

5
(n)|
2
|c
4

0
02004006008001000
n

Figure 14.5: The tap weight sequencesjc2njforW5kHz


564
2

w=0
20

10

0
02004006008001000
2

w=0.5
20

10

0
02004006008001000
2

w=1
20

10

0
02004006008001000
n

Figure 14.6: Channel outputs for20;0:5;1 forW5kHz


w

10
Monte Carlo simulation
Theoretical value
-1
10

-2
10

-3
10
Error Probability

-4
10

-5

10
05101520253035
Average SNR/bit (dB)

The MATLAB script for the problem is given below.


565
Eb= 1;% Energy per bit

EbNodB= 0:5:35;

Noover2=Eb*10.^(EbNodB/10);% Noise power

sigma= 1;% Rayleigh parameter

BER=zeros(1,length(EbNodB));

% Calculation of error probability using Monte Carlo simulation:

for i= 1:length(EbNodB)

noerrors= 0;

nobits= 0;10

% Assumption: m = 0 (All zero codeword is transmitted):

while noerrors<= 100

u=rand;

alpha=sigma*sqrt(2*log(u));

noise=sqrt(Noover2(i))*randn;

y=alpha*sqrt(Eb) +noise;

if y<= 0

yd= 1;

else

yd= 0;20

end

nobits=nobits+ 1;

noerrors=noerrors+yd;

end

BER(i) =noerrors/nobits;

end

% Calculation of error probability using the theoretical formula:

rhob=Eb./Noover2;

P2= 1/2*(1sqrt(rhob./(1+rhob)));

% Plot the results:30

semilogy(EbNodB,BER,-,EbNodB,P2,-o)
*
xlabel(Average SNR/bit (dB))

ylabel(Error Probability)

legend(Monte Carlo simulation,Theoretical value)


Computer Problem 14.3

The gure shown below illustrates the result of the Monte Carlo simulation and a comparison with

the theoretical error probability. We note that the agreement is very good for large SNR.

566
0

10
Monte Carlo simulation
Theoretical value
-1
10

-2
10

-3
10
BER
-4
10

-5
10

-6

10
5101520253035
Average SNR/bit (dB)

The MATLAB script for the problem is given below.

D= 2;
sigma= 1;
Eb= 1/sqrt(2);
EbNorxperchdB= 5:5:30;
EbNorxperch= 10.^(EbNorxperchdB/10);
No=Eb*2*sigma^2*10.^(EbNorxperchdB/10);
BER=zeros(1,length(No));
SNRrxperbperch=zeros(1,length(No));
% Calculation of error probability using Monte Carlo simulation:10
for i= 1:length(No)
nobits= 0;
noerrors= 0;
Prxt= 0;% Total rxd power
Pnt= 0;% Total noise power
r=zeros(2,2);
R=zeros(1,2);
% Assumption: m = 1 (All one codeword is transmitted):
while noerrors<= 100
nobits=nobits+ 1;20
u=rand(1,2);alpha=sigma*sqrt(2*log(u));phi= 2*pi*rand(1,2);
noise=sqrt(No(i)/2)*(randn(2,2) + 1i*randn(2,2));
r(1,1) =alpha(1)*sqrt(Eb)*exp(1i*phi(1))+noise(1,1);
r(1,2) =noise(1,2);
r(2,1) =alpha(2)*sqrt(Eb)*exp(1i*phi(2))+noise(2,1);
r(2,2) =noise(2,2);
R(1) =abs(r(1,1))^2 +abs(r(2,1))^2;

567
R(2) =abs(r(1,2))^2 +abs(r(2,2))^2;

if R(1)<=R(2)

mh= 0;30

else

mh= 1;

end

Pnt=Pnt+No(i);

Prxt=Prxt+ 0.5*(abs(r(1))^2 +abs(r(2))^2);

noerrors=noerrors+ (1mh);

end

SNRrxperbperch(i) = (PrxtPnt)/Pnt;

BER(i) =noerrors/nobits;

end40

% Calculation of error probability using the theoretical formula:

rho=EbNorxperch;

rhodB= 10*log10(rho);

rhob=D*rho;

rhobdB= 10*log10(rhob);

KD=factorial((2*D1))/factorial(D)/factorial((D1));

P2=KD./rho.^D;

% Plot the results:

semilogy(rhobdB,BER,-,rhobdB,P2,-o)
*

xlabel(Average SNR/bit (dB));ylabel(BER)50

legend(Monte Carlo simulation,Theoretical value)

Computer Problem 14.4


r
We use the relationR22ln1to generate the the samples from a Rayleigh distribution,
1A
where the parameterAis generated from a uniform distribution in the interval0;1and2may be

arbitrary selected as 1,5,10. Then the actual Rayleigh PDF is given by

22
f xxex=; x0
2
The gure below illustrates the histogram and the comparison with the actual Rayleigh PDF for

5.

568
300

200

100

0246810121416182022240
0:2

0:1

024681012141618202224

The MATLAB script for the problem is given below.

N=20000;

x=0:0.1:25;

u=rand(1,N);

sigma=5;

r=sigmasqrt(-2log(u));
**
r_ac=x/sigma^2.exp(-(x/sigma).^2/2);
*
subplot(2,1,1)

hist(r,x)

axis([0 25 0 300])

subplot(2,1,2)

plot(x,r_ac)

Computer Problem 14.5

The following gure illustrates the result of the Monte Carlo simulation and comparison with the
theoretical error probability for a dual diversity system (D2) at large SNR. We note that the

agreement is very good for large SNR.

569
-1

10
Monte Carlo simulation
Theoretical value
-2
10

-3
10

BER
-4
10

-5
10

-6

10
51015202530

]Average SNR/bit (dB)

The MATLAB script for the problem is given below.

D= 2;
sigma= 1/sqrt(2);
Eb= 1;
EbNorxperchdB= 5:5:25;
EbNorxperch= 10.^(EbNorxperchdB/10);
No=Eb*2*sigma^2*10.^(EbNorxperchdB/10);
BER=zeros(1,length(No));
SNRrxperbperch=zeros(1,length(No));
% Calculation of error probability using Monte Carlo simulation:10
for i= 1:length(No)
nobits= 0;
noerrors= 0;
% Assumption: m = 0 (All zero codeword is transmitted):
while noerrors<= 100
nobits=nobits+ 1;
u=rand(1,2);
alpha=sigma*sqrt(2*log(u));
phi= 2*pi*rand(1,2);
c=alpha.*exp(1i*phi);20
noise=sqrt(No(i)/2)*(randn(1,2) + 1i*randn(1,2));
r=c*sqrt(Eb) +noise;
R=real(conj(c(1))*r(1)+conj(c(2))*r(2));
if R<= 0
mh= 1;
else
mh= 0;

570
end
noerrors=noerrors+mh;
end30
BER(i) =noerrors/nobits;
end
% Calculation of error probability using the theoretical formula:
rho=EbNorxperch;
rhob=D*rho;
rhobdB= 10*log10(rhob);
KD=factorial((2*D1))/factorial(D)/factorial((D1));
P2=KD./(4*rho).^D;
% Plot the results:
semilogy(rhobdB,BER,-,rhobdB,P2,-o)40
*
xlabel(Average SNR/bit (dB));ylabel(BER)
legend(Monte Carlo simulation,Theoretical value)

Computer Problem 14.6

zThe inputs to the detectors at the receive antennas are given by Equation (14.4.7), where the

channel coecients complex-valued, independent, zero-mean Gaussian random variables with

identical variance2.

The MATLAB script for the problem for the case ofNTNR2; 5 is given below.

Nt= 2;% No. of transmit antennas


Nr= 2;% No. of receive antennas
sigma= 5;% Variance of fading coecients
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))*sigma/sqrt(2);% Channel coecients

Computer Problem 14.7

zThe elements ofHareh11,h12,h21, andh22. For the Rayleigh fading channel, these parameters

are complex-valued, statistically independent, zero-mean Gaussian random variables with identical

variances2. Hence, the two inputs to the detectors at the two antennas are

y1h11s1h12s21

y2h21s1h22s22

wheres1ands2are the transmitted symbols from the two transmit antennas and1; 2are the

statistically independent additive Gaussian noise terms with zero mean and equal variances2.
n

The MATLAB script for the problem when25 and21 is given below.
n

Nt= 2;% No. of transmit antennas


Nr= 2;% No. of receive antennas

571
sigma= 5;% Variance of fading coecients
No= 1;% Noise variance
s= 2*randi([0 1],Nt,1)1;% Binary transmitted symbols
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))*sigma/sqrt(2);% Channel coecients
noise=sqrt(No/2)*(randn(Nr,1) + 1i*randn(Nr,1));% AWGN noise
y=H*s+noise;% Inputs to the detectors
disp([The inputs to the detectors are: ,num2str(y)])10

Computer Problem 14.8

zThe MATLAB script for the computations in each of the three detectors is given below.

Nt= 2;% No. of transmit antennas


Nr= 2;% No. of receive antennas
S= [1 111; 11 11];% Reference codebook
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2);% Channel coecients
s= 2*randi([0 1],Nt,1)1;% Binary transmitted symbols
No= 0.1;% Noise Noiance
noise=sqrt(No/2)*(randn(Nr,1) + 1i*randn(Nr,1));% AWGN noise
y=H*s+noise;% Inputs to the detectors
disp([The transmitted symbols are: ,num2str(s)])10

% Maximum Likelihood Detector:


mu=zeros(1,4);
for i= 1:4
mu(i) =sum(abs(yH*S(:,i)).^2);% Euclidean distance metric
end
[Min idx] =min(mu);
sh=S(:,idx);
disp([The detected symbols using the ML method are: ,num2str(sh)])
20
% MMSE Detector:
w1= (H*H + Noeye(2))^(-1)H(:,1);% Optimum weight vector 1
**
w2= (H*H + Noeye(2))^(-1)H(:,2);% Optimum weight vector 2
**
W= [w1 w2];
sh=Wy;
*
for i= 1:Nt
if sh(i)>= 0
sh(i) = 1;
else
sh(i) =1;30
end
end
disp([The detected symbols using the MMSE method are: ,num2str(sh)])

% Inverse Channel Detector:


sh=Hny;
for i= 1:Nt
if sh(i)>= 0
sh(i) = 1;

572
else40
sh(i) =1;
end
end
disp([The detected symbols using the ICD method are: ,num2str(sh)])

Computer Problem 14.9

zThe graph for the estimated error rates as a function of SNR is shown below.
0

10
Alamouti: 4-PSK

-1
10

-2
10

Symbol Error Rate (SER)


-3
10

-4

10
5101520
SNR (dB)

The MATLAB script for the problem is given below.

Nt= 2;% No. of transmit antennas


Nr= 1;% No. of receive antennas
codebook= [1+1i 11i1+1i11i];% Reference codebook
Es= 2;% Energy per symbol
SNRdB= 5:5:20;% SNR in dB
No=Es*10.^(1*SNRdB/10);% Noise variance
% Preallocation for speed:
Dist1=zeros(1,4);% Distance vector for s1
Dist2=zeros(1,4);% Distance vector for s110
BER=zeros(1,length(SNRdB));
% Maximum Likelihood Detector:
echo o;
for i= 1:length(SNRdB)

573
noerrors= 0;
nosymbols= 0;
while noerrors<= 100
s= 2*randi([0 1],1,2)1 + 1i*(2*randi([0 1],1,2)1);
nosymbols=nosymbols+ 2;
% Channel coecients20
h= 1/sqrt(2) * (randn(1,2) + 1i*randn(1,2));
% Noise generation:
noise=sqrt(No(i))*(randn(2,1) + 1i*randn(2,1));
% Correlator outputs:
y(1) =h(1)*s(1) +h(2)*s(2) +noise(1);
y(2) =h(1)*conj(s(2)) +h(2)*conj(s(1)) +noise(2);
% Estimates of the symbols s1 and s2:
sh(1) =y(1)*conj(h(1)) +conj(y(2))*h(2);
sh(2) =y(1)*conj(h(2))conj(y(2))*h(1);
% Maximum-Likelihood detection:30
for j= 1 : 4
Dist1(j) =abs(sh(1)codebook(j));
Dist2(j) =abs(sh(2)codebook(j));
end
[Min1 idx1] =min(Dist1);
[Min2 idx2] =min(Dist2);
st(1) =codebook(idx1);
st(2) =codebook(idx2);
% Calculation of error numbers:
if st(1) =s(1)40
noerrors=noerrors+ 1;
end
if st(2) =s(2)
noerrors=noerrors+ 1;
end
end
BER(i) =noerrors/nosymbols;
end
echo on;
semilogy(SNRdB,BER)50
xlabel(SNR (dB))
ylabel(Symbol Error Rate (SER))
legend(Alamouti: 4-PSK)

Computer Problem 14.10

zFigures 14.7 and 14.8 illustrate the binary error rate (BER) for binary PSK modulation with

NT; NR2;2andNT; NR2;3, respectively. In both cases, the variances of the channel

gains are identical and their sum is normalized to unity; that is,
X
Ejhmnj21 (14.52)
n;m

The BER for binary PSK modulation is plotted as a function of the average SNR per bit. With the

normalization of the variances in the channel gainsfhmngas given by Equation (14.52), the average

received energy is simply the transmitted signal energy per symbol.

574
0

10
ML
MMSE
-1
10
ICD
-2
10
-3
10

BER
-4
10
-5
10
-6
10
-7

10
051015202530
Average SNR/bit (dB)

Figure 14.7: Performance of MLD, MMSE, and ICD (detectors) withNR2 receiving antennas

10
ML
MMSE
-1
ICD
10

-2
10

-3
10
BER
-4
10

-5
10

-6

10
051015202530
Average SNR/bit (dB)

Figure 14.8: Performance of MLD and MMSE detectors withNR3 receiving antennas
575
The performance results in Figures 14.7 and 14.8 illustrate that the MLD exploits the full diversity

of orderNRavailable in the received signal and, thus, its performance is comparable to that of

a maximal ratio combiner (MRC) of theNRreceived signals, without the presence of interchannel

interference; that is,NT; NR1; NR. The two linear detectors, the MMSE detector and the ICD,

achieve an error rate that decreases inversely as the SNR raised to theNR1power forNT2

transmitting antennas. Thus, whenNR2, the two linear detectors achieve no diversity, and when

NR3, the linear detectors achieve dual diversity. We also note that the MMSE detector outperforms

the ICD, although both achieve the same order of diversity. In general, with spatial multiplexing (NT

antennas transmitting independent data streams), the MLD detector achieves a diversity of orderNR

and the linear detectors achieve a diversity of orderNRNT1, for anyNRNT. In eect, with

NTantennas transmitting independent data streams andNRreceiving antennas, a linear detector

hasNRdegrees of freedom. In detecting any one data stream, in the presence ofNT1 interfering

signals from the other transmitting antennas, the linear detectors utilizeNT1 degrees of freedom

to cancel theNT1 interfering signals. Therefore, the eective order of diversity for the linear

detectors isNRNT1NRNT1:

The MATLAB script for the problem is given below.

Nt= 2;% No. of transmit antennas


Nr= 2;% No. of receive antennas
S= [1 111; 11 11];% Reference codebook
Eb= 1;% Energy per bit
EbNodB= 0:5:30;% Average SNR per bit
No=Eb*10.^(1*EbNodB/10);% Noise variance
BERML=zeros(1,length(EbNodB));% Bit-Error-Rate Initialization
BERMMSE=zeros(1,length(EbNodB));% Bit-Error-Rate Initialization
BERICD=zeros(1,length(EbNodB));% Bit-Error-Rate Initialization10

% Maximum Likelihood Detector:


echo o;
for i= 1:length(EbNodB)
noerrors= 0;
nobits= 0;
while noerrors<= 100
mu=zeros(1,4);
s= 2*randi([0 1],Nt,1)1;
nobits=nobits+length(s);20
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr);
noise=sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1));
y=H*s+noise;
for j= 1:4
mu(j) =sum(abs(yH*S(:,j)).^2);% Euclidean distance metric
end
[Min idx] =min(mu);
sh=S(:,idx);
noerrors=noerrors+nnz(shs);
end30
BERML(i) =noerrors/nobits;
end
echo on;

576
% Minimum Mean-Sqaure-Error (MMSE) Detector:
echo o;
for i= 1:length(EbNodB)
noerrors= 0;
nobits= 0;
while noerrors<= 100
s= 2*randi([0 1],Nt,1)1;40
nobits=nobits+length(s);
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr);
noise=sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1));
y=H*s+noise;
w1= (H*H + No(i)eye(Nr))^(-1)H(:,1);% Optimum weight vector 1
**
w2= (H*H + No(i)eye(Nr))^(-1)H(:,2);% Optimum weight vector 2
**
W= [w1 w2];
sh=Wy;
*
for j= 1:Nt
if sh(j)>= 050
sh(j) = 1;
else
sh(j) =1;
end
end
noerrors=noerrors+nnz(shs);
end
BERMMSE(i) =noerrors/nobits;
end
echo on;60

% Inverse Channel Detector:


echo o;
for i= 1:length(EbNodB)
noerrors= 0;
nobits= 0;
while noerrors<= 100
s= 2*randi([0 1],Nt,1)1;
nobits=nobits+length(s);
H= (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr);70
noise=sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1));
y=H*s+noise;
sh=Hny;
for j= 1:Nt
if sh(j)>= 0
sh(j) = 1;
else
sh(j) =1;
end
end80
noerrors=noerrors+nnz(shs);
end
BERICD(i) =noerrors/nobits;
end
echo on;
% Plot the results:
semilogy(EbNodB,BERML,-o,EbNodB,BERMMSE,-,EbNodB,BERICD)
*

577
xlabel(Average SNR/bit (dB),fontsize,10)
ylabel(BER,fontsize,10)
legend(ML,MMSE,ICD)90

Computer Problem 14.11

zThe MATLAB script for the problem is given below.

nobits= 10;% Determine the length of input vector


input=randi([0 3],1,nobits);% Dene the input as a random vector
if mod(nobits,2) = 0
input= [input0];
end
L=size(input,2);
st0= 0;% Initial state
stc=st0;% Initialization of the current state
ant1= [ ];% Output of antenna 110
ant2= [ ];% Output of antenna 2
% Update the current state as well as outputs of antennas 1 and 2:
for i= 1:L
stp=stc;
if input(i) == 0
stc= 0;
elseif input(i) == 1
stc= 1;
elseif input(i) == 2
stc= 2;20
else
stc= 3;
end
ant1= [ant1 stp];
ant2= [ant2 stc];
end
if stc= 0
stp=stc;
stc= 0;
ant1= [ant1 stp];30
ant2= [ant2 stc];
end
% Display the input vector and outputs of antennas 1 and 2:
disp([The input sequence is: ,num2str(input)])
disp([The transmitted sequence by antenna 1 is: ,num2str(ant1)])
disp([The transmitted sequence by antenna 2 is: ,num2str(ant2)])

578
Chapter 15

Problem 15.1

The probability of error for DS spread spectrum with binary PSK may be expressed as

s!

P2Q2W =Rb
PJ=PS

whereW =Ris the processing gain andPJ=PSis the jamming margin. If the jammer is a broadband,

WGN jammer, then

PJW J0

PS E=Tb ERb
bb

Therefore,
s!

P2Q2Eb
J0

which is identical to the performance obtained with a non-spread signal.

Problem 15.2

We assume that the interference is characterized as a zero-mean AWGN process with power spectral

densityJ0. To achieve an error probability of 105, the requiredE=J010 . Then, by using the
b
relation in (11.3.33) and (11.3.37), we have

W =RW =RE
b
PN=PSNu1J0

W =REbNu1
J0

WREbNu1
J0

whereR104bps,Nu30 andE=J010:Therefore,
b
W2:9106Hz

The minimum chip rate is 1=TcW2:9106chips/sec.

579
Problem 15.3

To achieve an error probability of 106;we require

E
b
10:5dB
J0
dB

Then, the number of users of the CDMA system is

NuW =Rb1
E=J0
b

1000

11:3189 users

If the processing gain is reduced toW =Rb500;then

500
Nu145users
11:3

Problem 15.4

We are given a system wherePJ=PS20dB; R1000bpsandE=J010dB:Hence, using


dBbdB
the relation in (11.3.33) we obtain

WPJE
b
RPSJ030dB
dBdBdB

W
R1000

W1000R106Hz

Problem 15.5

The radio signal propagates at the speed of light,c3108m=sec:The dierence in propagation

delay for a distance of 300 meters is

300
Td1sec
3108
The minimum bandwidth of a DS spread spectrum signal required to resolve the propagation paths

isW1MHz:Hence, the minimum chip rate is 106chips per second.

580
Problem 15.6

1.We haveNu15 users transmitting at a rate of 10;000bpseach, in a bandwidth ofW

1MHz:TheE=J0is
b

EW =R106=104100
J0Nu11414

7:148:54dB

1. The processing gain is 100.

2. WithNu30 andE=J07:14;the processing gain should be increased to


b

W =R7:14 29207

Hence, the bandwidth must be increased toW2:07MHz:

Problem 15.7

1. The length of the shift-register sequence is

L2m12151

32767 bits

For binary FSK modulation, the minimum frequency separation is 2=T ;where 1=Tis the symbol

(bit) rate. The hop rate is 100hops=sec:Since the shift register hasN32767 states and

each state utilizes a bandwidth of 2=T200Hz;then the total bandwidth for the FH signal is

6:5534MHz:

2. The processing gain isW =R:We have,

W6:5534106
4
R1006:553410bps

3. If the noise is AWG with power spectral densityN0;the probability of error expression is

s! s!

P2QEbQW =R
N0PN=PS
581
Problem 15.8

The processing gain is given as


W
50027dB
Rb

TheE=J0required to obtain an error probability of 105for binary PSK is 9.5 dB. Hence, the
b
jamming margin is

PJWE
b
PSRbJ0
dBdBdB

279:5

17:5dB

Problem 15.9

Without loss of generality, let us assume thatL1< L2:Then, the period of the sequence obtained by

forming the modulo-2 sum of the two periodic sequences is

L3kL2

wherekis the smallest integer multiple ofL2such thatkL2=L1is an integer. For example, suppose

thatL115 andL263:Then, we nd the smallest multiple of 63 which is divisible byL115;

without a remainder. Clearly, if we takek5 periods ofL2;which yields a sequence ofL3315;

and divideL3byL1;the result is 21:Hence, if we take 21L1and 5L2, and modulo-2 add the resulting

sequences, we obtain a single period of lengthL321L;5L2of the new sequence.

Problem 15.10

1. The period of the maximum length shift register sequence is

L21011023

SinceTbLTc;then the processing gain is

LTb102330dB
Tc
2. The jamming margin is

582
PJWE
b
PSRbJ0
dBdBdB

3010

20dB

whereJavJ0WJ0=TcJ0106

Problem 15.11

At the bit rate of 270.8 Kbps, the bit interval is

106
Tb3:69sec
:2708

a) For the suburban channel model, the delay spread is 7sec. Therefore, the number of bits aected

by intersymbol interference is at least 2. The number may be greater than 2 if the signal pulse

extends over more than one bit interval, as in the case of partial response signals, such as CPM.

b) For the hilly terrain channel model, the delay spread is approximately 20sec. Therefore, the

number of bits aected by ISI is at least 6. The number may be greater than 6 if the signal pulse

extends over more than one bit interval.

Problem 15.12

In the case of the urban channel model, the number of RAKE receiver taps will be at least 2. If the

signal pulse extends over more than one bit interval, the number of RAKE taps must be further

increased to account for the ISI over the time span of the signal pulse. For the hilly terrain channel

model, the minimum number of RAKE taps is at least 6 but only three will be active, one for the rst

arriving signal and 2 for the delayed arrivals.

If the signal pulse extends over more than one bit interval, the number of RAKE taps must be

further increased to account for the ISI over the same span of the signal pulse. For this channel,

in which the multipath delay characteristic is zero in the range of 2sec to 15sec, as many as

3 RAKE taps between the rst signal arrival and the delayed signal arrivals will contain no signal
components.

Problem 15.13

For an automobile traveling at a speed of 100 Km/hr,

vf01059108
fm83:3Hz
c360038

583
For a train traveling at a speed of 200 Km/hr,

fm166:6Hz

The corresponding spread factors are


8
><54
:8310;automobile
TmBdTmfm
>:13
:16610;train

The plots of the power spectral density for the automobile and the train are shown below

0.08

0.07

0.06

0.05

0.04

0.03

0.02
train
automobile

0.01

0
-200-150-100-50050100150200

(Hz)
f
m

Problem 15.14

The expression for the received signal power is

PRPTLsGT
dBdBdBdB

whereLsis the free-space path loss andGTis the antenna gain. The path loss is
dBdB
Ls20 log4 d
dB
2

where the wavelength100 meters. Hence,

Ls20log8104108 dB
dB

584
Therefore,

PTPR10820
dBdB

PR88
dB

The received power level can be obtained from the conditionPR=PN102. First of all,PNW N0,

whereN0kT41021W/Hz andW105Hz. Hence,

PN4:11016W

and

PR4:11018W

or, equivalently,PR 174 dBW. Therefore,


dB

PTPR99 86 dBW
dBdB

or, equivalently,PT2:5109W. The bit rate isRW =Lc105=103100 bps.

Problem 15.15

(a) The coding gain is


1
RcdH1057dB
min
2

(b) The processing gain isW =R;whereW107HzandR2000bps:Hence,

W107
510337dB
R2103

(c) The jamming margin given by (10.3.43) is

PJWE
b
PsRCGdBJ0
dBdBdB

3771034dB

Problem 15.16

(a)If the hopping rate is 2 hops/bit and the bit rate is 100 bits/sec, then, the hop rate is 200
hops/sec. The minimum frequency separation for orthogonality 2=T400Hz:Since there

areN32767 states of the shift register and for each state we select one of two frequencies

separated by 400Hz;the hopping bandwidth is 13:1068MHz:

585
(b) The processing gain isW =R;whereW13:1068MHzandR100bps:Hence

W
R0:131068MHz

(c)The probability of error in the presence of AWGN is given by (10.3.61) withN2 chips per

hop.

Problem 15.17

a)The total SNR for three hops is 2013 dB.Therefore the SNR per hop is 20=3. The probability of a

chip error with noncoherent detection is


E
c
p1e2N0
2

whereE=N020=3. The probability of a bit error is


c

Pb11p2

112pp2

2pp2
EE
cc
1
e2N0eN0
2
0:0013

b)In the case of one hop per bit, the SNR per bit is 20, Hence,

1Ec
Pbe2N0
2
1
10

2e
2:27105

Therefore there is a loss in performance of a factor 57 AWGN due to splitting the total signal energy

into three chips and, then, using hard decision decoding.

Problem 15.18

(a) We are given a hopping bandwidth of 2GHzand a bit rate of 10kbs:Hence,

W2109
210553dB
R104

(b) The bandwidth of the worst partial-band jammer isW ;where

2=E=J00:2
b

586
Hence

W0:4GHz

(c) The probability of error with worst-case partial-band jamming is

11
P2ee
E=J010
b

3:68102

Computer Problems

Computer Problem 15.1

The results of Monte Carlo simulation are shown in Figure 15.1 for three dierent values of amplitude

of the sinusoidal interference withLc20.

The Matlab script for the simulation program is given next.

% MATLAB script for Computer Problem 15.1.


echoon
Lc=20;% number of chips per bit
A1=3;% amplitude of the rst sinusoidal interference
A2=10;% amplitude of the second sinusoidal interference
A3=12;% amplitude of the third sinusoidal interference
A4=0;% fourth case: no interference
w0=1;% frequency of the sinusoidal interference in radians
SNRindB=0:2:30;
for i=1:length(SNRindB),10
% measured error rates
smlderrprb1(i)=ssPe(SNRindB(i),Lc,A1,w0);
smlderrprb2(i)=ssPe(SNRindB(i),Lc,A2,w0);
smlderrprb3(i)=ssPe(SNRindB(i),Lc,A3,w0);
echoo;
end;
echoon;
SNRindB4=0:1:8;
for i=1:length(SNRindB4),
% measured error rate when there is no interference20
smlderrprb4(i)=ssPe(SNRindB4(i),Lc,A4,w0);
echoo;
end;
echoon;
% Plotting commands follow.

587
function[p]=ssPe(snrindB,Lc,A,w0)
% [p]=ssPe(snrindB, Lc, A, w0)
% SSPE nds the measured error rate. The function
% that returns the measured probability of error for the given value of
% the snrindB, Lc, A and w0.
snr=10^(snrindB/10);
sgma=1;% Noise standard deviation is xed.
Eb=2*sgma^2*snr;% signal level required to achieve the given
% signal-to-noise ratio
Echip=Eb/Lc;% energy per chip10
N=100000;% number of bits transmitted
% The generation of the data, noise, interference, decoding process and error
% counting is performed all together in order to decrease the run time of the
% program. This is accomplished by avoiding very large sized vectors.
numoferr=0;
for i=1:N,
% Generate the next data bit.
temp=rand;
if(temp<0.5),
data=1;20
else
data=1;
end;
% Repeat it Lc times, i.e. divide it into chips.
for j=1:Lc,
repeateddata(j)=data;
end;
% pn sequence for the duration of the bit is generated next
for j=1:Lc,
temp=rand;30
if(temp<0.5),
pnseq(j)=1;
else
pnseq(j)=1;
end;
end;
% the transmitted signal is
transsig=sqrt(Echip)*repeateddata.*pnseq;
% AWGN with variance sgma^2
noise=sgma*randn(1,Lc);40
% interference
n=(i1)*Lc+1:i*Lc;
interference=A*sin(w0*n);
% received signal
recsig=transsig+noise+interference;
% Determine the decision variable from the received signal.
temp=recsig.*pnseq;
decisionvariable=sum(temp);
% making decision
if(decisionvariable<0),50
decision=1;
else
decision=1;
end;

588
0
10
A=0
A=3
A=10
-1
10

-2
10

-3
10
Measured error probability

-4
10
0510152025
SNR in dB

Figure 15.1: The results of Monte Carlo simulation

% If it is an error, increment the error counter.


if(decision=data),
numoferr=numoferr+1;
end;
end;
% then the measured error probability is60
p=numoferr/N;

Computer Problem 15.2

The results of Monte Carlo simulation are shown in Figure 15.2.

The Matlab script for the simulation program is given next.

% MATLAB script for Computer Problem 15.2


snrMin= 1;
snrMax= 14;
numOfUsers= 4;
N= 10000;% Number of simulation bits
% Assign the gold sequences
gs{1} = [1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 1];
gs{2} = [1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0];
gs{3} = [1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0];
gs{4} = [1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 0 0]; 10

589
for i=1:4
gs{i} = 2*gs{i}1;
end
chip=length(gs{1});
err=zeros(numOfUsers, (snrMaxsnrMin)+1);
j= 0;
forSNR=snrMin:snrMax
j=j+ 1;
stddev=sqrt(chip/((10^(SNR/10))*2));
forinData=1:N20
channelOutput=zeros(1,chip);
for i=1:numOfUsers
infoData(i) = 2.*(round(rand(1)))1;
channelOutput=channelOutput+gs{i}*infoData(i);
end
noise=stddev*randn(1,chip);
channelOutput=channelOutput+noise;
for i= 1:numOfUsers
hardDec=sign(sum(channelOutput.*gs{i}));
ifhardDec=infoData(i);30
err(i,j) =err(i,j) + 1;
end
end
end
end
% Plotting commands follow.
ber=err./N;
snr=snrMin:snrMax;
semilogy(snr,ber(1,:),--);
holdon;40
semilogy(snr,ber(2,:),-.);
semilogy(snr,ber(3,:),:);
semilogy(snr,ber(4,:),-);
legend(User 1,User 2,User 3,User 4);

Computer Problem 15.3

The results of Monte Carlo simulation are shown in Figure 15.3.

The Matlab script for the simulation program is given next.

% MATLAB script for Computer Problem 15.3


snrMin= 1;
snrMax= 14;
numOfUsers= 4;
N= 10000;
% Assign the gold sequences
gs{1} = [1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 1];
gs{2} = [1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0];
gs{3} = [1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0];
gs{4} = [1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 0 0]; 10
for i=1:4

590
-1
10
User 1
User 2
User 3
User 4
-2
10

-3
10
Probability of error

-4
10
1234567891011
SNR in dB

Figure 15.2: The results of Monte Carlo simulation of four time synchronous CDMA users

gs{i} = 2*gs{i}1;
end
chip=length(gs{1});
err=zeros(numOfUsers, (snrMaxsnrMin)+1);
j= 0;
forSNR=snrMin:snrMax
j=j+ 1;
stddev=sqrt(chip/((10^(SNR/10))*2));
previosInfoData= 2.*(round(rand(1, 4)))1;20
infoData= 2.*(round(rand(1, 4)))1;
forinData=1:N
channelOutput=zeros(1,chip+3);
temp1=zeros(1,chip+3);
temp2=zeros(1,chip+3);
temp3=zeros(1,chip+3);
temp4=zeros(1,chip+3);

nextInfoData= 2.*(round(rand(1, 4)))1;


30
temp1(1:chip) =gs{1}*infoData(1);
temp1(chip+1:chip+3) =nextInfoData(1) *gs{1}(1:3);

temp2(1) =previosInfoData(2) *gs{2}(chip);


temp2(2:chip+1) =infoData(2) *gs{2};
temp2(chip+2:chip+3) =nextInfoData(2) *gs{2}(1:2);

591
temp3(1:2) =previosInfoData(3) *gs{3}(chip1:chip);
temp3(3:chip+2) =infoData(3) *gs{3};
temp3(chip+3) =nextInfoData(3) *gs{3}(1);40

temp4(1:3) =previosInfoData(4) *gs{4}(chip2:chip);


temp4(4:chip+3) =infoData(4) *gs{4};

noise=stddev*randn(1,chip+3);
channelOutput=temp1+temp2+temp3+temp4+noise;

foruser= 1:4
hardDec=sign(sum(channelOutput(user:(chip+(user1))).*gs{user}));50
ifhardDec=infoData(user);
err(user,j) =err(user,j) + 1;
end
end
previousInfoData=infoData;
infoData=nextInfoData;

end

end60
% Plotting commands follow.
ber=err./N;
snr=snrMin:snrMax;
semilogy(snr,ber(1,:),--);
holdon;
semilogy(snr,ber(2,:),-.);
semilogy(snr,ber(3,:),:);
semilogy(snr,ber(4,:),-);
legend(User 1,User 2,User 3,User 4);

Computer Problem 15.4

The period of the sequence is

L2m14095

The periodic autocorrelation function of the equivalent bipolar sequence is presented in Fig-

ure 15.4

The Matlab script for this problem is given next.

% MATLAB script for Computer Problem 15.4


connections=zeros(1,12);
m= 12;
L= 2^m1;
connections(1) = 1;
connections(7) = 1;

592
-1
10
User 1
User 2
User 3
User 4
-2
10

-3
10
Probability of error

-4
10
123456789
SNR in dB

Figure 15.3: The results of Monte Carlo simulation of four time asynchronous CDMA users

connections(9) = 1;
connections(12) = 1;
sequence=ssmlsrs(connections);
c= 2.*sequence1;10
Rc=zeros(1,L);
form=1:L
forn=1:L

Rc(m) =Rc(m)+c(n)*c(n+m1);
end
end
% Plotting commands follow.

plot(Rc);20
axis([500 4500500 4500]);

function[seq]=ssmlsrs(connections);
% [seq]=ssmlsrs(connections)
% SSMLSRS generates the maximal length shift-register sequence when the
% shift-register connections are given as input to the function. A zero
% means not connected, whereas a one represents a connection.
m=length(connections);
L=2^m1% length of the shift register sequence requested
registers=[1zeros(1,m1)];% initial register contents
seq(1)=registers(1);% rst element of the sequence

593
4500

4000

3500

3000

2500

2000
(m)
c
R
1500

1000

500

-500
-500050010001500200025003000350040004500
m

Figure 15.4: The autocorrelation of the bipolar sequence

for i=2:2*L,10
newregcont(m)=mod(sum(registers.*connections), 2);
for j=m1:1:1,
newregcont(j)=registers(j+1);
end;
registers=newregcont;% current register contents
seq(i)=registers(1);% the next element of the sequence
end;

Computer Problem 15.5

The gure shown below illustrates the result of this crosscorrelation offrkgwithfckg. Although

the signal component is not observable in the high-level noise, the signal is clearly detectable at the

output of the correlator.

The MATLAB script for the problem is given below.

N= 1000;% Number of samples


M= 50;% Length of the autocorrelation function
p= [0.9 0.99];% Pole positions
w= 1/sqrt(2)*(randn(1,N) + 1i*randn(1,N));% AWGN sequence
% Preallocation for speed:
c=zeros(length(p),N);

594
10
1000
8
900
6
800
4
700
2
600
0
rk
yn
500
-2
400
-4
300
-6
200
-8
100
-10
0200400600800100002004006008001000
kn

Rx=zeros(length(p),M+1);
Sx=zeros(length(p),M+1);
for i= 1:length(p)10
for n= 3:N
c(i,n) = 2*p(i)*c(n1)power(p(i),2)*c(n2) +power((1p(i)),2)*w(n);
end
% Calculation of autocorrelations and power spectra:
Rx(i,:) =Rxest(c(i,:),M);
Sx(i,:)=tshift(abs(t(Rx(i,:))));
end
% Plot the results:
subplot(3,2,1)
plot(real(c(1,:)))20
axis([0Nmax(abs(real(c(1,:))))max(abs(real(c(1,:))))])
title(\it{p} = 0.9)
xlabel(\it{n})
ylabel(\it{c_{nr}})
subplot(3,2,2)
plot(real(c(2,:)))
axis([0Nmax(abs(real(c(2,:))))max(abs(real(c(2,:))))])
title(\it{p} = 0.99)
xlabel(\it{n})
ylabel(\it{c_{nr}})30
subplot(3,2,3)
plot(imag(c(1,:)))
axis([0Nmax(abs(imag(c(1,:))))max(abs(imag(c(1,:))))])
title(\it{p} = 0.9)
xlabel(\it{n})
ylabel(\it{c_{ni}})
subplot(3,2,4)
plot(imag(c(2,:)))
axis([0Nmax(abs(imag(c(2,:))))max(abs(imag(c(2,:))))])
title(\it{p} = 0.99)40
xlabel(\it{n})
ylabel(\it{c_{ni}})
subplot(3,2,5)
plot(abs(c(1,:)))
axis([0N0max(abs(c(1,:)))])
title(\it{p} = 0.9)

595
xlabel(\it{n})
ylabel(\it{|c_n |})
subplot(3,2,6)
plot(abs(c(2,:)))50
axis([0N0max(abs(c(2,:)))])
title(\it{p} = 0.99)
xlabel(\it{n})
ylabel(\it{|c_n |})

gure
subplot(2,2,1)
plot(abs(Rx(1,:)))
axis([0M0max(abs(Rx(1,:)))])
title(\it{p} = 0.9)60
xlabel(\it{n});ylabel(\it{|R_{c}(n)|})
subplot(2,2,2)
plot(abs(Rx(2,:)))
title(\it{p} = 0.99)
xlabel(\it{n});ylabel(\it{|R_{c}(n)|})
axis([0M0max(abs(Rx(2,:)))])
subplot(2,2,3)
plot(Sx(1,:))
title(\it{p} = 0.9)
xlabel(\it{f});ylabel(\it{S_{c}(f)})70
axis([0M0max(abs(Sx(1,:)))])
subplot(2,2,4)
plot(Sx(2,:))
title(\it{p} = 0.99)
xlabel(\it{f});ylabel(\it{S_{c}(f)})
axis([0M0max(abs(Sx(2,:)))])

Computer Problem 15.6

Figure 15.5 presents the frequency selection pattern for the rst ten bit interval.

The Matlab script for this problem is given next.

% MATLAB script for Computer Problem 15.6


W= 127;% frequency band of width
Df= 2;% frequency seperation for fsk
m=7;
L=2^m1% length of the shift register sequence requested
connections=zeros(1,7);
connections(1) = 1;
connections(7) = 1;
registers=[1zeros(1,m1)];% initial register contents
seq(1)=registers(1);% rst element of the sequence10
frequency(1) =bin2dec(num2str(registers));% rst frequency
% select the rst two frequencies
f0(1) =frequency(1)Df/2;
f1(1) =frequency(1) +Df/2;
for i=2:2*L,

596
140

120

100

80

60
Frequency

40

20

0
12345678910
time

Figure 15.5: Frequency selection pattern

newregcont(m)=mod(sum(registers.*connections), 2);
for j=m1:1:1,
newregcont(j)=registers(j+1);
end;
registers=newregcont;% current register contents20
seq(i)=registers(1);% the next element of the sequence
frequency(i) =bin2dec(num2str(registers));% select the frequency
% select two frequencies
f0(i) =frequency(i)Df/2;
f1(i) =frequency(i) +Df/2;
end;
plot(frequency(1:10),);
*

Computer Problem 15.7

Figure 15.6 illustrates the error rate that results from the Monte Carlo simulation. Also shown in the

gure is the theoretical value of the probability of error.

The MATLAB scripts for the simulation program are given next.

echo on
rhob1=0:5:35;% rho in dB for the simulated error rate
rhob2=0:0.1:35;% rho in dB for theoretical error rate computation
for i=1:length(rhob1),

597
0
10

-1
10

-2
10

-3
10

-4
10
05101520253035

Figure 15.6: Error-rate performance of FH binary FSK system with partial-band interferenceMonte

Carlo simulation

smlderrprb(i)=sspe96(rhob1(i));% simulated error rate


echo o;
end;
echo on;
for i=1:length(rhob2),
temp=10^(rhob2(i)/10);10
if(temp>2)
theoerrrate(i)=1/(exp(1)*temp);% theoretical error rate if rho>2
else
theoerrrate(i)=(1/2)*exp(temp/2);% theoretical error rate if rho<2
end;
echo o;
end;
echo on;
% Plotting commands follow.

function[p]=ssPe96(rhoindB)
% [p]=ssPe96(rhoindB)
% SSPE96 nds the measured error rate. The value of
% signal per interference ratio in dB is given as an
% input to the function.
rho=10^(rhoindB/10);
Eb=rho;% energy per bit
if(rho>2),

598
alpha=2/rho;% optimal alpha if rho>2
else10
alpha=1;% optimal alpha if rho<2
end;
sgma=sqrt(1/(2*alpha));% noise standard deviation
N=10000;% number of bits transmitted
% generation of the data sequence
for i=1:N,
temp=rand;
if(temp<0.5)
data(i)=1;
else20
data(i)=0;
end;
end;
% Find the received signals.
for i=1:N,
% the transmitted signal
if(data(i)==0),
r1c(i)=sqrt(Eb);
r1s(i)=0;
r2c(i)=0;30
r2s(i)=0;
else
r1c(i)=0;
r1s(i)=0;
r2c(i)=sqrt(Eb);
r2s(i)=0;
end;
% The received signal is found by adding noise with probability alpha.
if(rand<alpha),
r1c(i)=r1c(i)+gngauss(sgma);40
r1s(i)=r1s(i)+gngauss(sgma);
r2c(i)=r2c(i)+gngauss(sgma);
r2s(i)=r2s(i)+gngauss(sgma);
end;
end;
% Make the decisions and count the number of errors made.
numoferr=0;
for i=1:N,
r1=r1c(i)^2+r1s(i)^2;% rst decision variable
r2=r2c(i)^2+r2s(i)^2;% second decision variable50
% Decision is made next.
if(r1>r2),
decis=0;
else
decis=1;
end;
% Increment the counter if this is an error.
if(decis=data(i)),
numoferr=numoferr+1;
end;60
end;
% measured bit error rate is then

599
p=numoferr/N;

600

Você também pode gostar