You are on page 1of 5

SIGNAL DIGITIZATION FOR DSP Most (but not all) signals processed by a DSP system are initially analogue

and continuous. When a signal is converted from an analogue form to a digital form two key operations must be performed, discrete time sampling and amplitude quantization as shown below. Normally both functions are performed in an analogue-to-digital converter (ADC) subject to the sampling theorem being obeyed.
LSB 1 2 3 ADC B-1 B MSB

Analogue in

fs 1. The Sampling Theorem (Nyquist Criterion)

A basic parameter of any DSP system is the rate at which the input signal is sampled because the ADC presents a new sample to the DSP at this rate. The DSP must complete all the necessary processing before the new sample arrives. The sampling rate is given by the Sampling Theorem. If a signal has a bandwidth fmax then if it is sampled at a rate fs > 2fmax (Nyquist rate) it may be recovered completely (to the original continuous signal) by passing the samples through an ideal "reconstruction" filter. 2. Aliasing

If the signal is not strictly band-limited to a bandwidth fmax (using a brick-wall amplitude response), then the frequencies above fs/2 are folded back (aliased) and appear in the sampled signal at a different frequency. Take the example of a single frequency sinewave of frequency fa sampled a frequency fs with fs slightly greater than fa. The sampling theorem is violated and an aliased lower frequency sinewave of frequency fs-fa is produced.

If fs > 2fa the frequency domain output of the sampler (assumed ideal) will have images or aliases of the original signal around every multiple of fs i.e. at fs , 2fs , 3fs .... as shown in Fig. 2.4A

3.

Baseband anti-aliasing filter

Baseband sampling occurs in the first Nyquist zone (0 to fs/2). Only an ideal low pass filter can completely remove frequency components which are outside the Nyquist bandwidth. Practical filters will allow low levels of aliasing to occur due to finite transition region and insufficient attenuation in the stop band. Any signal or noise in any zone outside the first zone will be aliased back to the first zone if the antialiasing filter does not reject it.

EXAMPLE A signal has a flat uniform spectrum. A 4th-order (n=4) analogue Butterworth filter with a -3 db frequency fc of 2 kHz is used to filter this signal. This filtered signal is then sampled at 8 kHz. Find the ratio of signal power to aliased signal power at a frequency of 2 kHz expressing your answer in dB. The magnitude response of an nth order Butterworth filter is given by Solution:

H( f ) =

1 1 + ( f / fc )2 n

input signal

H(f)

Sampler

sampled signal

The amplitude response of the filter is filtered signal.

H( f ) =

1 1 + ( f / f c )8

. This will also be the shape of the

When the filtered signal is sampled its spectrum is replicated every 8 kHz. The power (spectral density of the signal at 2 kHz will be given by

H (2)

1 1 + (2 / 2)8
2

0 4 kHz 1 2 8 . The aliasing at 2 kHz will be caused by copies of the filtered 2

signal centred on multiples of 8 kHz. The most significant of these will be the component at 8 kHz (zone 2). The signal that falls on 2 kHz in zone 1 is 8-2 or 6 kHz from 8 kHz. Its power (spectral density) will be

H (6)

1 1 + (6 / 2)8 = 1
2

1 6562 .

Note that the next strongest aliased signal will be like a zone 3 signal which will be attenuated to amplitude

H ( 8 2)

1 + (10 / 2)8

107

which can be ignored compared to the zone 2 signal.

The ratio of signal power to aliased signal at 2 kHz will therefore be 10 log

6562 = 35 dB. 2

4. Analogue-to-Digital Conversion
An n-bit word represents 2N possible states. Therefore a N-bit ADC has 2N possible digital outputs. If the full scale amplitude of a signal is 10 V then the smallest voltages differentiated by the ADC (amplitude resolution) for various values of N are given in the figure below

4.1 Quantization Noise


Consider a signal whose amplitude varies between A and +A digitized using an ADC of B bits. The number of quantization levels is 2B-1. The quantization interval q is therefore

and all signal values falling between the quantization levels will be rounded up to the nearest level . The quantization error e is therefore between q/2 and +q/2 . The quantization error is also known as the quantization noise. If the error is assumed to be uniformly distributed within

2A . 2B 1

.............................. (1)

the quantization interval, then the probability density of the error signal pe = 1/q so that the total area under the propability curve is 1, that is
q/2

q / 2

(1/ q )de = 1
q/2 2

q2 The quantization noise (or error) power is e (1/ q )de = on a 1- basis. 12 q / 2


If the signal is assumed to be sinusoidal with same amplitude range A to +A then the signal power is A2/2 also on a 1- basis. Therefore

signal power A2 = 10log = 10 log 2 noise power q /12 Substituting for q from eqn (1) gives the SQNR as 22 B SQNR = 10log ............................................. (2) = 6.02B + 1.76 dB 2/3 Eqn (2) shows that the SQNR is independent of the signal amplitude A and only dependent on the number of bits in the ADC.
Signal to Quantization Noise Ratio (SQNR)

EXAMPLE A waveform 6 sint V is digitized using 8 bits. What is the signal power, SQNR and the rms value of the quantization noise? Solution: Signal power = A2/2 = 62/2 = 18 W on one basis B = 8 bits and A = 6 V so SQNR = (6.02 x 8) +1.76 = 49.9 dB q = 2A/(2B 1) = 12/(28 -) = 47.06 mV. r.m.s. quantization noise = q/(12) = 47.06/(12) = 13.56 mV PROBLEM (for you to attempt)
A sinusoidal signal of frequency 2 kHz is passed through an 8th-order Butterworth filter of cutoff frequency 5 kHz. It is then digitized using a 10-bit quantization. What should be the minimum sampling frequency if the aliased signal amplitude at 2 kHz should not exceed the r.m.s value of the quantization noise?

4.2 SQNR and Oversampling


The quantization noise has constant power for a given number of digitization bits and if it is assumed spread over the band from 0 to fs/2 then oversampling (fs > Nyquist rate) reduces the total noise in the signal band of zone1 and hence SQNR improves (i.e. increases)

You might also like