Baixe Contemporary Communication Systems using Matlab - Proakis and Salehi e outras Notas de estudo em PDF para Engenharia Elétrica, somente na Docsity!
RR Ri MAT LAB
John G. Proakis
Masoud Salehi
The PWS
BookWare Companion Series 14
CONTEMPORARY
COMMUNICATION
SYSTEMS
| USING MATLAB?
| John G. Proakis
Masoud Salehi
Northeastern University
i PWS Publishing Company
HP An International Thomson Publishing Company
Boston * Albany * Bonn * Cincinnati * London « Madrid + Melbourne * Mexico City * New York
Paris » San Francisco « Singapore + Tokyo » Toronto « Washington
lou freciy ever highespecd nenwor
for ibesc and other goals to be rca
necvork estrinistrators. and publishers will neec to communicate fizety and actively
asinh each other. We encourage you to parncipute in these exciting developments and
become Involver in the BC Secies today, Tf vou save an idea for improving
te problem. à demenstration asirs softwara cr
multimedia. or an cpporturity to explore, contact us.
We thank you eme and al for ym.e continuiag sappert
4 Engincoring Isam Contents
BBarerpus com — Acquinitioas Editor
ks IG support remote icurnirg activities, In order
2d, educators. students, saliware developers.
ness of he BC concept, an exam;
SicansGpwscom Assistant Editor
Nwilharipwscom — Marketing Manager 1 Signals and Linear Systems 1
LI Preview... 1
ee a cam Produeciom Ei 1.2 Fourier Series a . ne 1
PRockaweilê pus com Production Fiditor 1.2.1 Periudic Sigoals and LTT Systems o
TKolivepwscom — Editortal Assistam: H3 Pine: Transforms té
13.1 SamplingTheorem ...... .. 23
1.3.2 Frequency Domain Analysis o! LTI Systems .. o
1.4 Power and Energy o R
1.5 Lownass Equivalent of Bandpass Signals as
2 Random Progosses as
21 Preview AS
Generation of Random Variables . . . e as
Gaussian and Gauss-Markow Processes .......... st
2.4 Power Spectrum of Random Processes and White Processes s7
2.5 Linear Filtering of Random Processes . . .s
2.6 Lowpass and Bandpass Processes . o
3 Analog Modulation 79
31 Preview RE 79
32 Amplitude Modulation (AM) ”
321 DSB-AM . .. . 30
322 Conventiona AM... close 89
323 S$8-AM a . o 9%
33 Demodulation of AM Signals Cc ON
331 DSB-AM Demodulaton . .. 04
332 SSB-AM Demodulation 106
3.33 Conventional AM Demodulation E
4 Angle Modulation ce 6
4 Analog-to-Digital Conversion Jar
4d Preview... decir 13
42 Measure uf Information 132
vi
Lo mu
vii
43.2
Pulse-Code Mod atiom
5 Baseband Digitul Transmission
Preview
5.2 Binary Signal Transmission
sa
Optimum Receiver for the AWGN Channel
Signal Correinor
Matched Filter
The Detector
Monte Carlo Simulation of a Binary Comtnanicason System .
Other Binary Sienal Transmission Meikods
Antipodal Signals tor Binary Signal Transmission .
On-Olt Signals for Binary Stgnal Transmission...
Signal Constellation Diagrams for Binary Signais. .
53 Multiamplitude Sigaal Transmission
s21
532
533
sis
sas
Signal Wavetorms with Four Amplitude Levels
Optimum Recesver for the AWGN Channei
Signal Correlator
The Detector...
Signal Wavetorms with Multiple Amplitude Levels . .
5.4 Multidimensional Signals
54.1
542
Multidimensional Orthogona! Signals
Brorthogonal Signals
é Digital Transmission Through Bandlimited Channels
Preview ..
The Power Spectrum of a Digital PAM Signal , =
Characterization of Banulimited Channels and Channel Distortion
Characterization of Intersymbol Interference .
Communication System Design for Bandlimited Channels
61
62
6.3
[4
6.5
06
67
651
és.2
653
Linear Equalizers ....
661
Signal Design for Zero [SL .......
Signal Design for Conrolled ISI
Precoding for Detection of Partial Response Signals
Adaptive Linear Equalicers
Nonlinear Fqualizers
7 Digital Transmission via Carrier Modulation
Preview
71
72
73
Carrier-Amplizade Modulation . .
724
Carrier-Phase Modulation
Demodulaton ot PAM Signals
CONTENTS
132
13%
138
146
192
196
200
201
20
22
221
22
22%
2e1
244
2
253
251
265
71
281
281
281
285
287
t
i
CONTENTS
7.3.1 Phase Demodulation end Detscsion
7.3.2 Differential Phase Moduiatioa and Demogulaticn .
Quadrature Amplitude Modularion
74.1 Demedulation and Detection of QAM
74.2. Probability of Error for QAM in ar AWGN Channel
Canrier-Frequency Modulation
Frequency-Shiit Koying
Demodulation and Detecuon of FSK Signals
Probabiliny of Brror for Noneatezens Detection of FSK .
Inenizaven in Communication Systems
Carrier Synchronizanon
Clock Synchronization
34
8 Channel Capacity and Coding
BL Preview
8.2 Channel Mcdel und Channel Capacity .
82.1 Chanael Capacity
8a
Linear Block Codes. . 00...
83.2 Convolutiona! Codes
9 Spread Spectrum Communication Systems
91 Previow .
9.2. Direct-Sequence Spread Specstum Systems
92,1 Signal Demodulation . ........
922 Probability of Error .
9.23 Two Applications of DS Spread Spectrum Signals
9.3 Generation of PN Sequences .
9.4 Frequency-Hopped Spread Spectrum
9.4.1 Probability of Error (or FH Signals .
942 Use of Signal Diversity to Qvercome Partial- Band Interference . .
291
am
306
308
313
314
316
32
328
326
332
33
363
343
344
355
357
3
Ea!
391
392
395
397
398
a03
409
am
am
PREFACE
There are mamy texcbooks on the imarket today (sat near the basic topics in analog and
digital communicatior systems including coding and deced:g algoricams and medulation
ané demoduianon iechaques. The socus cf mst of (ese textbuoks is by necessity om the
Eeory that underiies Me desen and performance analysis o the various building blocks.
e, coders, decoders, modulators, ané demedulaters. that constitute the aasic elements of
a communication system. Relarively fem Gt ae teshonks, especially chose iwritien for an-
dergeaduars stuécuts, include à namber of applications that serve ta moúvale the students.
SCOPE OF THE BOOK
“The objecuve oi thus dock is so serve as a eempanior or suaplement, to any cf the com-
pesbensive texthonks in communication systems. “The bogk provides a vanety of exercises
that may be solved on the computer (generally. à personal vompuses is sufficient) using
the popular student edito: of MATLAB. The book is intended to be used primarily dy
senir-level undergraduate students and graduate students in electrical ergensering, com
puter ergincenng and zomputer science We assume lhat the student (or user) is familiar
veth the funidamentals cf MATLAB. Those topigs are not covered, because several tutorial
books and manuais on MATLAB are available.
By destgn, the treatment cf the various topies is Enef. We provide the motivation ond
a short introducuon o each topic, establish the necessary notation. and then illustrate the
basic notions hy means of an example. The primary text and the imstructor are expecteé to
provide lhe required depth of tre topres treated. Fer example, we introduce the matched
filter and the correlator and assert that these devices result im the optimum demodulation
cf signals corrupted by asdiave awiute Gaussian noise (AWGN), bat we do not provide à
proof ofthis assertion. Such a prowf is generally siven im most textbooks en communication
systems.
ORGANIZATION OF THE BOOK
“The book consists Of nine chapters. The Árst two ctapters on signats and Lincar systems and
on random processes treat tha basic background tal is generally cequiteé m che study of
communicanon systems. There is one chapter on analog communication techniques, and
she remaining five chaptezs are focused on digital communications.
Chapter |: Signals and Linear Systems
This chapter provides a review of the basic tocis and techniques from linear systems analysis,
including both time-domain and frequency -«Juraain chasactecizaticas. Frequency-domain-
analysis techniques are emplisized, sines these techniques are most frequently used in the
treatment f communication systems
x
2 CHAPTER à. SH
TALS AND LINEAR SYSTEMS
then the output is given by
vo= Act pio) dr
eo .
=a[f mor Sn [ata (123)
tm other words, the output is a complex exponential with the same Frequency as the inpuc
The (complex) amplitude of the output, however, is the (complex) amplitude of the input
amplified by
/ lee ho gr
Note thatthe above quantity isa function ofthe impulse response of the LTI system. h(t), and
the frequency of the input signal, fo. Therefore, computing the response of LT systems to
exponential inputs is particularly easy. Consequentty, its natutat in incar system analysis
10 look for methods of expancing signals as the sum of complex exponentials. Fourier
series and Fourier transforms are tecâniques for expanding signals in terms af complex
exponentials,
A Fourier series is the orthogonat expansion of periodic signals witit period Ty when
the signal set (e/2ru/To JO is employed as the basis for the expansion. With this basis,
any periodic signal! x(t) with period Tg can be expressed as
sN= L nei TA (12.8)
vhere the x's are called the Fourier series coeficients of the signal x(4) and are given by
1 pet, ,
nel [ elojecitsaito 025
a
Here a is an arbitrary constant chosen in such à way that the cormputation of the integral is
simplifed. The frequeney fg = 1/75 is catied the fundamental frequency ví the periodic
signal, and the frequency f, = n7o às called the nth harmonic. Ja most cases either a = O
ore = —Th/2 is à good choice.
This type of Fourier series is known as the exponentiu! Fourier series and cane applied
to bolhreal-valued and complex-valued signais x (7) as fong as they are períodic. In general,
the Fourier series coctficients (xn) are complex numbers even when x(?) is a real-valued
signal
1A sutficient condition for the
details ee [1]
state vF the Fourier series ia that e:+) satusfy the Dirichiet conditivns. Fur
12 Fourier Series
Whea xét) is à real veined periodi. sigua, we buve
df
Dam q
=— rare Eta q
nl
Feam this it is obviors thar
“Thus the Fourier series cocificients of a reai-value signal have Hermitian sooemermy: ie.
their real part is even and their imuginery part is odd tor. equivalenty. their m
even and their phasc is odd)
Another form of Fourier series, known as pigememetrio Fourier series, cau ix applied
dEly :o real, periadic signals and is obtained by detinng
fbu
jituce is
which, after using Euter's relation
em tim os (ame) = ssin mt 612.10)
sesults in
2 qem no
m= ESA xQ)cos (em) dt
2 quim n
bm Tl *(Bsin (15) dr 21
and, therefore,
a , .
dn = ; -Emeos E) + sin (am)
Note that for n = 0 we always have bg = O. so ag = 2x9.
By defining
+b;
(1213)
: CHAPTER | SIGNALS AND LINEAR SYSTEMS
and using the eeiarion
Ts 5º
só tising="0 Hitestp -) (1214)
q a!
Ecustion (52.123 cam be weten in the form
ay, É r
cur LE + enzos [rr + 6 1.215)
ra To
pe
svbica is the Erg sorm of ihe Founer sentes expansion fer reab and pervodie signais. To
generai the Fourice secs coclticieuts rw] for real-valued signals ate related mó, by, Cm,
and (4, tbroug
-2 mí
metal 216)
e =ir
Pets of [xy] and Lg vecsas avr nf) are called the discrere speciriem ot x(1). The plotof
leis usagily calted the ateegrnitide spectrim, art the piotof é xy is referred to as the phase
spectrum
E egej is real and even af (>) = x(rj—then taking e = —Ty/2, we have
E steysin [2 E) de (217)
Luas di io
which is zezo Sesause the integrand is an odd function of r. Theretore. jor a real and even
signal xtr). all aºs aro neal. Tn bis case he trigonometrio Puucier sertes consists of all
sosine [unctcns. Simiiarly. if city is real and eddie. if vio) = —x(n)—hen
2 path a
al uiipeos (2 =) + (218
is z2rc and all tw' are imaginary. In this case the trigonomei: Huurier series consists vf
all sine functions,
ENSINA ES
Tustrative Problem 1.1 [Fourier series of a rectangular signal train) Let the periodie
signal air, with period Ty, be defined by
A ch
4 . ;
un=an(s > t=&t (1.219)
9. others
13 tomei Seres 5
for ft! = 1572, where ro < To/2. The reciangular si
al [ít) :s, as usual, deôned by
H=<3
rot (1.220)
l
nin=44
0. otherwise
à plot of x(r) is shawa in Figure LL,
Figure 1.1: The signal w(t). m Mustrative Problem 1.1
Assuming 4 = |. To =4 ando = |
1. Determine the Fourier series coetficients of «(t) in exponential and trigonometric
form.
2. Plot the discrete spectrum of x17).
ED ——————
. To derive the Fourier series coefficients in the expansion of x(1), we have
'
prints gg
[ecra ma] 422)
a
- 2 1222
5) (222
where sine(s) is defined as
Ta)
sinctr) = = q2)
A plot of the sine iuaction is shown in Figure 5.2
CHAPTER |, SIGNALS AND LINKAR SYSTEMS
Pigure 1.2. The sine signal,
Obvinusly, all the x,'s are real (since x(t) is real and even), so
a = sinc(5)
3!
m=0 (1324)
c=pe(g)
&=02
Note lhat for even nºs. sy = O (With the exception of n = 0, where ap = cg = | and
xe = 4). Using lhese coeificients we have
&
1 n >
) ane (PY estames
do rele
e n A
at mel) cos (2u15) (1.228)
A plot of the Fourier series approximatious to this signal aver ons period fur n =
0,1,3.5,7,9 is shown in Figure 1.3. Note that as 1 increases, the approximation
becomes closer ta the original signal x(e)
»
Note that x, is always real, Therefore. depending on its sign, the phase is either zero
or. Tie magnitude of the xs is 3 [sine (2)| . The discrete spectram is shown in
Figure Ld.
Fourier Series 7
na
Figure 1.3: Various Fuurier series approximations for the rectangular pulse in llustrative
Problem 1.1
Figuro 1,9: The discrete spectrum of the signal in Hlustrative Problem 11
CHAPIER 1. SIGNALS AND LINEAR SYSTEMS
1.2.1 Períodic Signals and LTI Systems
When à periadie segnal tr) is passed througã a boear dime-invaricat (LTD system, as shown
m Eipure 7.9. the output sigas! (0) is also periodic, uscally with the same period as the
input signal” why), and therefore it has à Foueicr series expansion
1Ê xét) and vit) are expanded es
vida Do açenim (1.226)
vn = » petit (1227)
then ihe relation between tke Fourier series coefficients of x
emploving the comvoluion integral
3 and ytr) can be obtained by
O sa — esairhar
-f DO ane) de
(F atue feto de) altas
37 qeitamim (1228)
From the above relation we have
=ati( o (12.29)
dos anti o (UI
where Hi f) denotes the transfer function” of the LTI system given as the Fourier cransform
vt its impulse response A(t)
HO -[ ge TP dr (1.230)
Eye say usualty with the same period as che input signal. Can you give an example wbere the period of the
ouspur 15 diffecent From the perica of the input?
3 Also imewa as lhe frequeney resperse oF the system,
Pintor Series
um
mos
nm
um
nm
om
Figure 1.8: Magnitude and phase spectra fur Ulustrative Problem 13.
14 CHAPTER í. SHGNALS AND LINEAR SYSTEMS
4
LTt System st
Figure 1.9: Periodic signais thrmgh LTI systems,
ANS)
Uustrative Problem 1.4 [Filtering af periodic signais] à triangular pulse train (e) wim
period To = 2 is defined in one period as
t+ -gr<a
atn= [== O<tx1 (1230
9. otherwise
1. Determine the Fourier series coefficients of x(º)
2. Plot ihe diserete spectrum of x (4)
3. Assuming that this signal passes through an LTI system whose impulse response is
given by
1 Ostel
mo = o (1232)
O, otherwise
plot :he distrete spectrum and the output s(7). Plois of x(1) and A(t) are given in
Figure L.IO.
Figure 1.10: The input signal and the system impulse response
í
[2 Fourier Seres 15
ED —
1. Wehave
(1.2.34)
(12.35)
(236)
(1237
where we have used the fact Et 4 (7) cenishes cursido the [= 1. 1º isrerval und tha
the Fumrier tcansform ot A(t) is siac?: 9. This resul can also be cotained by using
the expression for A tr) and Integrating by parts. Obviousty, we have x, = O for all
even values of n except fer n = O.
2. A plot of the discrete spectrem aé «(1) :s shown in Figure 1.1].
Tm
Figure 1.1: The discrete spectrum af the signal,
3, First we have to derive A(/. tac transfer function of the systerr. Although this can
be done analytically, we will adopt a numerical approach, The resulting magnitude
15 CHAPTER |. SIGNALS AND LINCAR SYSTEMS
of tie transter funsuon amd also the megusituds of Flini To) — Hín/23 are shown in
Figure DI?
1 Tou:
jus the diserete spectrum 2: che output we employ the relation
The resulting diserote spectrum: of the output is shown in Figure 1.13
The MATLAB seript [or tis problem follows.
% MATEAD semper poe Musicativo Prublem 4 Clemire !
echo om
r=|-20:1:20],
% Emurior corios comgheiemas aj aim vereur
“a
fsadots;
hefzereato.20) 421 BI) zeceçd 2037:
& trunsger fenctem
Herhihi;6s,
jrequeney resuluton
Ge Pine enmrcds fistino
1.3 Fourier Transforms
The Fourier transforra is she extension of the Founsr series to nonperiodic signals. “Lhe
Fuvcier “ranstorm of a signal «(?) that satishies certain conditions. known as Dirichlet's
conditions [1], is denoted by X(/) ot equivalentiy, 7 [x(*)) and is defined by
Fl = XD =[ acre 413.0
“Tke inverso Founier transform ví X(7) is x(t), given by
F xcol==0 =[ XNDerint ar 3
t
Í
i
£3 Fourer Trarméoras ”
Frqueneo
alema ii [item pm
Figure 1.12: The transter fuactioa pf the LTI system and the magnitude of H (5.
2 CHAPTEK 1 SIONALS AND LINEAR SYSTEMS
Since the signals are simila:
magnitude spectra. Thy
the same axas are shown in Pigu
mitade spectrum and the two pj
LIS and 1.1á, respectively,
un
R N |
| | |
i 1
1
|
|
!
+
Freq
Figure 1.15: The comenon magnitude spectrum of the signals 1)(7) and 2!)
The MATLAB script for thus problem is given below. ln Section 1.3.1 we show how to
obtain the Fourier transform of a signal using MATLAB.
pt for a cime shift. we would expect them to have the sume
% MATLAB acnpt for MMusiranse Problem 5, Choptes 4
dr-007;
XMS Therl(at 6
XL id Ts
X2a21 dB] =fisenç
Kli=k 1/6
X2i=K2yre
F=[O Tl ailengria! 1) = 1)]-65/2,
ploeit she o
PIOUFTS0O-S25: Htstufangle(X HHÇS00-525V I(O0:525) ERS NA angie X2500:52579), =)
4.3. Erurice Transtormas 2
E rsdiams
e
fem;
Figure 1.76: The phase spectra cf the signals x1(t) and a2(1;
1.3.1 Sampling Theorem
The sampling iheorem is one of the most important results in signal and system analyais; it
forms the basis for the retaçion between continuaus-time signals and disceete-time signals,
The sampling theorem says that a bandlimited signal e asignal whose Pourier transform
vanishes for 1/1 » W for some W—can be completely described in terms of 1ts sample
values taken at intervals 7, as longas 7, < 1/2W. IFhe sampling is done at intervals “=
1/2W. known as the Ayquist interval (or Nuquis: rate), the signal x(1) can be reconstructed
from the sample values [e[4] = x(nT7, Ji (as
Mn= 5 xnTosine (Wi = nt) (319)
E
This result is based on the fact that the sampled waveform rs(t) defined as
utn= DD xtnTobt nt) 13.20)
foral
for IF]
(13.21)
2» CHAPTER 1. SIGNALS AND LINEAR SYSTEMS
so passing itdtrough a lcavmass filter with à bandwidth of W and a gain of 7; in tite passband
produce the original sigoa!
Figure 11758 a representarian of Fquation (1.2.19) for 7; = 1 and fa[nJl..
[1,1,=1.2,-2,1,23. In other words.
wiid
xt) = sineçr + 3) + sinetz +2) — simeis + )— 2eame(o)
— 2 sineiy — 15 sino! — 2) + 2 sines — 2)
Figure 1.17: Representatiun of the sampling theorem.
The discrere Fourier transform (DET) of the discrete-time sequence «[n] is expressed
as
Xutf= PO snes (1329)
Comparing Equations (13:22) and (1.3.21) we conclude that
XD=THMO tor f<W (1.3.23)
which gives the relation betiveen the Fourier transfocm of an analog signal and the discrete
Fourier transform of its corresponding sampled signal.
13 Fourtes Transforms 25
Numerical computation of he discrete Fonrier cransform is done via the well-Enown fest
Fourier transform “FET) algoritam. In his algorithm à seguence oi length N of samples of
the signals x(£) taken at intervals of T, is nser as he representation of the sigaal. The result
às a sequence of length M of samples cf Xu) in lhe frequency interval |O, fi], where
fe MTE = 2W is the Nyquist frequency. When he sumples are 4 = f,/N apart, the
value of A/ gives the frequency resolution af the resulting Fourier transform. In order to
improve the frequency resolutioa, we have to increase N, the lengih of the input signal
The PET algovithm is eompuationaliy efcient if the ingrh of the inpot sequence, N7, is a
power of 2. In many cases if this length is nota power of 2. it is made ta be a power of 2
dy techniques such as sero-pactirg. Note that since the FT algorithen essentially gives
the DFT af the sampled sigaal, in order to get he Fourier transform of the analog signal we
have to employ Equation (1.3.23). “This means that after computing the EFT. we have co
multiply il be Ty, or. equivalently, civic it by 4 in order ta obtain lhe Fourier transform
of the original analog signal.
The MATLAB funstion ffiseq.em, given below, tas as its input a time sequence rr, the
sampling interval 1,, and the required frequency cesolutico df and returns a sequence whose
length is à power of 2, the FFT of this sequence M, and the resulung frequency resoiution
function [Mm dfi=Msegtmas dj
% Mm) = ifrenim sed)
1Mmaf) = ftregom ta)
Geesrutes M, the FFT mf be tequence m
The sequence as ceru-pudded to meet He required reguency resulinica df
as is the sampling incerval, The comepue d? ir the Jirul jrequency resolution,
Dugput m ts the cem-puddoa versam of depu mm, M 44 the RET.
al=fs/ds;
end
nZstength(m,
ne2º (maximerrpow (ni!) nempowta2)):
Mefttmay:
m=fm aeros( 1 n=nZi):
dt=ts/a.
ILUS IRATIVE PROBLEM
Mlustrative Problem 1.6 [Analytical und sumerical derivation of the Fourier trans-
farm) The signal x(t) is described by
1+2 -2<1<-
ao= 1h mistsl (1.3.2)
lerg2
o. otherwise
and is shown in Figure L.IA.
CHAPTER 4. SIENALS AND LINEAR SYSTEMS
Figure 1.18: The si
al tt)
1. Determine the Faurier transtorm ot x(r) analytically and plot the spectrum of (1).
2. Using MATLAB, determine the Fourier transtorm numericaily ant plot the result.
€TD——————
1. The signal x(t) can he written as
norma ( J-am (1325)
t31m
and therefore
X(f)= 4sinci(2f) — sinci(f) (13.26)
where we have used, lineurity, scaling, and the fact that the Fourier transfoem vÊ Me)
is sinciÇf). Obvicusly the Fourier transform is real. The magnitude-spectrum is
shown in Figure 1.19
In arder (o determine the Fourier transform using MATLAB, we first give a rough
estimate of the bandwidih of the signal. Since the signal is relatively smocth, its
Vianclvsidth is proportionalto the inverse time duration of he signal. The time duration
ofthe signal is 4. Tu be ún the safe side we take the bandwidth as ten times Lhe inverso
time duration, or
BW=lUx1=25 (1327
and therefore the Nyquist frequency is twize the bandwidth and is equal to 5. Hence,
the sampling intecval is 7, == 1/f. = 0.2. We consider the signal on the interval
(-4,4] and sumpte it at TF, intervals. Wuth this choice, using a simple MATLAB
serpt employing the fitseg.m function, we car derive che EET numericatiy. We have
shosen the reguired frequency resolution to be 0.01 Hz, so the resulting frequency
resolution returned by Iftseq.m is 0.0098 Hz, which mects the requirements of the
= TT AT
| !
i 1
+ i .
1
1 E! i
| e |
n Poa Í
' ! !
Fregtos
Figure 1.19: The magutude-spectrum of 1(t) derived analyically
problem. The signal vector x, which has length 41, is zero-padided te à length oi 256
to meet the frequency-tescluton requirement and also to make it a power of 2 for
computational efficiency. A plot of the magnitude-speciram of the Fourier itansform
is given ia Figure 1.20.
The MATLASB script for this problem is given below.
% MATLAB senpi for Heero Problem 5. Chupier é
ecão ou
t=0.2; o ser pusumeçary
dE-001;
s=ferosti 10) [0:0 2:1,onesç1.9),(1.=Q.2:0) serostt AOJk
IXoxdf deriva he FET
XI=Xes e acuiing
1550 fl nclengrhço- 19)- 18,2;
He 250.001:25]; To frequento cecir far amulvtio approach
v=dafsine(2» |), "2—(sincttl)) "2: o esoei Fourier transform,
Pause db Prese a key co tee Me plvi ef he Heurier Transform aerivea anabyeculiy
es
sebplou2,1,1)
plextflaba(ç)j:
slabel( Frequenoy")
ride('Magni tude-pectrum oÉ x1t) derived analyticalIy')
pouso dé Press akoy to sec the nlot of tie Fourier ininsjorm derivec! mumeneutty
subploi(2.1,2)
Va frequentes vector for EFT
n CHAPIRR 5 SILINALS AND LINEAR SYSTEMS
H27My-2nonest 1.5]
U3BAN=ZAZecustd.Sepre32i 1
n82:48)=Beomesti 5
Fur d
[XX df Jeitisegixas ar: o specirum vs ho sou
E-OraftdetaConghix o -J-Is/2, Mo pequento, vector
Xi=ets, o sur
% per?
à plter sraneter function
Hejones(I, cells SdF zeros Length) Becuilit S/N ane 1 cedlit.5 fa)
Ye eH; De cmo neem
HO: “E oops 0 che filer
;
peer?
LT! eystem impulso
h=izeroaid teil(5/18M Most 182 Leny 2t9) nas À cet fm cenlB rest, 1 cui ren],
pecou, Ge cmtpot cj the LTE serem
Pause Broca u ey to see apectoum of dir imp
pler(ttsmNans De:
pace 6 Precios key do sec hr muipue oj the fompass fer
coça: Hemgentudhp.
pause SE Prestar dev ta
nloetl="048.19452)
o che omega ef que LF essi
1.4 Power and Energy
The energy and the power con:ents ofa real signal xí1). denoted by E x and Px, respectively,
are defined as.
(4
Px = lim —
TT Jr
A signal with finite energy is called an energy-type signai. and à signal with positive and
fimte power 1s a power-type signal * For instance x(t) = Tltt) is au example of an energy-
type signal, whereas x(!) - cost?) 15 an example of a power-type signal. AIL períudic
signals? are power-type signafs. The energy spectral densiry of an energy-type signal gives
the cistribution cf energy at various irequencies ví Lhe s;pnal and is given by
Put) = ICS (142)
Therefore,
. =[ Bytfrdf 43
ae
AThere exist signals that are neither energy Lyye nor pomez type. Qne example of such signals is ate) =
ita
“The only exeeptioa is those signals rhat are equal to zero 2Jmost exerywhere
14 Power ane Enerey
3
Using the convolution thecrem we have
Seis FIRED (144
where Rxir) is the autocorrelarion fimetion Di xir) derincd ss
erro [O inair+ ride
= meu) HAS)
for real-valued signals. For power-type signals we define the time-arerage autocorrelation
Suncrior as
voçes
Ryo = lim — vence —nde (14,6;
TT Loro
and the pow er apeciral densiry is in general given by
Swifi— FlRgíe] CAD
The total power is the integral of the power spectral density given by
Px f
Fo: the special case of a periodie signal x(t) with pericd Ty and Fourier series coefficients
xr. lhe power spectral density is given by
Sxifidr (1.4.8
sp= Dm
(14.9
which means all the power is concentrated at the harmomes of the fundamental frequency,
and the power at the ch harmonie (17 To) is [xyl?. ie. the magnitude square af the corre-
sponding Fourier series coefficiem
When the stgnai (7) passes through a Álter with transfer funciina FH4f5, che output
energy spectral density, or power spectral density. is obtained via
Brifr= io ES
SAN HE Sr)
(1.4.10)
f we use she diserete-time (sampled) signal, the energy and power 1
Equation (14.4) ia terms of the discrete-sime signal become
jons equivalent to
Ex-r o ll
x (LA;
a CHAPTER | SHENALS AND LINEAR SYSTEMS
and if the EFT is emploved--
repeated—then
. if the length of Lhe sequence is finito and the sequence is
so
Ex 05 sta
N=1
» tm
a=b
(14.12)
The following MATLAB function power.m gives the power content of a signal vector.
functica p=powesta)
% p= pemero
GPCIER Returns the Deer im suqual x
psinnem(as" 23 lemgthlaa
1F Xu) is the DFT of the sequence «|n, then the energy spectral density of x(1), the
equivalent analog ed by using the Equation (1.3.23) and is given by
FIXatS
Sr = (14.13)
where T, is the sampling interval. The power spectral density of a sequence x(n) is most
easily derived by using the MATLAB function spectrum m
Blustrative Problem L.$ [Power and power spectrum) The signal x() has a duration of
LO and is the sum Of two sinusoidal signals of unst amplitude. one with frequency 47 Hz
and the nther with frequency 219 Hz
(6) = [UM x 871) + costêm x 2191), 051 <10
=
o, otherwise
This signal is sampled at a sampling rate of 1000 samples per second. Using MATLAB.
find the power content and the power spectral density for this signal.
“DD
Ting the MATLAB function powerm the power content of the signal is found to be
10003 W. By using spectrumm and specplotam, iwe can plut the power spectral density of
the signal, as showa in Figure 1.25. The twin peaks in the power spectrum correspond to
the Iyiu frequenties present in ihe signal
The MATLAB script for this problem follows.
i
i
1.5. Lowpass Equivalent of Bandpass Signais 35
Figure 1.25: The power spectral density of the signal consisting of two sinusordal signals
at frequencies =47 and f, = 219 Hz.
% MATLAB teript for Mlustrucuve Problem 8, Chuprer 1.
ts=0.001
1145;
t=[0325:10],
A=coMepie47 en-cos(ZepivZi8ar);
pepowerty:
psdaspectrum(s, 1024);
pouso % Press a key to ser the pover in she signal
?
pouso % Preto a key to see the prver spectrum
specplotk pd ts)
1.5 Lowpass Equivalent of Bandpass Signals
A bandpass signal is a signal for which all frequency components are located in lhe neigh-
borhood of a central frequency fy (and, of course, — fi). In ather words, For a bandpass
signal X(f) = 0 for |f£ fo] > W, where W «& fo. A lowpass sipnal is a signal for
vrhich the frequency components are located around the zero (regueney; i.e. for fi > W,
wehave X(/)= 0.
Correspending ta a bandpass signal x(%) we can define the analyric signal (1), whose
3% CHAPTER |. SIGNALS AND LINEAR SYSTEMS
Fourier transform is given as
Zi) =
ua DADO (15)
where a (js the unit step function. In lhe time domain shis relation 15 written as
ses) + sit (152)
where £ (1) denotes the Hilbert iransfarm af x(3) detinedas $t8) = air: inthe frequency
domain it is given by
Xe = jsgnQNXio (1.5.3)
We note that he Elilbert transtorm tuncuion in MATLAB, dengted by hulbort.m, gonerates
mplex sequence 2(1). The real part nt (2) is the original sequence, and its imaginary
part is the Hilhert transform of the original sequence.
The lowpass equivalent of the signal tt), denoted by te), is expressed im terms of
xoas
amis
ater sale (15.4)
From this relation we have
x() = Rebotne? 58)
(O = Imba(r
In the frequency domain we have
Xi = Ef + fo) = Uolf > MXCS + jo) (15.6)
and
Xiii XOto fo) + =) as
The lowpass equivalent vt a real bandpass signal is, in general, à complex signal. lts real
part, denoted by xe(t), is called the in-phase component of x(7) and ils imaginary part is
called the quadratsre component cl xtt) and is dennted by x+(7); ie.
ati = st) + Past) (1.5.8)
In cerms of the in-phase and the quadrature components we have
241) = xots) cos(Zm for) — ate) sin(Zr for) (159)
Z(4) = x (ti cos(2M fot) + x. (1) sin(2m for)
If we express x:(t) in polar coordinates, we have
ato = Vígeoa (510)
3
Í
i
í
i
LS Lowpass Eguivalenr of Bancpass Signals 3
shere W(5) and Ott) are called the envelope and the phase of the signal a(t). In terms of
these two we have
nú) = Ve) custe fo + OC) (51
The envelope and the phase van he expressec as
Vo= a) radey
(15.12)
Oto — arean
or, equivalenty,
vo
(1543
er
ftis obvious from the above relations thar she envelope is independent of the choice of fa,
whereas the phase depends on this choice
We have written some simple MATLAB files to generate the analytic signal, the lowpass
representation of a signal, the in-phase and quadrature components, and the envelope and
phase. These MATLAB functions are analytic.m, loweq.m, quadcomp.m, and env.phas.m.
respectively. À listing of these functions is given Delow
funedon zeanalyeio(a)
% 2 = umano)
GANALHTIC Returns the angíptic «ipnul cnrresponding to vigaat x
%
zebilbença):
> ———————
fimetioa xl=towmeglx,3,10)
* af = lowegicasso
Returas the lumpuss equivalen: of Me cignet x
JO is the center frequency
vs de ahe sampling inrval
isto(eagitad= 19].
Ibero):
xisz sexp(-jsZeginti=t),
function [xs xsfequantcorup(a ts, 50
%
[zc.xs] = quadcompta.tsj0)
COUADCOMP Renems the incphuse and quadramre components uf
CHAPTER 1. SIGNALS AND LINEAR SYSTEMS
Problems
11 Consider the periudi signal of ustrative Problem 1.1 shown in Figure 1.1, Assuming
4=]1, Ty = 10, and tg = 1, determine and plot the discrete spectrum of the signal. Com-
pare your results with those obtained in Mustrarive Problem 1.t and justify the differences.
12 In Tlustrative Problem LL, assuming A = |, Tg = &, and to = 2, determine ané plot
the discreze speciram of the signal. Compare your results with those obtained in Nllustrative
Problem 1,1 and justify the differences
13 Usingthe mfile fseries.m, determine the Fourier series coefficients of the signal shown
in Pigure 1 with 4 = 1 To = 4 andio = À for —24 = 24. Plot the magnitude
spectrum of the signal. Now using Equauon (1.2.5) determine the Fourier series coefficients
and plot ihe magnitude spectrum. Wihy are the results not exactly the same?
14 Repeat Problem 1.3 with To = 4.6, and compare the results with those abrained by
using Equation (1.2 5). Do you observe the same discrepancy between the two results here?
why?
15 Using the MATLAB scripi dis.spotm, determine and plot the phase spectram of the
períodio signal x(*) with à penod of To = 4.6 and described in the interval [-2.3,2.3] by
the relation x(+) = At). Plot the phase spectrum for —24 4 n < 24. Now, analycically
determine she Fourter series coefficienis of the signal, and show that alt coefficients are
nonnegative real numbers. Does the phase spectrum you plolted earlier agree with this
tesult? If not, explain why.
1.6 In Problem 1.5, define xt) = A(t) in the interval [-1.3, 3.3]; the period is still
To = 4.6, Determine and plot the mugnitude and phase spectra using the MATLAB script
dis.spetm. Note that the signal is the same as the signal m Problem 15. Compare the
magnitude and the phase spectra with that obtained in Probiem 1.5. Which one shows a
more noticeable difference, the magnitude or the phase spectrum? Why?
1.7 Repeat Hlustrative Problem 1.2 with fa, b] = [-4, 4Janda(1) = cos(rt/8) for kt] < 4
1.8 Repeat [lustrative Problem 1.2 with (a,5) = [-4, 4] and (1) = sintrr/8) for | x 4
and compare your results with those of Problem L.7.
1.9 Numerically determine and piot the magnitude and the phase spectra of a signal x(!)
with a period equal to t0-S seconds and defined as
—108+0,5, 0<r<5x 107
soy= o
otherwise
inthe interval 4] < 5 x 1057
Í
i
i
:
1.3. Lunwpass Equivalens of Bandpass Signals 8
LIO À periadic signal x(t) wita period 7h = 6 is defined by x(1) = NGs/3) for |; < 3.
This signal passes through an LTI system with an imputse response given by
ae = 10 Q<1<4
0, utherwise
Numerically determine and plot the discrere spectrum of the output signal.
1.11 Repeat Problem 1.10 with xi) =X far |t <3a0d
IL Dstsa
nn) = [ É
0, otherwise
112 Verity the convolution thecrera of the Fourier transform for signals x(t) = [Tt") and
x() = Att) numerically, onve by determining the convolution directly ane once by sing
the Fourier transforms of the Iwo sigoais.
1.13 Plot the magnitude and The phase spectra of a signal given by
1 -Ixix
EE d<i
lxt<2
O. otherwise
(M=
LI4 Determine and plot the magnitude spectrum of an even signal x(1) wiich for pasitive
values of tis given as
:+1, Ostxi
z Istx2
n=
= La deres
0, otherwise
Determine your result both analyticaliy and numerically and compare the results
1-15 The signal described in Problem 1.14 is passcd through an LIT system with an impulse
response given by
1, Oxis2
nD=]2, 20123
O, otherwise
Determine the miugnitude and the phase spectra of the output signal.
4 CHAPTER 1. SIGNALS AND LINEAR SYSTEMS
1.16 The signal
cos(2m x 44) + cos(2r x 2191), Dae a0
“O = fg, otherwise
is considered, As in Hinstrative Problem 1.8, assume this signal :s sampled at a rate of 1000
samples/second. Using the MAILAB M-file butterm, design a lowpass Rutterwarth filter
ef order 4 with à cutoif Irequeney of OO Ie and pass x(:) through (his filter. Determine
ané sketch the output power spectrum and compare it wilh Figure 1.25. Now design à
Buterwarth filter Of order 8 th lhe suise cutaff frequency, and determine the output of
this filter and plot us puveer spectrum. Compare yowt results in teses two cases.
1.17 Repeat Problem 1.16, but this time design hghoass Butterworth filters with the same
orders and the same catoff frequencies, Plot your results und make the vormpurisons.
1.18 Consider the signal
cos x 47) = cosf2r x 2191), 0xr< 0
sin=
otherwise
a. Determine the analytic signal corresponding to this signal
e
. Determine and plot the Hilbert transtorm of this signal
c. Determine and plot the envelope of this signal
d. Once assuming fo = 47 and once essuming fo = 219, determine the lowpass
equivalent and the in-phase and the quadrature components of this signal.
mea qr jr retos mr
Chapter 2
Random Processes
21 Preview
Te this chapter we iilustrate methods for generatirg random variabtes and samples vf random
processes. We begin with the description of a method for generating random variables witha
specified prabability distributica function. Then, we consider Gaussian and Gauss-Markow
processes and ilfustrate a method for generaling samples of such processes. The third topic
hat we consider the caaracterization of a stationary random process by ils atocorrefation
in the time domain ané by its power spectrum in the frequency domain. Since linear filters
play a very important role in communication systems, we also consider the autocarrelation
function and the power spectrum of à linearly filiered random process. The final section of
this chapter deals with the characteristics cf lowpass and bandpass random processes.
2.2 Generation of Random Variables
Random number generators are often used in practice to simulate the effect oi noiselike
signals and other random phenomena that are encountered in the physical werld. Such noise
is present in electronic devices and systems and usually limits cur ability to communicate
aver large distances and to detect relatively weak signals. By generating such noise um a
computer, we are able to study is effecis ihrough simulation of communication systems
and to assess the performance of such systems iu the presence nf noise.
Most computer software fibraries include a un:form random number generator. Such
a random number generator generates a number tetwcen O and | with equal probability;
We call the output of the random number generator 3 tandom variable, If 4 denotes such a
random variable, its range is the interval O < 4 < |.
We know that the numerical output of à digital computer has limited precision, and
as a consequente i is impossible to represent the continuum 0€ numbers in the interval
0 < A < 1. However, we may assume that our computer represents each output hy à
large number of bits in either fixed poi or Hoating point. Consequentiy, tor al! practical
purposes, the number of outputs in the interval O < As 1 is sufficiently large, so lhat we
as
46 CHAPTER 2. RANDOM PROCESSES
are justibied in assuming that any value in che interval is a possible output from dhe generator.
ie uniform probability density function for the random variable A, denoted as jd).
is illustrated in Figure 2.1(4), We note that the average value or mean value of A, denated
asma isma = 3. The integral of the probability density function, which represents the
area under f (4), is called the probabilicy elistriburion function of the random variable 4
and is defined as
A
FA) -[ Fl) da n
For any random variable, this area must always be unity, which is the amaximum value thar
can be achicved by a distribution function. Hence, for the uniform random variable A we
have
'
sm- f flar = 222
and the range Of F(A)ISO 3 F(A) s tor < A < L The probability distribution
function is shown in Figure 2.1(b).
Ra) FA)
dr
Figure 2.1; Probability density function f(A) and the probability distribution function
F(A) of a uniformly distributed random variable A.
[f we wish to generate uniformly distributed noise in an interval (5, b + 1), it can be
accomplished simply by using the output À of the random number generator and shifting
it by an amount b. Thus a new random variable 8 can be defined às
B=A+b 223
vehich now has à mean value ing = 5 + 5. Forexample, ifb = - 1. che random variable &
is uniformly distributed in the interval (4, 4), as shown in Figure 2.2(a). Ts probability
distribution function F(B) is shown in Figure 2.24b).
mandem
22. Generation of Random Variables a
à uniformly distributed random variable in the range (0, ) cun be used to generate
runelom variables wilh other probability distrisuncn functions. Por example, suppose that
We wish 10 generate à random variable C with probability distribution function
illustrated in Figure 2.3.
RB a
ut
'
o
me
o
ta) eb)
Figure 2.2: Probability density function and the probability distribution function of à zero-
mean uniformiy distributed random variable.
Figure 2.3: Invere mapping from the uniformty distributed random variable À to the new
cundom variable C.
Since the range of FIC) is the imterval (0.1), we begin by generating a uniformiy
distributed random variable A in the range (0, (). df we set
F(C)= A 2.24)
C=EA) (2.2.5)
CHAPTER 2, RANDOM PROCESSES
Property 2: 1f the Gaussian process X(f) is passed througã a linear, timie-invartant (LTT)
system, the output of the system is alsu 0 Goussian process, The effect of the system on
X(6 is simply iellected by a charge in the mean value and (he covariance of X (1)
(STRASS
Austrative Problem 2.2 [Generation of samples of a multivariate Gaussian process]
Generate samples of a multivariate Gaussian random process Xtr) baving à specified mesn
value mr and « covariance Ce
First, awe generate a sequente o: » sentistically independent vero mean and unit variance
Gaussian andor variables by asins the method cescribed in Section 2.2. Let us denote
this sequence cf 2 samples by lhe vector Y = 3a). Secondiy, we faclor Me
desired x x 1 covariance matrix €, as
10,5) (23.3)
Thea, we define ke linearly teansiormed qn x 1) vecter X us
(23.4)
“Thus the covanance af X is
C=EMX-mMX-mo)
= Etc rio)
=ciewro”
= ciciy 235
The most difficuft step in this process :s the fastocization of be covariance matrix Cy. Let
us demonstrate this procedure by means of an example that employs the bivariate Gaussiaa
distnbution. Suppose we begin with a pair of statistically independent Gaussian random
variables yj and y, which have zero mean and unic variance. We wish to transfarm these
into a pair of Gaussian random variadies x1 and 42 witltiean 4a = O and covariance matrix
colei, “221
po o;
1
] 2.3.6
shere 7 and 57 are the variances of x, and 43, respecuvely, and p is the normalized
sovariance, defined as
ELMO — mo — ma) e
aros ai
3. Gaussian and Gsuss- Markov Processes 5
The covarianeo matrix € can be factored as
Ce ciicty
where
Therefore,
t [atm -(VI- ly
3-Dyn-tw3 rt
The MATLAS scripis for this computation are given below.
pr for Aihuctranive Problem 2, Chapter 2
or;
1 sZt2 1
semuliá.gplima Cah.
% Comprracinm cf the péf of tal. A Julhous
dettac0,3;,
al=-Igelta:ã;
Nu -Idelta:3
for ieAlengahtx 1d.
for j=ttenginta?)
Edit /BepiadertOe 1/2)oenplt= 1 72)=(MA ICO RG] maR + EmrrGom + 1 DL CE) AZ) mo:
end
end:
% plotting commund far pa! fitows
ameshixL x.)
fimesiom [3] ae mulô gp(im,C)
% dx = mulrigpím,C)
%» MULTIGP generares a muitiuniie Guussian random
z process walk mean vector m (coluna vector, aut cuvariance metris C,
54 CHAPTERZ, RANDOM PROCESSES
Nelergihtmy:
Far dx 1,
virgngaoss;
vos
X=sqamCayem;
ES
AS GAIN
ESSAS AS SS
EEESSLG 6 Seção
EM
Es
Figure 2.6: Joint probability density function of x1 and x2.
As indicated above, the most difficult step in the computátion is determining (1/72,
Given the desired covariance matrix, we may determine the eigenvalues [44,1 < E < 1)
and the corresponding eigenvectors (uy, | 5 k < n). Then, he covariance matrix € can
be expressed as
C= Davi (23.10)
ta
and since C = Ch2(c1/2y it follows that
CR Saiu (2341)
Hm
23, Gaussian and Ciuss Markov Processes 55
Definitina: A Markov process Xt4) is é random process whose past has no influence on
the future if its present is specified. That is, dt ty > 17-,. then
PP sm ds ta) = P[X Co) Sae KG)! 2312
From this definition, it follows ihatifn < 19 << ta, then
Xin
PER oo < x |xto
Definition: A Gauss.Murkoy process X(t) is à Markow process whose probability densicy
funetion is Gaussian.
The siraplest method for gencrating 4 Markov processis by means ofihe simple recursive
formula
Ku 6Xa1 + um (23.14
when tum is à sequence of zeru-mean 1i,d. (white) random variables and p is a parameter
that determines the degree of correlation between X, and Xy.. Thatis,
EAaka = EM) = 69), (23.15)
Ciaussian, then the
PROBLEM
Ifthe seguence (ui
ILLUSTRA
Hlustrative Problem 2.3 Generate a sequence of :000 tequally spaced) samples of u
Gauss-Markov process from the recursive relation
An =0.95X, 1 + um. mm 12... 000 (23.16)
where Xg = O and (au fis a sequence of zero mean and unit variance i.i.d. Gaussian random
variables. Plot the sequence (Xy, 1:77 < 1000) as a function of the time index n and
the antocarrelation
Ram) =
+50 31)
Nom
DO XnXnom m
at
where N = LD00.
“ED
The MATLAB saripis Cor this computation are given below. Figures 2.7 and 2.8 ilustrate
the sequence (X,) and the antocorrelatioa function R,(m)
CHAPIER 2. RANDOM PROCESSES
169;
Chugrer 2
o ana Xe. NJ
a
queria
ess qner(KO, ho,
% [XIegues mano,
a]
GAUSMAR
generos ar Guuss-Murkoo proceso «A length M
& the cabra proces ds reboa tor he witito Gaussiun
& mise mith cer mec ana sn striunce
far tn,
UWSC) Wok % venercie the mueso puncors
end;
Eq KM Way de pirer olomeno in she Guuse Manha process
M,
Xtiy-rhae Xi Ietêrsias So she cemuininy elements
end;
Figure 2.7: The Gauss-Markov sequence.
24 Power Spectrum of Random Provesses ar Yolte Prncesses s
Figure 2.8: The autocorrelation function of the Lauss-Markov process
2.4 Power Spectrum of Random Processes and
White Processes
A stationary random process X (1) 1s characterized in the frequency domain by its power
spectram 84 (f3, which is the Fourier transform of the autocorrelation function R,(1) of
the random process. That is.
ao
san= | êaue imitar es
Conversely, the autocorcelation function Re(T) Of a stationary random process X tt) is
obtained from the power spectrum S:(/) by means of the inverse Fourier transtorm: i.e,
Reto) =f Sape ar (2.4.2)
In modeling thermal noise lhat is genecated in electronic devices used in the imple-
mentation of communication systems, we often assume that such noise is a white random
process. Such a process is defined as follows.
Definition: A random process X (7) is called a white process if it has a flat power spectrum,
ie, if 8:(f) isa constant for all 7
As indicated above. the importance of white processes stems from the fact that thermal
noise can be closely modeled as specirally constant over a wide range of frequencies. Also,
CHAPTER 2. RANDOM PROCESSES
vogasos
8 B
8
Figure 2.13: Inverse FET ot the power spectrum of the bandlimited random process in
Blustrative Problem 2.5 with 32 samples.
5 Lincar Filtering of Random Processos é
ni Í |
' 1
al |
, Ad,
PRAÇA AV V | |
ou [ y
amb
: &——
Figure 2.14: Invecse PET of the power specirum cf the bandlimited random process in
Tustrative Problem 2.5 wiih 256 samples.
2.5 Linear Filtering of Random Processes
Suppose Mat a stationary random process Xtr) is passed through alincar time-invariant ter
that is characterized in the time domain by its impulse response A(f)and in the frequency
domain by fis frequency response
HD
Ê. hate PAS dr (25.1)
Tu follows that the output of the linear Álter is the random process
rn -f. X(oh(t — nar (252
The mean value of F(r) is
a CHAPTER 2 RANDOM PROCESSES
Eita
(t— dr
ms [ med
= mato (25,35
oxhere H(0) 15 lhe Irequeney response F(f) of the filter evaluated at / =)
The autocarrelanon function of Ftt) is
Rato = ElPiryr a + A
- f EIXO X a) hide — Dio + T — al dr de
=[ fÉ Ras att cet r -addeda sa
In the frequency domain, the penser spectrum of (he output process (7) is related 10 the
power spectrum of the input process X(r) and the frequency response of the linear filter by
the expression
8O= Ê ess
This is easily shown by taking the Fourier transform of (2.5.4)
ILLUSTRATIVE PROBLEM
Ilustrative Problem 2.6 Suppose that a white candom process X (1) with power spectrum
84f) = oral j excites a linear filter with impulse resporse
aun= ht CE (1.5.6)
9,
Determine the powe: spectrum $4./) af the fihec output
“ED ————————
The frequency response of the filter is casily shown ta be
1
=——— (2.5.7
HM TE jaf í )
2.5, Lincar Fiftcring or Random Processes ss
Hence,
The graph of Se: 3 is illustrated in Figure 2.15. The MATLAB script fer computing 8,0)
for a spesified Sat) and HP) is gnen belos .
% MATIAS
echo on
deita-0.01,
2,
ea di Tustcanivo Ponha
Figure 2.15: Plor of 8,(./) given by (2.5.8).
ILLUSTRATIVE. PROBLEM
Rlustrative Problem 2.7 Compute the autocorrelation function Ry(r) corresponding to
&y() in the Illustrative Problem 2.6 for the specified 8.) = 1
6 CHAPTER 2. RANDOM PROCESSES
“€ED——
Inthis case, we may use the inverse FF algorithm on samples of $,(/) gwen by (2.5.8).
Figure 2. 16 illustratos this computation with N = 256 trequency samples and 2 frequeney
separátion Af = 0.1. The MATLAB script for this computation is given below
% MATIAR seripa for Hlustratve Emislem 7. Chaprer 2
echo on
Xap56; o number vf sumpies
Haf=0.1; E frequeney cepuranon
fOrdeltaF(N/2)sdeitai, —(N/2- 4 adeltaf-deltaf:— celtaf),
E cmup the firot dal
Bye 1.1 HBupiet)."2k % sumpled! spectrum
Rysilisy); % dutacorretaion uj Y
So plotumg command falls
plotishifitreake Rey:
Figure 2.16: Plotof Ry(r) of Ilustrative Problem 2.7,
Let us now consider the equivalent discrete-time problem. Suppose that a stationary
random process X (1) is sampled and the samples are passed through a discrete-time linear
filter syith impulse response k (x). The vutput of the linear filter is given by the convolution
sum formula
Yi =D adoxa (25.9)
th
2.5, Linear Fiitermy 0Y Random Processes g
where Xín) = X(3,) are discrete-time values of the input randorm process and Fix) is the
output of lhe discrete-time filter. The mean value Dé she outpus process is
m.— ElF e)
=5 aiiptxio - 6]
+
=me) hi
=m HO) 2510)
whero 47 (0) is the frequency response Ft /) of she filtor evaluated at / = O and
e
HER = SO him eta (2511)
amo
The autocorrelation functiun of the eutput process is
Rom) = ElFin)P (a + m)]
e
DD uemeettin-txin tm 0]
êspico
=D Dacia Rom 144) (25.12)
test
The corresponding expression in the frequency domain is
SD = SABE (25.13)
where the power spectra are defined as
S(D= 5 &uameraia (25.14)
and
> 3
DD Ryimerrinim (2,3.15)
n CHAPTER 2. RANDOM PROCESSES
Srj)
. i
TORA ALA AA ! l
DA pa da PD i
A | t
| |
Figure 2.19: Power spesura S.t7) and $y(/) in lustrative Problem 2.9.
where X tt) and Xs(1) are called the in-phase and quadratis components ot X 4). The
random processes X.(t) and X,(1) are lowpass processes. The following thearem, stated
without proof, provides an important relatonshp among X(t), Xctt) and X, (1.
Theorem: IE X (3) is a zero-mean stationary random process, the processes X.(1) and Xs (1)
axe also zero-mean, jointly stationary processes.
In fact, xt can be easily proved (see [1]) that the sucocorrelation functions of Xc(t) and Xs (1)
are identical and may be expressed as
Rár)= Rári= Retrjcos2a for + Reir)sinZr far (2.6.2)
ssbere R$(1) i£ the antocorrelation function of the handpass process X(r) and És (1) is the
Hilbert wansform of R+(r), which is defined as
os Ra
BO) = = Ea 263
x let
Also, the cross-vorrelatian function of Xc(r) and Xs(f) is expressed as
Resto) = Rm) sin2m for — Rm costa fer (264)
Finaliy. the autocorrelation finction of the bandpuss process X (?) is expressed in terms of
the autocorrelation function R.(7) and lhe eross-correlation function Kes(T) as
RdO =
At) cos tr fr — Ran) sinZm for (2.6.5)
2.6. Lowpass aad Dandpass Processes 3
ILLUSTRATIVE PROBLEM
Nlustrative Problem 2.10 [Generation ofsamples of a band pass random process) Gen-
erate samples ol a bandpass rancom process by frst generating samples of two statistically
independent random processes X. ét) and X, tt) and using these to modulute the quadrarure
camiers cos 2x fiz and sur 257737, as shown in Figare 2.20.
sos 2m ff
N do sia Ze
was Lowpass | Hut
fer | ç
Lospass | 48
WON filter
en lrfs
Figure 2.20: Generation cf a bantipass random process
On a digital computer samples of the Jowpass processes X.(t) and Xs(!) are generated
by filering two independent white noise processes by twa identical Lompass filters. Thus,
«we obtain the samples X.(n) and X,(1). corresponding to the sampled values of Xc(f) and
Xs(t). Then, X.(n) modulates the sampled carrier cos 2 for? and sim) modulates the
quadrature carrier sir. 27 fan T, where 7 15 the appropriate sampling interval.
The MATLAB script for these computatians is given below. Por illussrative purposes,
we have selected the lowpass filter 10 have a transter function
HC
Also, we selected 7 = 1 and fo = 122, The resulung power spectrum ol the bandpass
process is shown in Figure 2.21.
% MATLAR script for iflusirative Problem 10. Chapter 2
N=100% Se number vy sumpies
for ie t2N,
LX It XL t=gngauss:
[X2tD X2lieilegngaus:
end; de standard Guussiun impar moise procerses
A-[1 -€.9]; Do Imepese fiber purumeiers
a CHAPTER 2. RANDOM PROCESSES
5 eusrier fraquemx
sind Zepomfiei!
of ihe handpues press
ba-specirarm
E plain como
izabei Abro. autecorr)
e folia,
Figure 2.21; The power spectrum of the bandpass process in Illustrative Problem 2.10
2.6. Lonvpress and Bandipass Processes B
Problems
2.1 Generate a set af 1000 uniform random numbers in the interval (0,1) using the MAT-
ZAR function randéL, N) functior.. Plot lhe histogram and the arohabiliy distribution
function. for the sequence. The histogram may be determined by quantizing the iuterval
am 10 cqual-widih subintervals covering the range [0, 1] and counling the numiers in each
subinterval
2.2 Generate a set of 1900 unitorm random numbers in the interval [- using the
MATLAB function randil, A). Plotthe hstogram and the probability disuributior functior.
far the sequence
2.3 Generate a set of IÇ00 uniform random numbees in the interval [-2, 2] by using the
MATLAB functioa randél, 4º). Plot the histogram and Me probability distribution function
for the sequence,
2.4 Generate a set of 1000 randum numbers having the linear probability density function
U<s<2
O, otherwise
foj=
Plot the histogramt and the probability distribution function
2.5 Generate a set of IOUO Gaussian random numbers having zero mean and unit variance
using the method described in Section 2.2, Plotthe histogram and the probability distribution
function for the sequence. In determining the histogram. the range of the random qumbers
may be subdivided into subintervals of width o 2/5, beginning with the first interval covering,
the range —02/10 « x < 02/10, where o? is the variancs.
2.6 Gencrate à set of 1000 Gaussian random numbers having zero mean and unit vari-
ance by using the MATLAB function randn(1, N). Plot the histogram and the probability
distribution function for the sequençe, Compare these results with che results obtained in
Problem 2.5.
2.7 Generate 1000 pairs ef Gaussian random numbers (x). x2) that have imcan vector
m=Ele
and covariance matrix
Eure
EE CHAPTER2. RANDOM PROCESSES
à Determine :ke mmeaos of the samples taxis xd. = 1,2... 1000 defined as
RR
Pi md L e
me
MS oo de
and their covaniance,
| me
Tomo Dt dinlea a)
b. Compare the values cbtained from the samples with the theoretical values.
2.8 Generate à sequence cf 1000 samples vt a Gauss-Markov process desenbed by the
recursive relation
1000
Xu = 0X: + Wa n=
where Xo = 0,0 = 0.9, and [W,) 15 a sequence of zero-mean and umit variançe iid.
Gaussian andom variabies
2.9 Repeat Ilustrative Problem 2.4 with an i.i.d. sequence of zere-mean, unit variancs,
Gaussian random variables.
2.10 Repeat Tlustrative Problem 2,5 when the power spectrum of à bandlinited random
process is
otherwise
[= É. If<B
sun sis
2.4) Repeat Iustrative Problem 2.6 with a linear filter that has impulse response
do fes zo
O=ig eo
26. Lowpass and Dandpass Processes ”
2.12 Determine rumerically the antorarrelatica Fencticn of the random aracess atthe output
of the lincar filter in Problem 2.!
2.13 Repear Iustrative Problem 2.8 when
am DOS nz0
o n<0
2.14 Gencrate an 1.
inthe incerval [1
d. sequence Iza | ot N = 1000 uniformly distributed random numbers
|. This sequence is passed through linear filter with impulse response
mim = TOS nz
mi=
o. n<0
The recursive equation thar deseribes the output of tus filter as a funcmon of che inputs
=005y-ttm n20, a
Compute the autocorrelation functions R«(m) and Ryim) of the sequences [xai and [3h]
and the corresponding power spectra $e(/) and $y(./) using the relations given in (2.4.6)
and (24 7), Compase thus cesuilt for 4,(£) with that obtained in Mustrative Problem 2.8.
2.15 Generate two iid. sequences lua, and ;39,9] 0! N = 1000 uniformiy distributed
random numbers in the interval [—3, 4). Each of these sequences is passed through a linear
filter svith impulse response
whose input-output characteristi is given by the recursive relavion
1
in = qdo + Um 21,20=0
Mm pia nz], xo
Thus, we obtain two sequences. [Xcw) and (sa). The output sequence [xcm| modulates
the carrier cos(r/2)n, and the output sequence ix,x) modulates the quadrature carrier
sin(x/23n. The bandpass signal is formed by combining the modulaicd components as in
26.0
Compute and plot the autocorrelation components R. (m) and sim) for Im] < 10 for
the seguences [t.n) and (Xsm]. respecnvely. Compute the autocorrelation funcuon Re(7m)
of the handpass signal for |m| < 10. Use the DFT (or the FFT algorithm) to compute
the power specira 8.(/). 85(7) and $,(/). Pler these poser spectra and comment on the
results.
82 CHAPTER 3. ANALOG MODULATION
SNR; i.e. itis given by
5 Pa
— | =—— 3.2.8
(5), NoW é )
where Pp is the received power (the power in the modulated signal at lhe receiver), a is
the noise power spectral density (assuming white noise), and W is the message bandwidth.
ILEUSTRATIVE PROBLEM
Illustrative Problem 3.1 [DSB-AM modulation] The message signal m(+) 15 defined as
| 0<xi<$%
mn=4-2, fera
0, otherwise
2
F
This message DSB-AM modulates the carrier c(1) = cos 2yr f.t, and the resulting modulated
signal is denoted by u(4). Itis assemed that 19 = 0.15 s and fo = 250 Hz.
!. Obtain the expression for u(1).
2. Derive the spectra of m(t) and u(t).
3. Assuming that the message signal is periodic with period Ty = to, determine the
power in the modulated signal.
4. If a noise is added to the modulated signal in part (3) such that the resulting SNR is
10 dB, find the noise power.
— SHIP
1. m(t) can be written as mt) = (6) — 2 (UE): therefore,
t— 0.025 t— 0.075
uct) = [n (o) -21 (os) cos(HMyrt) (3.2.9)
2. Using the standard Fourier transform relation F[M(4)] = sine(t) together with the
shifting and the scaling theorems of the Fourier transform, we obtain
FIm(tn] = Det ( 1) — 2ãe =iTfnçinç ( 2)
= imtuil DÍA sem iinnio
= 3 e sinc 3 (1 Ze ) (3.210)
Substituting ty = 0.155 gives
FUm(t)] = 0.086 205/74 sine(0.05 f) (1 = De Pins ) (3211)
32. Amplitude Modulation (AM) 83
For the modulated signal u(i) we have
UI) = 0.025 CSI cinc (005(f - fo) (1 - eU tinti= 10)
+ 0.025 COINA inc (0.05(f + £)) (1 - Ze ist)
Plots of the magnitude of the spectra of the message and the modulated signals are
shown in Figure 3.2.
Figure 3.2: Magnitude spectra of lhe message and the modulated signals in Ikustrative
Problem 3.1.
3. The power in the modulated signal is given by
Ai 1
Pa = É Pm = 5Pm
where Pm is the power in the message signal;
do o doy 5
=— d — |=-=
'm | mi(ndr = a (3 + 3 ) 3 1.666
and
1666
Here
P
1010819 (5) = 10
n
or Pr = P, = 10P,, which results in 2, = P,/10 = 0,0833.
mM
CHAPIBR 3. ANALOG MODULATION
The MATLAR script for the above problem loliows.
de deb
o Mestab demenstcanam corpt for DS!
Sirtifed er e UI DR MS ad
eche an
m= 13:
180.691;
-250
“t-0.3;
t=(0u51]
sme-tin= Oo (nei
e message signal
x,
mofomestt dj (3wts)j—2ronEstT Ata zeros)
sd,
Memyts:
Loud -tftsegiuas dry,
Valãs:
(C estlethseqee so:
ctg elengthumi= I9l-f5/2;
ságnal pover=possertut 1 lengiiue
noise powesesignal poser /ant lim:
noise .sld-sqrnoice.pover;;
roisenense sul econdn(T engriuu:
nor;
Rad =ilsegird ct
R=Ry(5;
paso 5 Press «key do sho the mmcduduced
signal pour
ErsuRSARRAnARRA
AM muitulation The message sena!
25043 amd raro utheruise
amet ureto
it urettom
So sampling interval
carrier freqmene
SNR ve 4P figurino,
sumptina fresuener
% dastred jreq verouçiom
time vectar
iemeur SNR
OAB DI;
career signal
emoelutaneo eiçnal
Foucter tranegoem
scutina
Pourave aransfiem
acatina
Fourier iruesprems
prog, vecior
peter de madutmad signal
Compute noite power
Compute ntise asandard aruunon
Generute noso
Ada mense te Me modulated tignal
apectrum of the sigrulecnse
scaiing
signaf poser
pause Press any key to see u plot nf the message
subplo(2:2.1]
plonfemt A dengahioo)p
alabel(cTêma)
til" The message signal”)
rasse o Press any key io ser u plot OJ she corner
sutolou2,2,2)
plegie deagttrto
dabel( Tire)
inleC' The sexeier")
passa % Press any key tu see «plot of the mudalates signai
subpler(2,2.3)
plot Tlengrtçe)
xiabelf" Timo”)
tideteuhe modularea sigral”)
pruse % Preso any key tm tee a plots ef the mugmitade 0) the messoxe and Me
do moudatateu sigral im she fregurency
subploda.1,5)
plot abstfrsturteMm)
xhabel( Frequency")
domain
32 Amplitude Modulaios (AM) Bs
tutteto Sm es
subplori 1 9
Plone abcfis ereção
tiley' ssecreim cf ineo
,
paus P% Pressa kar io see a meio conipto
eubplouez 1,13
plot noise
lite nor se 5:
pads Se Prego der to eee rh madidato
auibplat,2.1.29
plottal Elengemoiy
liketSigaal ard nesse +
eiaholg Dime)
prase Prestar hey o tec he mo
suboloti2,1,13
pleoEabautfisaniçãos;o
tileç: signa.
inhate eia! ota! monge de. Pre domo
subplur:2.*. 2)
almiCabscfisteeR o)
titer' Signal a:
xtabeltº Freques:
ILLUSTRATIVE PROBLEM,
Illustrative Problem 3.2 [DSE modulation for an almost band!
sage signal m(t) is given by
pe fome asda
“o vlherwise
where 16 = ().1. This message modulates :he carrier cít) = cos(2m fit), where f, = 250
Hz,
Determine the medulated signal ut).
. Determine the spectra of vm(t) and utr)
ta
. If he message signal is periodio with period Te
imodulated signal
2, s determine the power in the
»
tf'a Gausstan noise 1$ added to the modulated sigoal such titat the resulting SNR is
10 dB, find the noise power.
86 CHAPTER 3. ANALOG MODILATION
sis) = mino
sine( 1001) cus(500r), |] < 0.1
a otherwise
= sine( LDO TT (51) cos (5006) (213)
GL)
A plot of the spestra ot m(t) and a(t) is shown in Figure 3.3
As the figure shows, the message signal is an almost bandllimited signal with a band-
width of 50 Hz.
2. The power m the modulated signal is half of the power ia the message signal. The
power in the message signal is given by
fla
Pa= 5a f sinettnon de
The integral can be computed using MATLAB's quad8.m m-file, which results in
Pm = 0.0495 and, hence, P; = 0.0247.
3. Here
|Dlogig (5) = 10 = Pa = 0. 1Pe =0.1Py = 000247
The MATLAB seript for the abave problem follows,
T——
% dsbêm
% Matiuh demonstranon script for DSB-AM modulation. The message signal
do is ola) = sínct IDO,
echo on
n=2; * signal duration
18=0.001; % sumplag inlervul
fem250: % carrier frequency
q: E SNR in dB (tgarithmic)
% sampling frequency
% required! jrey. resolution
% time veciar
k & lincur SNR
mesinçi100m1), % lhe mesrage signal
ps(Zepiefe ar); he carrier sugeria)
e she DSB-AM mudulmed tignai
+seqlmuadO): B Fourier transfam
% acaling
(aid sfitsegins df): % Fourier transform
3.2. Ampliuds Modulaston (AM)
-r . nn
cof 1)
cara
axa
g
SO COD DO SS CN Do MEIO CRE do
Eequeney Hz;
“19º
ê
Soo ag z ECA)
Frequency
Figure 3.3: Spectra of the message and (he modulated signals in Nustrative Problem 3.2.
so CHAPTERI, ANALOG MODULATION
| ij
| ] | e
Figure 3.5: The
essage and the modulated sigaals in Hlestrative Problem 3.3
4. The poser in lhe mess:
e signal can be obtained as
1 nos a
Pra —s di+4 dr| = 1.667
15 h bs
The power in the cormaiized message signal Bm, is given by
pao lo = "É coa67
. 4 4
and the modulation efficiency 15
E Pe, 2x 0.4
no fa S8PAOAG oo
TP 14085 x 04167
The power ia the modulased signat is given by (E denotes the expected value)
A
Paz En +amtnÊ
L/ nas
=— O3010— 1.7
ato 28)
= 0.5088
e
Iotogo [1( se )] =10
7 (5) =10
Pa
5 An this case
or
32 Amplo Mudalanon AMP s
act . | Mis
Feepenar
uz
na
no 4
m
q!
Sig >= SR SA ARO a
Emos
Figure 3.6: Spectra of the message and she modulaled sigaals ia Mustrative Problem 3.3
a CHAPTER 3. ANALOG MODULATION
Substituting q = 02314 and Pg = E
A
p= =0MIS
= 0.5088 ia the above equation yietds
In finding the power in the madulated signal, in this problem we could not use the
relation
because in this problem (4) 18 aot à zero mean signal
The MATLAB seripa fo thus prabiesa is given helow.
% umum
Se Mathab demenstrunon script for DSB-AM imucdolorion. The messuge ssguat
Miselpu de te 20/32 Jor 103 eds 2/3 url cem urhemanto
echo on
do signal duratiun
%o dumphing incereut
% currier frequeney
% SNR im dB ilogarubmic.
e omadutamem indes
% sampling Pequency
% tume vector
E % required Jrequency eecotuno
ane lina 10"(507/10, % SNR
% mersuge tignat
m=fones[1 10/(3+18)) —2agnes(1 10 /:3405)) zeros(110/(3+15)+1))
cxcnsiZopieicao. % carrier sigaut
me nm/moxçabsimi) e normalized message cignat
EMdan df ]=fisegim ts. % Fourier bunsform
M/ Es: % eculing
FI: Ledlengrhtm) NI -ts/ 2: % fequenoy vecur
143em.n) % mendutased signal
[Ucsdfty % Founer transfira
Ual/is, o eculioy
signal. poseee=pomer(ut Islengu(t)), do peer um medulasça cprat
% power in rormalized message
pranspoveertani 1 lengthtts))/(mae(abs(m))" 2,
“Bapmn)1 va Zeprom). o maduduton effcieney
nense power-etaasigmal. power /snr-lim: So munre porver
nuise sId=sqrttnoise. peer): de oiee stumluard desamor
noisemnoise .sud=randn( lengrhiwj): % generate muiee
reutmense; Wo Adil nose to the medulaies ngnai
Rad =ifisegte ssa % Fourier arunsjorm
ReRyfs; % sculina
pausa % Presa a bey ta sãom the modahued signal power
signal power
pasa Ge Presr u key tu shaw the modulatios efficiency
em
pause Sb Preso any key to ser a plor of the message
subpluit2.2,1)
32, Amplitude Moautarion (AM) 95
alotttn despir
axiadD 0.15 2121)
xlabelj' “ima +)
unter
pouso.
passe So Preso cm dep mu see cs pos at the cuerier
aubplod(2.2,2
plertizt Ulengrnts)
aeis(f0 0.15 21 2.º)
tide( he carrtar-
pause e Preso am ev do eee ue plot mf tl mudistutad signai
Eubplox2.2.3%
plenti t Ilenggivio)
axistiO 2.15 21 2.1)
alabelt Time "1
ilet*The modtetazed sigral o)
Pause Preso ais be de see cr pluts of the maguntude of she message und she
“o modutatei! sugmai in die frequency domain.
cubpiaee2 31
plot fast hufceM
alapelt Frequentar)
lilet:Specrrum of "ha message signal)
subplot2. 1.24
piortabstisaitçoo
filer" Spectrum cf che modulared signal")
Xinbel' Frequency")
pause O Press u key do ses « aviso suiple
subplot2.:. 1
ploutenoise(tengrhçonh
tider'noise sample")
alabelt Time”)
posse o Prees a key to see the modulaied tignat and noise
subplouç2.1,2)
ponte t Tfengiot
tile/-Signa” and noise'i
alabelt Timer)
quase 6 Prers a key ta see the mudulated signal und noise iz fhea. domain
subdott21. 1)
plot abstitshiteetro
diet'Signal spectzum")
xlabel(' Frequency
subpluct.9.2)
plor(f abeçFRshivicR o)
tile('Sigral and raise spectrun?)
atalelt? Fa equency)
“The MATLAB m-file am.mode.m given below is a general conventional AM modulator,
este)
armam fe)
RAMMOD iukes signal m sampled at tr and cores
% Sire Je as inpus und returns the AM modidated
signal, "a is the medatation indes
Function u=am.nwdí:
% u=
%
6 CHAPTER 3. ANALOG MODULATION
% une ty e d/28
lengenem; - tre
osiZapisfe a);
im ve m/mantabetm)):
ue(i-arm nome
3.23 SSB-AM
SSB-AM is derived from DSB-AM by elimirating one cf the sidebands. Therefore, ir
accupies half the bandwidth of DSB-AM. Depending on the sideband that remains, either
the upper or the lower sideband), there exist two types of SSB-AM, USSB-AM and LSSB-
AM, The time cepresentation For these signals is given by
un=
dra
5 min) cosa foi ca (o) sinlêm fee) (3.2.21)
where the minus siga correspends to USSB-AM and the plus s:gn corresponds to LSSB-AM.
Tae signal denoted by di(t) is che Hilbert transform of 2a"), detincd by sk (th = m(r) + 5;+
or, im the Grequeney domain, by ÁTC/) = — sgn( IMC. In other words, the Hilbert
transfarm ofa signal represents a 1/2 phase shift in oll signal components. In the Frequency
domain, we have
p Mir cn Mer+ do A <fI
h = (3.2.22)
Vussatt) E otherwise (22
and
Jimi stat Mif+ oO ais h
Urssalf) = . athervise (3.223)
Typical plots of thespectra of a message signal and the corresponding USSB-AM modulated
sigaal are shown in Figure 3.7.
The bandwidth of the SSB signal is hatf the bandwidth ot DSB and conventional AM
and so is equal to the bandwidth of the message signal, i.e
Bra W (3.2.28)
“The power in the SSE signal is given by
A?
fa= E Pm (3.225)
Note that (he power is half of the power in she corresponding DSB-AM signal, because one
ofthe sidebands has been removed. On the other hand, since the modutated signal has half
the bandwidth of the corresponding DSB-AM signal, the noise power at the front end of
the ceceiver is also half of a comparable DSB-AM signal, and therefore the SNR in both
systems is the same; i.e,
s Pr
= E 3.2.26;
(o). Now N ?
32. Amplitude Modufation (AM)
Figure 3.7: Spectra of the message and (ho USSB-AM signal
ILLUSTRATIVE PROBLEM
Hlustrative Problem 3.4 (Single-sideband example! The message signal
Lo 0<:<%
men =
0, oiherwise
modulates the carrier c(t) = cost27 fer) using an LSSB-AM scheme. It is assumed that
to =0.15sand £ = 250 Hz.
1
Plot the Hilbert transform cf the message signal and the modulated signal s(:)
. Find the spectrum of the modulated signal.
Assuming the message signal is períodio with period ip, determine the penver in the
modulated signal.
4. la noisc 1s added to the modulated signal such that the SNR after dermodulation is
10 dB. determine the power in the noise.
— EI — ame
1. The Hilbert transform of the message signal can be computed using the Hilbert
transíorm m-tile ot MAILAB, 1.e., hilbertm. H should be noted, however, that this
function returas a complex sequence whose real part is the original signal and whose
imaginary part is he desited Hilbert transform. Therefore, the Hlilbert transtorm ot
the sequence mm is obtained by using ihe cominand imag(hilberi(mn)).
102 CHAPTER 3. ANALOG MODULATION
This message DSE-AM modulates the carrier c(t) -« cos 27.1, and the resulting modulated
signal is denoted by u(t). lt is essumed that to = 0.15 s and /
1. Obxain the expressian for att)
2. Derive the specira of m(r) and u(r).
3. Demodulate the modulated signal 4(1) and recover m(1). Plot the results 1m the time
and frequency domains:
Dn
1,2. The firsc wo parts of this problem are the same as the first two parts of the IHluscrative
Problem 3.1, and we repeat only those results here; namely,
1— 0.025 t— 0.075
ua) = [n (Se) -20 (55) cos(506r)
and
4 2
rim Becotnoas (8) - Rsteçs (0)
= Becintois, LN oeritamro
= qe! tolsine (E (1-2 )
= 0.08e-008/2/sinc(0.05 1) (1 — 2e-0047/)
Therefore,
UCP) = 0.025e POUR 2O sine(0,05(f — 250) (1 -20º Srty 250)
+ 0,025" POSIr(/+25inç(0.05( + 250) (1 = 20 Unts + 250
o
. To demodulate, we multiply ur) by cos(27 f.t) 10 obtain the mixer output (1)
0) = ute)cos(2mf.1)
1 = 0.025 1=005)] à
(= Jon ES JJ $0me)
HT (t- 0.025 OS
alm( 005 )an( 0.05 ]
If. /1- 0.025 1-0075
ei [o(a (102) cone
«whose Fourier transtorm is given by
FCF) = 0.025€ POR ginc(0.057) (1 - 2e Mia)
u
+ 0,0125698 In(/=50Dsinç (0.05(/ — 500)) (1 —- 2! tony sem)
+ 00125000 inc (0.05(f + 500) ( — qerbniay =)
3.3 Demodulation of AM Signais 103
where the first term corresponds to the message signal and lhe last two terms corre
spond o the high-Cequency terms actwvice the carrier frequeney. We see that iltering
che first term yields the original message signal (up to a groportionaiity constant). À
plot of the magmudes of (7) and Y(/) is shown in Figure 2.10.
The demo mira
Figure 2.10: Spectra of the modulated signal and the mexer output in IMustrative Problem
35.
As shown above. the spectrum of the mixer output has a lowpass component that is
quile similar to the spectrum of the message signal, except for a factor of 4, and a bandpass
component located at &2/, (in this case, 500 Hz). Using à lowpass filter we can simply
separate the lospass component om the bandpass component. In order to recover the
message signal sm(t). we pass y(r) through a lowpass filler with a bandwidth of 150 Hz.
The choice cf the bandwidth of the filtcr is more or less arbitrary here because the message
signal is not stricily bandlimited. For a strictly bandhmited message signal, the appropriate
choice for the bandwidth of the lowpass filter would be W, the bandwidth of the message
signal, Therefore, the ideal lowpass filter employed here has a characteristic
1 fx 150
Hp = -
Dto, oihervise
A comparison of the spectra of m(t) and the demodulator output is shown in Figure 3.11.
and a comparison in the time domain is shown in Figure 3.12.
The MATLAB seript for this problem follows.
% dsbdemm
% Matlab demonsiralon script for DSB-AM demodulation The mesrage signal
Misa for O << M/4 2 for 08 «é « 203 uni rem enherniso
ectm on
105.15; e signal duremon
us CHAPTER 3. ANALOG MODULATION
Figure 3.11: Spectra of the message and (he demodulated signals om Tlustrative Problem
35
he sem tais
d pol
1 Sd fm
Figure 3.12: Message and demoduiator output in Tlustrative Problem 3.5.
33 Demodulation of AM Signais 105
do camping iniorval
% carrier frequency
So cumpliny frequency
% uime vecrar
% desired frequercy resolution
% message signal
mes 0/0 Dets. = Zronesi 1 (Its! east O /6Isdo 3;
ceenst2ypimfo my, carrier eigaut
u=mte. smoduioted signat
meuimy
Fourier tramstorm
senna
Fuaner transfom,
seaiing
onrier trogisem
svaling
cce Freq Cf the fer
Design che for
ts:
E cutoft= 150;
Recinoff=foor(150/df1)
E=jOdflidtiodlengthon = 1H -s,
angus paa
tiriencentofr
Hlengihtfi-m cutolr + enguluf))-2eones 1 n.cutof;
DEMEH +Y; * apecirum of che Alter quis
demercaltIM(DEM nfs & fer ouipur
pause % Press u dy du see the efect ut minor
cr
subplor(3.1.1)
poste sshiitabseMin
tidet- Spectrum Df the the Message Signal)
xiabel(* Frequency”)
subpiorçã. 1,2)
plot Efashiiats (UI)
tie('Spactrum of the Modulared Signal")
alábelk' Frequency")
sabplotçã. 1.31
plot shifitabot Pp
tibe(' Spectrum cf the Mixer Output")
alabelt" Frequency")
pause % Press q key to see he efleci of fiteriny cm dhe misor culpas
ar
subplotç3,1,1)
plontE stitabsi
cúle(' Speczrum of che Mixer Cutput')
alabelt' Frequency")
subpÃos(3,9.2)
Porte ishificabstHm)
Hilet' Lompass Filter Characteristics")
Mabel Frequency")
subploiçã.1.3)
plor(f fishifiçabs DEM)
fidel* Spectcum ot Che Demoduiator quiput")
alubel(” Prequercy")
pause À Press a dey to Compare the spectra of the message an she received signal
ar
subplot(2.1,1)
plortf fshificnbs(M
106 CHAPTER 3. ANALOG MODULATION
file( spectrum oi the Macuaye Sicnal')
,
subplet2,1
pleeti Hieshif cabo DEM
Che Demodelarar Grepur)
xlabelt' Frequency)
pausa G% Prers a tes to see ih
subplor(?,1,1)
Plot Iilengrhgçio!
tuler*The Maesaçe Stgnal!
xlnhel Time)
sesploti2,1,23
ploctedecnt? lengahityy
use" The Demadr ator quepar *)
clabeli imo”)
ILLUSTRATIVE PROBLEM
Ilustrative Problem 3.6 [Effect of phase error on DSB-AM demodulation] In the de-
modulation of DSB-AM signals we assumed (hat (he phase of the oca! oscillaor is equal to
the phase of the carrier. If that is nor the case. f there exists a phase shift & between
the local oscillator and the carrier—how would the demodulation process change?
“ED ——————
[a this case we have u(1) = A m(r) cost2m ft), and the local oscillator generates a sinu-
soidal signal given by cost2r ft + q). Mixing these two signals gives
mertuxe une te demudulutor outras sigrals
(1) = Amt) cos fer) x cos(2m fit + qd) (333)
A,
Sem(ncostg) + Sm) costêmja + 4) (0.3.4)
As before, there are twa terms present in the mixer output. The bandpass term can be
filiered out by a lowpass filter, The lowpass term, 4-mtt) costg?. depends on &, however.
The power in the lowpass term is given by
A
Prcosig (135)
Pam = É
where Px denotes the power in lhe message signal. We can ses, lherefore, that in this case
we can recover the message signal with essentially no distortion. but we will suifer a power
lossofcos2g. For p = 7/4 this power loss is 3 dB, and for é = 1/2 nothing is recovered
in the demodulation process
3.3.2 SSB-AM Demodulation
“The demodulation process of SSB-AM signals is basicaliy the same as the demodulation
process for DSB-AM signals, i.e. mixing followed by lowpass fltering. In this case
4 Ae
ut) = dem cost fot) = Sto) sunt fer) (313.6)
33. Dermdulmion o! AM Signals 107
where the minus siga corresponds 16 the 1:SSR ad the plus siga corresponds to the LSSR
Mixing vir) with the local oscilator omput we obtain
Ar - Ar
= qmtiteoÊ (Ox fa) 7 (o) sin(22(.0 cosi2m pos)
Aeins de Aee .
= q mi+4- miticostdz fin) 7 — mis) sind fr) (337
7 4 4
vehich contains bandpass components at 2 f, and à losipass component proportional te
the message signal. The lowpass component can be filtered cut using à lowpass filler to
tecover the message signal. This process for the USSE-AM case is depicted :n Pigure 3.13
>
-— CANA
E? 2h 2hrW
Figure 3.13: Demodulation of USSB-AM sigrals.
— CT
Hlustrative Problem 2.7 [LSSB-AM example) in a USSB-AM modulation system, if the
message signal is
1 0xi<%
mij=(-2, Fera
0. otherwise
with to = 0.15 5. and the carrier has a frequency of 250 Hz, find U(f) and Fí
compare the demodulated signal with the message signal.
“€ED—————
The modutated signal and its spectrum are given in Tustrative Problem 3.4, The expression
for UC is given by
0.025e POSMD net O5(S — 250)) (1 — Ze tizey
UU = | + 0.028 DOME ine(D05(F + 250) (1 — De Ur Wish
0. otherwise
ANALOS MODULATION
Figare 3.17, A
mple enseiope detector.
Mathematically, the envelope detcior generates the envelope af the conventional AM
signal, wbish is
vn = [Lam tn] (339)
Because | + imp(t) 2 O, we constude thal
ve o Lhemto (3210)
uihere ma?) 'S proportonal to the message signal mtt) and 1 eomesponds to the carrier
comoneat that can be separated by a de-block circuit. As sera, in Me above procedure
there is no need fr knowledge of &, the phase of the carrier signal. That is why such a
demudulation scheme is calied nonconerent, or asynckronous, demodulasion. Recall irom
Chapter 1 that the envelops ot a bendpass signal cam be expressed as the magnitude of its
lowpass equivalens signal. Thus :f utt) is the bandpass signal with central frequency f
and the lowpass equivalent to u(t) is denoted by tr(r), then the envelope of uír), denoted
by V(), can be expressed as
3311)
where uv it) and ue, (t) represent the in-phase and the quadrature components of the bandpass
signal u(7). Therefore, in order to obtain the envelope, it is enough to obtain the lowpass
equivalent of the handpass signal. The envelope is simply the magnitude of the lovepass
mity= (2
0, otherwise
moduiates (ho camier ct!) = cos(2m.
is assumed that fz = 250 Ha and dg —
+) using a conventional AM modulation scheme. It
155. and the modulation index. is a = 0.85
3.3, Demedilation of AM Siginais na
Using envelope Estection. demodutate the message sipnal.
3f the message signal is periodic with à perical equal to «9 and É an AWGN pro-
1 added to the modulated signal suzh that the power in the noise process is
ume-hundredih Lhe power im the modulated signal, use an envelope demodulator to
demodilate the receiver] signai, Compare (has case wilh Lhe case where (here is no
noise present
Asan Tlustralive Prabiem 2.3, we have
—0. ssa
cosipr fo
UoIs
005
1— U.025
- |! 425 3 = 0.858 1] cosis007!)
1f an envelope detectar is used to Cecmedulate the signal and the carrier component
is removed hy à de-block, then the original message m(r) is recoverad. Note that a
erucial point in the recovery ofzm(r) is that for atl values of. the expression I+amn(t)
is positive; therefore, the envelope of the signal [1 + ama (8) cos(2x /.t), which is
Ve) = [14 amyto], is equalto 1 + ama(t) from which m(r) can be recovered
easily. A plot of the conventional AM modulated signal and its envelope as detected
by the envelope detector are shown in Esgure 3.18.
ul
Il )
| | | rd
|
| |
Figure 3.18: Conventional AM modulated signal and its envelope.
After the envelope detector separates lhe envelope ví lhe moduiated signal, the de
component of the sigaral is removed and the signal is scaled to generate the demod-
ulator output. Plets of the original message signal and the demadulator output are
shown in Figure 3.19.
14 CHAPTER 4 ANALOG MODULATION
1
ad nona
| |
d | , ! rancor
Figure 3.19: The message signal and the demodularsd signal when no noise is present.
2. When noise is present. some distortion due 10 the presence of noise will also be
present. Im Figure 3.20 the received signal and its envelope are shown. In Figure
3.21 the message signal and the demodulated signal are compared for this case
ppt
| fd | | | | Minie
ij
perotonal
Figure 3.20: The received signal and its envelope in the presence of noise.
The MATLAB senipt for this problem follows.
* um demm
%e Matiab demensiration script for envelope detection. The message signal
Ris+iforO <r<r0/3-2/%r mr 20/3 and zem othernise,
echo on
De 15; % signal duration
18=0.00%; % sampling intervat
fo=250; % carrier frequeney
&3. Demodulation of AM Signals ns
pre
% mudidanem andor
e sampling frequency
%o time vector
% required frequency vesoluiina
de messuge siguul
mO-[ones(] «0/(3e1s)), -Dannesi 1 104Qots) 2er0st1 10 /(3ursis 1];
Emcos(Zepim(e ay; % curreer riguat
man=m/maxtabstm)) % aúrmahzed message signal
[Mana [effisegemas df; % Fourier transform
F=[O:aflsdtleilengthtmo— 134 fs/2 o frequency vector
u=1tuem.m) sc; % mudulaed signct
EU dr =tisegtu sd %o Fourier trunstorm
emv=sav.phas(u): % Find he emelupe
demi=atenv— fiya: % Remove de und rescule
signal. power=poweriu( lengery, % pawer in mudulared signal
noise. pomeresigna]. power; 100: * mise power
noise std=sqruenaise. power); % neuse suundtard cemanion
nove=noise .srdamnda( lengebtu). & penerme nice
teuenoise: % Add núise «o the mudulaied rignal
[Ra af] jfitsegris di): do Fourier iransform
env.rsens. phastr); % envelope, «hem muuse ix present
demz=2menv.s— 1a; % Demululate in the presence af noise
pama & Pregs any hey ho sec u plet of the message
subplotta, 1,15
plot(Lamt 1 tengihteo)
axis(fO 0.15 21 2.1
alabeii Time")
tine(*The message signal”)
pause % Pres any key o see à plos of the menduluted signai
subploiça.1,2)
plot SC] dengrteiyo)
axistlO 0.45 -2.1 2.1)
xlabelk*Tima 3
ilet'The modulared signal”)
pause % Press a hey to see the envelome vf the maculated signal
ar
LE CHAPTER 3. ANALOG MODULATION
subpiona 1,1
peottaui Ttsagençr
aein(O 015 =21 27)
xasedt Pinar)
he medulatad signal"
plotetenv: flengrhuras
xlabelt Pimars
megulated
» contiparo que mens
gra)
e and me demaitutared signo
suoplod(2,12)
plstátam E lengiaço
axist(O 0.15 —21 21
xlabe:f" Time 1
nil('The message signal +
aubplot2, 1.29
dem IC eagihitio
Pine")
tlet The dec;
passe % Pres a key do compare om ie pereonco of noise
air
subatovt2,t,1)
alone dengentado
=xisilO 0.15 2124]
-e4 signal)
he massage signal i
subplott2.1.2
porco dem Ilergehutioh
xlatelt Time)
tidet'Tre demodulated sianal in che presence of noise!
In the demodulation process above, we have neglected the effect of the nuise-limiting filter,
which is a bandpass filter in the Best stage of any receiver. im practice the received signal
rlz) is passed through the noise-limiting filter and then supplied to the enveiope detector.
1n the above example, since the message bandwidth is not ânite, passing r(t) through any
bandpass filter will cause distortion on the demodulated message, butit will also decrease the
amount of noise in (he demodulator output. Ta Figure 3.22 we have plotted the demodulator
cuputs when noise-limiting fiters of different bandwidths are used The case of infinito
tanga is equivalent ta the result shown in Figure 3.21
34 Angle Modulation
Angie-modulation schemes, which include frequency modulation (FM) and phase modula-
tion (PM), belong to the class of nonlinear moculation schemes. “This family of modulaton
schemes is charscterized by Lheir high-bandwidih requirements and good performance in
the presence of nvise, These schemes can be visualized as modulation techniques úhat
trade-off bandwidth for power and. therefore, are used in situations where bandwidth is not
the major concern and a high SNR 15 required. Frequency modulation is widely used in
24. Anple Meditar n?
A:
Vila,
o o
!
rita Bana
Vametocre
|
N
h DA
a | | |
VM
Figure 3.22: Etiectof the bandwidth of the noise-limiting filter on the output of the envelope
detector.
CHAPTER 3. ANALOO MODULATION
and sa
frequency mudiaitiom. The message cias!
vor UPS 47 4 203 and
a uthenvise,
signal cturation
camping interval
carmer jrequency
emvelutamem index
sampling jrequene
Rana
*
reqicved frequency rerotuizon
es1119,/13-189.- Zrones! MACA Ivtsn2erost 1 10/eiss 1;
1-0:
ngihio 1 o integre of m
ars emtio Dstmi ratipermintets,
and
Mim lHlj=fisectmas af) % Founer aransjurm
s % sculing
dl del =tlengetiem— 1] a/2: % frequency vector
Jmeos(Bepinfeet+2epiakf int. mb; % mudulated sigra
UudflJefiegiutsdo, % Enurier transforma
U-tys % sculing
muié E Preso amy hey tu see se pior 0) the message and the modulimed tgral
sutplo2o 1)
otit lemgrhito
asisif0 0.15 2.1 2.1)
clabelt usa")
le Dre message sigaai”]
subolon2.1,2)
plot ui? lenguiço
axufO 045 2.1 24]
ctapelk "Time 'y
ulet' The nodilates signal >
use E Presa any key du se q ploix ef the mugmitade cf the mesmige ana he
So mucaluced signal in the fregueney dumain
subpn2115
elotctabscaistitiçMos
belg Fesuueney")
Gdet'Hngri rude spectcwm of the message signal |
sibpiot2.1,2)
plom abs istutas Dj
Hagrirvds-speci
Nateil' tregasney")
OÉ the modulateú siunal”
34. Angie Modutation 123
ILLUSTRATIVE PROBLEM
Mustrutive Problem 3.11 [Frequency modulatian] Let the messsge signal be
since T00N, tl
otherwise
mup=
wterc ir = 1, This message n
Hz The deriatior constam is &y
iulstes the carrier c(r! = cos(2r f.4). where f. = 250
106
1 Plotthe modulated signal ir the time end frequenzy doracim.
2. Coumpare the demodulator amput and the original message signal
ED
1 We Best integrare tac message sigaal and then use the se
ston
ahrt ted, f ntar)
jo ind “(?). A plos of a(s) together with the message signa! 1s shown in Figure 3.3
The integral of the message signal is shown in Figure 327
Figure 3.26: The message and the mudulated signals
mm
A plot of'the modulated signal in the frequency domtuin is shown in Figure 3.28
n
To demodulute the FM signal, we first find the phase of the modulated signal u(s)
This phase is 27ky 2 m(z) dr, which can be differentiated and divided by 27k;
to obtain m(r), Note Matin order to restore the phase and ondo the elf of2x phuse
foldings, we employ the unwrapum function of MAIL AB, Plats of (he message signal
and the demodulated signal areshown in Figure 5.29. As youcanses, thecemodulated
signal is quite similar to the message signal.
na
CHAPTER 3. ANALOCG MODLLATION
do
Figure 3.27: integral of the message signal.
Figure 3.28: Magnitude-specira of the message and the modulated signal.
Dodo Angelo adodrtaçnon 125
A
DANE
DA
Figure 1.20: The ruess
signa: and the demodulated signal
The MATLAB script for ils problem fo:lows.
& fmim
E Mankalo desmemenanuom ceripo for frequenci ormdufanim. The message sinal
ds mt -sanct dO
e cmgoat duruetar
Ge sampling enierat
% carrier frequency
Se SNR q dB dlngarishome!
% campling frequemey
% requered jrego resolution
e teme vertor
00: % devation conse
dfx0.25; % required Jrequerey resulunor
mesine 100: % the messuxe signal
intom(1 md;
for i=1lenginto—1 E incegret of m
iotom(is Deine m(ipemtizars;
end
(Mama! sffisegtmas dy: % Furtos srunsform
fa; E tcntry
0.4 dE alegam) - Mt ts/2: frequent vector
u=cos(Zapisfcet42epirki eim m) & muduluçed sigaut
(Uai Miseg(u asdf % Fourier transforma
U=U/6s: % realing
Cecphaseleeny. phasiu1s.2803 “o demoduiunor ford phase u! a
phisunwrap(phase): % restore original phnee
Sem A Zopisk)etdifrephitj0s) % demoduiator output, diferente und suute phase
pouso % Press uy key to ser v ploi of the message and the madulaied sipacl
subploeç2.11)
plea(e (1 -lengataçoo)
Xlabel(' Time")
tilei'The message signal”)
126 CHAPTER 3 ANALOG MODULATION
subplo(2,1,2)
plouta(tlengthtr)))
xlabelt' Time")
litie('The modulated signal ')
pause % Press any key to see ut plhos of the magnitude vf the message und the ,
% modulatred signal ir the frequenex domain
subplot(2,1,1)
plorifabs(Hishift(u1 5)
xlabel' Frequency ') . .
ude(i'Magnitude-spectrum of che message signa:'l
subplot(2,1,2)
plottf abs tshifiçU . .
ttlei Magnitude-specrrum of the modulated signal ')
slahel' Frequency!) ,
pause % Pres anv kev to see plots of the message and the demecdidator cuiper meth no
% nuise
subplot2,1,1)
plotter length()
xlabel(' Time)
title(' The message signal '>
subplot(2,1,2)
plot dem(Tlength(t)))
xlabel(' Time)
tilet' The demodulated signal')
—€ED-
A frequençy-modulated signal has constant amplitude. However, in Figure 3.26 the
amplitude of the signal =(t) às apparently not constant. Can ycu explain why this happens?
34 Angie Modulaiion 127
Problems
3.1 Signal m(t) is given by
Fr, Ol<i<l
miti=4-142, l<t<10
e, otherwise
in the interval [0, 2). This signal is used to DSB modulate à carrier of frequency 25 Hz and
amplitude | to generate the modulated signal utt). Write a MATLAB m-file and use it to
do the following.
a. Plot the modulated signal.
b. Determine the power content of the modulated signal.
c. Determine the spectrum of the modulated signal.
Determine the power spectral density cf he modulated signal and compare it with
the power spectral density of the message signal.
3.2 Repeat Problem 3.1 with
t
t
l
2
IA
t, o
mit) = |
=[+2,
EA
IA A
in the interval (0,
2). What do you think is the difference between this problem and Prob-
lem 3.1?
3.3 Repeat Problem 3.1 with
sinci(lO), |H<2
n(t) =
t) D, otherwise
and a carrier with frequency of 100 Hz.
3.4 In Problem 3.1 suppose instead of DSB, a conventional AM scheme is used with a
modulation index of a = 0.2.
a. Determine and ptoi the spectrum of the modulated signal,
b. Change the modulation index from 0.1 t6 0.9 and explain how it affects the spectrum
derived in parta.
e. Plot the ratio of the power content of the sidebands to the power content of the carrier
as a function of the modulation index.
CAP ER do MINA Eelao Etiriidhad Eótdo o od dO
42 Measure of Information
“The Guipul 0 2m infitrmation source idua, speech, vides, etc. can be modelad as a candom
pracess. Foz a discreie-memoryless and stationary random process, which can be thought
q as independent drawings SÉ one random variable X, the mformation content, or entropy
is defind as.
max
=—5º píxsiog pix) (2)
ER
alegro 5% denotes te sourze alphabecand p/2) is le probasility o the leer x. “Che base of
he logeritasm is usually chosen to be 2, sehictr sesults in the entropy being expressed in bits.
For ke hinary alphabet with probabiliies arc 3 — p, the encopy as denated hoy Hi(p)
and is given >y
Hip) =(i-phogc — pt (22)
A plot of the Dinary ensrepy funcnon is given ix Figure 4.1.
Figure 4.1: Plot of te binary entropy uneúon
The entropy cf a source provides an essential bouad on the number of bits required to
represent a sousce foz (uil recovery. In other words, the average number ul bits per source
cusput teguired to encode à source tor error-fee recovery can be mude as close to HI(X) as
swe desire, but zannot be less than 462).
4.21 Noiseless Coding
Naiseloss coding is the general term for ali schemes Uhat reduce the number of bits required
for he representation of a source output for perfect recovery. The noisetess coding theorem.
i
i
clue to Shanaoar states hat for perfect reconsiresnon oi à seurce iLis possible to use a code
sesth a rate as close to the entrogy of te source as we desire, “mt it IS nar possible to use &
code with a rate less than the scures entropy. In cther words. tor any é > O, we can have
a code with rate less than FX) + e, but wwe cannot have a code veta rato less than HCX).
vegardless of the complexity ol the encoder and che devoder. Tatece exist various algoriltuns
tor noiseless semirce code, Huifmao codiry qd Lempel-Ziv coding are two examples
Here we discuss the Huifman coding aleoritam
Huffman Coding
in Huffman coding we assign longer codewords to the less probable source outputs and
shorter codeseords to the more probable ones. To de tis we start by imerging (he two least
probahle source cutposs ta generate à new mersed output whose probability is the sum of
the corresponding probabilities. This process is repeated until only one xrerged oucput is
left. (n tins way we gencrate a sree. Siarung from the rool ef the tres and assigning 0º
and t's to any two branches emerging [rom lbe súme node, we geneete the code. ftean be
shown that ia this way we generate à code with minimum average length among the class
of prefir-free codes The following example shows how to design a Huffman code,
ILLUSTRATIVE PROBLEM
Iustrative Problem 4.1 [Huffman coding] Design à Hutfman code for a source with
alphaber X = (x1.x3.... . 49). and correspondiag probability vector
p=(02,015,013,0:2,0:,009,08,0.07,006)
Find the average codeword length of the resutung code and compare 1t with the entropy of
the source,
D——————
We follow the algorithm oultined above to gel (he Lee shown in Figure 4.2
The average codeworá length for this code is
L=2x02+3x(0.15401340.12 40.1) 44 x (0094008 4007 +006
=3.1 bits per source output
The entropy of the source is given as
9
ROO = — » pilog pu = 3037] bits per source output
We observe that L » H(X), as expected,
“The MATLAB function entropy.m given Eclow caiculates the entropy of a probability
vector p
!Prefix-free codes ase condes am selucla iu «usleseuna Sa pref of anathes codenvord,
Codewords
[ie
[o
1010
10LL
“Ho
um
x
x
x
“
CHAPTER4. ANALOG-TO 11
160
no
042
932
mo
ou
10
9 lose
0.26
1019
at?
10%
1011
tio
0.13
m
tu
Figure 4.2: Huffman code tree.
“AL CONVERSION
Prob. = 1
42 Messyre of Informares us
TD
Sunerioa h-ensrapyig)
% = exoprr.
% che probe
dE dengaótiadra <9:
ns the entrepy funchon eg
component (5) )
t abs(sumpo= 1
temor 'NcE a p
end
h=sum(-p aloga(p):
omencs dC qur ada up co 1º)
Ihe quantity
(423)
is called the ejficienos af she Hugfman code. Ohviously, wc always have q < 1. Tn gem.
sral, it cur be shown that ihe average codesvord length for any Quifman code satisÃes the
inequalities
BUD LÊ <HON+L (4.2.4)
Tf we design à Huffman code for blocks of length K instead of for single letters, we «will
have
- I
HM) <Ê<HOO+ E (4.25)
and, therefore, by increasing X we van get as close to H(X) as we desire. Needess 19
say, increasing K increases the ucmplexity considerahly. Tt should also be noted that the
Huffman coding algorithm does not result in à unique code due to the arbitrary way of
assigning 0's and 1's to dilferen tree branches. That is why we talk about « Huffman code
rather than che Huffman code,
The MAILAB function huffman.m, which designs a Huffman code for a discrete-
memanyless sauree with probability vector p and returns boththe codesvoras and the average
codesward length. is given below.
function Fadi=hufiiaantp):
GHUFEMAN Mugen conde gerenim
%
ff = huófmurtp), Hoffman code genenaur
% returas h the Husfram code auras and E che
% average conlemurd feng far a torce veish
& probubitico vector p.
1 lemprhçânec eg,
Ea prob. vector, negative compuneac (3) ')
df abs(sum(pi—1)10819,
na CHAFTER 4. ANALOG-TO-DIGITAL CONVERSION
ent Nor a prcd. veczor, cosponents Jo not ade up =
for cetiam"
—avifindmin-ioi,
findtentn= it Jet:
ein ineo”
etr-ia-tZem Saetn-ita-1)
climiZener dr;
for jetã=
cinnça+ Mono 1QsBandectnmi=
astndemin=is:,
end
ené
j==ato= "5 natindiratn= ot
a
ati fesdeett meitindeoat = D+ 1 inaçme! camino:
LUGUI=Iemgrhe Anda hi =32M:
«ad
tesumto atiy;
Nlustrative Problem 42 [Huffman coding] A discrete-memor;ess information source
with alphaber
«14h
and the cortesponding probabilíties
p= 10.1.0.3,005,0.09.0.2], 0.25)
às to De encoded using Huifman coding
1. Determine the entropy of the source.
Find a Huffman cude for the source and determine the efficiency of the Huffman
code,
ma
à, Now desiga a Huffman code for source sequences of length 2 and compare the
elficiency of this code with the efficiency of the code derived in part 2.
Mereagrire CÊ Br formato 154
1. The entr s derived via he entrcpy.m fuastior and is found to be
2.3548 bits per source symbol
y af the sourei
Using rhe kofêmaram dircrion ve can design a Huffman code for this soutce The
codesvards found 19 be 010, 11, ONO, QUI OG, and 10. The average codeword
lengtà for tbis code is found to be 2.38 >inary symbols per souree output. Therefore,
4he eificiencs of this code is
2.3549
— 09895
"238
3. A new source whose outpuis are letter pairs of the auiginal sovrce hrs 36 output
letters of the forma feai, €5)]É joy. Since the sourze às memorylesa, the prosability of
cach pair is the product of 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 praducz of two probabibiies in the original
probability vector p Thiscan he done by emploving lhe MATLAB fun
in the form of kraníp, p). The Huftman codewords are given by
TIGO0O, OH 70, OTHON, LOTLGON, 1TICO1, 00703. GI TIL, 000. 011010, 00111.
1001, 1100, 11101110,0HLOLI. LHOLLHHO, INIUNTLIT, 10UON, OO1000, LOTIOTO,
ONOO, 10140110, JOTIQVO, 101140, 141110, FLIOIO. 1010, LLIOHO, 1OLHIL,
VITLO, 0100, GOLO, 1103, 001007, LHLINL, 010), and LOGO and the average code-
word length for the extended sauree is 4,7420. The entropy of the extended source
is found to be 4.7097. so the efficiency of this Huffman code is
4.7097
4.7220
ma = 0.9932
which shows an improvement compared to the efficiency of the Huffman code de-
signed in part 2.
ILLUSTRATIVE PROBLEM
Nlustrative Problem 4.3 [4 Huffman code with maximum efficiency] Design a Iuff-
man code for a source with probability vector
14
256' 256
We use the huffman.m function to determine a Huffman code and the corresponding
average codeword length. The resulting codewords are L, 01. 001, 0001, 00001, 000001,
O0000B1. 80000009. and 00000001. The average codeword length is 1.9922 binary symbots
per sunrce output. 1 we find the entropy of the source using the entropyam function. we see
142 CHAPTER 4. ANALOG-TO-DIGITAL CONVERSION
dist-distrevalif! quad (nawtum, a tr ato= Ih told cares]
end
“DD [QN q
foneeian [y.fiaf=aq disigfuníca, bee deita s.tol,pl.p2,93)
SUQ DIST Reruons the dirtom df à eniforo quemues
aid quarizatten prrnts set to the centroids
pr UIQ DASTIFUNECNS,CN DELTA.S.TOLPIP2,P3)
funten=sutce density fmetiom givem in um meoite
tt ur masa chree parameters, sii.p2.p3.
Ebuct=The supor: of the suurce densicy faneiiom,
umbro cf ieveis
deita-ievei size
ne fefimost qusmtasamen segion boundary
pi.PZpd=paremeters e che umpui function
s=quantsatiom james,
distedimercian
ol=ihe relativo errar
SRAPIFANANAR
dé Ceotedeatn=20
emert'Toa many levelo tox this range. p ren
end
ir asd) n
emori The Lafrmost bourdazy too szali.*% retum
end
df is-(n-2)edelta>c)
emori he leftmosr baundary t20 Large
end
eetum
argse( |:
for j=fnacgin=?
arps=fargs." .p' imtêstriD:
end
avgs=[args,
a(Deb;
fer i=2n
atit=s+ti- BJedeitas
end
ata+ti=e;
[dissera] use distifunfeo, atol“ args):
ILLUSTRATIVE PROBLEM
Tlnsrative Problem 4.4 [Determining the centroids] Determine the centroids of the
quantization regions for a zero-mean, unit variance Gaussiun distribution. where the bound-
aries of the quantization regions are given by (-5, —4, —2,0,1,3,5).
The Gaussian distribution is given in the m-file normalm, This distribulionis a foreion
of two parameters, the mean and the variance, denoted by m and s (oro), respect ei The
support of the Guussian distribution is (—oe, co). but for emploving the reeical rontnes
it is enongh to use a range thai is muny times the standard deviation of the dis .
sad
43 Quamizaion 142
Forexample. (m 10/35, + 10,/5. can be used. The following rm-file determines the
centrords (optima! quantizarion levels)
& MATIAS seript ho ihusirative Problem 4, Cheptes 4
10. 5,-4,-20,13.5,19]
lengihian— 1
entrei norma? * armha(i+1) 0 091.0,1)
for
it
end
This resutts in the foilowng quantization levels: 2168, -2.3706, 0,722
—0,4599, 15101, 3.2827,5 1865)
(INES ES
Mlustrative Problem 4.5 In [ustrative problem 4.4 determine the mean-square error.
EPP—-————
Lettinga = (10, — 0.1,
square errar of 0.177
ILEUSTRATIVE PROBLEM
Mustra
«5, 10) and using imse .distum, we obtain a mean
e Problem 4.6 [Uniform quantizer distortion] Determine the mean-square er-
sor for à uniform quantizer with :2 quantization levels, each of lengih 1. designed for a
aero-mean Gaussiar source with variance of 4, It is assumed that che quantzation regions
are symmetric with respect to the mean of the distribution.
ET —— >>
By the symmetry assumptinn the boundaries of the quantization regions are 0, 1, 2
3, 4. £5, and the quantization regions are (00, 5; 4-5, —4], (4, 3) (3, 2],
(=2.=1]. (=1,0), (0.1, (1.2), (2, 31. (3,4), (4,5). and (5, +00). This means that in
the ug list funciion we can substitute 6 = 20.0 =20,4=1]n=12,5e-5,
tot = 0.001, p; = 0, and pz = 2, Substitutng these values into uy distm we obtain a
squared esror distortion ot 0.085] and quantizativa values of +0.4897, + 1.269], 42. 4487.
34286, 54,4089, and +5.6455.
The m-file ug.mepnt.m deteciines (he squared error distortion For a symmertio density
function when lhe quantization levels are chosen to be the midpoints of (he quantization
intervals. Tr this case ihe quantization levels corresponding to the firs: and she last quan-
tication regions are chosen 4 be ac distance 4/2 frum: úhe two outermest quantization
boundaries. “This means that if the number of quantization levels is even. then the quantiza-
tion boundaries are 0, EA. EZA,...,(N/2 — 1)á and the quantization levels are given
by =á/2,43A/2....,(N — 134/2. Ifthe number of quantization levels is cdd, then the
boundarics are given by £4/2.=34/2...., +(N/2- [A and the quartization levels are
eivenby 0, LA. 2A,....(N — VA/2, The mfile uq mdpotm is given below.
14 CHAPTER 4 ANALOG-TO-DIGITAL CONVERSION
—€CEE
tol.pl.p2,93)
Sure quanacer
furction disteuq. mdpestfunten h,n ht
UU MDENT O Beterns abe dito
a with queimtiraticm pres ser to the micpome
e DIST=UQMDPNTEFENFON E MDELTA. TOLPL IPS
& difenssonree demsigo fometõom gávem cm co
da vinte at most iherer parameters, pl
% funcao se onsumed o be um evem panction
% e sugar of the sonrce eme jumeom
& 4 PB p3-purimeters of Me Inpa funcsion
1º 1Bsseceltaaino 1)
emeri! Toc cas
negin-5
ams atear
tn/2- acesa:
2) -delta/2.
alorati= Htdelta;
Mi 1mati)--dotta/2.
nesfuge[" t3e- 6º murmêst(ytido 1 22. unha
istteval(ç' quad inesfun.é (1) ario
CESAR RE
ILLUSTRATIVE PROBLEM
Uiustrative Problem 4.7 [Uniform quantizer with levels set to (he midpoinis) Find the
distertions den a uniforia quantizer is used to quantize à zero-mean, unit variance Gaus-
sian random variable. The number o quanazation levels is 1, and the ength of each
quantization region is 1.
— ED >>>>>———T
la ug.mdpaim we substituto 'normal?? for the density function aame, p| = O und
tor the densixy funcuon parameters, 2 = 1 for the number of quantization levels,
which chocses
pm
and A = | for he length of the quantization levels, For the parameter
2The name of tas function should be subsrinuted with "nounual” enciudiag che single quotes,
4? Quamizaiton 145
the support set of he density function, we use lhe value b = 162 = 10. anó we choose
tãe tolerance to he N0G:. The resuling cistortior 1s 0,083.
Nonuniform Quanticution
ln nonuniform quantizatioa the reguirement ihar the quantizatioa regions, except the ficst
and the ist, have equal lengchs is relaxed. anc each quantization region can have any lengih.
Sinee in this sase aptimization is dore under more relaxed conditions, the result is obviously
superior to that of unitarm quantization. The opumanty conditions Fax this case, known as
he Lioyd-Mar conditions. can he expressed as
(430)
From these equatioas we zonclude that (he cptimal quantzaton ievels are lhe centroids
Of the quantization regions and lhe optima! koundares hesween «be quantizanon regions
are the midpoints between the quantization levels. [a order to obrain “he soluticn 19 she
Lloyd-Max equation», we start with a set of quantzanos levels é, From this set we can
simply find the set of quartization region Soundaries «. From this set of q,'5 à new set
of quantization levels can be obtained. This process is continued anti) he improvement in
distortion from ane iteraton to another is noi noticeable This algorithm is guaranteed to
sonverge to a local minimum, but in general ihere 15 no guarantee tãat the global minimura
can be achieved
The provedure of desigaing an optimal quantizer is shown in the m-file fioydmax.m,
given below.
>»
function [ay dist]=lloyuimax(funfen bn el.pl.p2,p3)
RLLUDMAX Renurna the dba Li
Ma quanticer qa the mesm-squared
% qutantzateur estar Jor a symmeimo distribuem
% dA LDISTISLLOFDMAMPUNFCS. BN TOLPL,22,P3]
à
he density famchon queen
%
car depene oh up tu three
% parameters, pt.p2,pà
%
he cector giving sie Duundartos of the
auantizemes regions
bb! approxmaias support «f te denerty fm
na The number ef quente
v=The quanncuten feveis
Pi pêpêsParcemrere nf fempên
Jolzthe reiative error
a regina
aee)
for jatnnrgin—s
args=(arg, pintas
eng
argolas
146 CHAPTER & ANALOG-PO-DIGIFIAL CONVERSION
veevalif* varianceifunfen, -b,b. ral args)
escore args)
for i-2n
ya Nayuyz
dist-newdit,
[ynewdistlcevall'mse diet !funfer a, cal" args);
and
ILLUSTRATIVE PROBLEM,
lltustrative Problem 4.8 [Lloyd-Max quantizer design] Design 2 10-level Lloyd-Max
quantizer for a zero-mean, anit variance Gaussian source.
€E-—————
Using b = 10,4 = 10. t01= 0.01, py = O, and pa = 1 in lloydmax.m, we obtain the
quantization boundaries and quanuzation levels veciors a and y as
a
0, =2.16, E 1.51, &0.98, 40.48,0
= &2.52, +1.98, 41.22, 40.72,-024
and the resulting distortioa is 0.02. These values are good approxizmations to the optimal
values given in the table by Max [2]
43,2 Pulse-Code Modulation
Tn pulse-code modulation an analog signal is first sampled at a rate higher than the Nyquist
rate, and then the samples arc quaatized. It is assumed that the analog signal is distributed
on an interval denoted by [-Xmax. tras), and che number of quantization levels is large.
“Tae quantization levels can be equal ur unequal. In the first case we are dealing with a
uniform PCM and in the second case. with a nonunifocm PCM
Uniform PCM
Inuniform PCM the interval [—xmas. Xmas] Of length Z%mas is divided into N equal subinter-
vals, each ot length A = 2xmax/N. EN is large enough, the density function of the input
in each subinterval can be assumed to be uniform, resulting in a distortion of D = 42/12.
TEN isa power vi 2,or N = 2º, then v bits are required for representation cf cach level.
This means chat if the bandwidth of the analog signal is W and if sampling is done at the
43. Quantization 147
Nyquist rate, the required handwidih for transmission of the PUM signal is at least »W (in
practice, 1.$v!W is close: to reality). The distortion is gives: by
(438)
If the power of the analog signal is denoted by X7, the signal-to-quamization-noise ratio
(SQNR) is given by
(43.9
where X denotes the normalized input defined by
sx
g= +
Xmas
The SQNR in decibels is given by
SQNRig = 484604 js (43.40)
After quantization, the quantized levels are encaded using v bits for each quantized
level, The encoding scheme that is usually employed is natura! binary coding (NBC),
meaning that the lowest level is mapped into a sequence of all 0's and the highest level is
mapped into a sequence of'all 1's. Alt the other levels arc mapped in increasing order of
the quantized value.
The mefile u.pem.m given below takes as its input à sequence of sampled values and
the number of desired quantization levels and Ends the quantized sequence, the encoded
sequence, and the resulting SQNR (in deibels)
function [sgara.quan, codej=u. pernfa,n)
RUPCM Uniform PCM encoding of a sequence.
[SONHA QUAN.CODE] = LPCMIAN)
a = input sequence
n = munber o) quuntizuior levels feveny
squr = cruspur SOMR fin dj
a quan = quantized ouput bejure encoding
code = the encuded cuipar
REAR
152 CHAPTER 4, ANALOG-TO-DIGITAL CONVERSION
The tiwa desired plois are shown in Figure 4.6.
ILLUSTRATIVE PROBLEM
Tlustrative Probtem 4.12 Repeat Tnstrativz Proklem 4.1: with number of quantization
eveis sel once to “6 and set once to 128. Compare the results.
EDP o
The cesult fer 16 quanúizatica levels is shown in Figure 4.7, and the result for 128
quantization levels is sheven in Pigure 4.8.
Comparing Figures 4.6. 4.7, and 4.8, iris cbxious that che Jarger (ho numbe: oé quantiza-
ion levels, the smailer lhe quantizanon error, as expected, Also note that for a large number
oé quartizanon levets, the relaúun belwecu the ingur and the quantized values tends to à
[oe seit) slope 1 passing through the origin; i.e.. the input and the quantized values become
almost equal. Sor à smal; number of quantization levels (16 for instance), this relaton is
far from equaliny, às shown in Figure 4.7
Nonuniform PCM
ln aomeniform PCM the tapua signal :s fics: passed ihrough a norlincar element to reduce us
dynamic range. and che oucput is applied tc à unitorm PCM system. AL the receiving end.
tn OUIpUE IS passed through the inverse al tre noalinear element used in the transmitter
“The overall esfect is equivalent to u PCM system with nanuniform spacing between levels
In gereral, for transmission af speesh signals. the ronlinearitios ihat are employed are either
sela or A-law aonlinearities
A ylaw nonlinearity is definc by she relanon
e go BUT gr) (2311)
Togil + 4)
where x is the aormatized input (x| £ 15 and já às a parameter that in standard pla
aontizsarity is equal to 255. A plot of this nonhnearity [or úfferent values of é is shown
in Figure 4.4
The inverse of ju-law nontineavity 1s given by
(4.3.12)
The two m-files mulawem and iavmulavem given below implement g:-law nonlinearity and
tis inverso.
“di
Suetion [yafeneclaw (saca)
SOMULAW melao nontineneity for monuniform PCM,
% 7 — MULAWOME)
% X* input vector
Figure 4.7: Quantization erros for 16 quantizatiun levels.
154 CHAPTER 4 ANALOG-TO-DIGITAL CON
Figure 4.8: Quantization error for 128 quantization levels
“3, Quantization
Figure 4.9: The u-law compander.
aemaviabs(ok.
logCL+musabs(x 0) log(1+mo)) asignumé.
o
function xeinvemvlaw(y mu)
SeINVMULAR The inverte of muiaw nonbncarioy
RASINVMULAWEEMU) Y = Normaiized cumes of ste mula nontinearira
K=itTlAmo. (abs(y)= 1), /mU) esigrumivy;
The m-file mula pom.m is lhe equivalent of the im-file u.pem.m when using a p-law
PCM scheme. This fike is given below.
funesion [sque.2 quan, code] =mula. penta. mu)
SEMULAPCM mulum PCM encoding vj à vequence
ISONRA LUANCODE] = MULA PCAANMU;
a = input sequence
a = number of quemiza
dqnr — utpas SON
ton levels fever)
am
aRaAR
156 CHAPTER 4. ANALOG-TO-DIGITAL CONVERSION
% a quam = quersized cuia befere encudding
% code = ie encoded crupar
Lreratamuml= mulaw(a,rma):
ts
aqunymula
a-quan=maxemumes quam,
senr=20elog 1 Gtnoranta) Pnorita—a quam);
ILLUSTRATIVE PROBLEM
Ilustrative Problem 4.13 [Nonuniform PCM] Generate 2 sequence of random variables
ot length 500 according to am A(O, 1) distrikution. Using 16, 64, and 128 quântization
Jevels and a qt law noniinearity with é = 255, plot the errar and the inpur-outpu relation
for the quantizer in each case. Also determine the SQNR in each case.
—E———————————
LeLibe vector a be the vector of length 500 generated according to WO, |), ie.,
a =: randn(500)
Then by using
|dista.quan.code] = mula pem(a, 16. 255)
we can obtain the quantized sequence and the SQNR for a 16-level quantization. The SQNR
will be 13.76dB. For the case of 64 levels we obrain SQNE, = 25.89 dB, and for 128 levels
we have SQNR = 31.76 dB. Comparing these results with the uniform PCM, we observe
that in all cases the gerormance s inferiur to the uniform PCM. Plots of the input-ouiput
reiation for the quantizer and the quantization error are given in Figures 4.10, 4.11, and
4.32.
Comparing the ingut-output relation for the uniform and the nonuniform PCM shown
in Figures 4.7 and 4.10 clearly shows why the former is called unifarm PCM and the Iatter
is called nonuniform PCM.
From the above example we see that the performance of the nonuniform PCM, in this
case, is not as good as uniform PCM. The reason is that in the abuve example the dynamic
range of the input signal is not very large. The next example examines tho case where the
performance of the nonuniform PUM is superior to the performance of the uniform PCM.
UMA VRATIVE PROBLEM
Tlustrative Problem: 4.14 The nonstationary sequence a 0 length 500 consists of two
parts. The first 20 samples are generated according to a Gaussian random variable with
mean O and variance 400 (9 = 20), and the next 480 samples are drawn according to à
Gaussian random variable with mean O and variance 1. This sequence is once quantized
using a uniform PCM scheme and once using à nonunitorm PCM scheme. Compare the
resulting SQNR in the tiwo cases
4.3. Quantization
Figure 4.10: Quantization error and input-output relation for à 16-level gt-lawy PCM.
157
162
CHAPTER <. ANALOG-TO-DIGITAL CONVERSION
Letter Prebability
006
0057
DOE
0.0317
0.31
0208
0.01
0.0467
00575 |
0.0008
7 D.0049
vos
00198
0.0574
0.0635
00152
0.0608
0.044
0514
0.0796
0.0228
0.0085
0075
00013
00164
0.0005
Word space 0.189
NI=<|=[ gi<iofntomolsio)z|zicla im]
Table 4.1: Probabilities of letters to printed English.
43 Quantization 163
48 For a zero-mean, unit variance Ganssiun source, design optima! nonaniform guantizers
with a number of levels Nº = 2.3,4,5,6, 7,8. For cach case determine F7( E), the entropy
Of the quantized source, and R, the average codewore length ot a Euffman code designed
forthat source. Plos H(Ê), R, and log, N as a function o! N on the same figure.
49 A Laplacian random variable is defined by the probabiltty density funcuion
where À > 95 à giver constun.
à Verify that the varianco of à Laplacian random variable is equal so 2
db. Assuming À = 1. design umiform quantizers with N - 2,3,4,5,6,7,8 levels for
this source. As usuat, take lhe interval of ins —100, 100] where o is the
standard deviazion of the sauree,
estto
€. Plor the entropy cf the quantized source and log, N as funetions of N on the same
figure
4.10 Repeat Problem «9, substituting the unstorm quentizer with the cptimal nonuniform
quantizer.
41! Design an optmal 8-leve! quantizer for a Lapiacian source and plot the resulting
mean-square elistortion as a function of à as 2 changes in the interval 70.1, 5).
412 Design optimal noruniform quantizers with N = 2,3,4,5,6,7,8 for the Laplacian
source given in Problem 4.9 with a À = «/2 (note that tbts choice of À results in a zero-
mean, unit vartance Laplacian source). Plot the mean-square error as à function of N for
this source, Compare these resulis with thosc obtained from quamtizing a zero-mean, unit
variance Gaussian squrce.
4.13 The periodic signal x(r) has a period of 2 and in ths interval 10, 2] is detined as
Ft) — .
=1+2, |si«
& Design au B-level uniform PCM quuntizer tor this signal and plot the quantized output
of his system.
-
Plor the quantizatiun error tor this system
By calculating the power in the error signal. determine the SQNR for this system in
decibels.
d. Repeal parts a, h, and e using a t6-level uniform PCM system.
vas CIHAPTER 4 ANALOG-TO-DIGITAL CONVERSION
4.14 Generate a Gaussian sequence with mean equai to D and veriance equal to L with 1000
elements. Design + E-level, Ló-leve, 32 level, end 64-levet uniftrm PCM schemes
for his sequence and pler che resulting SQNR Gn dezibels) as a fenctior of thz number o
x allacated to each source output
+
»
4.15 Gencrate a 2ero-mean. unis variance Gaussián sequence with à length of 1900 and
guamtiee il asing 4 6 trt per symbal uniform PCM scheme. The cesulting 6000 bits are
tranoristeé to lhe receiver via a noisy channel. The error probability of the ciannel is
denated by p. Plet the overall SQNR in decibels us a funchon cl p fer values of p =
1054,5 x 1053, 1052,5 x :052,0.1.0.2. Fer sunulation of he effect of noise, you can
generate binary random sequences witi these probabilities and add them imodulo 23 to he
nicaded sequence
4.16 Repear Probiexe <. 3 using a nonunifoor e law PEM with é =
417 Repeat Problem «
sing a nonuniform ;a-law PCM ven 4 = 255
4.18 Repeas Problem 4.15 using a noruncfoem ju-Jaw PCM vit qu -- 255.
Chapter 5
Baseband Digital Transmission
5.1 Preview
a this chapter we consider several buseband digital modulation and dermodu!ation tech-
niques far transmitting digital information rrough an additive vinte Gaussian noise chan-
nel. We begin with binary pulse modulation and then we intraduce several nonbinary
medulation methods. We describe the Optimum receivers for these different signais and
consider the evaluation of their performance in terms of the average probabilicy of error.
5.2 Binary Signal Transmission
In a binary cominunicativo system, binary data consisting of & sequence of O's and 1's ase
transmitted by means of two signal waveforms, say, so(?) and s1(1). Suppose that the data
rate is specified as À bits per second. Then. each bit is mapped inta à correspanding signal
waveform according to lhe rule
d> sl), Ost<Th
T+ sto. U<i<%
where 7; = 1/R is defined as the bit time interval. We assume that the data bits O and
1 are equally probable, ie., cach occurs with probabihty 4, and arc mutually statistically
independent.
The channel through hich the sigraf is transmitted is assumed to corrupt the signal
by the addition of noise, denated as n(t), which is à sample function of a wixte Gaussian
process with power spectrum No/2 wattshertz. Such a channet is called an additive white
Gaussian noise (AWGN) channel, Consequently, the received signal waveform is expressed
as
Fls) = (0) + dt), i=0,1, 0O<r<T 621)
165
166 CHAPTER 5. HASEBAND DIGITAL TRANSMISSION
The task of the receiver is to determine whether a Dora L was transmitted afier observing
tac received signal +(t) ix the interval U < + £ Th. The receiver is designed 10 mmimze
the praoabuliry of error. Such a receiver is called the oprumum receiver
5.2.1 Optimum Receiver for the AWGN Channel
Io nezrty all basic digital communication texts, 1t 15 Shown that the optimum resejves for
the AWGN chanrel consists of two ku Iding blocks, One
matcherl filter. The ather is a detector
«ither a ségral correlator ora
5.2.2 Signal Correlator
The signal correlator cross-correiates the cece
xisted signals sete) and sy(0), as illus
computes the two ontputs
ved signal r(7) with tãe two possible trans-
tec in Figure 5 E That is, (ne signal correlater
min = f ristndr
o
no ritysindr (5.22)
o
inthe interval O < 4 < Tp, samples the two vutpuis att = T> and feeds the sampled outpus
19 the detector.
a
Soodr '
so i
"9 t Deiector |—» Oueput data
sen :
KOdr Ao ]
Sample ——
au
Figure 5.1: Cross correlation of the received signal rir) with the two transmitted signals.
ILLUSTRATIVE PROBLEM
Nustrative Problem 5.L Suppose the signal waveforms sait) and sy(4) are the ones shown
in Figure 5.2, and let spt?) be (he transmiticd signal. Then. the receiver signal is
&2. Binary Sinal Transmission
167
sun
La.
0: Te Í
Figure 5.2: Signal maveforms sp(s) and s1€:) fer a binary communication system
= mino, Dxiei (5.231
Detesmine the coretator cmpuis at the sampling instanta
When the signal ni?) is processed by the two signal curreletors shown in Figure 5.1, the
“utputs r9 and 1 at the sampling insiam : = To are
mn
n=[ Fist dr
o
-[ oa f nébso(t) dr
o y
=E tra (52.4
and
n
E) Hos(ndr
U
T Tm
-[ solte ar+ nús dr
o
=" 15.25)
where ng and nj ate the noisc components at the output of the signal correlatos,
m= f n(tsa(r) de
)
n
n1 =[ (eso de
o
1 CHAPTER 5. BASEBAND DIGITAL TRANSVIS
ON
5.2.4 The Detector
“The detecior observes the correlator or mateked Áltor outpuis 7y and 71 and decides on
swltether the transmitted signal wavcform is eilher s0(1) or sit5), wnizh currespond to the
trarsmission of either a ora 1. respectively, The aptomem detector is defivecl as the detector
that minimizes the probability of error
ILLUSTRATIVE PROBLEM
Iustrative Problem 5.3 [er us consider the detector tor the signais shown in Bigure 5.2,
weiich are equally probable and have equai energies. Tue opimum detector far chese signais
compares ra and 7: and decides that a O was “ransmitted wiher r9 > r1 and thata | was
transmincd when rm > ro. Determine the probability of error
—- ED ———————————
When so(t) is lhe transmitted signal swaveform, the probability cf
ror is
Pe=Ptri>m= Pla E + ny: Pim ny» Ed (5.2.19
Since ny and no are zero-mean Gaussian random variables, iheir difference x = m — 015
also zero-mean Gaussian. The variance of the random variable x is
Elen — ne
But E(nin9) = U, because the signal waveforms are orthogonal. Thatis,
= E(n7) + Eing) — LElnino) (52.20)
PT fo
Equnç = f ) sotosdn(Onto ddr
No ph ph
5) Í sotr)s(r)Btt— ridrai
2d dh
T,
E [ ses
(5,220
Therefore.
(5.2.22)
(5223)
52 Binary Signa! Transmission 13
The ratio E /No is calied che signal to-noise ratio (SNRY
r
Ê
I
t
f
|
F
o
3 o
10 logia ESNo
Figure 5.7: Probability bf erzor for orhogenal sipnals
“The derivation of the detector performance given above sxas based on the Iransmission
of the signal waveform so(i). The reader may verify that the probability of error that 1s
obtained when s: ft) is transmitted is identical to that obtained when so(t) is transinitted
Because the O's and 1's in the data sequence are equally probable, the average probability
of error is that given by (5.2.23). This expression for the probability of error is evaluated
by using the MATLAB senpt given below and is plotted in Figure 5.7 as a function of the
SNR, where the SNR is displayed on à logarithmic scale (LO log1g E / No). As expected,
the probability of errar decreases exponentially as the SNR increases
DD ————
% MATLAB seript that generates the probabitins nf ermr versus the signalito-noise ratio
drtia] sor
final.sor=15,
snr.step=0.25:
al. sn 30r.step final.sar,
lengnhçsnr tm dB,
snr=10"(sar.in dR(/103:
Peti=Qunet(sgrtsnri:
end;
semilogy(snt in dB ey;
pa CHAPTER 5. BASEBAND DIGITAL TRANSMISSION
5.35 Mente Carlo
ulation of a Binary Communication System
Morte Carlo computer simulations are asuully performed in practice te estimate the proba-
hility of ecear ol a digita! communication system. especially 1n cases where the analysis of
lhe dezectar performance is difficult 10 perform. We demonstrate the method for estimating
the probability of error fur the binary communication sys:em destribed above.
ILLUSTRATIVE PROBLEM
Hlustrative Problem 5.4 Usc Monte Carlo simulation ta escimate and plot P, versus SNR
for a Sinary communication system lhatemploys correlators er matched filters. “Lhe model
vt the system is illustratert in Figare 5.8
| Urifoem candom Giaussian cardom
Mumiier gererqtor number generator
Output
data
WE
Detector
i VE 4
>
Gaussian random
number generator
Figure 5.8; Simulation model tor INusirative Problem 5.4,
We simuiale the generation of the random variables 29 and 14, which constitute the
input to the detector We begin by gencrating a binary sequence of 0's and 1's that cecur
with equal probability and are trutrally statistically independent. To accomplish this task,
we usc a random number generator that generates a unifucm random number with a range
(0, 15. If the number generated is in the range (0, (1.5), the binary source output is a O,
Olherwise, tis a 1. 1a O is generated, then ry -=.E + no and +; =m. If 1 is generated,
thenry =ngand | = E pr
The additive noise components n9 and ny are generated by means of two Gaussian noise
generators. Their means are zero and their variances are o? = E No/2. For conventence,
5.2. Binary Signal Transmission rs
we may normalize tas s:vnal energy E to unity (E = 1) and vary 02, Note that the SNR.
which is detined as E / Ny. is then equal to 1,292. The detecior Output is compared with
the binasy iransmittcê sequence. acd ar error eounter is used to count the number of bit
errars
Figure 5.9 illustrates the results of th.s siriulatior For the transmission of N=10,000
drts at several different values of SNR. Note che agreement between the simulation results
and the theoretical value ví 2, given by (5.2.23). We should also note that a simulation
DÊ N=10.000 data his allows us 10 estimate the error probability reliably down to about
Pe = 107%, tn other words. swith N=HO.OUO data bits, we should have at east !O exroes for
a reliable estimate of 4. MATI.AB seripis for this problem are given below.
o MATLAB scope por Mieinunve Problem 4, Chapter £
echa on
SNRindB1=0,1.12:
SNRimdB2=00 1:12;
for i=iilengiiSNRudB!;
% sumularea! arror ute
smld err -pebvii=smlgPeS48NRingE Lin;
end
tengihiSNRind2),
x PE SNRiadB3isdoag 1934 10),
% dhenresicai err rute
hem. oem prin Qlunct(sqr(SNRY,
end;
do pleno command juthos,
semilogy(SNRingB 1 sumld.em pr, ep
hot
semilogy(SNRindB2 aheo. err. pe
TN
ion plesmidPaSaisur.in dB)
du
% fpj — amiuPeseiene tn dB)
% SMLOPESS fed the probubihiy of error far the given
% eme an dB ssprad-tsiso ratio in dB,
E
SNRecxpisar im 98 elog(10)7103, “o cignal.re-noise rate
sgma-E /squiZASNRY Ge rigmia. andar! deveation of noise
Ne 1000:
% generaston mf dhe binare data ronco
for 1=1.N
temperand; % 4 uniform random vuriabie over (Qi)
if «emp< 0.5)
dsuurcoritel e cith prubabalico 192, source outpu? is &
else
dsgurveii Ke mith probubaisty 1/2, rource encon is 1
end
end;
% desecnan. und poobubuisty of ervar calcudasion
mumotegr-O:
foras
16 CHAPTER 5. BASEBAND DIGITAL TRANSMISSION
Fe muchos
if (dsoueeetid==0),
= Bsgnganssisgra):
ugausslegrma: Do the source omtpuris O"
ouipure
else
rO=angauss(egona)
rl=B+gngnvssisgma); do df she amaro impuros "1
end.
%o detector foltoms
if drtato
deciscO: de deciciom de "07
exe
veciset, decision ir
ipa ie an error increase the error counter
murrotercanumaferr+;
end:
end
p-numoferaN;
2
pemhabitios mf error esiimase
1Dlogig E/Ny
Figure 5.9: Error probability from Monte Carlo simulation compared swith theoretical error
prohabifity for arthagonal signaling,
In figure 5.9, simulation and theuretical results completely agree at ow signal-to-noise
ratios, whereas at higher SNRs they agree less. Can you explain why? How should we
change the simulation process to result in better agreement at higher signal ta-noise ratos?
52 Binary Signal Transmission 1”
5.2.6 Other Binary Signal Transmission Methods
Tae binarv signal transmiss:on method described ahove was based on the use of orthogonid
signels. Beltw, we descr.be cwc other methods for transmitting binary information through
a communication slannel. Ore method employs antipodsl signais. The other method
employs an on-ofi-type signal
5.2.7 Antipodal Signals for Binary Signal [ransmission
Two signal waveforms are said to be antipodat if one signal waveform is the negative of the
other. For example, one pair ví ancipodal signals is illustrated in Figure 5.:0(a). A second
pair ás illustrated in Figure 5.0)
tm ut asi
i
asi
A A ar
A bo, %
D no]
o]
a Wlio qdo
taj A pair ot antipedal signade
1b) Another pair of antipodal signals
Figure 5.10: Examples cf antipodal signals. (a) A pair of antipodal signals. (b) Another
pair of antipodal signals.
Suppase we use antipodal signal waveforms sa(?) = 5(*) and si(1) == —s(f) lo sramsmit
binary information, where s(1) is some arbitrary waveform having energy £. The received
signal waveform from an AWGN channel may be expressed as
ni = Estr) + ati). Os:<5, (5.2.24)
The optimum receiver far revovering the binary information employs a single correlator or
a single matched filter matched to s(1), followed by a detector, as illustrated in Figure 5.11
Let us suppose that (7) was transmitted, so that the received signal is
rin=sto+nt) (5.225)
The output of the correlator or maiched filter at the sampling instant =: Ty is
r=E+n (5.2.26)