8/12/2019 DC Chapter2a
1/35
Digital Communications
Instructor: Hammad A. Khan
8/12/2019 DC Chapter2a
2/35
Chapter 2: Formatting and
Baseband Modulation2.1 Baseband Systems
2.2 Formatting Textual Data (Character Coding)2.3 Messages, Characters and Symbols
2.4 Formatting of Analog Information
2.6 Pulse Code Modulation IPCM)
2.5 Sources of Corruption
2.7 Uniform and Nonuniform Quantization
2.8 Baseband Modulation
2.9 Correlative Coding: Not covered
8/12/2019 DC Chapter2a
3/35
2.1 Baseband Systems
8/12/2019 DC Chapter2a
4/35
Formatting
8/12/2019 DC Chapter2a
5/35
Character Coding (Textual Information)
A textual information is a sequence of alphanumeric characters
Alphanumeric and symbolic information are encoded into digital bitsusing one of several standard formats, e.g, ASCII, EBCDIC
2.2 Formatting Textual DataCharacter Coding)
8/12/2019 DC Chapter2a
6/35
Example: Message: USA
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 (see ASCII Table, Fig. 2.3)
2.3 Messages, Characters andSymbols
8/12/2019 DC Chapter2a
7/35
2.4 Formatting Analog Information Structure of Digital Communication Transmitter
Analog to Digital Conversion
8/12/2019 DC Chapter2a
8/35
Analog-to-digital conversion is (basically) a 2 step process: Sampling
Convert from continuous-time analog signalxa(t) to discrete-
time continuous value signalx(n)
Is obtained by taking the samples ofxa(t) at discrete-time
intervals, Ts
Quantization Convert from discrete-time continuous valued signal to discrete
time discrete valued signal
8/12/2019 DC Chapter2a
9/35
Sampling Sampling is the processes of converting continuous-time analog
signal,xa(t), into a discrete-time signal by taking the samples atdiscrete-time intervals
Sampling analog signals makes them discrete in time but still
continuous valued If done properly (Nyquist theorem is satisfied), sampling does not
introduce distortion
Sampled values:
The value of the function at the sampling points Sampling interval:
The time that separates sampling points (interval b/w samples), Ts If the signal is slowly varying, then fewer samples per second will
be required than if the waveform is rapidly varying
So, the optimum sampling rate depends on the maximumfrequency component present in the signal
8/12/2019 DC Chapter2a
10/35
Sampling Sampling Rate (or sampling frequency fs):
The rate at which the signal is sampled, expressed as thenumber of samples per second (reciprocal of the sampling
interval), 1/Ts = fs
Nyquist Sampling Theorem (or Nyquist Criterion):
If the sampling is performed at a proper rate, no info is lost about
the original signal and it can be properly reconstructed later on Statement:
If a signal is sampled at a rate at least, but not exactly equal totwice the max frequency component of the waveform, then the
waveform can be exactly reconstructed from the sampleswithout any distortion
max2sf f
8/12/2019 DC Chapter2a
11/35
Sampling If fs < 2B, aliasing(overlapping of the spectra) results
If signal is not strictly bandlimited, then it must be passed through
Low Pass Filter(LPF) before sampling
Fundamental Rule of Sampling (Nyquist Criterion) The value of the sampling frequency fs must be greater than twice
the highest signal frequency fmax of the signal
Types of sampling
Ideal Sampling
Natural Sampling
Flat-Top Sampling
8/12/2019 DC Chapter2a
12/35
Ideal Sampling ( or Impulse Sampling) Is accomplished by the multiplication of the signalx(t) by the uniform
train of impulses (comb function)
Consider the instantaneous sampling of the analog signalx(t)
Train of impulse functions select sample values at regular intervals
( ) ( ) ( )
( ) ( ) (2.5)
s s
n
s s
n
x t x t t nT
x nT t nT
=
=
=
=
8/12/2019 DC Chapter2a
13/35
Ideal Sampling ( or Impulse Sampling) Take Fourier Transform (frequency convolution)
1( ) ( )* ( )s s
ns
X f X f t nTT
=
=
1
( ) ( )* ( ), 2
s
s s snsX f X f f nf fT
=
= =
1 1
( ) ( ) ( )s sn ns s s
nX f X f nf X f
T T T
= =
= =
This results in:
8/12/2019 DC Chapter2a
14/35
Ideal Sampling ( or Impulse Sampling)This shows that the Fourier Transform of the sampled signal is theFourier Transform of the original signal at rate of 1/Ts
8/12/2019 DC Chapter2a
15/35
Ideal Sampling ( or Impulse Sampling)This means that the output is simply the replication of the originalsignal at discrete intervals, e.g
8/12/2019 DC Chapter2a
16/35
Ideal Sampling ( or Impulse Sampling) As long as fs> 2fm,no overlap of repeated replicasX(f - n/Ts) will
occur inXs(f)
Minimum Sampling Condition:
Sampling Theorem: A finite energy functionx(t) can be completelyreconstructed from its sampled valuex(nTs) with
provided that =>
2s m m s mf f f f f > >
2 ( )
sin 2( ) ( )
( )
s
s
s s
n s
f t nT
Tx t T x nT
t nT
=
=
( ) sin (2 ( ))s s s sn
T x nT c f t nT
=
= 1 12
s
s m
Tf f
=
8/12/2019 DC Chapter2a
17/35
Ts is called the Nyquist interval: It is the longest time interval that can
be used for sampling a bandlimited signal and still allow
reconstruction of the signal at the receiver without distortion
8/12/2019 DC Chapter2a
18/35
Practical Sampling In practice we cannot perform ideal sampling
It is not practically possible to create a train of impulses Thus a non-ideal approach to sampling must be used
We can approximate a train of impulses using a train of very thin rectangular
pulses:
Note:
Fourier Transform of impulse train is another impulse train
Convolution with an impulse train is a shifting operation
( ) spn
t nTx t
=
=
8/12/2019 DC Chapter2a
19/35
Natural SamplingIf we multiplyx(t) by a train
of rectangular pulsesxp(t),
we obtain a gated waveform
that approximates the ideal
sampled waveform, known
as natural sampling or
gating (see Figure 2.8)
( ) ( ) ( )s px t x t x t=
2( ) s
j nf t
n
n
x t c e
=
= ( ) [ ( ) ( )]s pX f x t x t=
2[ ( ) ]s
n f t
n
n
c x t e
=
=
[ ]n sn
c X f n f
=
=
8/12/2019 DC Chapter2a
20/35
Each pulse inxp(t) has width Ts and amplitude 1/Ts The top of each pulse follows the variation of the signal being
sampled
Xs (f) is the replication ofX(f) periodically every fs Hz
Xs (f) is weighted by Cn Fourier Series Coeffiecient
The problem with a natural sampled waveform is that the tops of the
sample pulses are not flat
It is not compatible with a digital system since the amplitude of eachsample has infinite number of possible values
Another technique known as flat top sampling is used to alleviate
this problem
8/12/2019 DC Chapter2a
21/35
Flat-Top Sampling Here, the pulse is held to a constant height for the whole
sample period
Flat top sampling is obtained by the convolution of the signalobtained after ideal sampling with a unity amplituderectangular pulse,p(t)
This technique is used to realize Sample-and-Hold (S/H)
operation In S/H, input signal is continuously sampled and then the
value is held for as long as it takes to for the A/D to acquire
its value
8/12/2019 DC Chapter2a
22/35
Flat top sampling (Time Domain)
'( ) ( ) ( )x t x t t=
( ) '( )* ( )sx t x t p t=
( )* ( ) ( ) ( )* ( ) ( )sn
t x t t p t x t t nT
=
= =
8/12/2019 DC Chapter2a
23/35
Taking the Fourier Transform will result to
where P(f) is a sincfunction
( ) [ ( )]s sX f x t=
( ) ( ) ( )sn
P f x t t nT
=
= 1
( ) ( ) * ( )snsP f X f f nfT
=
= 1
( ) ( )sns
P f X f nf
T
=
=
8/12/2019 DC Chapter2a
24/35
Flat top sampling (Frequency Domain)
Flat top sampling becomes identical to ideal sampling as thewidth of the pulses become shorter
8/12/2019 DC Chapter2a
25/35
Recovering the Analog Signal One way of recovering the original signal from sampled signalXs(f)is to pass it through a Low Pass Filter (LPF) as shown below
If fs > 2B then we recoverx(t) exactly
Else we run into some problems and signalis not fully recovered
8/12/2019 DC Chapter2a
26/35
Undersampling and Aliasing
If the waveform is undersampled(i.e. fs < 2B) then there will bespectral overlap in the sampled signal
The signal at the output of the filter will be
different from the original signal spectrum
This is the outcome of aliasing!
This implies that whenever the sampling condition is not met, anirreversible overlap of the spectral replicas is produced
8/12/2019 DC Chapter2a
27/35
This could be due to:
1. x(t) containing higher frequency than were expected2. An error in calculating the sampling rate
8/12/2019 DC Chapter2a
28/35
Plot of Aliased Cosine (with 90 degrees phase
shift) and Its Reconstruction
8/12/2019 DC Chapter2a
29/35
close all
clear all
fs=8000;f0=1;
fst=4;
t=0:1/fs:2-1/fs;
x=sin(2*pi*f0*t);x2=sin(2*pi*(f0+fst)*t);
N=length(x);
plot(t,x);
hold onplot(t,x2,'g');
xs=x(1:fs/fst:N);
tn=t(1:fs/fst:N);
stem(tn,xs,'r');pause
xsn=x2(1:fs/fst:N);
stem(tn,xsn,'c');
8/12/2019 DC Chapter2a
30/35
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
8/12/2019 DC Chapter2a
31/35
Solution 1: Anti-Aliasing Analog Filter
All physically realizable signals are not completely bandlimited
If there is a significant amount of energy in frequencies above
half the sampling frequency (fs/2), aliasing will occur
Aliasing can be prevented by first passing the analog signalthrough an anti-aliasing filter (also called a prefilter) before
sampling is performed
The anti-aliasing filter is simply a LPF with cutoff frequency
equal to half the sample rate
8/12/2019 DC Chapter2a
32/35
Aliasing is prevented by forcing the bandwidth of the sampled
signal to satisfy the requirement of the Sampling Theorem
8/12/2019 DC Chapter2a
33/35
Solution 2: Over Sampling and Filtering in the Digital
Domain
The signal is passed through a low performance (less costly)
analog low-pass filter to limit the bandwidth.
Sample the resulting signal at a high sampling frequency. The digital samples are then processed by a high
performance digital filter and down sample the resulting
signal.
8/12/2019 DC Chapter2a
34/35
Summary Of Sampling
Ideal Sampling(or Impulse Sampling)
Natural Sampling
(or Gating)
Flat-Top Sampling
For all sampling techniques
If fs > 2B then we can recover x(t) exactly
If fs < 2B) spectral overlappingknown as aliasing will occur
( ) ( ) ( ) ( ) ( )
( ) ( )
s sn
s s
n
x t x t x t x t t nT
x nT t nT
=
=
= =
=
2( ) ( ) ( ) ( ) s
j nf t
s p n
n
x t x t x t x t c e
=
= =
( ) '( )* ( ) ( ) ( ) * ( )s sn
x t x t p t x t t nT p t
=
= =
8/12/2019 DC Chapter2a
35/35
Example : Consider the analog signalx(t) given by
What is the Nyquist rate for this signal?
Example 2: Consider the analog signalxa(t) given by
What is the Nyquist rate for this signal?
What is the discrete time signal obtained after sampling, if
fs=5000 samples/s. What is the analog signalx(t) that can be reconstructed from the
sampled values?
( ) 3cos(50 ) 100sin(300 ) cos(100 )x t t t t = +
( ) 3cos 2000 5sin 6000 cos12000ax t t t t = + +
Top Related