Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

Digital Communication Systems (ECE4001)

Dr. Thomas Joseph

August 7, 2021

1 / 59
Contents

1 Module-1
Introduction
Sampling
Quantization

2 Module-II
Pulse Code Modulation

2 / 59
Module-1 Introduction

Communication Systems
Main purpose of communication is to transfer information from a
source to a recipient via a channel or medium
Basic block diagram of a communication system:

Figure: Block diagram representation of a communication system

3 / 59
Module-1 Introduction

Brief Description

Source: analog or digital


Transmitter: transducer, amplifier, oscillator, power amplifier,
antenna
Channel: e.g. co-axial cable, optical fibre, freespace
Receiver: antenna, detector, amplifier, demodulator, oscillator, power
amplifier, transducer
Recipient:e.g. person, (loud) speaker, computer

4 / 59
Module-1 Introduction

Block Diamgram of Digital Communication System

Figure: Block diagram representation of a digital communication system

The source encoder compresses the data into minimum number of


bits which helps to utilize the bandwidth effectively
The channel encoder introduces redundancy in a controlled fashion
in order to combat the errors that may arise from channel
imperfections and noise

5 / 59
Module-1 Introduction

Digital Modulator: the signal to be transmitted is modulated here


by a carrier. The signal is also converted to analog from the digital
sequence, in order to make it travel through the channel or medium
Channel is the physical medium connecting between the transmitter
and the receiver
Demodulator: the received signal is demodulated as well as
converted again from analog to digital
Channel Decoder: the channel decoder, after detecting the
sequence, does some error corrections
Source Decoder: the resultant signal is once again digitized by
sampling and quantizing so that the pure digital output is obtained
without the loss of information

6 / 59
Module-1 Introduction

Elaborated DCS Block Diagram

Figure: Elaborated block diagram representation of a digital communication system


7 / 59
Module-1 Introduction

Types of information
Voice, data, video, music, email etc.
Types of information systems
Satellite systems
Radio,TV broadcasting
Cellular phones, Computer networks (LANs, WANs,WLANs)

8 / 59
Module-1 Introduction

Why Digital?
Primary adavantage is ease of regeneration as compared to analog
signals
Low cost
Good processing techniques are available for digital signals, such as
Data compression (or source coding)
Error Correction (or channel coding) (A/D conversion)
Equalization
Security
regenerative repeater avoids accumulation of noise
Digital circuits are less affected by distortion and interference - -
binary digit circuits operating at two points – fully on or fully off
Easy to mix signals and data using digital techniques
The objective in digital communication is to determine from a noise
perturbed signal which waveform from the finite set of waveform was
sent by the transmitter

9 / 59
Module-1 Introduction

Drawbacks of Digital Communications

More signal processing intensive


Bandwidth requirement is more
Significant share of resources are allocated for synchronization
Nongraceful degrdation of quality – when SNR go below a particular
thresholod value quality degrade drastically

Figure: Pulse degradation and regeneration

10 / 59
Module-1 Introduction

Reference

Most of the figures are taken from Bernard Sklar: Digital


Communications, Fundamentals and Applications, Topic 1.1

11 / 59
Module-1 Sampling

Sampling
Sampling is the first step in analog to digital conversion
A CT signal is converted into DT signal by measuring the signal at
periodic instants of time
To convert an analog or continuous time signal into a discrete time
signal extract one sample every Ts second
Ts = sampling interval
1
Ts = fs → sampling frequency
In ideal sampling we multiply the input analog waveform with an
impulse train with period Ts
Impulse train means impulses at every Ts seconds ⇒ ...,-Ts , 0, Ts ,
2Ts , 3Ts ....
...δ(t + 2Ts ), δ(t + Ts ), δ(t), δ(t − Ts ), δ(t − 2Ts ),....

X
gδ (t) = δ(t − nTs ) (1)
n=−∞

12 / 59
Module-1 Sampling

Ideal Sampling

Let m(t) is the message signal


Sampled signal = original message signal × impulse train
sampled signal = m(t) × gδ (t)

X
= m(t) × δ(t − nTs )
n=−∞

X (2)
= m(t)δ(t − nTs )
n=−∞

X
mδ (t) = m(nTs )δ(t − nTs )
n=−∞

Sampled signal: = sequence of impulses with scaled amplitude levels


by the message signal values
mδ (t) ↔ Mδ (F ) (3)
13 / 59
Module-1 Sampling

Sampled signal: = sequence of impulses with scaled amplitude levels


by the message signal values

Figure: Sampling of a continuous time signal using an impulse train


14 / 59
Module-1 Sampling

By sampling, we are loosing some information and this can lead to


distortion
How to fix sampling parameters to minimize the distortion or if
possible avoid distortion?
Our aim is to calculate the spectrum of sampled signal
The impulse train is a periodic sequence with period Ts
gδ (t) = δ(t), 0 ≤ t ≤ Ts (4)
Since this is periodic, one can find the discrete Fourier series of gδ (t)

X
gδ (t) = ck e jk2πFs t
k=−∞
Z Ts
1 2
ck = gδ (t)e −j2πFs kt dt
Ts − T2s (5)
Z Ts
1 2
= δ(t)e −j2πFs kt dt
Ts − T2s
1 −j2πFs kt 1
= e |t=0 ⇒
Ts Ts 15 / 59
Module-1 Sampling

ck ⇒ k th coefficient in the DFS of gδ (t)



X 1 jk2πFs t
gδ (t) = e
Ts
k=−∞

1 X
gδ (t) = e jk2πFs t
Ts
k=−∞
DFS representation of impulse train
The Fourier transform of the signal is (6)
e j2πkFs t ↔ δ(F − kFs )
FT is an impulse at kFs

1 X
Gδ (F ) = δ(F − kFs )
Ts
k=−∞

1 X k
δ(F − ) which is another impulse train
Ts Ts
k=−∞ 16 / 59
Module-1 Sampling

i.e., spectrum of an impulse train is an impulse train


1
Spacing between the impulses is Fs = Ts
As spacing in time increases, spacing in frequency decreases and
vice-versa
Fourier Transform of sampled signal:

mδ (t) = m(t) × gδ (t)


Mδ (F ) = M(F ) ∗ Gδ (F )
X∞ (7)
Mδ (F ) = Fs M(F − KFs )
k=−∞

The above equation represents the spectrum of sampled signal ⇒


sum of all copies of the original message spectrum M(F ) shifted to
every kFs

17 / 59
Module-1 Sampling


X
Mδ (F ) = Fs M(F − KFs ) (8)
k=−∞

The process of uniformly sampling a signal in the time domain results


in a periodic spectrum in the frequency domain with a period equal to
the sampling rate
Mδ (F ) represents a periodic extension of the original spectrum M(F)

18 / 59
Module-1 Sampling

Message signal and its spectrum

Figure: Message signal Figure: Spectrum of message signal

Here we assumed that the message signal is strictly bandlimited

19 / 59
Module-1 Sampling

Impulse train and its spectrum

Figure: Impulse train Figure: Spectrum of impulse train

The spectrum of an impulse train is another impulse train


The spacing of impulses in frequency domain is inversely proportional
to the sapcing of the impulses in the time domain

20 / 59
Module-1 Sampling

Sampled message signal and its spectrum

Figure: Impulse train scaled by signal


amplitude
Figure: Spectrum of impulse train

Spectrum of the sampled signal is periodic repetation of the original


message signal
If fs − fm ≥ fm , then there is no overlap
If the above condition is satisfied we can filter out the message
spectrum from the sampled spectrum using a low pass filter

21 / 59
Module-1 Sampling

The following figure shows how to get back the original message
spectra from the sampled spectra

Figure: Sampled spectra and recovery of the message signal

22 / 59
Module-1 Sampling

Sampling Theorem
The sampling theorem, which is also called as Nyquist theorem,
delivers the theory of sufficient sample rate in terms of bandwidth for
the class of functions that are bandlimited
The sampling theorem states that,“a signal can be exactly reproduced
if it is sampled at the rate fs which is greater than twice the
maximum frequency fm of the message signal”

fs ≥ 2fm (9)

The sampling rate fs = 2fm is known as Nyquist rate


Nyquist criterion is a theoretically sufficient condition to allow an
analog signal to be reconstructed completely from a set of uniformly
spaced discrete-time samples

23 / 59
Module-1 Sampling

To understand this sampling theorem, let us consider a band-limited


signal, i.e., a signal whose value is non-zero between some -W and W
Hz.
Such a signal is represented as x(f ) = 0 for |f |>W
For the continuous-time signal x(t), the band-limited signal in
frequency domain, can be represented as shown in the following figure.

24 / 59
Module-1 Sampling

We need a sampling frequency, a frequency at which there should be


no loss of information, even after sampling. For this, we have the
Nyquist rate that the sampling frequency should be two times the
maximum frequency. It is the critical rate of sampling
If the signal x(t) is sampled above the Nyquist rate, the original signal
can be recovered, and if it is sampled below the Nyquist rate, the
signal cannot be recovered
The following figure explains a signal, if sampled at a higher rate than
2w in the frequency domain

25 / 59
Module-1 Sampling

The following figure explains a signal, if sampled at a rate 2w in the


frequency domain

Figure: Spectrum of the sampled signal with sampling rate equal to the Nyquist rate

26 / 59
Module-1 Sampling

The following figure explains a signal, if sampled at a rate lower than


2w in the frequency domain

Figure: Spectrum of the sampled signal with sampling rate lower than the Nyquist rate

27 / 59
Module-1 Sampling

Aliasing

Figure: Continuous signal spectra

Figure: Sampled signal spectra

28 / 59
Module-1 Sampling

Aliasing

Figure: Continuous signal spectra

Figure: Sampled signal spectra

29 / 59
Module-1 Sampling

Exercise Problems

Find the Nyquist sampling rate of the following signals


x(t) = cos(20πt)
y (t) = cos(10πt) + sin(15πt)
z(t) = cos(10πt) sin(25πt)
f (t) = cos2 (25πt)
A 100 Hz sinusoid is sampled at twice the Nyquist rate. How many
samples are obtained in 2 sec, 3 sec?

30 / 59
Module-1 Sampling

Exercise Problems
Consider a continuous time signal xc (t) = cos(4000πt). We sample
the signal with a sampling period T = 1/6000, we obtain the discrete
time signal x[n] = xc [nTs ] = cos(4000πnTs ) = cos(ω0 n), where
ω0 = 4000πTs = 2π/3. The sampling frequency
Ωs = 2π/Ts = 12000π. Highest frequency present in the signal is
Ω0 = 4000π
The Fourier transform the signal is πδ(Ω − 4000π) + πδ(Ω + 4000π)

31 / 59
Module-1 Sampling

Exercise Problems
In the above problem, the signal is changed to xc (t) = cos(16000πt),
sampling period T = 1/6000 remains the same. Find the spectrum of
the sampled signal?
The Fourier transform the sampled signal is
πδ(Ω − 16000π ± 12000πn) + πδ(Ω + 16000π ± 12000πn)

32 / 59
Module-1 Sampling

Interpolation

The process of reconstructing a continuous-time signal m(t) from its


samples is also known as interpolation
We have seen that it is possible to reconstruct a bandlimited signal
from its samples
This is possible by passing the sampled signal through an ideal-low
pass filter of bandwidth B Hz, and gain Ts where B is the highest
frequency present in the signal
The transfer function of the reconstruction filter is
 ω 
H(ω) = Ts rect (10)
4πB
Interpolation is a filtering operation in frequency domain

33 / 59
Module-1 Sampling

Interpolation

Let assume that the impulse response of the reconstructing filter is


h(t)
Now if we pass the signal mδ (t) through this filter we should get m(t)
back
Consider a simple interpolating filter whose impulse response is
rect(t/Ts )
When mδ (t) passed through this filter, the sample values are being
impulses, generates gate pulses of height equal to the sample values
The output signal is given by
X
y (t) = mδ (kTs )rect(t/Ts ) (11)
k

The filter output is a staircase approximation of g(t) and is a crude


form of interpolation and this filter is known as zero-order hold
34 / 59
Module-1 Sampling

Interpolation

The ideal interpolation filters impulse response is given by


h(t) = 2BTs sinc(2πBt) (12)
Assume Nyquist sampling rate 2BTs = 1
h(t) = sinc(2πBt) (13)
This h(t) is zero at all Nyquist sampling instants except at t=0
When the sampled signal is passed through this sinc filter you will get
a sinc interpolation which is given by
X
m(t) = mδ (kTs )h(t − kTs )
k
X
= m( δ)(kTs )sinc(2πB(t − kTs )) (14)
k
X
= m( δ)(kTs )sinc(2πBt − kπ))
k
35 / 59
Module-1 Sampling

Ideal interpolation is shown below

36 / 59
Module-1 Quantization

Quatization

A continuous time signal has continuous amplitude range and hence


after sampling we will have continuous amplitude range for the
discrete time signal
It is not necessary to transmit exact amplitude level–any human sense
as ultimate receiver can detect only finite intensity differences
The original continuos signal may be approximated by a signal
constructed of discrete amplitude levels selcted on a minimum error
basis from an available set
Amplitude quantization is defined as the process of transforming the
sample amplitudes m(nTs ) into a discrete amplitude v(nTs ) taken
from a finite set of possible amplitudes
In a quantizer each and every sample is rounded off or quantized to
nearest quantization or representation levels

37 / 59
Module-1 Quantization

Quantization

Conversion of continuous valued samples to discrete set of values is


termed as quantization
Purpose of quantization is to convert these samples to information
bits
v = g (m),
v = quantized value,
(15)
g (.) quantization function,
m = sampled value

Two types of quantization


Uniform quantization
Non uniform quantization

38 / 59
Module-1 Quantization

Uniform Quantization

In uniform quantization the quantization levels are uniformly spaced


Let us consider a 5-level quantizer with step size ∆
3∆ 5∆
if <m≤ g (m) = 2∆
2 2
∆ 3∆
if <m≤ g (m) = ∆
2 2
−∆ ∆
if <m≤ g (m) = 0 (16)
2 2
−3∆ −∆
if <m≤ g (m) = −∆
2 2
−5∆ −3∆
if <m≤ g (m) = −2∆
2 2

39 / 59
Module-1 Quantization

Depending on where the sampled value lies in the quantization


interval error can be range from −∆/2 to ∆/2
Minimum sample value is −5∆/2 and maximum sample value is 5∆/2
The range between −5∆/2 to 5∆/2 is termed as dynamic range

Figure: Qunatizer characteristics (Midtread type)


40 / 59
Module-1 Quantization

At the mid point the quantizer characteristics is flat ⇒ mid-tread type


The number of quantization levels are odd for a midtread quantizer
At the mid point the quantizer characteristics is rising ⇒ mid-rise type
The number of quantization levels are even for midrise quantizer

Figure: Qunatizer characteristics (Midrise type)


41 / 59
Module-1 Quantization

For a mid-rise quantizer with 4 levels the mapping is shown below


3∆
if 2∆ < m ≤ ∆ g (m) =
2

if ∆ < m ≤ 0 g (m) =
2 (17)
−∆
if 0 < m ≤ −∆ g (m) =
2
−3∆
if − 2∆ < m ≤ −∆ g (m) =
2

42 / 59
Module-1 Quantization

Illustration of quantization process is shown below

Figure: Illustration of qunatization process

43 / 59
Module-1 Quantization

Quantization Error

Quantization is a many-to-one mapping


All sample values in an interval mapped to a quantization level
So there is approximation error or qunatization error
For uniform quantizer the quantization error is uniformly distributed
between ±∆/2 . i.e., -∆/2 ≤ q ≤ ∆/2
The probability density function of the quantization error is given by
(
1
, − ∆/2 ≤ q ≤ ∆/2,
fQ (q) = ∆ (18)
0, otherwise

This is uniformly distributed and its mean value is zero. The variance
or noise power is given by

44 / 59
Module-1 Quantization

2
σQ = E [Q 2 ]
Z ∆/2
= q 2 fQ (q)dq
−∆/2

1
Z ∆/2 (19)
2
σQ = q 2 dq
∆ −∆/2
∆2
=
12
2mmax
Since L = 2n or equivalently n = log2 L, ∆ = 2n then
2
1 mmax
2
σQ = (20)
3 22n

45 / 59
Module-1 Quantization

The signal to noise ratio is given by


P
(SNR)0 = 2
σQ
(21)
3P
= 2 22n
mmax

46 / 59
Module-1 Quantization

Nonuniform Quantization

In uniform quantization the quantization levels are uniform


In signals (speech signals) there are weak signal parts and strong
signal parts i.e., signals with weak amplitude components and strong
amplitude components
The weak signals are occuring frequently, say ∼ 50 % time
Strong signals are occuring rarely, say ∼ 10-15 % time
If we use uniform quantization in this case the quantization error will
be high
In this case we use nonuniform quantization
Weak signals, which occure frequently, are fine quantized (with lower
quantization steps)
Strong signals, which occur rarely, are course quantized

47 / 59
Module-1 Quantization

Nonuniform Quantization

The effect is to improve the overall SNR by reducing the noise for the
predominant weak signals at the expense of noise for the rarely
occuring strong signals
Nonuniform quantization can be obtained by two ways
Directly use a nonuniform quantizer
Indirect method – First compressing the signal, then taking uniform
qunatization

Figure: Nonuniform quantizer Figure: Compression characteristics


charactristics

48 / 59
Module-1 Quantization

Nonuniform Quantization

More often nonuniform quantization is done by first compressing and


then by uniform quantization
Generally logarithmic compression is doing
For small amplitude characteristics the compression characteristics
has a much steeper slope than for large magnitude signals
At the receiver an inverse compression characteristics called expansion
is applied so that the overall transmission is not distroted
The processing pair, i.e., compression and expansion is usually
referred to as companding

49 / 59
Module-1 Quantization

Companding

Two types of compression functions are used world wide


µ law compression – North America
A law compression – Europe
ln(1 + µ|m|)
|v | = (22)
ln(1 + µ)
 A|m|
1
 1+ln A , 0 ≤ |m| ≤
 A,
|v | = (23)
 1+ln A|m|
 1
1+ln A , A ≤ |m| ≤ 1
Typical value of µ is 255 and A is 87.6

50 / 59
Module-1 Quantization

Characteristics of µ law and A law compressors are shown below

Figure: A-law compressor


Figure: µ- law compressor

51 / 59
Module-II Pulse Code Modulation

Pulse Code Modulation


It is a baseband signalling scheme
The quantized sample values are represented by a binary code word
The code word bit is transformed into pulse waveform

52 / 59
Module-II Pulse Code Modulation

Pulse Code Modulation

Steps involved in PCM is shown below

53 / 59
Module-II Pulse Code Modulation

Exercise Problems Module-1

A signal whose amplitude varies from 0 to 10 V is bandlimited to


4KHz is transmitted through a channel using 5 bit PCM system
system. The sampling rate is 50% higher than the Nyquist rate.
Calculate all the parameters of the PCM system?
Number of levels?
Maximum quantization error?
Nyquist rate?
Sampling rate?
Bit rate?
Bandwidth requirement?

54 / 59
Module-II Pulse Code Modulation

Solution

n =5 bit PCM, so number of levels L = 25 =32


maximum quantization error = ∆/2, where ∆ = 2Vmax/L = 2x10/32 =
5/16v
so maximum quantization error = 5/32v
Nyquist rate = 2xFm = 8KHz
Sampling rate (Fs) = 12KHz
Bit rate = nFs = 5x12Kbps = 60Kbps
Bandwidth = 30KHz=Bit Rate/2

55 / 59
Module-II Pulse Code Modulation

Exercise Problems Module-1

A video signal is bandlimited to 4.5MHz and is transmitted through a


channel using PCM system. Determine the sampling rate if the signal
is sampled at a rate of 20% higher than the Nyquist rate. Calculate
the bit rate if the number of quantization levels used are 1024
A sinusoidal signal is bandlimited to 5KHz and transmitted through a
channel using PCM. The sampling rate is equal to twice the Nyquist
rate. The maximum quantization error should be 0.1% of the peak
signal amplitude. Calculate the bit rate?
A message signal m(t) = 4cos(8π103 t) is sampled at Nyquist rate
and transmitted through a channel using 3-bit PCM system.
Calculate all parameters of PCM. If the sampled values are 3.8, 2.1,
0.5, -2.1, -3.1,-4, calculate the quantizer output and quantization
error per each sample?

56 / 59
Module-II Pulse Code Modulation

Ans: 1 ) = Fs = 10.8MHz n = 10, so data rate = 10x10.8 = 108Mbps


Ans: 2) Sampling rate = 20KHz,
Maximum Qunatization error = ∆/2 = 2Vmax/(2L) = 2Vmax/(2x2n ) =
0.1Vmax/100
On solving we get n = 10, Data rate = 200Kbps
Ans: 3) Fs = Nyquist rate = 8KHz, n = 3, so L = 8, ∆ = 2xVmax/L =
8/8 =1 v, Quantization error = ∆/2 = 0.5v
Data rate = 24Kbps

57 / 59
Module-II Pulse Code Modulation

Additional Learning

Natural Sampling: In natural sampling instead of an impulse train a


pulse train is used for sampling. The duartion of each pulse is finite
The Fourier transform of pulse train is another pulse train scaled by
sinc function
1
cn = Ts sinc(nT /Ts )


X
Xs (F ) = cn X (F − nFs ) (24)
n=−∞

58 / 59
Module-II Pulse Code Modulation

Figure: Pulse train for natural sampling


Figure: Spectrum of pulse train

Figure: Spectrum of the sampled signal


59 / 59

You might also like