0% found this document useful (0 votes)
6 views

Week 4

Uploaded by

faisal iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Week 4

Uploaded by

faisal iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 47

DIGITAL

COMMUNICATION

SPRING,2024
DR. SOYIBA JAWED

1
CONTENTS

 Pulse code Modulation

 Uniform Quantization

 Non Uniform Quantization

 Compander

2
ANALOG TO DIGITAL CONVERSION

- A digital signal is superior to an analog signal.

- Digital is less prone to noise and distortion.

- We can’t use analog signals for long distance


(lose their strength, which means amplifiers are needed to amplify
signal. However the amplifier creates distortion in the signal and
adds some noise).

- The tendency today is to change an analog signal (such as


audio ,voice and music) to digital data.

- Pulse Code Modulation (PCM) is a technique to convert


analog data to digital signal.
3
ANALOG TO DIGITAL CONVERSION

• The idea of digitizing analog signal started with telephone


companies, to provide long distance services; They digitized the
analog signal at the sender; The signal is converted back to analog
at the receiver.

- Pulse Code Modulation (PCM):


1- Sampling (PAM).
2- Quantization.
3- Binary encoding.
4- Line or block coding.
4
SAMPLING (PAM)

• The first step in PCM is sampling.


• The analog signal is sampled at equal interval, every Ts s (sample
interval)
• The inverse of sampling interval is sampling rate or sampling
frequency.
fs= 1/Ts
• Sampling rate: number of samples per second.

5
SAMPLING PAM (PULSE AMPLITUDE MODULATION)

6
QUANTIZED PAM SIGNAL

• The result of PAM is a series of pulses with amplitude values


between the maximum and minimum amplitudes of the signal with
real values.
• Quantization: is a method of assigning integer values in a specific
range to sampled instances.

7
BINARY ENCODING

- Each quantized samples is translated into equivalent binary


codes .

8
LINE ENCODING

- The binary digits are then transformed to a digital signal using


one of the line encoding.

9
COMPONENTS OF PCM ENCODER

10
PCM BLOCK

11

The basic elements of a PCM system


PULSE CODE MODULATION ADVANTAGES

1. Analog signal can be transmitted over a high speed


digital communication system.

2. Probability of occurring error will reduce by the use of


appropriate coding methods.

3. PCM is used in Telkom system, digital audio recording,


digitized video special effects, digital video, voice mail.

4. PCM is also used in Radio control units as transmitter and


also receiver for remote controlled cars, boats, planes.

5. The PCM signal is more resistant to interference than 12

normal signal.
PULSE CODE DEMODULATION

• Pulse Code Demodulation: will be doing the same


modulation process in reverse.
• Demodulation starts with decoding process
• During transmission the PCM signal will effected by the
noise interference.

13
Quantization
14
MOTIVATION
x [amplitude] Q(x) [quantized amplitude]

time time

Analog Digital Recovered


Signal Transmission Signal

0101100110

Processing Processing

How would you transmit an analog signal through a digital


medium?
MOTIVATION
Turning an Analog Signal into a Digital Signal.

What is the first step?


x [amplitude] x [amplitude]

time
time
MOTIVATION
Turning an Analog Signal into a Digital Signal.

Sampling (which frequency?)

x [amplitude]
x [amplitude]

time
time
MOTIVATION

x [amplitude] Q(x) [quantized amplitude]


^
𝑥1 ❑
time 𝑥^2❑ time

Turning an Analog Signal into a Digital Signal.

How would you represent the samples using 2 amplitude levels?


MOTIVATION
Turning an Analog Signal into a Digital Signal.

Quantization
x [amplitude] Q(x) [quantized amplitude]
^
𝑥1 ❑
time 𝑥^2❑ time

Choice of levels , and of


if
Boundary 𝑎1= Qx
if
MOTIVATION
Turning an Analog Signal into a Digital Signal.
How would you transform amplitude levels into bits?
How many bits are necessary to represent two amplitude levels?

Q(x) [quantized amplitude]


^
𝑥1 ❑
𝑥^2❑ time
MOTIVATION
Turning an Analog Signal into a Digital Signal.

Quantization
Q(x) [quantized amplitude]
Bit Mapping
^
𝑥1 ❑ ^2
1 , 𝑖𝑓 𝑥
bit
𝑥^2❑ time
0 , 𝑖𝑓 ^
𝑥1

Mapping may seem arbitrary. We use


techniques such as Grey coding. Message = 0 1 0 0 1
MOTIVATION
x [amplitude] Q(x) [quantized amplitude]
𝑥^2❑
^
𝑥1 ❑
time time

Analog Digital Recovered


Signal Transmission Signal

01001

Processing Processing

How would you transmit an analog signal through a digital medium?


MOTIVATION
x [amplitude] Q(x) [quantized amplitude]
𝑥^2❑
time
^
𝑥1 ❑ time

Analog Digital Recovered


Can we recover theTransmission
Signal original signal (without errors)
Signal
at the destination?
01001
Objective: design quantizers with good performance
Processing Processing
(low error)

How would you transmit an analog signal through a digital medium?


QUANTIZATION
SCHEME
In our motivation, we presented two mappings (on the LHS).
They can be summarized using the scheme on the RHS
EXAMPLE

• Student 1: generates samples at every 5 seconds. Each sample


is a real number between -10 and 10 chosen at random.
• Student 2: maps each sample to a bit and transmits that bit to
the receiver over the communication channel.
• Receiver recovers the original sample and writes on the
board.
Setup:
• Student 2 and Receiver come up with a Quantization Scheme
before starting the example.

Digital
01001
Transmission

Question: how would you improve this system?


QUANTIZER

Q(x)
The Quantization Scheme bits=10
provides all necessary
information for the bits=11
quantization process. x
It maps all possible
sample amplitudes to the
bits=01
quantized value (and the
associated bit bits=00
representation).
Notice that N levels imply in
log2(N) bits per sample.
GENERAL QUANTIZER

𝑖
SIMPLIFIED UNIFORM QUANTIZER
QUANTIZATION ERROR
QUANTIZATION ERROR
QUANTIZATION ERROR
EXAMPLE FOR 2 LEVELS
SOLUTION FOR N LEVELS

what happens to SQNR when we add one bit to the quantizer?


MATLAB DEMONSTRATION
QUANTIZER DESIGN

Uniform quantizer is good when input is uniformly distributed

When input is not uniformly distributed:


• Non-uniform quantization regions
• Finer regions around more likely values
• Optimal quantization values not necessarily the region midpoints

Possible Approaches:
• Use uniform quantizer anyway. Optimize the choice of Δ
• Use non-uniform quantizer. Choice of quantization regions and
values
• Transform signal into one that looks uniform and use uniform
quantizer
OPTIMAL UNIFORM QUANTIZER

Given the number of regions, N


• Find the optimal value of Δ and one region boundary
• Find the optimal quantization levels �ො𝑗 within each region
• Optimization over N+2 variables

Simplification: Let quantization levels be the midpoints of the


quantization regions (except first and last regions, when input is
not finite valued). Also, let the middle region boundary be at zero.
This is the Simplified Uniform Quantizer discussed earlier.

Solve for Δ to minimize distortion:


• Solution depends on input pdf and can be done numerically
OPTIMAL UNIFORM QUANTIZER -
EXAMPLE
OPTIMAL NON-UNIFORM QUANTIZER
OPTIMAL NON-UNIFORM
QUANTIZER

Key questions:
Given quantization regions, what should the quantization levels be?
Given quantization levels, what should the quantization regions
be?
Iterative approach for minimizing distortion:
Given regions, solve for quantization levels
Then, with the new levels, solve for quantization regions.
Loop until distortion stops improving.
Optimal Quantization Levels
OPTIMAL QUANTIZATION REGIONS
OPTIMAL NON-UNIFORM QUANTIZER
Necessary conditions for optimality:
1. Quantization levels are the “centroid” of their region
2. Boundaries of the quantization regions are the midpoint of
the quantization values
Clearly 1 depends on 2 and vice versa. The two can be
solved
iteratively to obtain an optimal quantizer.

Lloyd-Max algorithm:
Start with arbitrary regions (e.g., uniform Δ)
A) Find optimal quantization values (“centroids”)
B) Use quantization values to get new regions (“midpoints”)
LLOYD-MAX ALGORITHM -
EXAMPLE
Output of this algorithm is well-known for some common distributions.
• Table 6.3 (p. 299) gives optimal quantizer for Gaussian source.

For N = 4, D = 0.1175, H(Q) = 1.911

Optimal UNIFORM was: D= 0.1188, H(Q) = 1.904 (slight improvement)


(from previous slide)
COMPANDERS
Non-uniform quantizer can be difficult to design
• Requires knowledge of source statistics
• Different quantizers for different input types

Solution: Transfer input signal into one that looks uniform and then
use uniform quantizer

Speech signal: high probabilities for low amplitudes


• Compress the large amplitudes before performing uniform
quantization log 1 + 𝜇 𝑥
μ -law compander 𝑔 𝑥 = sgn 𝑥 , 𝑥 ∈ [−1,1]
log 1 + 𝜇
• μ controls the level of compression
• μ = 255 typically used for voice
COMPANDERS
log 1 + 𝜇 𝑥
μ -law compander 𝑔 𝑥 = sgn 𝑥 , 𝑥 ∈ [−1,1]
log 1 + 𝜇
• μ controls the level of compression
• μ = 255 typically used for voice
PULSE CODE MODULATION

voice Sampler Quantizer Encoder 011010

μ -law Uniform Q
Uniform PCM: x(t) ∈ [−𝑋𝑚𝑎𝑥 , 𝑋 𝑚𝑎𝑥 ]
• N = 2V quantization levels, each level encoded using v bits
• Uses a simplified uniform quantizer with no compander.
• SQNR: same as uniform quantizer
➪ 𝑋 2 × 3 × 4𝑣
𝑆𝑄𝑁𝑅 = , since Δ =
2𝑣−1
2 𝑋 𝑀𝐴𝑋
• Notice that increasing the number of bits by 1 increases
SQNR by a factor of 4 (6 dB)
SPEECH CODING

PCM with compander and μ = 255 (Non-uniform PCM)

Uniform quantizer with 128 levels, N = 27 , 7 bits per sample Speech

typically limited to 4kHz


• Sample at 8kHz ⇒ Ts = 1/8000 = 125 μs
8000 samples per second at 7 bits per sample => 56 kbps

Differential PCM:
• Speech samples are typically correlated
• Instead of coding samples independently, code the difference between
samples
• Result: improved performance, lower bit rate speech

You might also like