Basic Digital Communication
Transformations
Pulse Code Modulation
Source of continuous- Low pass Sampler Quantizer Encoder PCM
time (i.e., analog) Filter Signal
message signal
Analog-to-Digital Converter
• Low Pass Filter
– Confining the frequency content of the message signal
• Sampling
– To ensure perfect reconstruction of message signal at the receiver, the sampling rate must
exceed twice the highest frequency component of the message signal (Sampling
Theorem)
• Quantization
– Converting of analog samples to a set of discrete amplitudes
• Encoding
– Translating the discrete set of samples in a form suitable for digital transmission
2
3
Cont’d.
4
Block Diagram of PCM
Methods of Sampling
Ideal sampling
- an impulse at
each sampling
instant
Fig. Ideal Sampling
Methods of Sampling
Natural
sampling - a
pulse of short
width with
varying
amplitude
with natural
tops
Fig. Natural Sampling
Methods of Sampling
Flat-top
sampling - a
pulse of short
width with
varying
amplitude
with flat tops
Fig. Flat-top Sampling
Sampling Process: Introductory Note
Sampling of the signal
Periodic signal in
spectrum in the frequency
the time domain
domain
By Duality
Sampling of the Making the spectrum of
signal in the time the signal periodic in the
domain frequency domain
9
Motivation
Filtering & Sampling (1)
Technical Presentation
Page 10
Motivation
Filtering & Sampling (2)
Technical Presentation
Page 11
Motivation
Filtering & Sampling (3)
Technical Presentation
Page 12
Sampling Theorem
• Sampling Theorem for Band-limited Signals:
– A band-limited signal of finite energy which has no frequency
components higher than W Hz is completely described by specifying
the values of the signal at instants of time separated by 1/2W seconds
– A band-limited signal of finite energy which has no frequency
components higher than W Hz may be completely recovered from
knowledge of its samples taken at the rate of 2W samples per second
• fS=2W is called the Nyquist Rate
• tS=1/2W is called the Nyquist interval
13
Motivation
Filtering & Sampling (4)
➢ Most of the speech contents lies in between 300 – 3400 Hz
➢ According to Nyquist theorem Fs >= 2 fm (to avoid aliasing)
➢ A value of 8kHz is selected (8 >= 2*3.4).
➢ For good quality16 bits are used to represent each sample.
➢ Bit-rate = 8kHz *16 bits = 128 kbps Input Rate
The Input rate could even be more, for example in Skype: 16 kHz sampling
frequency is used in skype and so resulting to an input rate of 192 kBit/s. But, this
is a waste of bandwidth that could rather be used by other services and
applications.
Source Coding (Speech Coding in this Context)
Technical Presentation
Page 14
Quantization
Understanding Quantization
To understand quantization a bit more let’s have a look at the following Example:
Technical Presentation
Page 15
16
Uniform Quantization
• A quantizer with equal quantization level is a Uniform Quantizer
• Each sample is approximated within a quantile interval
• Uniform quantizers are optimal when the input distribution is uniform
– i.e. when all values within the range are equally likely
• Most ADC’s are implemented using uniform quantizers
• Error of a uniform quantizer is bounded by q q
− e
2 2
17
Signal to Quantization Noise Ratio
◼ If q is the step size, then the maximum quantization error that can
occur in the sampled output of an A/D converter is q
V pp
q=
L
where L = 2n is the number of quantization levels for the converter. (n is the
number of bits).
• The mean-squared value (noise variance) of the quantization error is given
by:
2 1
q/2 q/2
1 q/2 2
2 = e p(e)de = e de = e de
2
−q / 2 −q / 2 q q −q / 2
1 e q/2
q 2
=q =
3
3 −q / 2 12
19
20
21
Example 2
• Consider a full load sinusoidal modulating signal of amplitude
A, which utilizes all the representation levels provided
• The average signal power is P= A2/2
• The total range of quantizer is 2A because modulating signal
swings between –A and A. Therefore, if it is N=16 (4-bit
quantizer), Δ = 2A/24 = A/8
• The quantization noise is Δ2/12 = A2/768
• The S/N ratio is (A2/2)/(A2/768) = 384; SNR (in dB) 25.8 dB
The Approximate SNR is
23
Advantages of PCM:
• Relatively inexpensive
• Easily multiplexed: PCM waveforms from different sources can
be transmitted over a common digital channel (TDM)
• Easily regenerated: useful for long-distance communication,
e.g. telephone
• Better noise performance than analog system
• Signals may be stored and time-scaled efficiently (e.g.,
satellite communication)
• Efficient codes are readily available
Disadvantage:
• Requires wider bandwidth than analog signals
PCM: A Quick Recapitulation
Differential Pulse Code Modulation
(DPCM)
Differential Pulse Code Modulation
• Changes between adjacent samples small
• Send value, then relative changes
– value uses full bits, changes use fewer bits
– E.g., 220, 218, 221, 219, 220, 221, 222, 218,.. (all values between 218
and 222)
– Difference sequence sent: +2, -3, 2, -1, -1, -1, +4....
– Result: originally for encoding sequence 0..255 numbers need 8 bits;
– Difference coding: need only 3 bits
Differential Pulse-Code Modulation (DPCM)
Usually PCM has the sampling rate higher than the Nyquist rate.
The encode signal contains redundant information. DPCM can efficiently
remove this redundancy.
• Linear Predictor Implemented
With Transversal Filter
• Transversal filter is a tapped delay
line (with required weights )
30
31
DPCM Encoding
33
DPCM Decoding
34
Delta Modulation
Delta modulation (DM) uses a single-bit DPCM code to achieve digital
transmission of analog signals
• analog input is approximated by a staircase function
– can move up or down one level () at each sample interval
• has binary behavior
– since function only moves up or down at each sample interval
– hence can encode each sample as single bit
– 1 for up or 0 for down
Noise in Delta Modulation
REMEMBER: In DM, the step size is related to the
sampling frequency. In order to avoid slope overload
distortion, the maximum slope of the staircase
approximation must be equal to or greater than the
maximum slope of the signal.
49
50
PCM verses Delta Modulation
• DM has simplicity compared to PCM
• but has worse SNR
• Issue of bandwidth used
– eg. for good voice reproduction with PCM
• want 128 levels (7 bit) & voice bandwidth 4khz
• need 8000 x 7 = 56kbps
• data compression can improve on this
• still growing demand for digital signals
– use of repeaters, TDM, efficient switching
• PCM preferred to DM for analog signals
Adaptive Delta Modulation (ADM)
The step size is automatically varied, depending on the level of the
derivative of the input analog signal
The receiver must be able to A common algorithm
adapt step sizes in exactly followed for an ADM is that
the same manner as the when three consecutive 1s or
transmitter 0s occur, the step size is
increased or decreased by a
factor of 1.5.
Comparison of PCM and other Techniques
Multiplexing
Bandwidth utilization is the wise use of
available bandwidth to achieve
specific goals.
Efficiency can be achieved by multiplexing; i.e., sharing of the
bandwidth between multiple users.
6.54
MULTIPLEXING
Whenever the bandwidth of a medium linking two devices is
greater than the bandwidth needs of the devices, the link can be
shared. Multiplexing is the set of techniques that allows the
(simultaneous) transmission of multiple signals across a single
data link. As data and telecommunications use increases, so
does traffic.
Types of Multiplexing:
❑ Frequency-Division Multiplexing (Analog)
❑ Wavelength-Division Multiplexing (Analog)
❑ Synchronous Time-Division Multiplexing (Digital)
TDM is a digital multiplexing technique for combining
several low-rate digital channels into one high-rate one.
6.55
TDM System
PAM is employed in TDM
Synchronous Time-Division Multiplexing
Commutator Decommutator
T-1 line for multiplexing telephone lines
6.58
59
60
Companding
• Voice signals are more likely to have amplitudes near zero than at extreme peaks.
• For such signals with non-uniform amplitude distribution quantizing noise will be higher for
amplitude values near zero.
• A technique to increase amplitudes near zero is called Companding.
• Nonuniform quantizers are difficult to make and expensive.
• An alternative is to first pass the speech signal through a nonlinearity before quantizing with
a uniform quantizer.
• The nonlinearity causes the signal amplitude to be Compressed.
– The input to the quantizer will have a more uniform distribution.
• At the receiver, the signal is Expanded by an inverse to the nonlinearity.
• The process of compressing and expanding is called Companding.
Nonuniform Quantization
➢ Many signals such as speech have a nonuniform distribution.
– The amplitude is more likely to be close to zero than to be at higher levels.
➢ Nonuniform quantizers have unequally spaced levels
– The spacing can be chosen to optimize the SNR for a particular type of signal.
x x’ x’ y
Output sample Q(.)
C(.)
XQ 6
Compressor Uniform Quantizer
4
2 Example: Nonuniform 3 bit quantizer
-8 -6 -4 -2 2 4 6 8
Input sample The used of a non-uniform quantizer is
-2
X equivalent to passing the baseband
-4
Signal through a compressor and then
applying the compressed signal to a
-6 uniform quantizer.
Concepts
Companding
There are two standard companding methods.
⚫ u-Law is used in North America and Japan
⚫ A-Law is used elsewhere to compress digital telephone signals
A-Law Encoding µ-Law Encoding
Example: m-law Companding
1
x[n]=speech /song/
0.5
-0.5
-1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
0.5
y[n]=C(x[n]) 0
Companded Signal
-0.5
-1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
0.5
Close View of the Signal
Segment of x[n] 0
-0.5
-1
2200 2300 2400 2500 2600 2700 2800 2900 3000
Segment of y[n]
0.5
Companded Signal -0.5
-1
2200 2300 2400 2500 2600 2700 2800 2900 3000
SNR Performance of Compander
• The output SNR is a function of input signal level for uniform quantizing.
• But it is relatively insensitive for input level for a compander.
• α = 4.77 - 20 log ( V/x for Uniform Quantizer
rms)
V is the peak signal level and xrms is the rms value
• α = 4.77 - 20 log[Ln(1 + μ)] for μ-law companding
• α = 4.77 - 20 log[1 + Ln A] for A-law companding
PCM Waveform Types
• The output of the A/D converter is a set of binary bits
• But binary bits are just abstract entities that have no physical definition
• We use pulses to convey a bit of information, e.g.,
• In order to transmit the bits over a physical channel they must be transformed
into a physical waveform
• A line coder or baseband binary transmitter transforms a stream of bits into a
physical waveform suitable for transmission over a channel
• Line coders use the terminology mark for “1” and space to mean “0”
• In baseband systems, binary data can be transmitted using many kinds of pulses
67
Line Coding
1
Line Coding
The digital data need to be coded into electrical pulses
for the purpose of transmission over the channel. This
process is called line coding or transmission coding.
There are two major categories of line codes:
• return-to-zero (RZ), and
• nonreturn-to-zero (NRZ).
With RZ coding, the waveform returns to a zero-volt
level for a portion (usually half) of the bit interval.
Line coding examples
1 0 1 0 1 1 1 0 0
Unipolar
NRZ
Polar NRZ
NRZ-inverted
(differential
encoding)
Bipolar
encoding
Manchester
encoding
Differential
Manchester
encoding
4
Unipolar & Polar Non-Return-to-Zero (NRZ)
1 0 1 0 1 1 1 0 0
Unipolar NRZ
Polar NRZ
Unipolar NRZ Polar NRZ
• “1” maps to +A pulse • “1” maps to +A/2 pulse
• “0” maps to no pulse • “0” maps to –A/2 pulse
• High Average Power • Better Average Power
0.5*A2 +0.5*02=A2/2 0.5*(A/2)2 +0.5*(-A/2)2=A2/4
• Long strings of A or 0 • Long strings of +A/2 or –A/2
– Poor timing – Poor timing
– Low-frequency content – Low-frequency content
• Simple • Simple
5
Bipolar Code (Alternate Mark Inversion)
1 0 1 0 1 1 1 0 0
Bipolar
Encoding
• Three signal levels: {-A, 0, +A}
• “1” maps to +A or –A in alternation
• “0” maps to no pulse
– Every +pulse matched by –pulse so little content at low frequencies
• String of 1s produces a square wave
– Spectrum centered at T/2
• Long string of 0s causes receiver to lose synch
• Zero-substitution codes
6
7
The signal
level is
checked
twice for
every bit
time, both
initially and
in the
middle.
Hence, the
clock rate is
double the
data transfer
rate and thus
the 8
modulation
Manchester Code Conventions
Differential Manchester Encoding
If there occurs a transition at the beginning of the bit interval, then the
input bit is 0. If no transition occurs at the beginning of the bit interval, then
the input bit is 1.
Differential Manchester is
specified in the IEEE
802.5 standard for token ring
LANs, and is used for many
other applications, including
magnetic and optical storage.
High Density Bipolar (HDB)