Research: Science and Education edited by
Topics in Chemical Instrumentation
Howard A. Strobel Duke University Durham, NC 27708-0354
A Standardized Approach to Collecting and Calculating Noise Amplitude Spectra Norman N. Sesi, Mathew W. Borer, Timothy K. Starn, and Gary M. Hieftje* Department of Chemistry, Indiana University, Bloomington, IN 47405
Noise is a fundamental limitation in any measurement system and affects the accuracy and precision of any analytical method. It will ultimately limit the smallest detectable signal that can be measured within a specified level of confidence (1). For that reason it is not surprising that efforts to improve analytical instrumentation and techniques have concentrated on minimizing the noise level (2–12). Before proper correction methods can be implemented, noise sources, of course, need to be identified and classified. Fourier techniques can be a powerful tool in this endeavor by allowing a complex time-domain waveform to be “simplified” by breaking it down into the individual frequencies that comprise it. Fourier’s basic theorem states that any process in the time domain can be represented as a series of sine and cosine waves (in frequency space) (13, 14 ). The determination of noise amplitude spectra has played an integral part in the development and improvement of analytical instrumentation (3–5, 15–22). Unfortunately, comparing the noise behavior of different types of sources (e.g., glow discharge vs inductively coupled plasma, ICP) or even of the same type (e.g., two different ICPs) has been difficult because standardized rules seem not to have been laid down. For example, a survey of the literature reveals that published noise spectra have been plotted using various units of noise magnitude vs frequency (Hz). These units include decibels (dB), A/(Hz)l/2, and V 2/Hz; and in some cases, no explicit units were assigned. Furthermore, the methods used to measure and calculate the noise spectra seem to differ from laboratory to laboratory. The purpose of this paper is to suggest a clearly defined approach for collecting and calculating noise amplitude spectra that we have been using in our laboratory for about eight years (3, 5, 21, 22) and to review procedures for proper data *Corresponding author. Present address for N. Sesi and M. Borer: Eli Lilly and Company, Lilly Research Laboratories, Indianapolis, IN 46285. Present address for T. Starn: Department of Chemistry, West Chester University, West Chester, PA 19383.
788
acquisition. Although the treatment is applicable to many areas of chemistry, physics, and other laboratory sciences, the examples chosen for illustration are taken largely from spectrochemical analysis and atomic spectrometry. Fundamentals
Types of Noise In general, noise can be classified into four primary categories: white, flicker, whistle, and impulse. White or Gaussian noise includes thermal (also known as Johnson or Nyquist) noise and shot (also known as Schottky) noise. It has a flat spectrum (i.e., the same noise power in each hertz of frequency up to some limit) and a Gaussian amplitude distribution (i.e., a histogram of amplitudes has a Gaussian shape). White noise arises from the random movement of charge carriers in an electrical circuit (thermal noise) and from the statistical fluctuation or random arrival of particles across a junction or to a detector (shot noise). White noise, being random, can be minimized by averaging a measurement over a sufficiently long period of time, reducing the measurementsystem bandwidth, lowering the temperature of the detector and associated electronics (thermal noise), or limiting the current flowing through the detection electronics (shot noise) (14 ). Flicker noise (also referred to as 1/f, fluctuation, pink, or excess low frequency [e.l.f.] noise) gives a spectrum whose magnitude is inversely related to frequency (i.e., lower frequencies have greater noise amplitude). While the causes of flicker noise vary from application to application, major origins include the random but slow drift of properties of electronic components with temperature, variations in power-line voltages with time, and aging of analytical instruments. Flicker noise can be reduced by operating instruments in a temperaturecontrolled environment or by using constant-voltage transformers and signal-modulation techniques (10). Whistle noise is an environmental or exogenous source of noise that has a spectrum consisting of peaks at discrete
Journal of Chemical Education • Vol. 75 No. 6 June 1998 • JChemEd.chem.wisc.edu
Continued on page 789
Research: Science & Education
frequencies. Common whistle noises include interference from alternating-current (ac) sources (e.g., 50 or 60 Hz and associated harmonics from the main power distribution lines in Europe and the United States, respectively), noises related to sample-introduction systems such as peristaltic-pump rollers or spray-chamber drainage systems, as well as radiofrequency (rf ) interference (e.g., communication devices or rf plasma power supplies). Whistle noise can be overcome by proper instrument shielding and through signal-filtering techniques (14, 23–25). Lastly, impulse noise is caused by abrupt bursts of energy in time. Its origins are environmental, but it has a noise spectral distribution that is flat like white noise. Examples include lightning strikes, power surges when equipment is turned on and off, and instrument vibrations when something heavy is dropped on the floor. The effects of impulse noise, because it does not occur all of the time, can be minimized through signal averaging, by limiting the bandwidth of the observed signal, and by rejection of spurious peaks.
Discrete Fourier Transform The discrete Fourier transform is used to convert a digitized waveform from the time domain to the frequency domain. The discrete Fourier transform is given as (13) N –1
X k ∆ f = 1 ∆ t Σ x n ∆ t cos 2 π k n ∆ t ∆ f – i sin 2 π k n ∆ t ∆ f N n =0
(1)
where N is the total number of points in the digitized waveform, n is the index of the waveform sampled in the time domain (n = 0, 1, …, N – l), k is the index (k = 0, 1, …, N – l) of the calculated frequency components (i.e., the index of the spectrum in frequency space), ∆ f is the frequency interval, ∆ t is the sampling interval in the time domain, x(n∆t) is the time-domain representation of the waveform to be Fourier transformed, X(k ∆ f ) is the Fourier-domain representation of the sampled waveform, and i is the imaginary quantity. Two important points should be made concerning eq 1. First, division by N is performed on the forward transform instead of on the inverse Fourier transform as is usually done. The advantage of this procedure is that the calculated Fourier dc (zero frequency) term will be the average of the acquired time samples (13). Second, the frequency resolution is defined by the inverse of the data-acquisition interval ∆f = 1 N∆ t
(2)
In other words, the longer a waveform is sampled in the time domain, the better will be the frequency resolution in Fourier space.
Time-Domain Sampling of the Waveform The accurate sampling of a signal waveform is one of the most important steps in processing or characterizing it. According to the Nyquist sampling theorem, a signal should be sampled (i.e., digitized) at a rate that is at least twice as high as the highest frequency component in the waveform that is necessary to a measurement (27 ). For example, the spectral range of importance in an infrared measurement on a sample must be decided before data are taken. The highest frequency component that is properly sampled is generally referred to as the Nyquist frequency. Since signals can, in theory, possess frequency compo-
nents from dc to infinity, some type of band-limiting device such as a low-pass filter is normally required to isolate the desired frequency range to minimize the appearance of “ghost” peaks. This type of bandpass limitation is necessary to prevent frequency components higher than the Nyquist frequency from showing up as “ghost” peaks in the measured spectrum. Such spurious peaks will fall at a frequency that is the difference between the sampling frequency (twice the Nyquist frequency) and the extraneous frequency component. For example, if the upper frequency of analytical interest is 100 Hz (yielding a sampling frequency of 200 Hz), an extraneous 120 Hz peak will appear at 80 Hz as an aliased feature, thereby distorting the spectrum. Experimental Procedure A Hewlett-Packard model 3326A two-channel frequency synthesizer was used as the waveform-generation source. Signals from the function generator were passed through a Krohn-Hite model 3342 double low-pass filter having a ᎑ 96 dB/octave roll-off to limit the bandwidth of the waveform (in order to prevent aliasing). The filtered waveform was then digitized at an appropriate rate using a National Instruments NB-MIO-16XL-18 data acquisition board and converted into a noise spectrum on an Apple Macintosh Quadra 700 computer with software written in-house using the LabVIEW programming language (National Instruments, version 3.0). This and other programs can be downloaded from the Gopher server at the Indiana University Laboratory for Spectrochemistry (26 ). Unless stated otherwise, the sample waveform, having a 1.0-V root-mean-square (rms) amplitude with a l.0-V dc offset, was sampled at a rate of 400 Hz (200 Hz Nyquist frequency) and windowed with a Hanning (cosine2) filter. The waveform was sent through a low-pass filter set at 100 Hz before digitization. Five scans were acquired and averaged in the frequency domain to yield the resultant spectrum. The reasons for choosing the above settings and the method for computing the noise spectra are described in the Results and Discussion section below. Results and Discussion
Measuring the Signal Waveform As described above, proper waveform measurements require the signal to be frequency band-limited and to be sampled at a rate consistent with the Nyquist rule. The frequency bandpass criterion can be met by sending the signal through a low-pass filter. The output of the filter will, of course, be a modified version of the input signal; the filter will attenuate components present in the signal that are higher in frequency than the cutoff frequency of the filter. In an ideal low-pass filter, the cutoff frequency would be the point at which frequency components below the cutoff are transmitted without change in amplitude and frequencies above cutoff would be blocked. Unfortunately, a filter with an infinitely sharp roll-off does not exist in the real world. For a conventional low-pass filter the cutoff frequency is by definition the point at which its output has dropped to 0.707 (3 dB) of the input amplitude (14, 27 ). The implications of using a traditional low-pass filter are twofold. First, desired frequencies just less than the cutoff frequency will be passed through the filter with an ampli-
JChemEd.chem.wisc.edu • Vol. 75 No. 6 June 1998 • Journal of Chemical Education
789
Research: Science and Education
tude that will be too small. Second, unwanted frequency components just above the cutoff will be transmitted, albeit with reduced amplitude. If the frequency range of interest were from 0–100 Hz, setting the low-pass filter response to 0.01 s (100 Hz) would be inappropriate because the measured amplitudes of the 80–100-Hz components would not be representative of the original waveform (Fig. 1). The conclusion to be drawn is that only the frequency components in the 0–80 Hz range are free (within about 3%) from loss of amplitude. A further concern is that with a filterfrequency setting of 100 Hz, only if the original signal is sampled at a rate that is at least 280 Hz will aliasing of components in the 100–140 Hz region be eliminated (since with a 100-Hz filter, frequencies from 100–140 Hz are still transmitted, although with much reduced amplitude). Of course, the exact filter cutoff frequency and sampling rate must be user-determined based on the particular filter to be employed and the signal frequency range of interest.
Calculating the Noise Spectrum After the waveform is appropriately digitized in the manner discussed above, voltage values should be corrected for analog-to-digital converter (ADC) and current-amplifier gains. The average value of the data set (i.e., the dc component) should be determined and subtracted from each point in the array to improve the contrast between low- and high-amplitude noise features (13). The signals are then multiplied by an empirically determined calibration constant to convert the measured values into units of nanoamperes (nA), root-meansquare (rms). The calibration constant corrects for energy losses in the measurement equipment (cables, filters, etc.) and converts the measured values from peak amplitude (as measured by the ADC) to rms. The resulting waveform is windowed (i.e., apodized or weighted) by multiplying it by a suitable function (generally a Hanning [cosine2] window as mentioned earlier) to minimize the effect of spectral leakage and to improve the contrast between adjacent frequency elements (13, 25). The choice of the weighting function depends, of course, on the waveform to be measured and on the type of information to be extracted from the noise spectrum. A Hanning function has the dual advantages of providing good resolution in the resulting spectrum (rapid drops at the edges of a sharp frequency peak) and of not introducing spurious
Figure 1. Effect of amplitude bias due to the low-pass filter transmission roll-off with frequency. The 95-Hz component should have the same amplitude as that of the 40-Hz peak. Low-pass filter frequency setting: 100 Hz. Sampling rate: 400 Hz. Frequency resolution: 1.0 Hz (digitization period = 1.0 s). Window: Hanning.
790
side-lobes on frequency features. Once signal preprocessing is accomplished, the waveform is Fourier transformed to the frequency domain. Ng and Horlick (28) have described several algorithms by which the data can be properly converted. The noise amplitude spectrum (in units of nA, rms) is calculated by taking the square root of the sum of the squares of the real and imaginary components of the Fourier-transformed signal. Finally, the spectrum is divided by the average dc signal (not rms) in microamperes, to yield a noise spectrum that is normalized to the signal strength. The amplitude scale of the resulting spectrum is thus expressed in “reduced units”. The above procedure can be repeated several times if signal averaging is desired. Signal averaging should be done in
A
B
C
Figure 2. (A) Amplitude and peak-width distortion of a 45.5-Hz frequency component due to spectral leakage. The amplitude and width should be similar to those of the 40-Hz peak. Frequency resolution: 1.0 Hz (digitization period = 1.0 s). Sampling rate: 400 Hz. Window: rectangular. (B) Effect of triangular window function on spectral leakage of a 45.5-Hz frequency component. Sampling rate: 400 Hz. Frequency resolution: 1.0 Hz (digitization period = 1.0 s). (C) Effect of Hanning window function on spectral leakage of a 45.5-Hz frequency component. Sampling rate: 400 Hz. Frequency resolution: 1.0 Hz (digitization period = 1.0 s).
Journal of Chemical Education • Vol. 75 No. 6 June 1998 • JChemEd.chem.wisc.edu
Research: Science & Education
the frequency domain if the phase relationship between the individual waveforms is unknown. Time domain averaging would be possible only if each time-based signal is sampled relative to a reference trigger so all of the acquired waveforms are synchronized.
Calibration If noise spectra are to be compared quantitatively with those determined in other laboratories, either from similar or different sources, the amplitude scale of the computed noise spectrum needs to be calibrated absolutely. This calibration can be accomplished by introducing a sine wave signal of known rms amplitude into the measuring network (consisting of low-pass filter, analog-to-digital converter, and computer) and normalizing the resultant output to that amplitude. For example, if a 1-V rms, 40-Hz sine wave is measured as having a peak-height amplitude of 0.50 V in the computed spectrum, then the correction factor would be 1.0 V rms/ 0.50 V = 2.0. It is assumed that the measured amplitude was determined by adding the negative and positive 40-Hz frequency components from the double-sided spectrum produced by the Fourier transform. In general, the positive and negative halves of the spectrum are symmetrical, so one half contains redundant information. Since only one half of the spectrum is displayed, the noise amplitudes must be multiplied by two (exceptions are the dc and Nyquist components) because half of the noise energy is stored in the negative frequency range and the other half in the positive frequency domain (because of conservation of energy).
Spectral Leakage Spectral “leakage” occurs when an integral number of cycles of a particular frequency do not fit in the time window of the measurement or, stated differently, when the frequency resolution of the computed spectrum is not an integral submultiple of the waveform frequency. The result of spectral leakage is distortion of both amplitude and shape of spectral peaks. Figure 2A shows the effect of sampling a 45.5-Hz sine wave at a frequency resolution of 1.0 Hz (i.e., with a total digitization interval of 1.0 s). Note the lower magnitude and broader base-width of the 45.5-Hz peak compared to that of
Figure 3. Correction of amplitude bias due to spectral leakage of a 1.0-V, rms, 1.0-V dc offset 45.5-Hz component using a 4-time (32) zero-fill Fourier-domain interpolation. The 40-Hz component also has a 1.0-V, rms amplitude with a 1.0-V dc bias. Sampling rate of original waveform: 400 Hz. Frequency resolution of original waveform: 1.0 Hz. Window: Hanning.
a 40-Hz component. This distortion is caused by the chosen digitization interval (1.0 s) and by the sampling operation itself. The process of sampling a waveform for a finite period of time implicitly multiplies that waveform in the time domain by a rectangular window function. The rectangular window has a (sin x)/x spectrum, consisting of peaks at discrete frequencies determined by the chosen digitization interval. Since the original signal is not an integral multiple of the frequency spacing, the convolution in Fourier space of the original signal with the (sin x)/x function leads to the observed effects (13, 25). The effect of spectral leakage (sometimes called timedomain truncation) can be overcome in three ways. The first possibility is to convolute the sampled waveform with different windows in the time domain. The degree to which spill-over into adjacent frequency bins is reduced will depend on how the sampled waveform fits into the convolving window; different windows have distinct shapes (13, 25). Figures 2A, 2B, and 2C depict the effects of using rectangular, triangular, and Hanning windows, respectively. Although such apodization (windowing) can minimize spectral leakage (compare Figs. 2A and 2C), it lowers the frequency resolution (i.e., makes the main-lobe peak broader). The true frequency resolution will depend on the bandwidth of the weighting function (cf. Figs. 2A-2C) (25). The best compromise between spectral leakage and frequency resolution will depend on the type of waveform to be measured and the information to be gleaned from the noise spectrum. The second method of overcoming the effects of timedomain truncation is to interpolate the noise spectrum by using a technique known as Fourier-domain zero-filling (29– 32). This approach can correct the amplitude bias but will not improve the frequency resolution (cf. Fig. 3). Third, if the frequency components of interest are known beforehand, the original waveform can be sampled such that the frequency resolution is an integral submultiple of the desired frequencies (Fig. 4). This third alternative assumes that all desired frequency components will have an integral number of cycles in the measurement time-window. If the frequency components are not harmonically related to the sampling time, the required information can be extracted from several noise spectra acquired at different frequency intervals.
Figure 4. Correction of spectral leakage of the 45.5-Hz component by sampling at a total digitization interval that is a harmonic of both the 40- and 45.5-Hz frequencies. Sampling rate: 400 Hz. Frequency resolution: 0.5 Hz (total digitization interval = 2.0 s). Window: Hanning.
JChemEd.chem.wisc.edu • Vol. 75 No. 6 June 1998 • Journal of Chemical Education
791
Research: Science and Education
Why Normalize to the dc Level? So far, we have reviewed how to acquire and calculate noise spectra and have described methods for overcoming some common problems encountered in noise-spectral analysis. Now we would like to explain why the noise amplitude spectrum should be normalized to the dc level of the input signal. It is well known that noise is not the sole factor in determining the figures of merit of an analytical source or instrument (7–9, 33–36 ). Characteristics such as precision and detection limits are dependent also on the analyte signal level. By mathematically dividing the noise magnitude by the dc level, the noise spectra are scaled to take into account differences in signal strength. For example, from the perspective of detection limits, two sources are equivalent analytically if they produce the same signal-to-noise ratio. Again, it is the combination of signal and noise that is important and not the individual values. One might argue that normalizing to the square root of the dc signal would be more appropriate under circumstances where shot noise dominates, since shot noise scales as the square root of the dc level, whereas flicker and whistle noises increase in direct proportion to the dc magnitude. However, under operating conditions most often used in spectrometric dc measurements (detection-system time constants of several milliseconds to a few seconds), flicker noise generally dominates (7, 21, 22). Summary The main points of this paper are: 1. Sampling a band-limited waveform at a rate that is twice the filter cutoff frequency will lead to amplitude biasing of frequency components just less than the 3 dB point and aliasing of components just above the roll-off frequency. Low-pass filters should be set to a frequency such that all components of interest are transmitted by the filter with minimal amplitude truncation. The sampling rate should then be further adjusted to eliminate any possibility of frequency aliasing. 2. Spectral leakage or time-domain truncation can affect the measured noise amplitude. Proper correction procedures include windowing, Fourier-domain interpolation, and the use of different waveform-acquisition times. 3. Calibrating the magnitude axis in units of nA, rms, and normalizing the noise amplitude spectrum to the dc signal level (not rms) is recommended so noise spectra from similar sources obtained in different laboratories or with different instruments can be quantitatively and qualitatively compared.
Acknowledgment Supported in part by the National Institutes of Health through grant GM 53560. Literature Cited 1. Fassel, V. A.; Scribner, B. F.; Alkemade, C. Th. J.; Birks, L. S.; Menzies, A. C.; Plsko, E.; Robin, J. P.; Winefordner, J. D.; Jenkins, R.; Kaiser, H.; Kvalheim, A.; Muller, R.; Rubeska, I.; Strasheim, A.; Vukanovic, V.; Walters, J. Pure Appl. Chem. 1976, 45, 99–103.
792
2. Rayson, G. D.; Shen, S. Y. Appl. Spectrosc. 1992, 46, 1245–1250. 3. Sesi, N. N.; Galley, P. J.; Hieftje, G. M. J. Anal. At. Spectrom. 1993, 8, 65–70. 4. Walden, G. L.; Bower, J. N.; Nikdel, S.; Bolton, D. L.; Winefordner, J. D. Spectrochim. Acta 1980, 35B, 535–546. 5. Brushwyler, K. R.; Hieftje, G. M. Appl. Spectrosc. 1992, 46, 1098–1104. 6. Chester, T. L.; Winefordner, J. D. Spectrochim. Acta 1976, 31B, 21–29 7. Alkemade, C. Th. J.; Snelleman, W.; Boutilier, G. D.; Pollard, B. D.; Winefordner, J. D.; Chester, T. L.; Omenetto, N. Spectrochim. Acta 1978, 33B, 383–399. 8. Boutilier, G. D.; Pollard, B. D.; Winefordner, J. D.; Chester, T. L.; Omenetto, N. Spectrochim. Acta 1978, 33B, 401–415. 9. Alkemade, C. Th. J.; Snelleman, W.; Boutilier, G. D; Winefordner J. D. Spectrochim. Acta 1980, 35B, 261–270. 10. Ingle, J. D., Jr.; Crouch, S. R. Spectrochemical Analysis; Prentice– Hall: Englewood Cliffs, NJ, 1988; Chapter 5. 11. Myers, S. A.; Tracy, D. H. Spectrochim. Acta 1983, 38B, 1227–1253. 12. Easley, S. F.; Monnig, C. A.; Hieftje, G. M. Appl. Spectrosc. 1991, 45, 1368–1371. 13. Ramirez, R. W. The FFT–Fundamentals and Concepts; Prentice– Hall: Englewood Cliffs, NJ, 1985. 14. Diefenderfer, A. J. Principles of Electronic Instrumentation, 2nd ed.; Saunders: Chicago, 1979; Chapter 13. 15. Talmi, Y; Crossum, R.; Larson, N. M. Anal. Chem. 1976, 48, 326–335. 16. Davies, J.; Snook, R. D. J. Anal. At. Spectrom. 1987, 2, 27–31. 17. Montaser, A.; Clifford, R. H.; Sinex, S. A.; Capar, S.C. J. Anal. At. Spectrom. 1989, 4, 499–503. 18. Goudzwaard, M. P.; De Loos-Vollebregt, M. T. C. Spectrochim. Acta 1990, 45B, 887–901. 19. Winge, R. K.; Eckels, D. E.; DeKalb, E. L.; Fassel, V. A. J. Anal. At. Spectrom. 1988, 3, 849–855. 20. Belchamber, R. M.; Horlick, G. Spectrochim. Acta 1982, 37B, 17–27. 21. Monnig, C. A.; Hieftje, G. M. Appl. Spectrosc. 1989, 43, 742–746. 22. Madrid, Y.; Borer, M. W.; Zhu, C.; Jin, Q.; Hieftje, G. M. Appl. Spectrosc. 1994, 48, 994–1002. 23. Betty, K. R.; Horlick, G. Appl. Spectrosc. 1976, 30, 23–27. 24. Braganza, O. P.; Prabhananda, B. S. Meas. Sci. Technol. 1995, 6, 329–331. 25. Brigham, E. O. The Fast Fourier Transform and Its Applications; Prentice Hall: Englewood Cliffs, NJ, 1988. 26. Starn, T. K.; Hieftje, G. M. Spectrochim. Acta 1994, 49B, 533–534. 27. Malmstadt, H. V.; Enke, C. G.; Crouch, S. R. Electronics and Instrumentation for Scientists; Benjamin/Cummings: Menlo Park, CA, 1981. 28. Ng, R. C. L.; Horlick, G. Spectrochim. Acta 1981, 36B, 529–542. 29. Horlick, G.; Yuen, W. K. Anal. Chem. 1976, 48, 1643–1644. 30. Griffiths, P. R. Appl. Spectrosc. 1975, 29, 11–14. 31. Lepla, K. C.; Horlick, G. Appl. Spectrosc. 1990, 44, 1259–1269. 32. Comisarow, M. B.; Melka, J. D. Anal. Chem. 1979, 51, 2198–2203. 33. Boumans, P. W. J. M.; Vrakking, J. J. A. M. Spectrochim. Acta 1987, 42B, 917–939. 34. Boumans, P. W. J. M. Spectrochim Acta 1990, 45B, 799–813. 35. Boumans, P. W. J. M. Spectrochim Acta 1991, 46B, 431–445. 36. Boumans, P. W. J. M. Spectrochim Acta 1991, 46B, 917–939.
Journal of Chemical Education • Vol. 75 No. 6 June 1998 • JChemEd.chem.wisc.edu