Vous êtes sur la page 1sur 10

Design of 1st Order 1 bit ADC For Audio

Application
Abdo Salah,
Nishant Singh,
Rajen Paudel,
Students,Master of Science in Communication Engineering,
Technical University of Munich,
Munich
May 5, 2014

Contents
1 Concept and Theories

2 Spectrum Analysis

Chapter 1
Concept and Theories
1. What is the function of a Modulator?What is the difference between a
ADC and a Nyquist Rate ADC? What is the best application for a ADC?
Why?
A Modulator converts analog signals into a low resolution,noise shaped,digital signal.A ADC is classified as a Oversampling ADCs , wherein input signal is sampled at
a much higher frequency than Nyquist Frequency, usually the sampling frequency can be
128 to 512 times higher than that of Nyquist Frequency, the ratio of sampling frequency
to the Nyquist Frequency is termed as OverSampling Ratio or OSR, the required OSR is
decided on the application requirements.
Nyquist ADCs are the one who sample input signals at ,or close to (but higher),Nyquist
Frequency.
ADCs are mostly used in industrial application,or in voiceband-audio , wherein a a
high resolution in data is required (>15 bits) but the frequency requirement is low (less
than 100KHz).
ADC

Nyquist Rate ADC

Sampling Rate is higher than Nyquist Frequency (of the order of 100 times above the
input frequency)
Is ideal for low frequency signals, as it offers
a higher resolution (upto 20 bits) with simple
cicuit implementation

Sampling rate is equal or a little higher than


Nyquist Frequency.

A Simpler anti-aliasing filter can be used , the


transition band for the filter can be wide, as
the noise gets divided equally among the individual chunks, and since number of chunks
are large, amount of noise per chunk of data
is less
Favorable as simplicity in analog circuitry is
compensated with signal processing in digital
domain, which is relatively easier to implement

Anti-aliasing filter needs to have a steep roll


off, so as to filter off the noise , before data
conversion.

To get a higher resolution the circuitry for


ADC becomes complex, ideal for high frequency signals.

Complexity of ADC circuit depends upon the


desired resolution, higher the resolution required, the complexity goes up.

2. Sketch a 1st order modulator.Describe the functional units in a 1st order


modulator.

Functional units in sigma-delta modulator are described as under:


Noise Shaping Filter or Integrator: As the transfer function of first order sigma
delta modulator sugggest need of filter that provides a lot of gain for low frequencies and
little gain for high frequencies, integrator provides the required functionality inherently.
It distributes the converter quantization error or noise such that it is very low in the band
of interest.
Latched Comparator: The latched comparator acts as a 1 bit quantizer and passes
the bit stream to the output. The advantage of inherent linearity makes 1-bit converters
a common choice.
D/A converter: Since the output bit-stream is digital, we need D/A converter to
feedback the output signal to feed the delta (difference fo input and pervious output) into
the integrator. For larger input signals, it must be observed that the input signal has to
remain within the maximum levels of the feedback signal, as the output of the integrator
may saturate otherwise impacting the performance of the converter.
3. Draw the equivalent linear model of a 1st order modulator.When a
modulator can be regarded as equal to its linearized model?
The linear model of a sigma delta modulator can be given as,

The linear model is accurate if the dependency of the error e[n] of the input signal is taken
into consideration. Under the common assumption of e[n] being white noise independent
3

of frequency, this model is approximately exact.


4. What is an idle tone?What is the relationship between idle tones and the
order of modulators? Can these tones be removed?
Idle tones are unwanted discrete spectral peaks in the signal band, which occur due to periodic patterns at the modulator output. For instance if a DC input voltage of +1/3 V is
applied , with Vref = 1V, the output at the modulator is seen as ..., +1, +1, 1, +1, +1, 1
Increasing the order of modulator can suppress the effect of Idle tones, but neverthless Idle tones have been observed in higher order modulators, or even in multi-bit
and cascaded architectures. The fundamental Idle Tone frequency is directly proportional to DC input magnitude and the sampling frequency , and is given by the following
relation,
FF IT = ADC fs
the relation however does not hold for very low input DC voltages ( for magnitudes close
to 0).
Idle tones can be removed from the output by adding a psuedo-random noise at the input
of quantizer, this process is termed as dithering.
5. Describe analytically the transfer behaviour of the modulator. Give a validation border for your description.
For a first order modulator, the Signal Transfer function (STF) and Noise Transfer
Function (NTF) is given as ,
H(z)
1
N T F = 1+H(z)
ST F = 1+H(z)
The primary objetive of design is to have a filter resulting in high stability with few
artifacts, such that in pass-band we have,
STF = 1 and, NTF = 0
A design of first order sigma delta filter is given below,

from the above figure, we can see that,


u(n+1)=x(n) - y(n) + u(n) ,
a corresponding Z domain block is given in figure below,

from the above block diagram , we get,


4

Y(Z) = X(z)z 1 + E(z)(1 z 1 ), .......(1) On keeping E(Z) as 0 in above equation, we


get STF as,
STF = Y(Z)/X(z) = z 1 ,.............(2)
on keeping X(z) as 0 in (1) we get NTF as,
NTF = Y(z)/E(z) = 1 z 1 .....(3)
STF implies a unit delay, which means that the incoming signal passes through the modulator unaffected, except for a unit delay.We also have the following relation,
From equation (3) above we have,
NTF = 1 z 1
The goal of NTF is to filter out low frequency noise. The above relation describes NTF as
a difference of current signal level to the unit delayed signal level, over a unit time step.
So for low frequency signals NTF becomes near to 0, as difference between consecutive
samples is less , thus barring the low frequency noise. The below figure further elaborates
on this, this approach is however valid on low frequency signals.

Chapter 2
Spectrum Analysis
1. Give the equation that defines DFT.
DFT or Discrete Fourier Transform of a signal can be defined as ,
X(k )
PN 1

N
1
X

x(tn )ejk tn ,

k = 0, 1, 2, . . . , N 1, , where,

n=0

n=0 f (0) + f (1) + . . . + f (N 1)


x(tn ) input signal amplitude(real or complex) at time tn
tn nT = nth sampling instant, n an integer
T sampling interval (sec)
X(k ) spectrum of x (complex valued), at frequency k
k k = k th frequency sample (radians per second)
N2T = radian-frequency sampling interval (rad/sec)
fs 1/T = Sampling rate(Hz)
N number of time samples = no.frequency samples (integer).

2. DFT has to be used to analyze the frequency spectrum of the output bit
stream. Matlab provides a FFT function instead of DFT. What is the relationship between these two?
There is no difference in concepts between FFT and DFT. FFT is exactly DFT but
because DFT is not an efficient way to determine the frequency content of a time domain
sequence when the number of points exceed some limits such as thousand or hundreds
points, an algorithm called FFT (fast Fourier transform ) was introduced. There are many
algorithms to calculate the FFT but the most famous on is radix-2 FFT . The radix-2
FFT algorithm is a very efficient process for performing DFTs under the constraint that
the DFT size be an integral power of two. (That is, the number of points in the transform
is N = 2k , where k is some positive integer.)
While DFT can also be applied to any complex valued series, in practice for large series
it can take considerable time to compute. The time taken being proportional to square of
number of elements in the series. So the faster algorithm is desired in most applications,
which is FFT , and the computing time is proportional to Nlog(2n).
3. Explain the term window function. Why do we need it?How does it affect the
result?
Window function is a mathematical function that is of 0 value outside the interval. It
is observed that in aperiodic signals the FFT has signal much more dispersed.The dis6

persed nature of FFT makes it difficult to identify the frequency content of the input
signal.Since in practical implementations most of the signals are aperiodic within the
pre-defined datablock, the FFT would suffer from the dispersal of signal enrgy, which is
termed as leakage.
A window is applied for correction of leakage. A window function is shaped such that it is
exactly zero before and after the data block, and has some sort of signal shaping function
in between.This function is multiplied by time data block which forces the signal to be
periodic.Thus as the signal is now periodic, the FFT of it does not show any leakage.
However the FFT needs to multiplied by a weighing factor to correct the amplitude levels
, as the original amplitude levels of the input signal gets distorted because of the window
function, so after FFT , an additional multiplication by a weighing factor is needed to
restore original signal levels. The figure below depicts the application of Hanning window,
the change in FFT leakage is noticeable.

4. What is SNR? Explain the way to calculate SNR from a frequency spectrum
resulted from DFT with window function for a modulator with sinusoidal
input signa and implement this as a Matlab Script.
SNR stands for Signal to noise ratio, of a given signal, it is given by following formula,
SN R = Signalpower
N oisepower
7

The SNR can be estimated from DFT by computing ratio of power in the signal bins to
power in the in-band noise bins.For a high SNR number of bins occupied by signal should
be a relatively small (less than 20% number of in-band noise bins). When using Hanning window, the signal would occupy 3 bins, so we should compute power in all three
bins and take mean of that. By implementing the script (given at the end) , it was
seen that windowing can increase SNR significantly, for a sampling frequency of 4000
Hz, and input frequency of 543 Hz, a window of length 256 was used (corresponding to
approximately 64.OSR). It was seen that without windowing a SNR of 4.5 was achieved,
on windowing the same signal , the SNR achieved was 27.4 . The SNR can further be
increased by increasing the window length. The figure belows show the input waveform
, windowed waveform, FFT without windowing, and FFT with windowing waveforms,

The Matlab script used for getting above result is given as under,
clear all;
Fs = 4000;
fin=543;
T=1/Fs;
8

N = 256 ; % OSR = 4000/1086 , N 64.4 = 256


Nw = floor((fin*N)/Fs) % first bin for hann window signal power
t = (0:(N-1))*T;
x = sin(2*pi*fin*t) ;
w = hann(N);
xw = x.*transpose(w);
Y = (fft(x,N))/N;
Yw = (fft(xw,N))/(N/4);
Z = fft(w,N)/N;
f = linspace(0,0.5,N/2);
fbin = (1:N/2);
figure(1);
subplot(2,1,1);
plot(t(1:100),x(1:100));
subplot(2,1,2);
plot(t,xw);
figure(2);
subplot(2,1,1);
plot(fbin,mag2db(2*abs(Y(1:N/2)./Y(1))));
subplot(2,1,2);
plot(fbin,mag2db(abs(Yw(1:N/2)./Yw(1))));
%calculating SNR from FFT without windowing
signalpower = (sum(abs(Y(Nw+1).2))) ;
noisebins = [Yw(2:Nw) Yw(Nw+2:N/2)];
noisepower = (sum(abs(noisebins.2))/(length(noisebins)));
SNRnonWindow = 10*log10(signalpower/noisepower)
%Applying Hanning Window, there should be 3 spikes forthe signal.
%SNR calculation calculate Noise bins, and power in Signal bins
signalpowerw = (sum(abs(Yw(Nw:Nw+2).2))/3) ; % hann window spreads signal power
to 3 bins, so taking average power
%noise bins
noisebinsw = [Yw(2:Nw-1) Yw(Nw+3:N/2)];
noisepowerw = (sum(abs(noisebinsw.2))/(length(noisebinsw)));
SNRw = 10*log10(signalpowerw/noisepowerw)

Vous aimerez peut-être aussi