Signal Processing Toolkit User Guide > Reference (Q to Z) > SGFDESIGN Function (PV-WAVE Extreme Advantage)
  

SGFDESIGN Function (PV-WAVE Extreme Advantage)
Designs a finite impulse response (FIR) Savitsky-Golay filter.
Usage
result = SGFDESIGN(m, l)
Input Parameters
mThe length of the filter.
l—The number of moments preserved by the filter.
Returned Value
result—A filter structure containing the coefficients of the FIR filter.
Keywords
None.
Discussion
SGFDESIGN designs optimal linear phase FIR filters for estimating the signal s(n) from the noise-corrupted observation
x(n) = s(n) + e(n)
where noise e(n) is an independent, identically distributed random variable.
The coefficients of the FIR filter:
are chosen so that the signal estimate:
satisfies two properties. First, the filter minimizes the error:
E[bn*e(n)]2
where the operation denotes the mathematical expectation. Second, the moments of the signal s(n) are conserved up to a desired order L.
The moment constraints can be equivalently stated as requiring the filter coefficients bn to satisfy:
and:
,    l = 1, 2, ..., L
This filter is most often used in the physical sciences for smoothing experimental data.
Example
This example illustrates the design of a Savitzky-Golay filter. The results are shown in Magnitude Response of Savitzky-Golay Filter.
h = SGFDESIGN(15, 4)
hf = FREQRESP_Z(h, Outfreq = f)
PLOT, f, ABS(hf), Title = 'Savitzky-Golay Filter Magnitude', $
XTitle = 'Frequency'
 
Figure 4-7: Magnitude Response of Savitzky-Golay Filter
For Additional Information
Schussler and Steffen, 1988, Section 8.3.2, pp. 441-443.
Savitsky and Golay, 1964. Steiner, Termonia and Deltour, 1972.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.