Digital data smoothing utilizing Chebyshev polynomials - Analytical

Analytical Chemistry 1977 49 (9), 1369-1375 ... The enhancement of electroanalytical data by on-line fast Fourier transform data processing in electro...
0 downloads 0 Views 332KB Size
copper. Above 700 OC, CusO reacts very rapidly and both reactions are completed in essentially the same time. In conclusion, we find t h a t pure cuprous oxide is easily produced, and is a satisfactory oxidant for sulfides. The oxidation takes place a t low Poz conditions, making theoretical SO3 and measured sulfate production completely negligible.

ACKNOWLEDGMENT We thank D. R. Pettis and D. W. N. Keith for their help in the laboratory and T. A. Rafter, J. R. Hulston, and G. L. Lyon for comments on the manuscript.

LITERATURE CITED (1) P. Fritz, R. J. Drimrnie, and V . K. Nowicki. Anal. Chem., 46, 164 (1974).

(2) V. A. Grinenko, Russ. J. Inorg. Chem., 7 , 1284 (1962). (3) T. A. Rafter, N.Z. J. Sci. Techno/..Sect. 6, 38, 849 (1957). (4) H. G. Thode, J. Monster, and H. B. Dunford, Geochim. Cosmochim Acta, 25, 159 (1961). (5)H. Sakai and M. Yamarnoto. Geochem. J., 1, 35 (1966). (6) I. R. Kaplan, J. W. Smith and E. Ruth, Geochim. Cosmochim. Acta, Suppl. 1, 2, 1317 (1970). (7) 0. Kubaschewski, E. El. Evans, and C. B. Alcock, "Metallurgical Thermochemistry", 4th ed., Pergamon Press, London, 1967. (8) T. A. Rafter, N.Z. J. Sci. Techno/.,Sect. B., 38, 955 (1957). (9) S. Oana and H. Ishikawa, Geochem. J., 1 , 45 (1966). (10) J. R. Hulston and E. W. Shilton N.Z. J. Sci., 1, 91 (1958). (11) T. A. Rafter, N.Z. J. Sci., 10, 402 (1967). (12) M. Jansen and K. Anderko, "Constitution of Binary Alloys", McGraw-Hill, New York. 1958.

RECEIVEDfor review December 12, 1974. Accepted March 3, 1975.

Digital Data Smoothing Utilizing Chebyshev Polynomials D. E. Aspnes Bell Laboratories, Murray Hi//, NJ

07974

T h e advantages of digital processing techniques relative to analog filtering methods for reducing noise in data are well known and have been discussed in detail in several recent papers dealing with both sliding polynomial ( I ) and Fourier transform (2-4) approaches to digital smoothing. T h e Fourier transform method is particularly powerful since the Fourier amplitude coefficients can be weighted individually in the signal reconstruction process. Nonetheless, difficulties occur when data having significantly different end-point values, of the type obtained for example in dc polarography, are Fourier transformed. Here, relatively large amplitude coefficients are obtained for high harmonics, which simply reflects the difficulty of generating the end-point discontinuity using a basis set of periodic functions. This effect may be reduced by subtracting a linear background from the data prior to processing ( 3 ) , but this is not completely effective since the discontinuity is only removed to lowest order. It is the purpose of this note to point out the existence of a method of accommodating end-point discontinuities based on expansion in terms of the Chebyshev polynomials, T , ( x ) , defined by the expression ( 5 )

T,(x) = cos(n cos-'x).

(1)

T h e Chebyshev polynomials, the first few of which are Tab) = 1, T i ( x ) x , T z ( X ) = 2 X 2 - 1, are orthogonal and have a maximum value of 1 over the expansion interval -1 Ix I1, but are not periodic and consequently form a natural basis set for representing data. The orthogonality condition satisfied by these functions is given explicitly by (6)

c n =

{ NN /f2o r€orn =n?0 1

(4 1

For application purposes, we assume t h a t the data are represented by a set of points (f,, vJ, p = 1, 2, . . . , M , where f , is the value of the measured quantity a t the value u p of the variable. We suppose that these data can be represented formally by a continuous function f ( u ) , where f(u,) = f,, over the interval u1 Iv IU M . If for simplicity we assume t h a t the v, are equally spaced with increment h, then the Lagrange three-point interpolation formula ( 7 )

can be used to provide an adequate representation of f ( u ) for v near u p . We next define a new variable, 0 = O ( u ) , according to

or conversely z'(0) = [t'i

+

I'M

+

(Z'M

- Ci)cos8]/2.

Then the Chebyshev expansion of f ( u ) for (6)

5 v IU M is

00

00

a , T n ( c o s Q ( ~= ))

f ( ~=)

u1

(7)

COS

8(v)

(8)

n=O

n.0

where the coefficients a, are given by (2)

N

a, where X"

= cos

(5

(v -

i))

=

(l/c,)Cf(c,')cos(na,)

(9)

url

where u,,' = ~ ( 0 , from ) Equation 7 and

(3 )

8, =

~ ( 2'

1/2)/N

ANALYTICAL CHEMISTRY, VOL. 47, NO. 7, JUNE 1975

(10) 1181

k:.

.

I

Au

- 300K

i

w

9

c

0

W

0

- IO

F I

-10 I

2 .o

I

2.5

3.O

1

3.5

E (eV)

Flgure 1. Points: values of t h e energy derivative of the real part of the dielectric function of Au calculated numerically from ellipsometric data. Dashed curves: lowest three Chebyshev polynomial approximations to the data points. Solid curve: 29th-order Chebyshev polynomial approximation, with zero offset for clarity

20

25

3.O

3.5

E (eV)

Figure 2. Points: spectrum synthesized by adding random numbers in range of -2.5 to +2.5 eV-' to points of Figure 1. Dashed curve: 29th-order Chebyshev polynomial approximation from Figure 1 used a s a reference. Solid curve: Chebyshev polynomial approximation reconstructed with weighting function as described in the text

Typically N = M , but N can be greater or less than M depending on the situation. T h e Chebyshev expansion coefficients for the set of values f,, equally spaced in u, are given by the Fourier coefficients for the set of values f(u,'), spaced nonuniformly in u according to a cosine distribution (6). Consequently, the coefficients a,, can be calculated by the usual fast Fourier transform (8), and smoothing can be performed by truncating or suitably attenuating the coefficients in the reconstruction process based on Equations 6 and 8. T h e transformation to the nonuniformly spaced values u,,' eliminates t h e effect of end-point discontinuities in the original data in two ways. First, Equation 7 in effect continues f ( u ) beyond the measurement range so that it is periodic and symmetric about the end points u1 and U M . This eliminates the effect of end-point discontinuities to lowest order and ensures that the cosine functions form a complete basis for the expansion of the values f(u,,').Second, the cosine distribution of the points u,' in effect spreads out f ( u ) at the end points so that the interpolation function for the set of values f(u,,') reaches the end points with zero slope. This eliminates the end-point discontinuities in the first derivative, which is essential because each cosine function of the basis set also has zero slope a t the end points, and a derivative discontinuity would again require a relatively large number of coefficients to reproduce. Therefore, the set f ( v , , ' ) can be represented with relatively few coefficients a,,. T h e above expressions can be applied to a specific situation by means of the following procedure. 1) Generate the set of values f(u,,') from the data points (f,, u p ) , p = 1, 2, . . . , M , taken over the interval u 1 I u 5 u . ~ by , means of Equations 7 and 10 and the interpolation formula Equation 5. 2) Calculate the amplitude coefficients a, by the Fourier transform Equation 9. 3) Attenuate or truncate the amplitude coefficients t o perform the smoothing in the desired manner, and reconstruct the smoothed data by means of Equations 7 and 8. We demonstratethe use of the Chebyshev expansion approach to digital data smoothing by applying the above procedure t o smooth the first energy derivative, del (E)/dE, of dielectric function data for Au obtained with a high-resolution scanning ellipsometer (9, 1 0 ) developed in this laboratory for solid and solid-solution interface studies. T h e original data consisted of 250 values of q ( E ) for a n evaporated Au film on a glass substrate measured a t equal energy 1182

ANALYTICAL CHEMISTRY, VOL. 47, NO. 7, JUNE 1975

intervals over the range 1.7 t o 3.5 eV. These data were differentiated numerically t o yield the unsmoothed first-derivative expansion data shown as points in Figure 1. T h e derivative data have widely different end-point values and include a single structure at approximately 2.5 eV which is due to the onset of d-band t o Fermi-level transitions in the bulk metal. Superimposed on these data are shown the zeroeth, first, and second Chebyshev polynomial approximations calculated with N = M = 250. Optimal smoothing by truncation was found to occur a t n = 29 from inspection of the amplitude coefficients, which decreased essentially uniformly up to this index and remained approximately constant thereafter. T h e reconstructed curve is also shown in Figure 1, offset from the original data for clarity. It is evident that this curve provides a faithful representation of the signal portion of the original unsmoothed data. In order to test the capability of the Chebyshev procedure to smooth random noise, the derivative data were modified by adding to each point a random function of peak-to-peak amplitude of 5 eV-', to create a signal-tonoise ratio of 2 as shown in Figure 2. These data were smoothed by reconstruction with the unmodified coefficients through n = 9, then attenuating the remainder according to the Gaussian cutoff exp[-(n - 9)"/7']. T h e reconstructed Chebyshev polynomial approximation is compared directly to the smoothed curve of Figure 1 in Figure 2, and it is seen that the agreement is quite good. The small oscillation that occurs in the reconstructed curve in Figure 2 above 3.4 eV is a remnant of the noise fluctuation which can be seen in the modified data. This illustrates one aspect of the Chebyshev procedure of which the prospective user should be aware: the additional weighting given to the end points in the calculation produces less smoothing a t the ends than in the middle. In situations where this cannot be tolerated, the advantages of uniform-weight averaging provided by Fourier techniques can be combined with the end-point discontinuity reduction capabilities of the Chebyshev approach by subtracting low-order Chebyshev polynomial components of the original data, then smoothing the remainder by Fourier methods. T h e smoothed curve is then reconstructed from the subtracted Chebyshev polynomials, together with the appropriately weighted Fourier components. This procedure

I 2 .o

I

2.5

, s 3.0

3.5

E(eV)

Figure 3. Comparison of different smoothing techniques applied to the artificially noisy data of Figure 2, as described in the text. The vertical axis scale is the same as that of Figure 2 (1) Chebyshev smoothing: (2) combined Chebyshev/Fourier smoothing: (3) Fourier smoothing remainder obtained by subtracting a straight line joining end points: (4) Fourier cosine smoothing: (5)Fourier smoothing remainder obtained by subtracting a third-order polynomial matching average endpoints and derivatives

used in the Chebyshev smoothing example, after first subtracting the Chebyshev polynomials of order u = 1, . . . , 4. T h e smoothing in this case is effective in a uniform manner over the entire curve. T h e third curve shows the result obtained by Fourier smoothing the remainder with the same truncation function following subtraction of a straight line joining the end points ( 3 ) .This procedure forces the derivatives of the smoothed curve to be equal a t the end points and induces a minor distortion a t the ends, b u t a better result is still obtained near the ends than with Chebyshev smoothing alone. The result of Fourier cosine smoothing (Equations 8-10), followed by truncation with the (equivalent) function exp[-(n - 6)2/52], n 2 7, is given by the fourth curve. Here, end-point distortion occurs because the derivatives of the smoothed curve must be zero a t the end points. T h e final curve was calculated by applying the Fourier method to the remainder obtained by subtracting a third-order polynomial, smooth on the scale of Figure 3, with coefficients chosen to give visual "best"-fit end-point and deriuatiue values to the data. This latter procedure is a minor extension of the technique of Ref. ( 3 ) . In general, each method yields basically the same lineshape, with relative advantages and disadvantages which must be considered with respect to the intended application. We have used the Chebyshev approach in numerous situations including smoothing raw dielectric function data and numerically calculated derivatives, and have found t h a t it gives excellent results.

LITERATURE CITED substantially reduces both end-point and derivative discontinuity effects in Fourier sine/cosine smoothing in a systematic way, since odd-order Chebyshev polynomials provide end-point discontinuity reduction, and even-order polynomials, derivative discontinuity reduction. A comparison of Chebyshev and combined Chebyshev/ Fourier smoothing procedures with other techniques is shown in Figure 3, where each method considered is applied to the artifically noisy data of Figure 2. The curve smoothed by the Chebyshev procedure and given in Figure 2 is reproduced a t the top. The second curve shows the result of Fourier smoothing the remainder with the truncation function exp[-(n - 3 ) 2 / 2 . 5 2 ]n, 2 4, equivalent to t h a t

(1) A. Savitzky and M. J. E. Golay, Anal. Chem., 36, 1627 (1964). (2) G. Horlick, Anal. Chem., 44, 943 (1972). (3) J. W. Hayes, D. E. Glover, D. E. Smith, and M. W. Overton, Anal. Chern., 45, 277 (1973). (4) C. A. Bush, Anal. Chem., 46, 890 (1974). (5)U. W. Hochstrasser. in "Handbook of Mathematical Functions", M. Abramowitz and I. A . Stegun, Ed., (Nat. Bur. Std. ( U S . ) Appl. Math. Ser., 55, 1964), pp 771 ff. (6)R . W. Hamming, "Introduction to Applied Numerical Analysis", McGrawHill, New York, 1971, pp 297 ff. (7) P. J. Davis and I. Polonsky, Ref. 5,pp 878-9. (8) J. W. Cooiey and J. W. Tukey, Math. Cornput. 19, 297 (1965). (9) D.E. Aspnes, Opt. Comrnun., 8 , 222 (1973). (10) D. E. Aspnesand A. A. Studna, Appl. Opt., 14, 220 (1975).

RECEIVEDfor review October 31, 1974. Accepted February 21, 1975.

Kinetic Assay of Nitric Esters S. K. Yap, C. T. Rhodes, and Ho-Leung Fung' Department of Pharmaceutics, School of Pharmacy, State University of New York at Buffalo, Buffalo, NY 142 14

A number of assay methods are currently available for the determination of nitric ester antianginal drugs such as nitroglycerin, erythrityl tetranitrate, pentaerthrityl tetranitrate, and mannitol hexanitrate in commercial dosage forms. Cornpendial assays ( I , 2 ) of these drugs are tedious and time-consuming in that they require extraction of the drug followed by colorimetric determination of the nitrated products of phenoldisulfonic acid. Other reported analytical methods such as IR (3, 4 ) , gas-liquid chromatography Author to whom inquiries should be directed.

( 5 ) ,and polarography (6) also require a number of manipulative steps prior to assay, thus rendering them unsuitable for rapid analysis of nitric esters. Simpler methods such as t h a t developed by Bell ( 7 ) ,which indirectly measure nitrite ions liberated by alkaline hydrolysis of nitric esters a t elevated temperatures, are subjected to interference by inorganic nitrites. In a recent communication (81, we reported preliminary data on a simple kinetic assay of nitroglycerin. This nitric ester was shown to degrade in alkaline methanolic soliItions in a consecutive manner producing a chromophoric, interANALYTICAL CHEMISTRY, VOL. 47, NO. 7, JUNE 1975 * 1183