Properties of a variable digital filter for smoothing and resolution

D. Brown , Todd Q. Barker , Robert J. Larivee , Stephen L. Monfre , and Harlan R. Wilk .... Agnieszka Wojciechowska , Adam Pietraszko , Wieslawa B...
0 downloads 0 Views 489KB Size
536

Anal. Chem. 1986, 58,536-539

Properties of a Variable Digital Filter for Smoothing and Resolution Enhancement Gerhard Biermann and Horst Ziegler*

FB 6-Angewandte

Physik, Uniuersitat Paderborn, Warburgerstrasse 100, 0-4790 Paderborn, West Germany

The paper dlscusses the effects of a modified triangular dlgltal filter on a noisy spectrum uslng single and poorly resolved twin Gaussian spectral llnes as model functions. By varying the two parameters of the fllter, one can achieve dlfferent degrees of noise reduction. Simultaneously it Is posslble to lncfpase the height and decrease the width of spectral Ilnes, thus yieldlng (esoiutlon enhancement at the expense of negatlve slde lobes. The dependence of nolse reduction and resoiutlon enhancement on the filter parameters Is discussed. Diagrams slmplify the parpmster selection for dlfferent spectrometrlc sltuatlons. An example shows the effect of the filter and the wlbe range of posslble appllcatlons.

higher frequencies the frequency response decreases rapidly. This ensures that the high-frequency noise of the signal is suppressed. The effects on the additive noise can be examined separately from those on the signal, since the filter is linear. The following equation is valid for additive white noise (5):

4.W = llalls(r)

(3)

with

lla1I2 = 1

3N(N

+ 1)(2N+ 1)

1

where s(r) denotes the standard deviation of the unfiltered noise and s(Ar) that of the filtered noise. llall describes the noise amplification; it increases linearly with a for our filter function. For small values of N this effect is more pronounced. As a function of the filter width it shows a strong decrease for small values of N but only a slight decrease for greater values of N. The linearity of the filter allows its separation into two parts, a triangular and a running average filter

The processing of spectrometric signals usually starts with the determination of position (e.g., wavelength) and height (or area) of the individual spectral lines. Overlapping spectral lines and additive random noise are the two major problems in this process of information extraction. Among others, Ziessow (1) describes several resolution enhancement techniques. They usually reduce the problem of overlapping lines but increase the noise. Digital filters for smoothing noisy spectra (2) on the other hand can reduce random noise at the elrpense of reduced resolution. A new class of digital filters finally combines both effects thus reducing noise and simultaneously enhancing resolution. Among these filters a special triangular filter can be implemented with a stable recursive integer algorithm yielding an extremely high throughput even on microprocessors (3). They can thus be used as real-time digital filters a t minimal cost. This filter can be varied over a wide range between strong smoothing and high resolution enhancement. In the following the Gaussian line is chqsen as q spectrometric mQdel function in order to describe the effects of the filter. Figure 5'in ref g noisy Gaussians, dem3 shows this for a pair of overla tiop and resolution enonstrating simultaneous noise hancement.

Therefore the filter in eq 2 conserves the zero moment, i.e., the area of the spectral lines.

THEORY Digital Triangular Filter for Noise Reduction and Resolution Enhancement. A digital filter can be described as a discrete, linear, translation invariant convolution operation

EXPERIMENTAL SECTION Effects on a Single Line. We begin with the discussion of the effects of the filter on single lines in order to obtain a general view of the influence of the two parameters and to show its behavior when a single line a p p e q in the spectrum. The Gaussian serves as a spectrometric model function

N

A f ( k ) = C a(n)f(K- n) n=-N

(1)

where A denotes the filter operator, a ( n ) the filter function, f the unfiltered spectrum, and A f the filtered spectrum. The filter presented in this paper possesses the function

a ( n ) = (2a

+ 1)/(2N + 1)- (2alnl)/(N(N+ 1)) (2)

with In( IN . Besides the filter width, N, there is a continuous arameter, a , that determines the degree of resolution enancement. As described in ref 4 the resolution enhancement is based on a reduction of the line width, pince the frequency response partly exceeds 1 for a > 1 a t low frequencies. At

E

+

a ( n ) = a I ( n ) aII= 2a(1/(2N + 1) - Inl/(N(N + 1)))+ 1/(2N

+ 1) (4)

where In) IN. A convolution with a ( n )shows the same result as the sum of the signals filtered with aI and aII,respectively. These two functions possess the propertieb ko(aI)

=0

(5)

1

(6)

FLo(Q.11)=

where kLodenotes the zero moment. The moment of a filtered spectrum is given by ( 4 )

dAfl = da)dfl

f , ( k ) = h, e x p ( - W 2)(k

- kd2/w,2)

(7)

(8)

yhere f,(k) denotes the i line in a spectrum f with the height h, in the position ka, and w,is the full width at half-maximum (fwhm) gjven in units of the distance between data points. All following examples are calculated using w = 100. If we sample with sufficient data points per fwhm (>lo) it can be shown that with an accuracy of better than all filter properties depend only on the ratio, Nlw, of the filter width to fwhm. For a given line width (expressed in number of data points per fwhm) all filter properties can thus easily be obtained from the example given. While eq 8 is filtered with eq 2, the zero moment (area) is conserved. But the resolution enhancement is based on a reduction of the line width. This increases the height of the

0003-2700/86/0358-0536$01.50/00 1986 American Chemlcal Society

537

ANALYTICAL CHEMISTRY, VOL. 58, NO. 3, MARCH 1986 0.3, I

2.0

.

2

1.5

5

1.0

I

4

z

3

k-

LiJ 7z

0.5

I

0.0 0.0

-0.21 0.5

1.5

1.0

2.0

Cl.0

2.5

C.2

0.A

0.6

0.8

1.0

1.2

N / w

N / *

Flgure 4. Resolution enhancement for a Gaussian doublet for various

Flgure 1. Height of a filtered Gaussian for various a.

a. -0.0

2

0.50 -0.2

\

m

0.45 -0.4

0.AD

0 1

8

-0.6

,0.35

-0.8

z

I

e

v,

0.?0

z

Ld

-1.0

0.0

0.5

1.5

1.0

2.0

0.25

2.5

N / w Flgure 2. Depth of the negative side lobes of a flltered Gausslan for various a. 1.0

,

0.20

0

5

10

Flgure 5. N / w as a function of

15 a

20

25

a for maximal resolution enhancement.

I

noise by the square root of measurement time by increasing their time ccmn,stant according to the slower scan speed (5). E f f e c t s on a D o u b l e t . The results o f a single line can be transferred to two additively superimposed lines because of the linearity of the filter. So we now can deal with the resolution bnhancement. To describe the resolution enhancement, we use the definition that two equal lines are resolved if their center distance is greater than the fwhm (6). If two lines lie apart just 1 fwhm, they show a relative indent of 7.85%. This relative indent, I , is defined by N / w Flgure 3. Signal-to-noise ratio of a filtered Gaussian for vaiious

I = cf(kmax)- f ( k m 3 ) / f ( k n a x ) a.

maximum and produces additional negative side lobes. In Figure 1the height of a filtered*Gaussi&is shown in dependence on Njw for various values of a, If we have chosen resolutioh enhancement ( a > l),the height of the maximum of a Gaussian is increased. There is a maximum in Figure 1 for a certain Njw. The dependence between the height of a filtered line and the parameter a shows a linear behavior for a given N. The negative side lobes, whieh appear as a consequence, show a behavior similar to the height increase. The depth of the side lobe as a function of Njw possesses a very flat maximum (see Figure 2). More important than height is the signal-to-noise ratio (SNR). This ratio is defined for a filtered line by SNR = A f ( k , ) / s ( A r ) (9) The variance of the unfilteied noise (compare eq 3) can be set to 1 for convenience; the SNR must be divided by s(r) for other variances. To make the results available to other widths, the ratio N/w is chosen as a filter parameter; in doing so we have to divide the SNR by the square root of w. We assumed that the SNR of a filtered fdnction is 1/w1/2 (h = 1,s(r) = 1). Hence there is an improvement of the SNR above the line at 0.1 for w = 100 in Figure 3. This is in line with the general observation that an increase in the number of data points per line width can increase the SNR, since at equal measurement time per data point the variance of the individual data point remains constant. The total measurement time on the other hand increases proportionally. Even conventiorial analog (RC-type) filters can exploit this increased measurement time to reduce the

(10)

where f(km,) denotes the apparent height of the maximum and the height of the minimum ( 4 ) . Our definition of the resoiutiofi enhancement, E, shows how far two filtered Gaussians can be pushed together, measured in units of the unfiltered fwhm, so that they have the same relative indent as two unfiltered lines with a distance of 1 fwhm

f(Kmi,)

E=l-P

(11)

where P denotes the new distance of the two filtered Gaussiahs in units of the fwhm. If these two filtered lines, for instance, have a relative indent of 7.85% a t a distance, P, of 0.8 fwhm the resolution enhancement, E, amounts to 0.2 fwhm. Figure 4 illustrates the resolution enhancement in dependence on Njw. The highest obtainable resolution enhancement can be adjusted by a, while one canget values for the enhancement between this maximum and negative values with different filter widths, i.e., even resolution deterioration for large N. Figure 5 shows those parameters that produce the maximal resolution enhancement. For each a one can find a filter width in this graph so that the filter works optimally with respect to the resolution. It is apparent that N can only be an integer. Note that Figure 5 does not tell anything about the value of the resolution enhancement. In contrast, Figure 6 shows this value for the bptimal parameter combination given in Figure 5. It increases rapidly for small values of a while flattening off for large (Y values as shown in Figure 6. Now it is possible to plot the two properties of the filter in one diagram so that one may get a survey of the obtainable resolution enhancement given a certain SNR. It becomes obvious in Figure 7 that the filter is able to improve the SNR and the resolution at the same time. Note that the SNR

538

ANALYTICAL CHEMISTRY, VOL. 58, NO. 3, MARCH

1986

1

0.30

0.10

1

,

0.25

2.0

1 ’

0.03

1.8

0.08

0.20

LT

0.15

5

0.06

0.10

v; E

0.05

0.07

1.6 ’

L \

1.A

z

0

1.2

0 . 0 4 1 ’”.

0.05

E

z

1.0 n

0. ec

o’8,bl

-0.35

0.00

I

-0.10

0

5

IO

20

15

5

0

I

25

II 15

IO

Figure 6. Maximal resolution enhancement as a function of a.

25

30

0.6

a

3G

a

20

Flgure 9. Maximal relative distance error (a)and the respective minimal distance (b) for a given a. I

0.30 30

0.25

25

0.20 t .

.

z

20

\

15

0.15

b-

0.10

ww

IC

w

2

0.05 CT

0.00

-0.05

1

I

5 0

I F

0

0.2

0.1

0.3

0.5

0.4

c

SNR / & Figure 7. Maximal obtainable resolution enhancement vs. signal-tonoise ratio.

z \

k

2 0 k

Z

W

a U a a

(I

fb)

0.0

IO

-5 I -10 I

I

0.0

I

0.5

(a)

1.0

1.5

2.0

TRUE D I S T . / w

Flgure 8. Distances of the maxima of an unfiltered (a)and of a filtered (b) ( N l w = 0.38, a = 15) Gaussian doublet. is normalized to the square root of the fwhm. Therefore the value of 0.1 corresponds to a normalized ratio of 1. High-resolution enhancement can only be obtained a t the expense of a weaker improvement in the SNR. For a high enhancement the points are very close; the reason for this is that (given a high a ) only a little change of the resolution and noise behavior is obtained, because each point in Figures 6 and 7 corresponds to one in Figure 5. Position Error. This triangular filter offers another advantage. It is possible to compute the distance of the apparent maxima of a doublet in dependence of the true distance of the two lines. So a distance error can be given for certain filter parameters and distances of the two lines, In Figure 8 the apparent distances of the maxima of a doublet are shown on the ordinate, and the true distances of the spectral lines are shown on the abscissa. Both are normalized to the fwhm. This gives a straight line if there is no mutual “influence” of the two lines. One can see that the unfiltered superimposed two lines begin to separate if the distance is greater than 0.85 fwhm. One may say that the Gaussians show a certain “adhesion”. They separate much sooner when they are filtered, because their width is reduced. While the distance of the maxima of the unfiltered doublet never exceeds the true distance (straight line in Figure 8), it is slightly overstepped by filtering.

Y

Ib)

100

200

300 / RU

400

i

500

POSITION Figure 10. (a)Synthetic noisy spectrum (plotted with an offset of 15 AU); (b) spectrum filtered with N = 25 and a = 7.8; and (c)spectrum filtered with N = 29 and a = 1 (plotted with an offset of 20 AU). This suggests a definition of a distance error; it is the difference between the distances without mutual influence and those with mutual influence related or normalized to the true distance. It is possible to quantify this relative error for each pair of filter parameters and for each distance. It is useful to give a lower limit of the distance, for which a certain quantity of the error is not exceeded; this quantity is set by the maximal overshooting. Figure 9 shows both the lower distance limit and the respective maximal error for different values of a , The filter parameters are chosen to get the highest resolution enhancement at a given SNR. Figure 9 can be used as follows: if one has chosen N and a, then one can read a minimal separable distance of two lines as well as the maximal distance error. Starting from an estimate of the line distance in a given spectrum greater than or equal to that one found in Figure 9, the distance error by filtering will not be greater than in the diagram.

RESULTS AND DISCUSSION An example shall demonstrate the use of this filter. Figure 10a shows a synthetic noisy spectrum. We start with a n estimate of the width of an individual line. The line near 450 is obviously not a single line, but is composed of two Gaussians. The whole fwhm could be estimated at 80 units. The width of one of these lines is smaller, because a pronounced separation can be seen. So one can guess the width of the higher line to about 60 units. Since the filter works with a fixed width, one needs a mean fwhm. If one assumes that the middle line is also a doublet, it does not show a clear separation. So the distances of the two lines are smaller than one fwhm, supposed they are equal or very similar. With a whole fwhm of 75 units the width for one line can be estimated t o 40 units. Finally, the left spectral line seems to be composed of two lines. Since one of them is very much superimposed on the other, one can assume a fwhm of about 70 units for one line. Therefore it is reasonable to work with a mean fwhm of 57 units. On an average, the variance of the noise can be set t o 1. Now one can determine the parameters of the filter. Starting from a desired resolution enhancement of 0.2 we get a SNR of 0.21 from Figure 7. This must be multiplied by the square

539

Anal. Chem. 1986, 58,539-543

6.A

1

A

1200

6.6

6.8

7.0

7.2

7.4

FREQUENCY / MHZ Flgure 11. (a) Noisy ENDOR spectrum (plotted with an offset of 600 AU). (b) Resolution-enhanced ENDOR spectrum with N = 7 and LY = 10. (c) Smoothed ENDOR spectrum with N = 6 and a = 1 (plotted with an offset of 800 AU).

root of the fwhm and by a mean height of the signal to get the true signal-to-noise ratio. So we improve the SNR by about 50%. In Figure 6 we see that we can reach this resolution enhancement with a value of a of about 7.8. We find the corresponding filter width in Figure 5 to be 25. One can obviously see in Figure lob, that the expected number of lines is correct. I t is a great advantage to have a well-defined background: it allows for separation of the negative side lobes in the filtered spectrum between the position 300 and 400. The real lines a t 280 and 400 lie apart so far that the side lobes of the left and right line return to zero. Thus a pseudoline is produced. In Figure 10b the line at about 340 obviously is such a pseudoline, because there is a linear noisy background a t zero. The two parameters a and N may be changed in a wide range in order to show the different effects of the filter.

Another example shows that it works very well in the range of smoothing without resolution enhancement. With an a of 1 and a value for N near w / 2 , i.e., 29 in this case, the filter deforms the lines only weakly. Figure 1Oc shows the result of such a simple smoothing of the noisy spectrum. This synthetic spectrum serves as an example to show the most important effects of this filter. Figure l l a shows an electron nuclear double resonance (ENDOR) spectrum (7). The intensity in arbitrary units is plotted as a function of the frequency over a range from 6.4 to 7.4 MHz with a step width of 0.002 MHz. A smoothing filtering with a = 1 and N = 6 (=w/2) seems to be a good reconstruction of the spectrum out of the noisy data (see Figure llc). Figure l l b shows the same spectrum filtered with LY = 10 and N = 7 yielding both resolution enhancement and noise reduction. This example shows that this numerically simple filter (only two multiplications per data point for the recursive form given in ref 3) can be adapted for a wide range of problems in spectrometric signal processing.

LITERATURE CITED Ziessow, D. "On-line Aechner in der Chemie"; de Gruyter: Berlin and New York, 1973; Chapter 2.5. Bromba, M. U. A.; Ziegler, H. Anal. Chem. 1983, 55, 648-653. Bromba, M. U. A.; Ziegler, H. Anal. Chem. 1984, 56, 2052-2058. Wlnkler, J. Diplorn Arbeit, Universitht Paderborn. Ziegier, H.Appl. Spectrosc. 1981, 35, 86-92. Demtroder, W. "Grundiagen und Techniken der Laserspektroskopie"; Springer Verlag: Berlin, Heidelberg, and New York, 1977; Chapter 4.3.

Mlchel, J., Universitat Paderborn, D-4790 Paderborn, West Germany, May 1985, personal communication.

RECEIVED for review July 12,1985. Accepted September 23, 1985. This work was supported by the Deutsche Forschungsgemeinschaft.

Mixture Analysis Using Solid Substrate Room Temperature Luminescence Ebenezer B. Asafu-Adjaye and Syang Y. Su*

Department of Chemistry, Virginia Commonwealth University, Richmond, Virginia 23284

The use of comblned solid substrate room temperature fluorescence and phosphorescence techniques for the determlnatlons of five and elght luminescent compounds In three synthetic mixtures was fully explored and reported. Four components studied have In common naphthalene main-frame structure. Parameters, such as pHs of sample envlronment, solid substrates, and heavy atoms, were utllized to selectively detemlne the components. All relevant iumlnescence spectra for the mixture determination are included. Also presented are absolute standard deviations as well as percent relative errors of these determlnations.

In a recent publication ( I ) some current luminescence techniques used for mixture analyses were reviewed. The feasibility of using room temperature phosphorimetry (RTP) for mixture analyses by a new luminescence sampling system ( I , 2) was also demonstrated. Three out of four phosphorescent compounds of similar structure were determined in

several synthetic mixtures (1). However, the question that remains unanswered but has to be addressed is to what extent RTP can be used for mixture analysis. For instance, how many compounds in a mixture can be determined without prior separation with an acceptable degree of accuracy. In this study, we address this issue in terms of some of the problems and limitations that may be encountered as well as some specific means that can be used to achieve sample determinations. Ten phosphorescent pesticides and toxic substances have been selected as model compounds. Six of these possess naphthalene as their main-frame structure and thus exhibit similar luminescence behavior. In addition to the use of previously described approaches (I), such as different combinations of solid substrates and heavy atoms and the signal subtraction method, application of room temperature fluorescence (RTF) (3) and control of pH are carried out for the analyses. The R T P characteristics of these compounds on various solid substrates were obtained and are compiled in Table I. From this, strategies for the determination of these

0003-2700/86/0358-0539$01.50/0 0 1986 American Chemical Society