Digital Communication (Formating)
Digital Communication (Formating)
Systems
Lecture-2
Formatting
Example 1:
In ASCII alphabets, numbers, and symbols are encoded using a 7bit code
Formatting
Sampling
Quantization
Convert from discrete-time continuous valued signal to discrete
time discrete valued signal
Sampling
f s 2 f max
9
Therefore, we have:
1
xs (t ) x(t )
Ts
e jn st
Xs ( f ) X ( f )*
Ts
jn s t
1
X ( f ) * e jn s t
Ts
n
s
1
X s ( f ) X ( f ) * ( f nf s ), f s
Ts
2
n
1
Xs( f )
Ts
1
X ( f nf s )
Ts
n
n
X(f )
Ts
n
10
Sampling
11
xs (t ) x(t ) (t nTs )
n
1
(t nTs )
Ts
n
jns t
2
s
Ts
12
13
fs fm fm fs 2 fm
2 f (t nTs )
sin
2
T
x(t ) Ts x(nTs )
(t nTs )
n
1
1
Ts
fs
2 fm
14
15
Ts is called the Nyquist interval: It is the longest time interval that can
16
Practical Sampling
In practice we cannot perform ideal sampling
t nTs
x p (t )
Note:
Natural Sampling
If we multiply x(t) by a train
of rectangular pulses xp(t),
we obtain a gated waveform
that approximates the ideal
sampled waveform, known
as natural sampling or
gating (see Figure 2.8)
xs (t ) x(t ) x p (t )
x(t )
cn e j 2 nf s t
X s ( f ) [ x(t ) x p (t )]
cn [ x (t )e j 2 nf s t ]
X [ f nf s ]
18
The top of each pulse follows the variation of the signal being
sampled
Xs (f) is the replication of X(f) periodically every fs Hz
19
Flat-Top Sampling
20
x '(t ) x(t ) (t )
xs (t ) x '(t ) * p(t )
21
X s ( f ) [ xs (t )]
P ( f ) x(t ) (t nTs )
n
1
P( f ) X ( f ) *
Ts
1
P( f )
Ts
( f nf s )
X ( f nf )
22
23
One way of recovering the original signal from sampled signal Xs(f) is
to pass it through a Low Pass Filter (LPF) as shown below
The
This
26
27
28
29
Summary Of Sampling
xs (t )
Ideal Sampling
(or Impulse Sampling)
Natural Sampling
(or Gating)
x(nT ) (t nT )
xs (t ) x(t ) x p (t ) x(t ) cn e
j 2 nf s t
Flat-Top Sampling
30
Example 1:
Example 2:
31
Speech
- Telephone quality speech has a bandwidth of 4 kHz
(actually 300 to 3300Hz)
- Most digital telephone systems are sampled at 8000
samples/sec
Audio:
- The highest frequency the human ear can hear is
approximately 15kHz
- CD quality audio are sampled at rate of 44,000
samples/sec
Video
- The human eye requires samples at a rate of at
least 20 frames/sec to achieve smooth motion
32
33
35
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
36
For a speech input, this quantization error resembles a noiselike disturbance at the output of a DAC converter
38
Uniform Quantization
q/2
1
1
2
2 e p(e)de e
de
e
de
q
q q / 2
q / 2
q / 2
q/2
q/2
2
q
1
e
q
3 q / 2 12
3
q/2
40
2
4
1
V p2
L2 q 2 / 4
SNRq 2
3L2
q /12
41
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
L
S
2n ) 6n dB
10log
(2
10
N dB
42
Nonuniform Quantization
43
Or use fine quantization (small step size) for weak signals and
coarse quantization (large step size) for strong signals
44
46
Companding is a technique
used to reduce the number of
bits required in ADC or DAC
while achieving comparable
SQNR
47
48
49
Types of Companding
-Law Companding Standard (North & South America,
and Japan)
y ymax
log e 1 (| x | / xmax
log e (1 )
sgn( x)
where
x and y represent the input and output voltages
is a constant number determined by experiment
In the U.S., telephone lines uses companding with = 255
ymax
y ( x)
| x|
A
xmax
sgn( x),
(1 A)
ymax
| x |
1 log e A
x
max
sgn( x),
(1 log e A)
| x| 1
0
xmax A
1 | x|
1
A xmax
where
x and y represent the input and output voltages
A = 87.6
A is a constant number determined by experiment
51
Pulse Modulation
Two Types:
Encodes the sample values into the time axis of the digital signal
Pulse Width Modulation (PWM)
Constant amplitude, width varied in proportion to the signal
Pulse Duration Modulation (PDM)
sample values of the analog waveform are used in determining the
width of the pulse signal
52
53
55
56
57
Line Coder
s (t )
f (t nTb )
where f(t) is the pulse shape and Tb is the bit period (Tb=Ts/n for n
bit quantizer)
Details of this operation are set by the type of line code that is
being used
58
No DC component
59
When the category and the generalized shapes are combined, we have
the following:
Polar NRZ:
Wireless, radio, and satellite applications primarily use Polar
NRZ because bandwidth is precious
Unipolar NRZ
Turn the pulse ON for a 1, leave the pulse OFF for a 0
Useful for noncoherent communication where receiver cant
decide the sign of a pulse
fiber optic communication often use this signaling format
Unipolar RZ
RZ signaling has both a rising and falling edge of the pulse
This can be useful for timing and synchronization purposes
60
Bipolar RZ
A unipolar line code, except now we alternate
between positive and negative pulses to send a 1
Alternating like this eliminates the DC component
This is desirable for many channels that cannot
transmit the DC components
Generalized Grouping
Non-Return-to-Zero: NRZ-L, NRZ-M NRZ-S
Return-to-Zero: Unipolar, Bipolar, AMI
Phase-Coded: bi-f-L, bi-f-M, bi-f-S, Miller, Delay
Modulation
Multilevel Binary: dicode, doubinary
Note:There are many other variations of line codes (see Fig. 2.22,
page 80 for more)
61
A, when X n 1
an
A, when X n 0
Polar NRZ uses NRZ pulse shape
Polar RZ uses RZ pulse shape
62
A,
an
0,
when X n 1
when X n 0
f (t )
Tb
63
It
A,
an A,
0,
64
f (t )
Tb
T
b
t
t
4
4
T
Tb
b
2
2
65
66
67
Self-synchronization
Manchester codes have built in timing information because they
always have a zero crossing in the center of the pulse
Polar RZ codes tend to be good because the signal level always
goes to zero for the second half of the pulse
NRZ signals are not good for self-synchronization
Error probability
Polar codes perform better (are more energy efficient) than
Unipolar or Bipolar codes
Channel characteristics
We need to find the power spectral density (PSD) of the line
codes to compare the line codes in terms of the channel
characteristics
68
69
Unipolar NRZ, polar NRZ, and bipolar all have 1st null bandwidths of
Rb = 1/Tb
Unipolar RZ has 1st null BW of 2Rb
Manchester NRZ also has 1st null BW of 2Rb, although the
spectrum becomes very low at 1.6Rb
70
Section 2.8.4: Bits per PCM Word and Bits per Symbol
L=2l
M = 2k
72
| e | pV pp
V pp Lq
1
l log 2
2
p
fs 8000
q
| e |max
2
V pp
q
L
1
2 L
2p
l
l log 2 (50) 6
Rs 48000
M 16
R
48000
R2