Analog to Digital Conversion

14
ANALOG-TO-DIGITAL CONVERSION INTRODUCTION: Usually most of the signals such as speech signals, RADAR signals and various communication signals are analog in nature. Because of many advantages, digital signal processing is preferable to analog signal processing. To process the analog signals by digital means, it is first necessary to convert them into digital form. That is to convert them to a sequence of numbers. This procedure is called Analog-to-Digital Conversion (A/D) and the corresponding devices which perform this are called Analog- to-Digital Converters (ADCs). The Analog signal is simply a continuous signal which is continuous both in terms of time and amplitude, i.e, it has a continuous range of values both on time axis and in amplitude axis, it is simply called as Continuous Time Continuous Value (CTCV) signal. Whereas on the other hand Digital signal is discretized both in time and amplitude and the corresponding amplitudes are represented in a sequence of binary digits. In order to do this Analog to Digital Conversion it is necessary to discretize both the time and amplitude axis and this process is done by first doing on the time axis and then moving to the amplitude axis. So this entire process is done in three stages namely Sampling, Quantization and Encoding and block diagram of the A/D process and corresponding waveforms of

description

A brief data regarding the analog to digital conversion process

Transcript of Analog to Digital Conversion

Page 1: Analog to Digital Conversion

EncoderQuantizerSampler

Continuous time signal xa(t)

Discrete time signal x(nT)

Quantized signal xq(n) digital data

ANALOG-TO-DIGITAL CONVERSION

INTRODUCTION:Usually most of the signals such as speech signals, RADAR signals and various

communication signals are analog in nature. Because of many advantages, digital signal

processing is preferable to analog signal processing. To process the analog signals by

digital means, it is first necessary to convert them into digital form. That is to convert

them to a sequence of numbers. This procedure is called Analog-to-Digital Conversion

(A/D) and the corresponding devices which perform this are called Analog-to-Digital

Converters (ADCs). The Analog signal is simply a continuous signal which is continuous

both in terms of time and amplitude, i.e, it has a continuous range of values both on time

axis and in amplitude axis, it is simply called as Continuous Time Continuous Value

(CTCV) signal. Whereas on the other hand Digital signal is discretized both in time and

amplitude and the corresponding amplitudes are represented in a sequence of binary

digits. In order to do this Analog to Digital Conversion it is necessary to discretize both

the time and amplitude axis and this process is done by first doing on the time axis and

then moving to the amplitude axis. So this entire process is done in three stages namely

Sampling, Quantization and Encoding and block diagram of the A/D process and

corresponding waveforms of the continuous , discrete and digital signals are shown in

figure1.

Figure 1: Block diagram of Analog-to-Digital Conversion

011001100…

Page 2: Analog to Digital Conversion

Sampling:The first step of the A/D is sampling process, discretizing the time axis i.e, it

converts the analog/CTCV signal into Discrete time Continuous Value (DTCV) / discrete

signal. This conversion is done by taking the value of the signal at specified instances of

time instead of taking the signal for all values of time. And these values are taken

precisely at a periodic instances with a period ‘T’, called as a sampling Period. So the

sampler converts the analog x(t) signal into a discrete signal x(nT) which can also be

denoted as x[n]

i.e, x[n] = x(nT) ….(1)

The reciprocal of this sampling interval is the sampling frequency ‘fs’. Selection of this

sampling frequency plays a crucial role in sampling. If this sampling frequency is not

properly selected, then we cannot reconstruct the original signal from the sampled one.

The selection is conveyed by the sampling theorem.

Sampling Theorem says that, if we have a continuous time signal x(t) and its equally

spaced samples x(nT), sampled at a sampling period ‘T’ and

If x(t) is band limited i.e

X(w) = 0 for |w| >wm ……(2)

where X(w) is Fourier Transform of x(t) and wm is the highest frequency in the

spectrum of X(w).

Then under the condition that the sampling frequency (ws)

ws ¿ 2ΠT

≥2wm …….(3)

Then x(t) is uniquely recoverable from the set of samples.

The Sampling process is performed by multiplying the continuous time signal xa(t) with

impulse train. The impulse train is a periodic impulse signal with a period namely

sampling period ‘T’.

Page 3: Analog to Digital Conversion

xa(t) Continuous-time signal

p(t) = Impulse Train

xs(nT)Discrete-time signal

The impulse train p(t) can be given as

p( t )= ∑n=−∞

δ( t−nT )

where, δ ( t )is the unit impulse function, or Dirac delta function. The time domain

representation of the continuous time, and discrete time signals are shown in figure 2.

The frequency domain equations of the above multiplication process can be given as

convolution of the Fourier transforms of continuous time signal Xa(w) and Fourier

Transform of the Impulse signal P(w).

Xs(w) =

12∏ ¿

[Xa(w )⊗P(w)] ¿

Where Xs(w) is the fourier transform of the sampled signal. And the P(w) can be given as

P(w )=2∏ ¿T ∑

k=−∞

δ ¿¿¿¿

substituting the value of P(w) in Xs(w), we get

Xs(w) =

12∏ ¿

×2∏ ¿T ¿¿¿¿

Xs(w) =

1T ∑k=−∞

∞¿¿¿

Page 4: Analog to Digital Conversion

Figure 2: Time domain representation of continuous, impulse train and discrete signals

But from the product property of the impulse signal, the equation can be re-written as

Xs(w) =

1T ∑k=−∞

∞¿¿¿

That is, the spectrum of the sample signal is a “sum of frequency shifted replications of

the Fourier transform of the original signal”. If we consider the original continuous time

signal as continuous band of frequencies then the frequency domain representation of the

continuous time, impulse train and discrete-time signals are shown in figure3.

Page 5: Analog to Digital Conversion

Figure 3: spectrum of continuous, impulse train and sampled signals.

If the sampling interval is not properly selected, that is if the sampling frequency is not

properly chosen as suggested by the sampling theorem, then the time shifted replicas of

Figure 4: spectrum of original and sampled signal with improper selection of fs.

Page 6: Analog to Digital Conversion

the original signal may overlap upon each other, thereby causing loss of information and

the original signal cannot be recovered back. The results of improper selection of the

sampling frequency is shown in figure4.

The above said effect is called as Aliasing effect, where a signal of some

frequency appears to be a signal of different frequency. To recover the original signal

from the sampled signal, it is sufficient to pass the sampled signal through the low pass

filter, then we can obtain the original signal provided that the replicas of the original

signal are not overlapped. The overall process of sampling and reconstruction of original

signal from the sampled signal can be given as shown in the figure5. where H(w) is the

impulse response of the ideal low pass filter(LPF).

Figure 5: Block diagram of sampling and reconstruction using Ideal LPF.

Figure 6: spectrum of sampled, filter and reconstructed signal

Page 7: Analog to Digital Conversion

The spectrum of reconstructed signal along the filter response is given in Figure6. The

necessary and sufficient condition to recover the original signal without any loss of signal

is

ws >> 2wm

and this condition is called Nyquist sampling theorem. If this condition is not satisfied

then the aliasing effect will occur.

Quantization:Quantization is the process of converting a Discrete time-continuous valued

(DTCV) signal to Discrete time-Discrete valued signal (DTDV) by expressing each

sample value as a finite number of digits (instead of infinite). The difference between the

unquantized and quantized signals is, in the prior one there are continuous range of the

amplitude levels where as in the next signal, there are only a finite set of amplitude

levels. Quantization is nothing but rounding off the sampled signal to the nearest

quantized levels. This rounding of the sampled data leads to loss of data and the error

introduced in representing the continuous-valued signal by a finite set of discrete value

Figure 7: Discrete sinusoidal signal

levels is called quantization error or quantization noise. If x(n) is the continuous valued

signal and xq(n) is quantized signal, then the quantization error eq(n) is defined as

Page 8: Analog to Digital Conversion

eq(n) = xq(n) – x(n)

The quantization process can be explained with the help of a discrete sine wave which is

shown in figure 7 and the corresponding quantization of each sample is shown in the

table1, this table shows the quantized value of each sample and also displays the

corresponding quantization error. The values allowed in the digital signal are called

quantization levels, and the distance between two successive quantization levels is called

the quantization step size (∆) or resolution. The quantization error eq(n) in rounding is

limited to the range of -∆/2 and ∆/2, that is

− Δ2≤

eq(n)

Δ2

In other words, the instantaneous quantization error cannot exceed half of the

quantization step. If xmin and xmax represents the minimum and maximum value of x(n)

and L is the number of quantization levels, then resolution can be defined as

Δ=Xmin - Xmax L−1

In the example specified in table 1, the xmin = -4 and xmax = 4, and the number of levels

Samples

Number

Discrete signal value

x(n)

Quantized value

xq(n)

Quantization error

eq(n)

1,11,21 0 0 0

2,10 1.25 1 -0.25

3,9 2.3 2 -0.3

4,8 3.1 3 -0.1

5,7 3.8 4 0.2

6 4 4 0

12,20 -1.25 -1 0.25

13,19 -2.3 -2 0.3

14,18 -3.1 -3 0.1

15,17 -3.8 -4 -0.2

16 -4 -4 0

Table 1: Quantization of the discrete signal

is L = 9, which leads to ∆ = 1. and from the table it is abvious that the quantization error

never exceeded 0.5, which is half of the resolution. As we increase the number of

Page 9: Analog to Digital Conversion

quantization levels L then the resolution ∆ decreases, so that the dynamic range of the

quantization error also decreases which increases the accuracy of the quantization. So in

practice we can reduce the quantization error to an insignificant value by choosing a

sufficient number of quantization levels. The quantized signal xq(n) is shown in figure 8.

Figure 8: Quantized signal

Encoder:

The purpose of the encoder is to represent the value of every quantized sample in

the form of b-bit binary code. where ‘b’ is the number of bits present in the binary

equivalent. Simply, Encoding is the process of assigning a binary sequence to every

sampled value of the quantized signal. There are a variety of ways to do the encoding

process and they are called as coding techniques. All these coding techniques aim at

reducing the redundancy of the data. Where redundancy is nothing but the repetition of

data which increases the length of code and ultimately increases the memory required. So

if we remove the redundant data then we can represent the same data with less number of

bits. Some of the coding methods are Huffman coding, Shannon-Fano coding, Arithmetic

coding etc., Table 2 shows the simple coding technique of simply assigning a binary

equivalent without reducing the redundancy.

Samples

Number

Quantized value Binary equivalent

Page 10: Analog to Digital Conversion

1,11,21 0 0000

2,10 1 0001

3,9 2 0010

4,8 3 0011

5,7,6 4 0100

12,20 -1 0101

13,19 -2 0110

14,18 -3 0111

15,17 -4 1000

16 -4 1001

Table2: Encoding of the quantized samples

After the Encoding is done, the entire analog signal is now can be represented as a

sequence of binary bits, which is nothing but the signal in digital form.