NOISELESS, IDEA L CONV ERTER

HISTOGRAM OF SAMPLES

PROBABILITY DISTRIBUTION

FUNCTION

PEAK-TO-PEAK NOISE

OFFSET ERROR

σ

RMS NOISE

X

Noise Histogram Analysis

by John Lis

JAN ’95

AN37REV1

1

Crystal Semiconductor Corporation

P.O. Box 17847, Austin, TX 78760

(512) 445-7222 FAX: (512) 445-7581

http://www.crystal.com

Copyright

Crystal Semiconductor Corporation 1996

(All Rights Reserved)

Application Note

AN37

INTRODUCTION

Many Analog-to-Digital Converters (ADC) are

used to measure the level or magnitude of static

signals. Applications include the measurement of

weight, pressure, and temperature. These appli-

cations involve low-level signals which require

high resolution and accuracy. An example is a

weigh-scale that can handle up to a 5 kilogram

load and yet resolve the measurement to 10 mil-

ligrams. The ratio of maximum load to lowest

resolvable unit is five hundred thousand to one.

This req uires the weigh -scale’s ADC to digitize a

load cell’s signal with a resolution of 500,000

counts.

When working with high resolution ADCs, an

understanding of the error and noise associated

with the conversion process is required. The goal

for this application note is to show how histo-

gram analysis is used to quantify static

performance. Sample sets of data are collected

and used to measure noise and offset. Statistical

techniques are used to determine the "goodness"

and confidence interval associated with the esti-

mates. Averaging is addressed as a means of

decreasing unce rtainty and improving resolution.

In an ideal situation, the output of an ADC

would be exact with no offset error, gain error,

nor noise. However, the actual output from the

ADC includes error and noise. Static testing

methods can be used to evaluate the ADC’s per-

formance. A dc signal is applied to the ADC’s

input and the digital output words are collected.

The signal’s level is adjusted to measure offset

and gain errors associated with deviations in the

slope and intercept of the ADC’s transfer func-

tion. Noise is measured as the variability of the

output for a constant input.

Statistical techniques can be used to acquire per-

formance measurements, assess the effects of

noise, as well as compensate for the noise. An

ADC’s output varies for a constant input due to

noise. The noise is defined by a Probability Den-

sity Function (PDF), which represents the prob-

ability of discrete events. Statistical parameters

can be calculated from the PDF. The PDF’s

shape describes the certainty of the ADC’s out-

put a nd its noise cha racteristi cs.

Noise histogram analysis assumes that the noise

is random with a Gaussian distribution. This

means that the noise amplitude at a given instant

is uncorrelated with the output amplitude at any

other instant. A sample set of random noise pro-

duces a normal distribution which is used to

estimate the PDF. If the noise is not random and

does not have a normal distribution, the follow-

ing histogram analysis would not apply.

Examples of non-Gaussian noise include 1/f

noise, clock coupling, switching power supply

noise, and power line interference.

The ensuing sections discuss noise histogram

analysis and the estimation of unknown parame-

ters. The discussion addresses sampling

requirements, statistics, and performance trade-

offs. Statistical methods are used to determine

"goodness" and confidence intervals of parame-

ters estimated from sampled data. Goodness

relates to how well the sample set parameters

correlate to the actual system. Averaging is dis-

cussed as a method of reducing uncertainty and

improving resolution. This paper will lead to an

understanding of sampling issues and the trade-

offs that can be made to improve performance

and the consequences of the various choices

among sample size, confidence level, and

throughput.

NOISE HISTOGRAM DESCRIPTION

Usually the PDF descri bing the ADC noi se is not

specified. The PDF can be estimated by static

testing. This estimated PDF is actually a histo-

gram plot of the occurrences of a random

variable versus the individual variations. For an

ADC, the random variable is the resulting digital

codes, so the frequency at which each code oc-

curs is plotted against e ach discrete code.

Noise Histogram Analysis

2AN37REV1

In a noiseless ADC, the output code for a spe-

cific input voltage will always be the same value .

The histogram plot for a noiseless converter is

shown in Figure 1. If noise sources are present

in the ADC, the histogram plot of the output

codes contains more than one value. Figure 2 is

a histogram plot of an ADC with internal noise.

The histogram suggests that the output for a sin-

gle input ca n be one of eleven possible codes.

Electrical noise resulting from random effects

forms a Gaussian or normal distribution, which

is a bell-shaped curve called a normal curve. The

Gaussian PDF is continuous and completely de-

termined with the specification of a mean (µ)

and variance (σ2). The Gaussian PDF is defined

by the following equation:

p(x) = n

√2π σe − (x−µ)2⁄ 2σ2

n = 1 for the actual PDF.

Other values for n scale the PDF to fit a sample

set. The data presented in Figure 2 can be used

to estimate the PDF. Figure 3 plots the histogram

of an ADC with noise along with its estimated

PDF. The mean and variance were estimated

from the sample set of data. From these PDF pa-

rameters, the ADC’s performance can be

quantified. The mean is the expected or average

value. It is used to measure offset errors. The

variance describes the variability of the distribu-

tion about the mean. It is used as a measurement

of uncertainty or noise. The square root of the

variance is called the standard deviation (σ), and

it is a measure of the effective or rms noise. The

peak-to-peak noise can be determined from the

rms noise value.

The Gaussian PDF can not be used to measure

all types of noise. When using a normal or

Gaussian distribution to estimate the PDF, the

noise must be random. Figure 4 illustrates a his-

togram of non-random noise. Notice that the

Figure 1. Histog ram for a Noi se less ADC

Figure 2. Histogram for an ADC with Noise

Figure 3. Histogram and Estimated PDF

Noise Histogram Analysis

AN37REV1 3

histogram distribution does not possess the fa-

miliar bell-shape. This histogram is possibly the

result of 60 Hz line interference or other type of

sinusoidal noise. The PDF resembles that of a

sine wave, which has a "cusp-shaped" distribu-

tion.

Figure 5 is another example of a PDF not having

a Gaussian shape. Here, the reason is due to the

ADC’s poor differential nonlinearity (DNL).

Poor DNL results in uneven code widths, which

skew the distribution. Delta-Sigma and self-cali-

brating ADCs possess good DNL specifications.

Good DNL is very important for applications

which use averagin g to improve resolution.

The histogram must possess a bell-shape distri-

bution or the estimated Gaussian PDF will not

correlate to the actual system. It is good practice

to view the noise distribution and verify that ran-

dom noise is being analyzed. If the noise is not

random, the Gaussian PDF equation can not be

used to model the histogram.

EXAMPLE

Figure 6 is a noise histogram of a 20-bit ADC

with a grounded analog input, and ± 2.5 volt in-

put range. For an ideal, noise free system, the

expected output would always be zero. However,

the experimental 1024-sample set ranges from

negative seven to positive five. Since the digital

codes vary by more then one count, the system

noise exceeds quantization error causing an un-

certainty associated with the output. The range

of code variations requires the histogram to con-

tain at least thirteen discrete ranges or cells.

Table 1 lists the number of occurrences of the

fifteen cells used to create the histo gram.

A PDF can be estimated by using statistical

funct ions to characterize sampled data. Assuming

the system noise is Gaussian, the noise can be

measured by collecting a set of n samples from a

normal population with mean (µ) and variance

(σ2) and calculating the sample mean (Χ) and

sample variance (S2).

X

__ = 1

n ∑

i = 1

n

Xi

S2 =

∑

i = 1

n

( Xi − X

__ )2

n − 1

Figure 4. Non-random Noise Histogram

VOLTAGE

VOLTAGE

"GOOD" DNL

"POOR" DNL

RESULTING

HISTOGRAM

NARROW CODE

DISTORTS THE

DISTRIBUTION

Figure 5. DNL Effects on a Noise Histogram

Noise Histogram Analysis

4AN37REV1

Χ and S2 are estimators for the system µ and σ2.

This information is used to create a mathemati-

cal model of the system’s PDF. From the sample

set of data used to create Figure 6, Χ = -0.98

and S2 = 3.96. The PDF for Figure 6 can be

modeled by substituting n, Χ, and S2 into the

scaled Gaussi an PDF equation.

p(x) = n

√2π σe − (x−µ)2⁄ 2σ2

Substituting Χ for µ, S for σ, and S2 for σ2.

p(x) = 1024

√2π 1.99 e − (x+0.98)2⁄ (2 ∗ 3.96)

Figure 7 overlays the estimated PDF over the

histogram of 1024 samples shown in Figure 6.

Notice that the PDF and histogram are highly

correlated and the estimated PDF seems to be a

good model of the actual system.

Continuing with the assumption that the data in

Figure 7 has a normal distribution, the perform-

ance of the ADC can be quantified using the

measurements based on estimates for the mean

and standard deviation.

The sample mean in Figure 7 is -0.98 counts. A

perfect ADC, operating in the same mode with

its input grounded, has a mean of zero. Such a

mean deviation from ideal is called an offset. In

terms of voltage, the ADC’s Zero Offset in

Figure 7 is -0.98 counts or -4.67 µV

Figure 6. Noise Histogram for a 2 0-bit ADC

CELL -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6

Occurrences 0 1 8 32 64 124 181 204 169 126 76 32 6 1 0

Table 1. Data for Histogram in Figure 6

Noise Histogram Analysis

AN37REV1 5

(1 count = 5 volts ⁄ 220)) . The Full Scale Error is

measured in a similar manner, by calculating a

mean for a full-scale input signal.

The PDF’s shape, which is used in noise calcula-

tions, is defined by the sample variance or its

positive square root called the sample standard

deviation (S). The standard deviation of a noise

distribution is a measure of the rms or effective

noise. In Figure 7, the rms noise is 1.99 counts

or 9.49 µV. Additionally, the peak-to-peak noise

can be calculated by using the standard devia-

tion. Peak-to-peak noise is defined as the interval

which contains six standard deviations. For a

normal distribution, this interval represents

99.6% of the occurances. In Figure 7, the peak-

to-peak noise is 11.9 4 counts or 56.93 µV.

CONFIDENCE INTERVAL ESTIMATE

In the preceding section, the performance of an

ADC was quantified from a sample set of data.

For the data in Figure 7, the offset is calculated

at -4.67 µV, and the noise at 9.49 µV rms and

56.93 µV peak-to-peak. Since these values are

calculated from sampled data, a degree of uncer-

tainty is associated with the estimated

performance.

Using statistics, confidence intervals can be cal-

culated for the estimated performance values.

First a confidence interval for σ2 is described.

The accuracy of the model derived from sampled

data depends upon how well the sample set re-

sembles the actual system. The sample

distribution alone is not useful in determining

how well the sample variance correlates to the

actual variance. However, a confidence interval

can be obtained from the sample data. If the de-

grees of freedom ( v ) and the actual system

variance (σ2) are included with S2, then the ran-

dom variable [ (n−1)S2⁄σ2 ] has a chi-squared

distribution with v degrees of freedom, where

v = n−1 for n number of samples.

χ2 = (n−1) S2

σ2

Χ = -0.98

S = 1. 99

S2= 3.96

Figure 7. Histogram and Estimated PDF

Noise Histogram Analysis

6AN37REV1

By treating the variance as a chi-squared vari-

able, the variance PDF becomes a funct ion of the

degrees of freedom. Now the chi-squared distri-

bution can be used to determine the accuracy of

S2 and state σ2 as a con fidence interval.

Chi-squared percentiles can be obtained from

statistics tables. Statistic tables may not be avail-

able for large sample sizes. Fortunately, as the

number of samples or degrees of freedom in-

creases, a chi-squared distribution approaches a

normal distribution. A good approximation of a

chi-squared percentile, χ2(α;v), in terms of a

standard normal percentile [z(α)] is given by:

χ2 (α ; v) ≈ 0.5 ( z(α)+√2v−1 )2 , v > 100

In the above formula, χ2is a function of α = area

under the left tail of the standard normal curve

and v = degrees of freedom.

For example, a 99% confidence interval is deter-

mined for χ2 when n=1024:

Covering 99% of the total area leaves 1% uncov-

ered, which is divided equally between the left

and right tails. Thus the desired percentiles are

α = 0.005 and α = 0.995. From a table for a

Normal Distribution curve, the corresponding

percentile points z(α) are -2.575 and 2.575 re-

spectively. Thus 99% of the area under the

standard Normal Distribution l ies between -2.575

and 2.575.

Substituting values for z(α) and v in the

χ2(α;v) formula, a range of χ2 values is calcu-

lated.

χ2 (0.005 ; 1023) = 909.37

χ2 (0.995 ; 1023) = 1142.26

From these numbers, it can be stated that χ2 has

a 0.5% possibility of being less than 909.37 and

99.5% possibility of being less than 1142.26.

Combining these two conditions, χ2 has a 99%

possibility of being greater than 909.37 and less

than 1142.26.

Finally, a 99% confidence interval for σ2 is ob-

tained by substituting (n−1) S2⁄σ2 for χ2. Here the

values n = 1024 and S2 = 3.96 are used to fur-

ther i llustrate Figure 7.

909.37 < χ2 < 11 42.26

909.37 < (n−1) S2⁄σ2 and (n−1) S2⁄σ2 < 1142.26

σ2 < (n−1) S2

909.37 and (n−1) S2

1142.26 < σ2

3.55 < σ2 < 4.45

The calculated sample variance (S2) is 3.96

LSB2s. Th ere is a 99% co nfidence that the a ctual

system variance (σ2) is between 3.55 and 4.45

LSB2s. The uncertainty associated with 3.96 is

less than a half LSB2 (4.45 - 3.96 = 0.49). That

is to say the maximum error is 0.49, with 99%

confidence.

If the confidence interval or uncertainty is unac-

ceptable, adjustments can be made. Notice that

the interval width is effected by two variables

z(α) and n. The interval width can be reduced by

either increasing the sample set size or tolerating

more uncertainty.

The following calculations using peak-to-peak

noise show how z(α) and n affect the confidence

interval. Peak-to-peak noise is the uncertainty as-

sociated with a single sample. Above, the 99%

confidence interval was calculated for the vari-

ance. In Figure 7, the estimated variance is

between 3.55 and 4.45 with 99% confidence.

Noise Histogram Analysis

AN37REV1 7

This interval can be translated for peak-to-peak

noise:

peak-to -peak noise = 3σ + 3σ = 6σ

6 √3.55 < peak-to-peak noise < 6 √4.45

11. 30 < peak-to-peak no ise < 12.66

(99% Confidence Interval)

The width of this confidence interval is 12.66 -

11.30 = 1.36 counts. If the confidence is relaxed

to 95%, χ2(α;v) is recalculated using α = 0.025

and α = 0.975. This results in the confidence

interval width for peak-to-peak noise being re-

duced by 0.32 co unts:

11. 45 < peak-to-peak no ise < 12.49

(95% Confidence Interval)

If the set is increased to 2048 samples and the

sample variance remains at 3.96, χ2(α;v) is re-

calculated using v = 2047 and the 99%

confidence interval becomes:

11. 48 < peak-to-peak no ise < 12.44

(99% Confidence Interval)

The original 99% confidence interval is reduced

from 1.36 to 0.96 counts by increasing the sam-

ple set. As seen, thousands of samples may be

required to reduce the peak-to-peak noise confi-

dence interval to an acceptable width. The size

of the sample set depends upon system capabili-

ties and performance requirements. Large data

sets are affected by memory size and processing

capabilities of the data collection equipment, and

ADC throughput. Table 2 indicates how the de-

gree of confidence and number of samples affect

the c onfidenc e interval.

AVERAGING

Once the ADC noise has been characterized, the

effect of averaging can be analyzed. When sam-

ples are collected, the average or sample mean

(Χ) is an estimator of the population mean (µ).

Χ is likely to estimate µ very closely when the

sample size is large.

Again a confidence interval describes how

closely Χ estimates µ, and the sample size gov-

erns the width of the interval. The distribution of

Χ is Gaussian with a mean µ and variance σ2

n. In

the case where the ADC output is not Gaussian,

the distribution of Χ will approach the above

gaussian distribution as n gets large, by the

Central Limit Theorem. The confidence interval

for µ is:

Confidence Number of

Samples αz(α)χ2σ2 Range Peak-to-

Peak

Noise Range

99% 1024 0.005

0.995 z(0.005) = -2.575

z(0.995) = 2.575 909.37

1142.26 3.55 < σ2 < 4.45 11.30 to

12.66

95% 1024 0.025

0.975 z( 0.02 5) = -1 .96

z(0.975) = 1.96 935.79

1113.06 3.64 < σ2 < 4.33 11.45 to

12.49

99% 2048 0.005

0.995 z(0.005) = -2.575

z(0.995) = 2.575 1885.08

2214.55 3.66 < σ2 < 4.30 11.48 to

12.44

95% 2048 0.025

0.975 z( 0.02 5) = -1 .96

z(0.975) = 1.96 1923.03

2173.81 3.73 < σ2 < 4.22 11.59 to

12.33

Tabl e 2 . Deg ree of Con fide nce an d Sa mple Si ze Effects on the Co nfiden ce In terval

Noise Histogram Analysis

8AN37REV1

Χ - z(α) σ

√n < µ < Χ + z(α) σ

√n

where α is set by the co nfidence interval.

Note that z(α) σ is the peak noise and 2 z(α) σ is

the peak-to-peak noise value. Restated, the actual

mean differs from the sample mean by a range

of the peak-to-peak noise divided by the square

root of the number of samples. Thus averaging

multiple sample s reduc es the error by 1⁄√n.

µ = Χ ± peak−noise

√n

The peak-to-peak noise of the sample set for

Figure 7 is 11.94 counts. If one sample is taken,

the 99.6% confidence interval is 11.94 counts or

± 5.97 counts. If all 1024 samples are averaged,

the actual population mean is between -1.17 and

-0.79 with a 99.6% confidence. The uncertainty

is reduced to ± 0.19 counts. Note that the quanti-

zation error for an ideal ADC produces an error

of ± 0.5 counts. Averaging 1024 samples im-

proves this noisy 20-bit ADC’s accura cy to better

than 2 1 bits!

As shown above, averaging can reduce the ef-

fects of Gaussian distributed noise as well as

quantization error. However, the tradeoff is in re-

duced throughput. To get the confidence interval

to less than one count, √n has to be greater than

the peak-to-peak noise. For the sample set of

data plotted in Figure 7, 143 samples ( 11.942)

need to be acquired and averaged. Over 36,496

sample s are required to create a 24-bit ADC with

less than one count of peak-to-peak noise (re-

duce the uncertainty of a 20-bit converter to

±1/32 counts). This would reduce a 100kHz,

ADC to an effective throughput of 2.74 Hz. Av-

eraging sacrifices throughput for improved

resolut ion and reduced unc ertainty.

CONCLUSION

Statistical methods are available to measure the

performance of an ADC. The testing involves in-

putting a noise free, accurate DC signal to the

ADC and collecting a sample set of data points.

The sample set is used to calculate estimators for

the mean and standard deviation. More statistics

are used to decide the "goodness" and confi-

dence level associated with the estimates.

Averaging was introduced for reducing uncer-

tainty and improving resolution. However,

averaging reduces the ADC’s effective through-

put. Figure 8 illustrates the tradeoff between

reducing uncertainty and lowering the effective

throughput.

The same methods used to measure an ADC’s

performance can be used to measure the per-

formance of an entire system which includes

additional components containing multiple noise

sources and offsets. During system integration or

production test, tests can be performed as sub-

systems are added. This can be used to measure

the performance of individual subsystems or iso-

late problems to a subsystem or component. The

results can then be used with compensation tech-

niques to improve system performance or to

determine corrective actions.

Noise Histogram Analysis

AN37REV1 9

TABLE OF VARIABL ES

µ mean

σstandard deviation

σ2variance

p(x) probabil ity density fu nction

Χ sample mean

S sample stan dard deviatio n

S2 sample variance

χ2chi-squared variable

n number of samples

v degrees of freedom.

αarea u nder the normalized curve

zstandard normal distribution

0.01

0.1

1

10

100

Throughput (%)

0 20 40 60 80 100

Reduction in Uncertainty (%)

Effects of Averaging Multiple Samples

Figure 8. Tradeoff between Uncertainty and throughput

0

-Zc

Zc

Area = 1 -

α

α

/ 2

α

/ 2

PDF for a Gaussian random var iable. The area 1 -

α

is the confidence interval

0

Area = 1 -

α

α

/ 2

PDF for a Chi-Square v ariable. The area 1 -

α

is the confidence interval

α

/ 2

χ

2

a

χ

2

b

Noise Histogram Analysis

10 AN37REV1

REFERENCES

[1] John Neter, William Wasserman, & G.A.

Whitmore, "Applied Statistics" Allyn and Bacon,

Inc.

[2] Ronald E. Walpole & Raymond H. Myers,

"Probability and Statistics for Engineers and Sci-

entists", Macmillan Publishing Co., Inc, New

York, 1978 .

[3] Rich ard H. Willia ms, "Ele ctrical Eng ineerin g

Probabi lity", West Pu blishing Company.

[4] Ferrel G. Stremler, "Introduction to Commu-

nications Systems",Addison-Wesley Publishing

Company, Inc. 1982.

Noise Histogram Analysis

AN37REV1 11

• Notes •

Noise Histogram Analysis

12 AN37REV1