0% found this document useful (0 votes)
8 views59 pages

Lecture 4a Baseband and Data Formating

Uploaded by

notmausam
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)
8 views59 pages

Lecture 4a Baseband and Data Formating

Uploaded by

notmausam
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/ 59

Lecture 4a

Baseband and Data Formatting


Outline
Formatting Textual Data
Formatting analog
information Pulse Code
Modulation Differential pulse
code modulation Delta
modulation
Linear and non linear quantisation,
dynamic range and quantisation
noise
3
Layering of Source Coding

4
Formatting

The first important step :

Transforming the information source to a


form compatible with a digital system

5
Formatting of Textual Data (Character Codes)

 A textual information is a sequence of alphanumeric


characters
 Alphanumeric and symbolic information are encoded into
digital bits using one of several standard formats, e.g,
ASCII, EBCDIC

6
Character Coding (Textual Information)
Example 1:
 In ASCII alphabets, numbers, and symbols are encoded using a 7-bit
code

 A total of 27 = 128 different characters can be represented using


a 7-bit unique ASCII code

7
M – ary systems

•System using symbol set size of


M

M = 2k

k bits
Symbol set size
•Example
•2 bits = 4 symbols
•M = 22 = 4
16_ary =
M = 16
K = 4
8
Example
•For word USA, develop
coding;
•7-bit ASCII
•16_ary digits

Solution

9
Formatting of Analog Data
To transform an analog waveform into a
form that is compatible with a digital
communication, the following steps are
taken:
1.Sampling
2.Quantization and Encoding
3.Base-band transmission (PCM)

10
From Analog Signal to PCM Digital Code

Figure shows the entire process in graphical


11
form
Sampling
 The function of a
sampling circuit in a
transmitter is to
periodically sample the
continually changing
analog input signal and
convert those samples
to a series of pulses
that are easily
converted to binary
code. 12
Type of Sampling
Ideal
Natur
al
Sampl
e and
Hold
(Flat-
top)

13
Ideal Sampling

 In Ideal Sampling, pulses from the analog


signal are sampled. This is an ideal
sampling method and cannot be easily
implemented.

14
Natural Sampling

 In Natural Sampling, a high-speed switch is


turned on for only a small period of time
when the sampling occurs. The result is a
sequence of samples that retains the
shape of the analog signal.

15
Flat-top Sampling

 In Flat-top Sampling, the most common


sampling method, called sample and
hold, however, creates flat-top
samples.

16
Sampling Rate and Bit Rate
 Definition:
Sampling rate or sampling frequency is
defined as the rate at which a signal is
sampled.

According to the Nyquist theorem, the sampling rate


must be at least 2 times the highest frequency
contained in the signal.
Bit rate = Sampling rate X number of bits per sample

17
According to the Nyquist
theorem, the sampling
rate must be at least 2
times the highest
frequency.

18
Example

Determine the sampling rate needed for a signal with a


bandwidth of 10 kHz (1 kHz to 11 kHz).
Solution
Sampling rate = 2 X (11000) = 22000 samples/s

19
Example

We want to digitize the human voice. What is the bit


rate, assuming 8 bits per sample ?
Solution
The human voice normally contains frequencies from
0 to 4000Hz. So the sampling rate is:

Sampling rate = 4000 × 2 = 8000 samples/s


the sampling rate must be at least 2
times the highest frequency.
The bit rate can be calculated as:

Bit rate = sampling rate × number of bits per samples


= 8000 x 8 = 64 kbps

20
Pulse Amplitude Modulation (PAM)
 Analog to digital conversion method is
called PAM.
 Output of Sampling (natural/S&H) is known as
PAM
 Pulse-Amplitude Modulation (PAM)
▫ The amplitude of regularly spaced pulses are varied in
proportion to the corresponding sample values of a
continuous message signal
 This technique takes an analog signal,
samples it and generates a series of pulse
based on the results of the sampling.
 The method of sampling used in PAM

21
Pulse Amplitude Modulation

22
Pulse Amplitude Modulation
is part of a process of a
popular conversion method
used in digital
communications, i.e.
Pulse Code Modulation

23
Other forms of Pulse Modulations
PDM (Pulse-duration modulation)
Pulse-width or Pulse-length modulation.
The samples of the message signal are used to vary
the duration of the individual pulses.
PDM is wasteful of power

PPM (Pulse-position modulation)


The position of a pulse relative to its un-modulated
time of occurrence is varied in accordance with
the message signal.

24
Other forms of Pulse Modulations

25
Quantization

• Quantization is a method
of assigning integral
values in a specific
range to sampled
instances.
• Amplitude quantizing:
Mapping samples of a
continuous amplitude
waveform to a finite
set of amplitudes.

26
Quantization
Out

In Average quantization noise


power
Quantized

Signal peak power


values

Signal power to average


quantization noise
power

27
PCM
codeword
Quantization example
a
m x(t)
111 3.1867
pl
110it 2.2762 Quant. levels
u
101 1.3657
d
100e 0.4552

011 -0.4552 boundaries

010 -1.3657

001 -2.2762 x(nTs): sampled values


xq(nTs): quantized values
000 -3.1867
Ts: sampling time
t
110 110 111 110 100 010 011 100 100 PCM sequence
011 28
29
Quantized PAM Signal

30
Quantizing by using Sign and Magnitude

Sign bit: 0 means +ve


1 means -ve

• Figure above shows a simple method of


assigning sign
and magnitude to quantized samples.
• Each value is translated into its 7-bit binary
equivalent.
• The MSB indicates the sign. MSB=Most significant bit 31
Transform to Digital Signal

The binary digits are then transformed to a digital


signal by one of the line coding techniques.

32
Note that we can always
change a band-pass signal
to a low-pass signal
before sampling. In this
case, the sampling rate is
twice the bandwidth.

33
Dynamic Range
 The number of PCM bits transmitted per
sample is determined by several
variables, which include maximum
allowable input amplitude, resolution,
and dynamic range.

 Dynamic range (DR) is the ratio of the


largest possible magnitude to the
smallest possible magnitude that can
be decoded by the ADC (analog-digital
converter).

34
Dynamic Range
V
DR 

 Where Vmin is equal to the resolution and


Vmax is the maximum voltage magnitude
that can be decoded by the ADC. Thus:
DR Vmax
 resolutio
n
In dB,
Vmax 3
DR  20 log  20 log1 
Vmin
9.54dB 35
Dynamic Range
 The number of bits used for a PCM code
depends on
the dynamic range.

 With a two bit PCM code, the minimum


decodable
magnitude has a binary code of 01.

 The maximum magnitude is 11.

 The ratio of the maximum binary code to the


minimum binary code is 3, the same as the
dynamic range. Because the minimum binary
code is always 1, DR is simply the maximum 36
binary number of the system.
Dynamic Range

 Thus, to determine the number of bits


required for a PCM code:
2n – 1 ≥ DR
And for a minimum value of n,
2n – 1 = DR

Wher n = number of PCM bits excluding the


e sign bit DR = absolute value of dynamic
range

37
Quantization Noise
 When reconstructing a quantized signal, there will
be a
difference between this signal and the original.
 This is known as the quantization error.
 This is equivalent to adding an additional signal to
the
input.
 Thus the process of quantization introduces noise
into the system.
 This is known as quantization noise.
 An important quantity when dealing with noise is
the value of the signal power divided by the noise
power.

38
Quantization Noise
 This is named as signal-to-noise ratio (SNR) and
is usually expressed in dB. For a PCM system
quantiser it is known as signal-to-quantization
noise ratio (SQNR), and is given by:

signal power
SQNR  10 10
log quantisation noise
power S
10
 10 Nq
log
39
Quantization Noise

 For an n-bit quantization:


signal-to-quantization noise ratio
SQNR  (6.02n 1.76) dB

Where the signal is assumed to be a sinusoid of maximum non-


overload amplitude and at a frequency approaching the
Nyquist frequency

40
Nonlinear Encoding

 Quantization levels not evenly


spaced
 Reduces overall signal distortion

41
Effect of Non-Linear Encoding

42
Summary

signal power S
SQNR  10  10 SQNR  (6.02n 1.76)
log
10
quantization noise power log 10
Nq dB

43
Example

A telephone subscriber line must have an above


SNRdB What is the minimum number of bits per 40.
sample?
Solution
We can calculate the number of bits as
SNR  6.02n 1.76 
40 dB
 n  6.35
n  7

Telephone companies usually assign


7 or 8 bits per sample. 44
Pulse Code Modulation (PCM)

 PCM modifies the pulse created by


PAM to create a pure digital signal.
 To do so, PCM first quantizes the PAM
pulse.
Pulse Code Modulation refers to a digital
baseband signal that is generated
directly from the quantizer and encoder
output
Sometimes the term PCM is
used interchangeably with 45
PCM
 PCM is actually made up of several
processes:
a. PAM
b. Quantization
c. Binary encoding
d. Line coding

46
Encoding

 After each sample is quantized and the


number of bits per sample is decided,
each sample can then be changed to bit
code word.

47
Encoding Techniques

 Digital data, digital


signal
 Analog data, digital
signal
 Digital data, analog
signal
 Analog data, analog
signal

48
Analog Data, Digital Signal
 Digitization
- Conversion of analog data into digital data
- Digital data can then be transmitted using
code such as Non-Return-Zero-Level (NRZ-L)
- Received digital data can then be converted to
analog signal
- Analog to digital conversion done using a
codec
- Pulse code modulation
- Delta modulation

49
Pulse Code Modulation(PCM) (1)
 If a signal is sampled at regular
rate
intervals at
than
a twice the
higher
highest signal frequency, the
samples contain
information of the originalall the
signal.
 Voice data limited to below 4000Hz
 Require 8000 sample per second
 Analog samples (Pulse Amplitude
Modulation, PAM)
 Each sample assigned digital value

50
Pulse Code Modulation(PCM) (2)
 4 bit system gives 16 levels
 Quantized
- Quantizing error or noise
- Approximations mean it is impossible
to fully recover the original sample

 8 bit sample gives 256 levels,.. 28


 Quality comparable with analog
transmission
 8000 samples per second of 8 bits each
gives 64 kbps
51
PCM Example

5
Example:

For a PCM system with the following


parameters:
• Maximum analog input frequency = 3 kHz
• Maximum decoded voltage at the receiver =
± 2.55V
• Minimum dynamic range = 40dB

Determine the followings:


i. Minimum sample rate
ii. Minimum number of bits used in the PCM
code
iii. Total number of PCM codes
iv. Actual dynamic range
v. Resolution
vi. Quantization error 5
5
Solution
i. Minimum sample f s  2 f a  2 3kHz 
rate is 6kHz
ii. Absolute value for dynamic Minimum number of
range: bits:
20 logVmax 

 Vmin  n  log 2 DR 1
40dB  log 2 100 1
20 log DR  
40dB  6.658
DR  100
iii The closet whole number greater than 6.658 is 7, hence 7 bits
. must
be used for the magnitude. Since the inputis ±2.55V , one
additional
iv. sign bitdynamic
Actual is required. Thus, the total number of PCM codes is
range:DR  20 log 2 n
dB  28 = 256

1   20 log 128
1 5
6
 Resolution
v. Resolution  Vnmax  vi. Quantization error 
 2 1  2

  2.55  0.02
 
 128 1
 
 
0.02V

vii. Coding efficiency 


min. no. of bits (incl. sign 100
actual no. of bits (incl. sign %
bit) bit)
7.65
 8
100%

95.63%

55
Delta Modulation
 Analog input is approximated by a
staircase function
 Binary behavior
- Function moves up or down at each
sample interval:
output = ‘1’ for +ve slope and output =‘0’
for –ve slope

56
Delta Modulation

57
Delta Modulation - Operation

58
Delta Modulation - Performance
 Good voice reproduction
- PCM - 128 levels (7 bit)
- Voice bandwidth 4khz
- Should be 8000 x 7 = 56 kbps for
PCM

 Improved Data compression


- e.g. Interframe coding techniques for
video

59

You might also like