0% found this document useful (0 votes)
16 views75 pages

Analog To Digital Convertion

Uploaded by

Lohith Reddy A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views75 pages

Analog To Digital Convertion

Uploaded by

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

5/5/2021

Sampling and Reconstruction


Sampling Theorem : If a finite energy signal x(t) contain
no frequencies higher than W Hz, then x(t) may be
completely recovered from its samples spaced 1/2W
seconds apart.
Proof : x(t) is finite energy and infinite duration analog
signal which is continuous both in time and amplitude.
x(t) is sampled at every Ts seconds to get xδ (t).Then


x (t ) = x(t )   (t − nTs ) -------------------- (1)
n = −
where 𝛿(𝑡 − 𝑛𝑇𝑠) is Dirac delta
function.
5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 2
By using shifting property of the impulse
x(t) δ(t-to) = x(to) δ(t-to)
We can write expression (1) as

x (t ) =  x(nT )  (t − nT )
n = −
s s
--------- (2)

Which is the time domain equation for sampled signal


Applying Fourier transform on both the sides of equation (1)

X  ( f ) = X ( f )  F {   (t − nTs )} ---------- (3)
n = −
Where
 
1 n
F {   (t − nTs )} =  ( f − ) ----------(4)
n = − Ts n = − Ts

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 3



1 n
X ( f ) = X ( f )
Ts

n = −
( f −
Ts
) -----------(5)

or 1 
n
X ( f ) =
Ts

n = −
X(f − )
Ts -------------(6)

X ( f ) = fs  X( f −n f
n = −
s )
--------------(7)

Which gives the spectrum of the sampled signal.

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 4


5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 5
 This shows that X  ( f ) which is the Fourier transform of
the impulse sampled signal is periodic repetition of the
Fourier transform of the original signal with period 1/Ts
or fs

 If fs =2W, the adjoint spectral replicates just touch each


other, and by using an ideal low pass filter having
bandwidth B=W, it is possible to recover the message
signal x(t).

 If fs >2W, known as oversampling, spectral replicates


have larger separation between them known as guard
bands. Filtering processing is easier and effective.
5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 6
 When fs < 2W, known as under sampling. The spectral
replicates overlap each other and the filtered signal will
be distorted. This distortion is called aliasing. Aliasing
can be avoided if fs ≥ 2W

 The minimum sampling frequency fs =2W is called


Nyquist rate or Nyquist frequency.

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 7


5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 8
5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 9
Aliasing
Overlapping of spectral replicates in the spectrum
of the sampled signal, due to under sampling is
known as aliasing
It can be avoided by using antialiasing filter.
Antialiasing filter : The analog signal is filtered
prior to sampling, to a new maximum
frequency which is less than or equal to fs/2.

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 10


H(f)

-W 0 W

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 11


H(f)

-W 0 W

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 12


H(f)

-W 0 W

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 13


RECONSTRUCTION
The signal x(t) can be reconstructed by passing sampled
signal x(nTs) through an ideal LPF with bandwidth W Hz
and zero transmission delay
To get the original signal back, the sampled signal should be
filtered using a low pass filter with frequency response

characteristic TS for f  W X ( f ) =


1
Ts

n = −
X(f −
n
Ts
)


H( f )= 1
0 for f  − W
 TS

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 14


Example 7.1: Assume x(t) has a bandwidth of 40 kHz.

1. What is the minimum sampling rate for this signal? ·

2. What is the minimum sampling rate if a guard band of 10 kHz is


required?

3. What is the maximum sampling interval for the signal

x1(t) = x (t) cos (80,000πt)?

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 15


Solution : maximum frequency in X(f ) is is 40 kHz or band width of
x(t) , W =40 kHz

1. Minimum sampling rate =2W= 80 kHz.

2. With guard band samplig frequency is

fs = 2W + WG = (2 × 40) + 10 = 90 KHz.

where WG is the guard band.

3. x1(t) = x (t) cos (80,000πt), taking FT on both sides we get

X1(f) = X(f) * 0.5 [ δ( f - 40000 ) + δ( f + 40000 ) ]

X1(f) = 0.5 [ X( f - 40000 ) + X( f + 40000 ) ]

5/5/2021 Latha, Department of ECE, ASE, Bengaliuru 16


Hence Band width of X1(f ) is

( f+40000 ) - ( f – 40000) = 80000 Hz,

and the minimum sampling rate is

fs = 2 × 80000 = 160000 samples per second

From this, the maximum sampling interval is

Ts = 1/fs = 1/160000 = 6.25 μ sec.

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 17


Solution: The signal band width W=6000 Hz.

The minimum sampling frequency is the Nyquist rate

fs = (2) (6000) samples/sec = 12000 samples/sec

With guard band, sampling frequency is

fs = 2W + WG = (2 × 6000) + 2000 = 14 KHz.

where WG is the guard band.

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 18


The signal g(t) = 10 cos(20 πt) cos(200 πt) is sampled at a rate of 250
samples per second.

1. Determine the spectrum of the resulting sampled signal and plot

2. Specify the cut off frequency of the reconstruction filter, so as to


recover the signal g(t) from its sampled version

3. What is the Nyquist rate for g(t)

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 19


Solution: g(t) = 10 cos(20 πt) cos(200 πt)
1. g(t) = 5[cos(220 πt) + cos(180 πt) ]
Taking Fourier Transform on both the sides we get the spectrum
of g(t) as
5
𝐺 𝑓 = [ δ ( f -110) + δ ( f +110) + δ (f - 90) + δ (f + 90) ]
2
G(f)

2.5
---------

f
-110 -90 0 90 110

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 20


The spectrum of sampled signal is given by

∞ 5
𝐺𝛿 (f) = fs σ𝑛=−∞ [ δ ( f – n fs - 110) + δ (f – n fs+110)
2

+ δ (f – n fs - 90) + δ (f – n fs + 90) ]

5
𝐺𝛿 (f) = fs σ∞
𝑛=−∞ [ δ ( f – 250n - 110) + δ (f – 250n +110)
2

+ δ (f – 250n - 90) + δ (f – 250n + 90) ]

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 21


To plot Gδ(f), let us consider n=0, ±1

5
Gδ( f) /n=0 = G(f) = fs [ δ ( f -110) + δ ( f +110) + δ (f - 90) + δ (f + 90) ]
2

Gδ( f) /n=1 = G ( f – fs ) = G ( f – 250 )

5
= fs [ δ ( f -360) + δ ( f -140) + δ (f - 340) + δ (f - 160) ]
2

Gδ( f) /n= -1 = G ( f + fs ) = G ( f + 250 )

5
= fs [ δ ( f +140) + δ ( f +360) + δ (f - 160) + δ (f - 340) ]
2

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 22


5
Gδ( f) = f [……δ ( f +140) + δ ( f +360) + δ (f - 160) + δ (f - 340)
2 s

+δ ( f -110) + δ ( f +110) + δ (f - 90) + δ (f + 90)

+ δ ( f -360) + δ ( f -140) + δ (f - 340) + δ (f - 160)…….. ]

Gδ(f)

2.5 fs

f
-360 -340 fs -160 -140 -110 -90 0 90 110 140 160 fs 340 360

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 23


2. Cut off frequency of the reconstruction filter is

110 < fc < 140

3. Nyquist rate for g(t) is

fs=220 samples per second

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 24


QUANTIZATION

5/5/2021
Quantization

5/5/2021
Number of quantization levels=8
Input voltage range=[-2, 2]
-∞ ≤ xi < -1.5: xq=-1.75
-1.5 ≤ xi < -1: xq=-1.25
-1 ≤ xi < -0.5: xq=-0.75
-0.5 ≤ xi < 0: xq=-0.25
0 ≤ xi < 0.5: xq=0.25
0.5 ≤ xi < 1: xq=0.75
1 ≤ xi < 1.5: xq=1.25
1.5 ≤ xi < ∞ : xq=1.75
X=[ -0.3, -1.45, 0.6, 1.33, 0.798, -0.492]
Xq=[-0.25, -1.25, 0.75, 1.25, 0.75, -0.25]

5/5/2021
 The conversion of an analog sample of the signal into
discrete form is called quantizing process.

 Graphically quantizing process means that a straight


line representing the relation between input and
output of a linear analog system is replaced by a stair
case like transfer function.

 The peak-to-peak range of input sample values is


subdivided into a finite set of decision levels or
decision thresholds that are aligned with the rises of
the stair case.
5/5/2021
 The output is a discrete value selected from a finite set
of representation levels or reconstruction values
that are aligned with the treads of the stair case .

 The separation between the decision levels which is


same as the separation between the representation
levels is known as step size
𝑽𝒑𝒑
Step size = ∆=
𝑵
N is the number of quantization levels.
Vpp is peak to peak value of input signal

5/5/2021
Quantization Error : It is the difference between the
output and input values of the quantizer. The maximum
instantaneous value of quantization error is half of one
step size, and the range of variation is from minus half a
step to plus half a step.
qe= x - Q(x)
x is input to the quantizer, Q(x) is output of the quantizer
and qe is quantization error

Max{qe}=
𝟐
Quantization error is in the range
∆ ∆
- ≤ qe ≤
𝟐 𝟐

5/5/2021
5/5/2021
Quantization Methods
a. Uniform quantization
b. Non-uniform quantization

5/5/2021
5/5/2021
5/5/2021
ENCODING

5/5/2021
 In encoding process a sequence of bits are assigned to
different quantization values.
 Since there are a total of N=2ν quantization levels, ν
bits are sufficient for encoding.
 There are ν bits corresponding to each sample.
 Since the sampling rate is fs samples per second, we
will have a total
bit rate R= νfs bits per second.

5/5/2021
NBC and GRAY codes for 16-level Quantization
Level order NBC code Gray code

0 0000 0000

1 0001 0010

2 0010 0011

3 0011 0001

4 0100 0101

5 0101 0100

6 0110 0110
5/5/2021
7 0111 0111

8 1000 1111

9 1001 1110

10 1010 1100

11 1011 1101

12 1100 1001

13 1101 1000

14 1110 1010

15 1111 1011
5/5/2021
Example: Design an 8-bit quantizer for the input sample range
[-1.6, 1.6], and plot the transfer function. Also quantize the
sample values and encode using NBC

x=[0.25, -0.3, 1.027, -1.57, 0.52, -0.46, 1.57]

5/5/2021
Solution: Number of quantization levels=N=8
Step size= Vpp/N=3.2/8 =0.4 or ∆=0.4
Maximum quantization noise is 0.2
Quantization noise is in the range -0.2 – 0.2

Decision thresholds: -∞ -1.2 -0.8 -0.4 0 0.4 0.8 1.2 ∞


Quantization levels: -1.4 -1 -0.6 -0.2 0.2 0.6 1 1.4
000 001 010 011 100 101 110 111

x=[0.25, -0.3, 1.027, -1.57, 0.52, -0.46, 1.57]


Q(x)=[0.2, -0.2, 1, -1.4, 0.6, -0.6, 1.4]

xc=[1 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1]

5/5/2021
5/5/2021
Line coding
 The assignment of the electrical voltages to
binary symbols 0 and 1 is called line coding.

 There are many factors influencing the


selection of a particular line code for
transmission.
 xc=[1 0 0 0 1 1 1 1 0 0 0 1]
x(t)=cos(2 pi 5t) for
5/5/2021
5/5/2021
WAVEFORM CODING TECHNIQUES

5/5/2021
 Waveform coding schemes are designed to reproduce
the waveform output of the source at the destination
with as minimum distortion as possible.
 The aim is to reproduce the source output at the
destination with high fidelity.
 The waveform coders are robust and can be used with
a variety of sources producing the waveforms having
some similarities.

5/5/2021
PULSE CODE MODULATION
 Pulse code modulation(PCM) is the oldest and
simplest waveform coding scheme.
 Pulse code modulation (PCM) is the name given to
the class of baseband signals obtained from sampled,
quantized signals by encoding each quantized sample
into a digital word.
 For baseband transmission, the codeword bits will be
transformed into pulse waveforms.
 It is the standard form of digital audio in computers,
CDs, digital telephony and other digital audio
applications.
5/5/2021
 The pulse code modulator consists of three basic
sections. A sampler, a quantizer and an encoder.
 In PCM the following assumptions are made.
1. The signal is band limited with a maximum
frequency of W Hz. Therefore it can be completely
reconstructed from samples taken at a rate of fs ≥ 2W.
2. The signal is of finite amplitude or bounded.
3. The quantization is done with a large number of
quantization levels N which is a power of 2 (N=2ν ).

5/5/2021
Basic elements of PCM system

5/5/2021
 The basic elements of PCM system are as shown.
 The basic operations in the transmitter are sampling,
quantization and encoding which are done in same
circuit known as analog-to-digital converter.
 Regenerative repeaters will do the regeneration of
impaired signals at intermediate points along the
transmission path.
 The operations at the receiver are last stage of
regeneration, decoding and demodulation of train of
quantized samples.
 The operation of decoding and reconstruction are
performed in same circuit called a digital-to-analog
converter.
5/5/2021
Two PCM systems are
1. Uniform PCM system : uses uniform quantizer
2. Non uniform PCM system : uses non uniform
quantizer

5/5/2021
Uniform PCM System:
 In uniform PCM system the quantizer is uniform
quantizer.
 The range of input samples is [-xmax, +xmax]
 The number of quantization levels is N.
 The length of each quantization region is
2 xmax xmax
= = v −1
N 2

5/5/2021
SQNR
 In uniform PCM the quantized values are chosen to be
the midpoint of the quantization regions
 The quantization error is ~ x = x − Q ( x) is a random
variable taking values in the interval [− Δ , + Δ]
2 2
 In ordinary PCM application the length of each
quantization region (Δ) is small and N is large.
 Under these assumptions, in each quantization region,
the error X~ = X − Q( X ) can be approximated by a
uniformly distributed random variable on ( −  , +  ]
2 2
 Or  1  ~ 
 − x
f ( ~x ) =   2 2
 0 otherwise
5/5/2021
 Therefore quantization noise is
Δ
+2 1 Δ2 2
𝑥𝑚𝑎𝑥 2
𝑥𝑚𝑎𝑥
𝐸[𝑋෨ 2 ] = ‫ ׬‬Δ Δ 𝑥෤ 2 𝑑 𝑥෤ = = = 𝑣
− 12 3𝑁2 3×4
2

 Then signal to quantization noise ratio is


𝑃𝑋 3×𝑁2 𝑃𝑋 3×4𝑣 𝑃𝑥
𝑆𝑄𝑁𝑅 = ෪ 2] = = 2
𝐸[𝑋 𝑥 2 max 𝑥𝑚𝑎𝑥

 where v is the number of bits per source sample and


PX is signal power
 If X(t) is a wide-sense stationary process then PX can
be found using any of the following relations 

PX = RX(τ)|τ=0 PX =  x 2 f ( x) dx PX =  S X ( f ) df
− −
5/5/2021
 xmax is the maximum possible value of X.
 Therefore PX = E[X2] ≤ x2max
PX
 This means that 2
1
xmax
 Hence upper bound to the SQNR in uniform quantizer
is 3N2 = 3.4v
 SQNR in uniform PCM decreases as the dynamic
range of the source increases because increase in the
PX
dynamic range results in decrease in 2
xmax

 Expressing SQNR in decibels we get


PX
SQNR / dB 10 log10 2
+ 6 v + 4.8
xmax
5/5/2021
 It can be seen that increase in v by one bit increases
the SQNR by 6dB. Using this we can achieve desired
SQNR.

5/5/2021
Example 7.4.1: What is the resulting SQNR for a signal
uniformly distributed on [- 1 , I], when uniform PCM with 256
levels is employed?
Sol: We have SQNR / dB 10 log10 PX + 6v + 4.8
2
xmax

xmax = 1 and v = log 2256 = 8

Substituting all these values in the SQNR equation, we


get
1/3
𝑆𝑄𝑁𝑅/𝑑𝐵 ≈ 10log10 + 6×8 + 4.8 = 48.02 dB
1

5/5/2021
7.15: A stationary random process has an autocorrelation function
𝐴2 𝜏
given by 𝑅𝑥 (𝜏) = 𝑒 cos2πf0τ . We know that the random
2
process never exceeds 6 in magnitude.
Assume that A = 6.
1. How many quantization levels are required to guarantee an
SQNR of at least 60 dB ?
2. Assuming that the signal is quantized to satisfy the condition of
Part 1 and assuming the approximate bandwidth of the signal is
W, what is the minimum required bandwidth for the
transmission of a binary PCM signal based on this quantization
scheme?

5/5/2021
𝐴2 𝜏
Sol: 𝑅𝑥 (𝜏) = cos2πf0τ . We know that the power in random
𝑒
2
process Px= Rx(τ) / τ=0
𝐴2 62
Px= = 18W xmax=6
=
2 2
1. PX
SQNR / dB 10 log10 2 + 6v + 4.8
xmax
60=10 log(18/36) + 6v + 4.8
60=-3 +6v +4.8 v=9.7 ≈ 10
Number of quantization levels N=2v =1024
2. The minimum bandwidth requirement for transmission of a
binary PCM signal is
BW = νW. Since ν = 10, we have BW= 10W.

5/5/2021
Example7.21: The power spectral density of a zero-mean WSS random
process X (t) is as given below and the maximum amplitude of this process
is 600.
1. What is the power content of this process?
2. If this process is sampled at rate fs to
guarantee a guard band of 2000 Hz, what
is fs?
3. If we use a PCM system with 256
quantization levels on this process (sampled
at the rate you found in Part 2), what is the resulting SQNR (in decibels)?
and also what is the resulting bit rate?
5. If the output of the PCM system is to be transmitted using a binary system,
what is the required minimum transmission bandwidth?
6. If we need to increase the SQNR by at least 25 dB, what is the required
number of quantization levels, the resulting SQNR, and the required
transmission bandwidth?

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 59


Solution: 1. SX ( f )is a triangle of height one extending from
−5000 to 5000.
Therefore the area under it which is the power in the process is
PX = 5000 Watts. What is the power content of this process?
2. fs = 2W + WG = 2 × 5000 + 2000 = 12000 samples per second.
3. N= 256 , hence ν = 8. We have
P
SQNR / dB =10 log 10 2X + 6v + 4.8
xmax
5000
SQNR / dB =10 log10 + 6  8 + 4.8 = 34.36dB
360000

Resulting bit rate=R =v x fs = 8 x 12000 =96000 bps


4. The transmission band width is

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 60


6. For each extra bit added, the SQNR increases by 6dB.
To increase SQNR minimum by 25 Db, 5 extra bits are required.
Therefore the total number of bits
v=8+5=13
PX
SQNR / dB =10 log 10 2 + 6v + 4.8
xmax

The resulting 5000


SQNR / dB =10 log10 + 6  13 + 4.8 = 64.23dB
360000

Transmission band width B=vfs/2 = 13x 12000/2 = 78000 Hz

5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 61


Band width requirement of PCM system
 If the signal has bandwidth of W, then the minimum
number of samples required for perfect reconstruction
is 2W samples/sec.
 If some guard band is required then the number of
samples per second fs is more than 2W.
 If v bits are used then vfs bits per second are required
for transmission of PCM signal.
 The minimum bandwidth requirement for binary
transmission of R bit/sec is R .
2
𝑅
𝐵𝑊𝑟𝑒𝑞 =
5/5/2021
2
 Therefore the minimum bandwidth requirement of a
PCM system is
v fs
BWreq =
2

 Bandwidth requirement at Sampling with Nyquist rate


is BWreq = vW

 This means that a PCM system expands the bandwidth


of the original signal by a factor of at least v

5/5/2021
Differential Pulse Code Modulation(DPCM)
 In PCM each sample is quantized independently using
scalar quantizer.
 Previous sample values have no effect on the
quantization of the present sample.
 When a band limited random process is sampled with
Nyquist rate or more, the sampled values are
correlated random variables which means that the
signal does not change rapidly from one sample to
next so that the difference between the adjacent
samples has a variance that is smaller than the
variance of the signal itself

5/5/2021
 When these highly correlated samples are encoded as
standard PCM the resulting encoded signal contains
redundant information.
 By removing this redundancy before encoding we can
obtain more efficient coded signal.
 Here the previous samples give some information
about the next sample.
 This information can be used to improve the
performance of the PCM system
 Example: If the previous sample values were small,
there is high probability that the next sample value
will also be small then it is not necessary to quantize
a wide range of values to achieve a good performance.
5/5/2021
Delta Modulation(DM)
 Delta Modulation is simplified version of DPCM
 In basic form DM provides a stair case
approximation to the over sampled version of an
input base band signal
 DM quantizer is one bit (two level) quntizer
with amplitudes ±δ.
 Analysis are same as analysis of the DPCM.

5/5/2021
Two level quantizer

5/5/2021
 Here quantization noise is high if dynamic
range of the signal to the quntizer is high as
one bit per sample is employed. This implies
that the correlation between two consecutive
samples must be high.
 Therefore the sampling frequency for DM must
be much higher than the Nyquist rate.
 The number of bit per sample is only one, so
that the total number of bits per second
required to transmit is much lower than the
PCM system.
5/5/2021
5/5/2021
 The step size ∆ plays very important role in
the design of delta modulator system.
 The larger values of ∆ causes the modulator to
follow rapid changes in the input signal.
 This causes excessive quantization noise when
the input changes slowly.
 Granular noise is the quantization noise
caused by the larger value of ∆ with slowly
varying input where in stair case approximation
will hunt around a relatively flat segment of the
input waveform
5/5/2021
 When ∆ is too small, we have problem with the
signal that is changing rapidly with the time.
 When the input changes rapidly, the modulator
takes a long time for the out put to follow the
input.
 The excessive quantization noise caused by the
small value of the ∆ for rapidly changing signal
where in stair case approximation falls far
behind the signal is known as slope-over load
distortion.

5/5/2021
 The condition which should be satisfied to
avoid slope overload distortion is

 dx(t )
 max or
2Ts dt

 dx(t )
 max
TS dt

5/5/2021
5/5/2021
Example: A DM system is designed to operate at 3 times the
Nyquist rate for a signal with 3 kHz band width. The step size is
250 mV.
1. Determine the maximum amplitude of a 1 kHz input sinusoid
for which the DM does not show slope over load distortion.
Solution: 1. Let the input sinusoidal signal be
x(t)=a0 cos(2π1000t)
Condition for no slope over load distortion is
 dx(t )
max
𝑑𝑥(𝑡)
= a 2000π  max
𝑑𝑡 0 ST dt

𝛿
≥ a0 2000π
𝑇𝑆

5/5/2021
𝛿 𝑓𝑠
a0 ≤
2000𝜋
250×10−3 (3×2×3×103)
a0 ≤
2000π
a0≤ 716.19 mV

5/5/2021

You might also like