Practical Sampling
TLC 503
pulses:
Digital Communications x p (t )
t nTs
n
Dr Imran Shafi
ai_case@yahoo.com
Note:
Fourier Transform of impulse train is another impulse train
Convolution with an impulse train is a shifting operation
Natural Sampling
If we multiply x(t) by a train Each pulse in xp(t) has width Ts and amplitude 1/Ts
of rectangular pulses xp(t),
The top of each pulse follows the variation of the signal being
we obtain a gated waveform
sampled
that approximates the ideal
sampled waveform, known Xs (f) is the replication of X(f) periodically every fs Hz
as natural sampling or Xs (f) is weighted by Cn Fourier Series Coeffiecient
gating (see Figure 2.8) The problem with a natural sampled waveform is that the tops of the
x s (t ) x (t ) x p (t ) sample pulses are not flat
It is not compatible with a digital system since the amplitude of each
x (t )
n
c n e j 2 nf s t sample has infinite number of possible values
Another technique known as flat top sampling is used to alleviate
X s ( f ) [ x ( t ) x p ( t )] this problem
n
c n [ x ( t ) e j 2 nf s t ]
n
cn X [ f n f s ]
1
4/1/2011
Flat-Top Sampling
X s ( f ) [ x s ( t )]
P ( f ) x ( t ) ( t nTs )
n
1
P( f ) X ( f ) * (f nff s ) Flat top sampling (Frequency Domain)
T s n
Flat top sampling becomes identical to ideal sampling as the
1
P( f )
Ts
n
X ( f nf s ) width of the pulses become shorter
2
4/1/2011
3
4/1/2011
close all
clear all
fs=8000; 1
f0=1;% 1Hz
fst=4;% 4Hz 0.8
t=0:1/fs:2-1/fs; 0.6
x=sin(2*pi*f0*t); % 1 Hz sine wave
0.4
x2=sin(2*pi*(f0+fst)*t); % 5 Hz sine wave
N=length(x); % total length of signal x(1st signal) 0.2
plot(t,x);
0
hold on
plot(t,x2,'g'); -0.2
xs=x(1:fs/fst:N); % samples of 1st signal at interval of
fs/fst=2000 -0.4
tn=t(1:fs/fst:N); -0.6
stem(tn,xs,'r');
pause -0.8
xsn=x2(1:fs/fst:N); -1
stem(tn,xsn,'c'); 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
4
4/1/2011
Summary Of Sampling
Solution 2: Over Sampling and Filtering in the Digital
Ideal Sampling x s (t ) x (t ) x (t ) x (t ) (t nTs )
Domain n
(or Impulse Sampling)
The signal is passed through a low performance (less costly)
analog low-pass filter to limit the bandwidth.
n
x ( nTs ) (t nTs )
Sample the resulting signal at a high sampling frequency.
Natural Sampling
The digital samples are then processed by a high
performance digital filter and down sample the resulting
(or Gating)
x s (t ) x (t ) x p (t ) x (t ) cn e j 2 nf s t
signal.
signal n
Flat-Top Sampling
xs (t ) x '(t ) * p (t ) x(t ) (t nTs ) * p (t )
n
For all sampling techniques
If fs > 2B then we can recover x(t) exactly
5
4/1/2011
Advantages of PCM:
Relatively inexpensive
Disadvantage:
Requires wider bandwidth than analog signals
6
4/1/2011
q/2 2
1q e q
3
7
4/1/2011
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
The peak power of the analog signal (normalized to 1Ohms )can be
V
expressed as: q pp
V 2
V p2 L2 q 2 L
P pp
1 2 4 where L = 2n is the number of quantization levels for the converter.
(n is the number of bits).
Nonuniform Quantization
Nonuniform quantizers have unequally spaced levels
The spacing can be chosen to optimize the Signal-to-Noise Ratio
Many signals such as speech have a nonuniform distribution
for a particular type of signal
It is characterized by: See Figure on next page (Fig. 2.17)
Variable step size Basic principle is to use more levels at regions with large probability
Quantizer size depend on signal size
density function (pdf)
Concentrate quantization levels in areas of largest pdf
O use fine
Or fi quantization
ti ti (small
( ll step
t size)
i ) for
f weakk signals
i l and
d
coarse quantization (large step size) for strong signals
8
4/1/2011
The signal below shows the effect of compression, where the Basically, companding introduces a nonlinearity into the signal
amplitude of one of the signals is compressed
This maps a nonuniform distribution into something that more
After compression, input to the quantizer will have a more uniform closely resembles a uniform distribution
distribution after sampling
A standard ADC with uniform spacing between levels can be used
after the compandor (or compander)
At the receiver, the signal is The companding operation is inverted at the receiver
expanded by an inverse
operation
There are in fact two standard logarithm based companding
The process of COMpressing techniques
and exPANDING the signal is
US standard called µ-law companding
called companding
European standard called A-law companding
Companding is a technique
used to reduce the number of bits
required in ADC or DAC while
achieving comparable SQNR
9
4/1/2011
log e 1 (| x | / xmax
y ymax sgn( x )
log e (1 )
where
x and y represent the input and output voltages
A = 87.6
10
4/1/2011
11
4/1/2011
PSD of code should be negligible at the frequency near zero
Transmission Bandwidth
s (t ) a
n
n f (t nTb )
Should be as small as possible
Transparency where f(t) is the pulse shape and Tb is the bit period (Tb=Ts/n for n
bit quantizer)
The property that any arbitrary symbol or bit pattern can be
transmitted and received, i.e., all possible data sequence should This means that each line code is described by a symbol mapping
be faithfully reproducible function an and pulse shape f(t)
Details of this operation are set by the type of line code that is
being used
12
4/1/2011
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
13
4/1/2011
14