Application Hints For Savitzky-Golay Digital Smoothing Filters
Application Hints For Savitzky-Golay Digital Smoothing Filters
Application Hints For Savitzky-Golay Digital Smoothing Filters
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
-
?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
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