Você está na página 1de 4

Anal. Chem.

1981, 53, 1583-1586 1583

Application Hints for Savitzky-Golay Digital Smoothing Filters


Manfred U. A. Bromba and Horst Zlegler
Fachbereich Naturwissenschaeen I, Angewandte Physik, Universitat Paderborn, Warburger Strasse 100, 0-4790 Paderborn, West Germany

The processing of spectra is often complicated by the pres- but does not show maximal noise reduction for a given filter
ence of noise. The applicatlon of dlgltal smoothlng fllters Is width.
a posslblllty for improving the accuracy of data extraction (2) If the moments pm of a signal f are defined by
from those spectra. In lthls paper the fundamental properties
of least-squares dlgltal polynomial smoothlng filters, popular- pm(n = 2 f[klkm
k=-m
(6)
Ired by Savitzky and Golay, are summarized. On the bask
of these properties the irange and the boundaries of applica- it can be shown (8) that for every m with 0 5 m 5 2M +1
tlon of these fllters are discussed. They are seen to be ap- pm(D2Mf) = h(f) (7)
proximately optimal In the range of low slgnal deformation.
That is, a Savitzky-Golay smoothing filter of degree 2M ex-
actly conserves every existing moment up to m = 2M + 1. For
practical requirements it may be sometimes reasonable to
Much has been written about least-squares digital poly- define truncated moments with the summation in eq 6 going
nomial smoothing filters (Savitzky-Golay smoothing filters over a finite interval lkl 5 K where K depends on the fwhm
in short), e.g. (1-16). They are probably the most frequently of the line. The effect of smoothing on area which is defined
used digital smoothing filters in spectromletry. Nevertheless, in such a way (% 2a area) has been studied by Tominaga
there seems to be still some vagueness about their properties. et al. (12). Enke and Niemann (6) empirically stated an
Also, the question In what cases are these fiiters superior over increase in area (jio(Dfi> ,ii&) The
).property of polynomial
other types of digital smoothing filters? has not yet been conservation (eq 4) appears to be completely equivalent to
answered in a satisfactory manner. This paper lists some of the conservation of moments (eq 7). So a Savitzky-Golay
the most significant properties of Savitzky-Golay smoothing smoothing filter for a fiied width N is the moment conserving
filters in view of their appropriate applications. filter with most noise reduction. Note that for eq 7 to hold
Using the notation introduced in (11))a digital filter op- it is necessary and sufficient that the sum of all coefficients
erator A is defined by a2M[n]is one and all higher moments up to m = 2M + 1 are
m zero
PO(~~=
M )1 prn(am) = 0 (8)
where f is the original spectrum with values f [ k ] ,Iz = 0 , f l , The (2M -+ 2)th moment of the filter function aW is seen to
f 2 , ...,and a is the filter function. The brackets refer to the be (8)
discrete character of thie functidns. For a Savitzky-Golay
smoothing filter of degree 2M we may write
N
D z ~ f [ k=:] a z ~ [ n l f [--kn1 (2) or, if N is large enough
n=-N

since a 2 ~ [ n=]0 if In1 > N. The filter functions ao, u2, and
a4 will be found, e.g., in 14,211. a6 is derived with aid of the
general formula given in1 (18) The (2M + 2)th moment allows an approximate calculation
a6[4= P ~ + (y4n4i- (ysn6)
( +~(y2n2 (3) of the systematicerror caused by smoothing, for further details
see (15).
where cyo = 3 5 P + 105N5- 280N4 - 735N3+ 4 9 7 P -+ 882N (3) Another description of digital filtering is obtained by
- 180, (112 = -(315N4 + 6 3 0 P - 189OW - 2205N + 2121))a4 Fourier transform (3, 13, 14)
= 6 9 3 P + 693N - 2310, ~ y g= -429, and fi = 35/(4(2N - 5)(2N
- 3)(2N - 1)(2N + 1)(2N + 3)(2N + 5)(2N + 7)).
10

f(w) = C f [ n ]exp(-iwn)
n=-m
101 5 ?r (11)
PROPERTIES
The properties of Savitzky-Golay smootliing filters may be realizing that filtering in frequency domain is equivalent to
summarized as follows: pointwise multiplicatio; of the frequency response 6 with
(1) Let p ~ be +an arbitrary
~ polynomial of degree 2M + the Fourier transform f of the signal
1 or less, then (Afi ( 0 ) = E(w)f(w) (12)
DZMi?2td+1 = P2M+1 (4) Since the moments of the filter function are simply related
That is, a Savitzky-Golay smoothing filter of degree 2M to the frequency response and its derivatives a t w = 0, eq 8
conserves every polynomial signal of degree up to 2M + 1. are equivalent to
Among all filters with filter width N (2N $. 1 points) having 6(0
,) =1 LW(0) = 0 (13)
this property, Savitzky-Golay smoothing filters perform
maximal noise reduction for stationary white noise. Note that where 6(m)denotes the mth derivative of 8. In Figure 1 the
multiple filtering D& also has the property ( 4 ) frequency responses for the filters Do, D2, D4, and D6 are
plotted (N = 10). Obviously Savitzky-Golaysmoothing fiters
D2MmiD2M+1 = P2M+1 (5) have a low-pass characteristic with flat passband.
0003-2700/81/0353-1583$01.25/0 0 1981 American Chemical Society
1584 ANALYTICAL CHEMISTRY, VOL. 53, NO. 11, SEPTEMBER 1981

"g'w'
Table I. Maximum Normalized S/N Enhancement for
Some Smoothing Filters and Gaussian Peaks
max optimizing
nurnialized filter width
S/N ( N resp RC)
filter enhancement to fwhm ratio
matched 1 1
Do 0.943 0.59
D, 0.947 1.15
D4 0.946 1.72
D6 0.945 2.31
Do 0.998 0.47
RC 0.895 0.88

density function of the noise. The deviation for uniform


distribution, empirically obtained by Enke and Niemann (6)
may be due to averaging too few samples.
RANGE OF APPLICATION
We have seen that a Savitzky-Golay smoothing filter acts
as a low-pass that is optimal for polynomial signals. But in
spectrometry we generally have nonpolynomial signals such
as Gaussian or Lorentzian lines. The question may arise if
or in which cases Savitzky-Golay smoothing is superior over
other filtering techniques. This question can be answered by
consideration of the statements of the last section.
Evidently, polynomial filtering becomes approximately
optimal, if the spectrometric signal becomes approximately
polynomial. That is, within the filter span (2N + 1points),
the signal f can be replaced by the first terms of its Taylor
expansion fairly well such that
D2Mf DZMP2M+l = P2M+1 f (17)
In the case of Gaussian or Lorentzian lines, condition 17 is
fulfilled if the filter width is essentially smaller than the full
width at half-maximum (fwhm) of the line
N << fwhm (18)
Using the frequency representation, where the Fourier
I
transform of the filtered signal (Dmf)" is the product of the
Flgure 1. Frequency response of Savitzky-Golay smoothing filters of
degree 0, 2, 4, and 6. Filter width N = 10 (21 coefficients). frequency response d 2 (Figure
~ 1)and the Fourier transform
of the original signal (eq 121, we see that the filtered signal
The effect of multiple filtering may be most advantageously hardly-differs from the original one, if all the transformed
considered with aid of the frequency response since the re- signal f is concentrated in the flat region of the frequency
sulting frequency response of m-time filtering is simply response near w = 0. In other words, condition 17 is fullfilled
( & ~ ( w ) ) ~ . Slutsky-Yule oscillations, as conjectured by for slowly varying signals, in accordance with inequality 18.
Madden (4), cannot happen because Furthermore, in this weak filtering region, we can observe a
decrease of error with increasing degree 2M of the Savitzky-
liT.zM(w)l <1 (14) Golay smoothing filter, if 2M is not too large (the maximum
for every w satisfying 0 < 1wI 5 of 2M increases with decreasing maximal allowable error). A

-
?r (10). Hence
suggested value for the relative error i s 1%or less, only slightly
dependent on error criterion. Systematic signal distortion
if m - 152M(41rn 0
m, Multiple smoothing is preferred if an improved
high-frequency rejection is needed, e.g., if the subsequent
(15)
errors of this size can advantageously be calculated by using
the moment approximation given by De Blasi et al. (15) to-
gether with eq 9. For Gaussian and Lorentzian lines the
processing is sensitive especially to high-frequency noise distortion of peak maximum (which in these cases is the largest
components (3). To avoid the loss of data points a t the be- systematic error occurring along the line) for a chosen noise
ginning and end of a record, Proctor and Sherwood (24) re- amplification or filter width and polynomial degree can readily
cently have proposed a combination of least-squares fitting be obtained from the error diagrams in (16).Obviously, an
and least-squares smoothing which enables every number of operation in this low-error region is only reasonable if the
repeats desired. statistical error after filtering and the signal distortion by
(4)The noise reduction (assuming stationary white noise) fitering are of similar size. This is illustrated in Figure 2 where
of a digital filter is generally given by the inverse square root a noise-contaminated Gaussian peak f, having approximately
of the s u m of squares of the coefficients a[n](19). In the case 17 samples per fwhm, and its smoothed version D4f, N = 12,
of Savitzky-Golay smoothing filters this simply reduces to the are shown. Here the N to fwhm ratio is equal to 0.7, thus being
inverse square root of the coefficient am[O] (8) well below the S/N optimizing ratio given in Table I. Gi-
noise reduction = (U~M[O])-~/~ (16) annelli/Altamura (20) and Papoulis (21)have developed
simple expressions for the total error after weak filtering,
Theoretically this result is independent of the probability including signal deformation and noise. This total error can
ANALYTICAL CHEMISTRY, VOL. 53, NO. 11, SEPTEMBER 1981 1585

1.2

1.0
I 1.0

i?
I
0.8 ::
I
0.8

9 9
k
z
0.6 2
0.6
I

W W
2 O.d I

I-
a z
1 I 1
-
-1
2 0.2 $ 0.2

0.0 0.0

-0.2 h: -0.2
-200 -150 -100 -50 0 50 100 150 200
-200 -150 -100 -50 0 50 100 150 20[1
SAMPLE NURBER SAMPLE NUMBER

1
E
1.2

1.0

0.8
I
'2
L I f 0.6
f.
W
>
I
0.4
l-
0.4 a
g-1
'

I- 0.2
a
-1
& 0.2
0.0

0.0 +----------/ -0.2 I---+- :


-200 -150 -100 -50 0 50 100 150 200
-0.2 I--.-.+- 4 - - :
SAMPLE NUMBER
-200 -150 -100 -50 0 50 100 150 200
SAMPLE NUMBER Figure 3. unfiltered noisy Gaussian llne and its SIN optimal filtered
Flgure 2. Unfiltered noisy Gaussian line and its weak filtered version. version, fwhm = 17, filter degree 2M = 4, filter width N = 29.
fwhm = 17, filter degree 2M = 4, filter width N = 12.
= 1.74) which is nearly the S/N optimizing filter width for
D4 and this line. It is an interesting fact that double filtering
Table XI. Maximum Normalized SIN Enhancement for with Do achieves a higher maximum S/N enhancement than
Some Smoothing Filters and Lorentzian Peaks
single pass filtering by arbitrary Savitzky-Golay smoothing
max optimizing filters. This arises from the theoretical result that the max-
normalized filter width imum of S/N enhancement directly depends on the likeness
S/N ( N resp RC) between the signal shape and the shape of filter function. The
filter enhancement to fwhm ratio
correspondingfilter function of Do2 is a triangle and triangles
matched 1 1 give a better approximation of Gaussian peaks than any
Do 0.906 0.70 Savitzky-Golay smoothing filter functions. For higher degrees
D2 0.904 1.44 and higher iterates see Figure 5 of Proctor and Sherwood (24).
D4 0.903 2.22 Obviously, in the S/N maximizing case, it is true that Sav-
D6 0.903 3.01
Do = 0.982 0.62 itzky-Golay smoothing is not optimal, but the maximum
RC 0.899 1.12 achievable S/N enhancement only unessentially differs from
the theoretical boundary.
be minimized with respect to the filter width (20, 21). At first sight it is not evident what degree 2M should be.
The case of weak filtering significantly differs from the case In contrast to the case of weak filtering, where 2M = 2 or 4
of maximizing signal to noise ratio (S/N). Here the filter seems to be an appropriate choice, the authors recommend
width of a Savitzky-Golay smoothing filter of degree 2M is Do for S/N maximizing purposes since it is the simplest of
adjusted so that the S/N enhancement by filtering is max- all Savitzky-Golay smoothing filters, has the least optimal N,
imized for a known shape and fwhm of the signal. The S/N and does not produce any side lobes, which may lead to
ratio is defined by the peak height to standard deviation ( u ) systematic faulty detections in automatic peak searching
ratio. As is well-known, the absolute maximum S/N en- procedures. In Figure 4 an original undistorted Gaussian peak
hancement will be obtained with a matched filter. That is f [ k ] = exp(-k2/100), fwhm = 16.7, the optimal filtering D f
a filter whose filter function has the same shape and fwhm with N = 29 (see Table I), and two fiterings with mismatched
as the undistorted signal. Let the normalized S/N en- N to fwhm ratio (broadest peaks, N = 50, N/fwhm = 3 and
hancement by a matched filter for a Gaussian line be 1. The N = 100, N/fwhm = 6) are shown.
corresponding approximate values for Savitzky-Golay A third area of application for Savitzky-Golay smoothing
smoothing filters and the RC filter are shown in Table I and filters may be background estimation or background sub-
Table 11. The maximal achievable S/N-enhancement by traction for a slowly varying background b such that
Savitzky-Golaysmoothing fiiters is seen to be only 5% smaller fwhm << N << K (19)
than the theoretical optimum.
Figure 3 shows the same line as Figure 2 except for increased Dmb = b (20)
noise. This time high-precision filtering lis not suitable for where K is the total number of measurements. If the filter
the reason given above. So we have chosen N = 29 (N/fwhm width N is much greater than the maximal fwhm, occurring
1586 Anal. Chem. 1981, 53, 1586-1590

1.2 LITERATURE CITED


(1) Savitzky, A.; W a y , M. J. E. Anal. Chem. 1964, 36, 1627-1638.
1.0 (2) Ernst, R. R. Adv. Magn. Reson. 1988, 2, 1-135.
(3) Wlilson, P. D.; Edwards, T. H. Appl. Specfrosc. Rev. 1978, 72, 1-81.
0.8 (4) Madden, H. H. Anal. Chem. 1978, 50, 1363-1380.
I (5) Casaletto, J. J.; Rice, J. R. Appl. Anal. 1978, 6 , 143-152.
z
(0 (6) Enke, C. G.; Nieman, T. A. Anal. Chem. 1978, 46, 705A-712A.
0.6 (7) Clarke, F. J. J. IEEConf. Pub/. 1973, No. 103, 136-140.
z
I (8) Bromba, M. U. A., Dlplomarbelt, Paderborn, 1976.
>
W 0.d (9) Borgan, 0. Scand. AcfuarlalJ. 1979, 83-105.
I (IO) Grevllle, T. N. E. SIAM J. Math. Anal. 1974, 5 , 376-398.
I-
a (11) Bromba, M. U. A.; Zlegler, H. Anal. Chem. 1979, 51, 1760-1762.
J
E 0.2 (12) Tomlnaga, H.; DoJyo, M.; Tanaka, M. Nucl. Instrum. Methods 1972,
96, 69-76.
(13) Betty, K. R.: Horllck, G. Anal. Chem. 1977, 49, 351-352.
0.0 (14) Horllck, G. Anal. Chem. 1972, 44, 943-947.
115) . . P.: Rotunno. T. Ann. Ch/m. (Rome)
De Elasl. M.: Glannelll. G.: PaDoff.
-0.2
1975, 65, 183-190.
---
-3nn -isn
.-- - i n._
n -50
.. o 50 ion 150 200 (18) Zlealer, H. ADD/. Soecfrosc. 1981. 35. 88-92.
SFlfiPLE NUMBER ( 17) Koopmans, L. H. The Spectral Analysis of Time Series; Academic
Press: New York, 1974; Example 8.9.
Figure 4. Deformation of a Gaussian line (high peak). Filter degree (18) Bromba, M. U. A.; Zlegler, H. /ectron Lett. 1980, 16, 905-906.
2M = 4. N/fwhm = 1.74, 3 (medium peaks), and 6 (low peak). (19) Hamming, R. W. Digital Filters; Prentlce-Hall: Englewood Cliffs, NJ,
1977.
(20) Glannelll, G.; Altamura, 0. Rev. Scl. Insfrum. 1978, 47, 32-36.
in the spectrogram,the peaks will be flattend (22,23)and the (21) Papoulls, A. IE Trans. Inf. Theory 1977, IT-23, 631-633.
background will remain for subtraction provided that the (22) Carbonneau, R.; Boiduc, E.; Marmet, P. Can. J. Phys. 1973, 51,
505-509.
background can be approximated by a polynomial Of degree (23) Marchand, P.; Velllette, P. Can. J. Phys. 1976, 54, 1309-1312.
2M + 1 within the filter width, and the number of peaks is (24) Proctor, A,; Sherwood, P. M. A. Anal. Chem. 1980, 52, 2315-2321.
relatively small. For straightening through smoothing ap-
plications the recursive representation of Savitzky-Golay RECEIVED
for review September 22,1980. Resubmitted April
smoothing fiiters (see ref 11) can most advantageously be used. 6, 1981. Accepted May 15, 1981.

Steady-State Theory of Biocatalytic Membrane Electrodes


H. F. Hameka
Department of Chemistry, University of Pennsylvanla, Philadelphia, Pennsylvania 19 104

G. A. Rechnltz
Department of Chemlstty, Universm of Delaware, Newark, Delaware 1971 1

A mathematical derivation is presented for the exact solution tentiometric enzyme electrodes but were limited to numerical
of partlai differential equations descrlblng the steady-state evaluations of the resulting differential equation. We now
response of blocafalytlc potentlometrlc membrane electrodes. develop an exact solution which can be more conveniently
The derivatlon Is based upon a previously proposed model in employed without the need for extensive computing facilities.
which the steady-state response is seen to result from a If we mume, as did Brady and Carr, that the net equation
comblnatlon of dlffusion and Michaelis-Menten klnetic steps. governing the rate of change of substrate concentration within
The expressions derived In thls work yield further inslght into any portion of the biocatalyst-containing membrane sur-
the behavlor of blocatalytlc potentlometrlc membrane elec- rounding the sensor must contain a diffusional mass transport
trodes and permlt convenlent evaluation of key parameters term and a Michaelis-Menten kinetic term, we obtain
as a function of the malor experimental variables. a2c,- kz[EoIC,
dC, = Do-
- (1)
at ax2 KM+ CB
where D,is the substrate diffusion coefficient in the mem-
The empirical development of bioselective membrane brane, C, is the substrate concentration, kz[&] is the bioca-
electrodes (I) has proceeded rapidly in recent years with the talyst activity, and KM is the Michaelis-Menten constant. It
recognition that bacterial cells, mitochondria,or intact animal is assumed that biocatalytic activity can be treated in a
and plant tissue slices can (2) be employed as biocatalysta at manner analogous to enzyme activity for the purposes of this
membrane electrode surfaces in a manner analogous to con- model.
ventional enzyme electrodes. The concomitant development The schematic model of Brady and Carr is adapted to our
of theoretical models and formulationshas not kept pace with notation in Figure 1 where the boundary condition is that
these practical advances; recently, Brady and Carr (3) gave aC,/aX = 0 at X = 0 and dC,/dt = 0 at steady state. Equation
a theoretical treatment of the steady-state response of PO- 1 then becomes
d2C, ~2[EolC,
Current address: Institute for Physical Chemistry 111, Tech- D,- - =O
nische Hochschule, D-6100Darmstadt, Germany. ax2 KM + c,
0003-2700/81/0353-1586$01.25/0 0 1981 Amerlcan Chemical Society

Você também pode gostar