You are on page 1of 67

WAVEFORM CODING

UNIT 2
DIGITAL COMMUNICATION
T.E (Ist Semester)
PULSE MODULATION
The process of transmitting signals in the form of
pulses (discontinuous signals) by using special
techniques.

Such as
• Pulse Amplitude
Modulation
• Pulse Width Modulation
• Pulse Position
Modulation
• Pulse Code Modulation
Pulse Modulation

Analog Pulse Modulation Digital Pulse Modulation

Pulse Amplitude (PAM) Pulse Code (PCM)

Pulse Width (PWM) Delta (DM)

Pulse Position (PPM)

Pulse Amplitude Modulation (PAM):


* The signal is sampled at regular intervals such that each sample
is proportional to the amplitude of the signal at that sampling
instant. This technique is called “sampling”.
* For minimum distortion, the sampling rate should be more than
twice the signal frequency.
Pulse Amplitude Modulator
Analog AND PAM FM
Pulse Shaping PAM - FM
Signal Gate Network Modulator

Pulses at sampling frequency HF Carrier Oscillator

Analog Signal

Amplitude Modulated
Pulses
Pulse Width Modulation (PWM or PLM or PDM):
* In this type, the amplitude is maintained constant but the duration
or length or width of each pulse is varied in accordance with
instantaneous value of the analog signal.
* The negative side of the signal is brought to the positive side by
adding a fixed d.c. voltage.

Analog Signal

Width Modulated Pulses


Pulse Position Modulation (PPM):
* In this type, the sampled waveform has fixed amplitude and
width whereas the position of each pulse is varied as per
instantaneous value of the analog signal.

* PPM signal is further modification of a PWM signal. It has


positive thin pulses (zero time or width) corresponding to the
starting edge of a PWM pulse and negative thin pulses
corresponding to the ending edge of a pulse.

* This wave can be


further amended
PWM
by eliminating the
whole positive
narrow pulses.
PPM The remaining
pulse is called
clipped PPM.
PAM, PWM and PPM at a glance:

Analog Signal

Amplitude Modulated Pulses

Width Modulated Pulses

Position Modulated Pulses


Pulse Code Modulation (PCM):
* Analog signal is converted into digital signal by using a digital
code.
* Analog to digital converter employs two techniques:

1. Sampling: The process of generating pulses of zero width


and of amplitude equal to the instantaneous amplitude of the
analog signal. The no. of pulses per second is called
“sampling rate”.

2. Quantization: The process of dividing the maximum value


of the analog signal into a fixed no. of levels in order to
convert the PAM into a Binary Code.
The levels obtained are called “quanization levels”.

* A digital signal is described by its ‘bit rate’ whereas analog


signal is described by its ‘frequency range’.

* Bit rate = sampling rate x no. of bits / sample


V Sampling,
o
l Quantization
t and Coding
a
g
e
Time
7 111
L 6 110 B
e 5 101 i C
v 4 100 n o
e 3 011 a d
l 2 010
r e
s 1 001 s
0 000 y
Time
V
o 010101110111110101010
l
t
a
g
e
Time
Merits of Digital Communication:
1. Digital signals are very easy to receive. The receiver has to just detect
whether the pulse is low or high.
2. AM FM signals become corrupted over much short distances as compared
to digital signals. In digital signals, the original signal can be reproduced
accurately.
3. The signals lose power as they travel, which is called attenuation. When
AM and FM signals are amplified, the noise also get amplified. But the
digital signals can be cleaned up to restore the quality and amplified by
the regenerators.
4. The noise may change the shape of the pulses but not the pattern of the
pulses.
5. AM and FM signals can be received by any one by suitable receiver. But
digital signals can be coded so that only the person, who is intended for,
can receive them.
6. AM and FM transmitters are ‘real time systems’. I.e. they can be received
only at the time of transmission. But digital signals can be stored at the
receiving end.
7. The digital signals can be stored, or used to produce a display on a
computer monitor or converted back into analog signal to drive a loud
speaker.
PCM Generator
x(nTs) xq(nTs) v digits
x(t)
Low pass Parallel to PCM
Sample & q-level Binary
Filter Serial
hold quantizer encoder
fc=W converter
fs r=vfs

Timer
~

fs>=2W

• Nyquist rate fs>=2W


• Quantization error ε = xq(nTs)-x(Ts)
Transmission bandwidth in PCM
• If v binary digits are used by the quantizer then the number of levels q=2v
• Number of bits per sample= v
• Number of samples per second= fs
• Number of bits per second=number of bits per sample* number of samples per
second
• Signaling rate in PCM: r=v fs
• Bandwidth needed for PCM transmission will be given by half of the signaling rate,
BT>=1/2r
>=1/2v fs
>=vW
Since fs=2W
PCM Receiver
PCM+noise v digits xq(t)
PCM
Serial to Digital to YD(t)
Regene- Sample & Low pass
Parallel to Analog
rator hold filter
converter converter

sync Timer

•Quantization error can be reduced by increasing the binary levels


which in turn increases binary digits per sample and hence increases
the signaling rate as well as transmission bandwidth.

•Therefore the choice of these parameters is made such that noise due
to quantization error is in tolerable limits.
Problems
1. The bandwidth of TV video plus audio signal is 4.5MHz. If this
signal is converted to PCM bit stream with1024 quantization
levels, determine number of bits/sec generated by the PCM
system. Assume that the signal is sampled at the rate of 20%
above Nyquist rate.
W=4.5MHz, q=1024
fs=20%+2W
r=?
Problems
1. A TV signal has a bandwidth of 4.5MHz.This signal is sampled,
quantized and binary coded to obtain a PCM signal. Determine
the sampling rate if the signal is to be sampled at a rate 20%
above the Nyquist rate. If the samples are quantized into 1024
levels, determine the number of binary pulses required to encode
each sample. Determine the binary pulse rate(bits per second) of
binary coded signal and the minimum bandwidth required to
transmit the signal.
W=4.5MHz, q=1024
fs=20%+2W
v=?,r=?,BT=1/2vW
Problems
• A CD records audio signals digitally by using PCM. Assume the
audio signal bandwidth to be 15kHz.What is Nyquist rate? If the
Nyquist samples are quantized into L=65,536 levels and then binary
coded, determine the number of binary digits required to encode a
sample. Determine the number of binary digits per second required
to encode the audio signal.
W=15kHz, q=65536
fs=2W
v=?,r=?
PCM
• Sampling signal based on nyquist theorem

Original signal

3.9 3.4 4.2


3.2 2.8
PAM pulse 1.2

PCM pulse 3 4 3 3 4
with quantized error 1

011 100 011 011 001 100

PCM output 011100011011001100


Quantization

Classification of
quantization

Uniform quantization nonuniform


quantization

Mid-tread Mid-rise type µ law A law


type
uniform quantization
A uniform Quantizing is the type in which the
'step size'
Noremains same throughout
assumption the input
about amplitude range.
statistics and
correlation properties of the input.

Mid-tread Mid-
Zero is one of the Zerorise
is not one of the
output levels M is output levels M is
odd even
Midtread quantizer

Quantizing error consists of the difference between


the input and output signal of the quantizer.

− ∆ / 2 ≤ input < ∆ / 2 ⇒ output = 0


∆ / 2 ≤ input < 3∆ / 2 ⇒ output = ∆

Quantization error lies between -∆ /2 and


∆ /2
Maximum quantization error, ε max =
uniform quantizing noise


Maximum instantaneous value of 2
quantization error is
Midrise quantizer

Output

0<=input<∆ ;output= ∆ /2
Δ/2 3Δ/2 Input- ∆ <=input<0;output= -∆ /2

Quantization error lies between - ∆ /2 and ∆ /2


Maximum quantization error is |∆ /2 |
Uniform Symmetric Quantizers

Midtreader Midriser
ri: output levels
Step size is constant di: input levels
• For a non-uniform quantizer, the quantization
• error power is related to the quantizer’s input
• distribution, since it has smaller quantization
• step for small input and larger quantization step
• for large input.

• In most cases the quantizer input has a


• distribution similar to Normal distribution,
• which means using a non-uniform quantizer
• will lead to smaller quantization error power
Quantization noise for linear
quantization
Quantization error= output signal-input signal
Quantization error ε = Xq (nTs)-x(Ts)

Total amplitude range= Xmax – (-Xmax )


= 2 Xmax
If amplitude range is divided into ‘q’ levels of quantizer,
then step size
∆ = 2 Xmax
q
Maximum Quantization error=ε max=∆
2
Noise power= V2noise, V 2= mean square value of noise volt
R
Quantization noise power= ∆ 2
12
Signal to quantization noise ratio in for linear
quantization
S = normalized signal power
N normalized noise power

S = 3P .22v
N x2max

=>signal to power ratio of quantizer increases exponentially


with increasing bits per sample.

signal to quantization noise ratio for normalized values of


power =
S dB <=(4.8+6v)dB
N
rms signal to quantization noise ratio for normalized values
of power =
S dB <=(1.8+6v)dB
N
Nonuniform Symmetric Quantizers

Midtreader Midriser ri: output levels


di: input levels
Non Uniform quantizing
• 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.

Effect of non linear quantizing can be


can be obtained by first passing the
analog signal through a compressor
and then through a uniform quantizer.

x x’ x’ y
Q(.
C(.) )
Compressor Uniform Quantizer
• Quantization levels are not necessarily equally
spaced. The problem with equal spacing is
that the mean absolute error for each sample is
the same, regardless the signal level. Lower
amplitude values are relatively more distorted.
• Nonlinear encoding reduces overall signal
distortion
• Can also be done by companding
• Nonuniform quantization
• ♦ In the case of uniform quantization levels, the
• quantization noise power depends only on the spacing
• between the levels, and is independent of the actual
• signal level at any instant.
• ♦ The SNR decreases with a decrease in the input power
• level relative to the maximum range of the quantizer,
• which is undesirable in many applications.
• ♦ For example, in a speech system a fixed quantization
• noise power will be more objectionable when a quiet
• speaker is speaking than when a loud one is.
• Nonuniform quantization
• ♦ A remedy is to use nonuniform
quantization levels. This
• can be achieved by using a nonuniform
quantizer:
• As in speech transmission, the same quantizer
has to
• accommodate input signals with widely varying
power
• levels.
• ♦ A nonuniform quantizer for which the SNR
remains
• constant over a wide range of input power levels
is
• called robust.
• Probability density function
• ♦ A uniform quantizer makes sense when the
probability
• distribution of the signal in the range -Vmax to Vmax is
• uniform. If we have reason to believe that the
• distribution is nonuniform, and we know what the
actual
• distribution is, then we can place nonuniform
• quantization levels in an optimal manner.
Nonuniform quantization
Probability density function
• ♦ Recall from the discussion on information theory that the
• entropy is maximized if the probability of occurrence of
• each level is equal.
• ♦ Therefore we should choose the quantization levels such
• that the probabilities of occurrence in each level are
• equal.
Nonuniform quantization
Companding
• ♦ More often, nonuniform
• quantization is achieved by
• first distorting the original
• signal with a nonlinear
• compressor characteristic, and
• then using a uniform quantizer
• on the result:
Nonuniform quantization
Companding
• A given signal change at small magnitudes will then
• carry the uniform quantizer through more steps than the
• same change at large magnitudes. At the receiver, an
• inverse compression characteristic (or expansion) is
• applied, so that the overall transmission is not distorted.
• The processing pair (compression and expansion) is
• usually referred to as companding.
Nonuniform quantization
μ-law compander
• The μ-law compander is
• characterized by
• ♦ Vout = log(1+μVin) / log(1+μ)
• ♦ The μ-law companding is
• used for PCM telephone
• systems in the USA, Canada
• and Japan, with the standard
• value of μ = 255
Nonuniform quantization
A-law compander
• The A-law compander is
• characterized by
• ♦ Vout = A*Vin / {1+log(A)}
• ♦ for Vin < 1/A
• ♦ Vout = A*{1+log(A*Vin) /
• {1+log(A)}
• ♦ for 1/A ≤ Vin
• ♦ The A-law companding is
• used for PCM telephone
• systems in Europe, with A =
• 87.56
Nonlinear encoding
Quantizing level
15 15
14 14
13
13
12
11Strong signal 12
10 11
10
9
8 Weak signal 9
8
7 7
6
6 5
5 4
4 3
3 2
2
1
1
0 0

Without nonlinear encoding


With nonlinear encoding
Companding process
11  Implement nonlinear encoding via
11 10
01 companding process
00
11
10 10
01
00  Companding = Compressing
11
01segment 10
01
00 Expanding
00 codes
11
10
(+) 01
00 11
10
01
00
00
11
10
01 01
00
11
10
01 10
00 segment
11 codes
11
10
01
00
(-)
linear quantization interval

vi C
Co
om
m prr
p e
ess
sso
orr L
Line
ina
err
a Network L
Line
ina
err
a E
Ex
xpa
pand
nde
err vo
cc
ircu it
ircuit A DC
ADC D AC
DAC cc
ircuit
ircuit
vi v’o

Prior to the input signal being sampled and converted by ADC into a
digital form, it is passed through a circuit known as a compressor.
Similarly, at the destination, the reverse operation is perform on the
output of the DAC by a circuit known as expander.
Uniform and Nonuniform Quantization
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.
µ -Law Companding
1

• Telephones in the U.S., Canada


and Japan use µ -law
companding:
Output |x(t)|

ln(1 +|µ( )|)


xt
| y( t)| =
ln(1 +)µ

– Where µ = 255 and |x(t)| < 1

0 1
Input |x(t)|
µ −law Encoder Transfer Characteristics
A-law and µ −law Companding
• These two are standard companding methods.
• u-Law is used in North America and Japan
• A-Law is used elsewhere to compress digital telephone signals
Differential Pulse Code Modulation (DPCM)
• Signal is first sampled and then the difference between the
successive samples is quantized .
• Encode the changes between consecutive samples
• This difference is encoded to a digital value.

When these highly correlated samples are encoded the


resulting encoded signal contains redundant
information.
Differential Pulse Code Modulation
• The value of the differences between samples
are much smaller than those of the original
samples.
• For decoding the difference is added to the
previous sample to obtain the value of the
current sample. Lossless coding is achieved
DPCM - Transmitter

^
DPCM - Receiver
Delta Modulation
• This scheme sends only the difference
between pulses, if the pulse at time tn+1 is
higher in amplitude value than the pulse at time
tn, then a single bit, say a “1”, is used to
indicate the positive value.
• If the pulse is lower in value, resulting in a
negative value, a “0” is used.
• This scheme works well for small changes in
signal values between samples.
• If changes in amplitude are large, this will result
in large errors.
Delta Modulation - example
Delta modulation components
DM system- Transmitter
Delta demodulation components
DM system- Receiver
Delta modulation is subject to two types of
quantization error:
slope overload distortion and
granular noise (Hunting).
The process of delta modulation
Illustration of the two different forms
of quantization error in delta
modulation.
Slope overload distortion

Slope overload noise will decrease as δ increase.


Granular noise(Hunting)

Granular noise will decrease as δ decrease


Granular noise & slope
overload noise
Adaptive Delta Modulation

Variable Step Size

Input signal is varying fast - Step Size is increased

Input signal is varying slow - Step Size is reduced


A D M - Transmitter
Logic for
Step-size
Control

Input + Output
One-bit
x(nTs) Σ
Quantizer
-

Delay
Ts
A D M - Receiver
Input + Low-Pass Output
X Σ
Filter

Delay
Logic for Ts
Step-size
Control
ADM

Step size constraint


δ min ≤ δ (nTs ) ≤ δ max

δmax = controls the slope overload


distortion
δmin = controls the idle channel noise.
Adaptive DM

You might also like