Skip to content

Savitzky-Golay Smoothing

The Savitzky-Golay Smoothing procedure in the Filter menu or the main toolbar offers effective time-domain smoothing for data sets with uniform X-spacing. The algorithm offers adjustable order, automatic sequential passes, and optional first through eighth smoothed derivatives.

Uniformly spaced data are needed so that no additional noise is introduced. This procedure does not automatically generate uniform data for the Savitzky-Golay algorithm. If needed, the Spline Estimation or Local Regression Spline Estimation option can be used to create an interpolated data set with constant X-spacing.

The raw and smoothed data are shown in a TableCurve 2D Graph for rapid determination of the effectiveness of smoothing.

Savitzky-Golay

This time-domain method of smoothing is based on least squares polynomial fitting across a moving window within the data. The method was originally designed to preserve the higher moments within time-domain spectral peak data. The TableCurve 2D implementation of the Savitzky-Golay algorithm offers sequential internal smoothing passes to improve overall noise reduction.

To generate a fourth derivative, a minimum quartic (order 4) smoothing must be used. For a third derivative, a minimum cubic (order 3) smoothing is needed. Similarly, a second derivative requires a minimum quadratic (order 2) smoothing.

A higher order polynomial makes it possible to achieve a high level of smoothing without attenuating the extrema in the data. Because this algorithm relies on the linearity of an unweighted polynomial model, it is also quite efficient with large data sets.

The Savitzky-Golay procedure requires a constant X-spacing within the data. If needed, use one of the options in the Estimate menu to generate uniformly spaced data.

Options

The Win n field specifies the one-sided width of the moving window. The smoothness will increase as the size of the window becomes greater.

The Order specifies the polynomial model order. A quadratic (order 2) is the minimum. Orders through 12 are supported. Typically, Savitzky-Golay smoothing uses a quartic (order 4) polynomial.

The Passes field specifies the number of sequential applications of the smoothing filter. In general, three passes is about optimum.

The Zero Edges option is useful for derivatives when edge effects are adversely corrupting the computation of the derivative. When this box is checked, all points that are in this zone of edge effects are zeroed. Note that increasing the pass count expands this edge effect zone.

Process

The Savitzky-Golay procedure can smooth to a derivative. You can choose to simply smooth the Data, or you can smooth to a derivative. Derivatives 1 through 8 are available. You cannot select a derivative order higher than the polynomial model order currently set.

Estimated Noise Reduction

TableCurve 2D offers a robust noise estimation procedure that may be of some value for low-frequency signals. A cubic polynomial interpolation is made for each point using the two points to the left and the two to the right (excluding the current point). The difference between the interpolated and data values is used to generate a measure of the white noise present. This assumes that the data can be locally characterized by a smooth cubic interpolant.

The Raw value reports the estimated white noise in the incoming data, the Smooth value the estimated white noise for the smoothed data. The percent is given as the amount of estimated noise remaining after smoothing.

The r-squared correlation coefficient is also reported. An r² of 1 is a perfect correlation while a value of 0 means the smoothed and unsmoothed data are completely uncorrelated.

List

Generate/8943.gif The List Data option lists the index, x-values, and the smoothed data. The listing uses the TableCurve 2D text viewer facility.

Copy

Generate/8941.gif The Copy Data to Clipboard option copies the x values and smoothed data to the clipboard. Formats include full precision binary (for spreadsheets such as Excel) and ASCII (for pasting into text editors).

Save

Generate/8942.gif The Save Data to Disk option writes the x-values and smoothed data to a supported file format. These formats include ASCII, Excel 97/2000, Excel 95, Lotus WK3, Lotus WK1, SPSS, or Systat.

Production Facility

Generate/8946.gif The TableCurve 2D Automation facility allows unattended processing of large numbers of data sets. The data sets can be consolidated in an Excel file or acquired using a DLL. The graphs can be exported to an MS Word/RTF file, while the processed data can be exported to an Excel 95 or Excel 97/2000 file.

Generate/8912.gif The Reset button restores the data to its state when first entering the procedure. If an Automation Session is in progress, the Reset button can be used to terminate the automated processing.

Residuals

Generate/89571.gif The Residuals button is used to graphically display the difference between the original and smoothed data.

Numeric Summary

Generate/8949.gif The Numeric Summary displays a basic summary of the analysis and a listing of the Savitzky-Golay filter coefficients. If a derivative is currently selected, both the zero order data and the specified derivative coefficients are listed.

MS Word/RTF Export

Generate/8971.gif The MS Word/RTF File Export option is used to save the current graphs and reports to either a MS Word file or a portable RTF (Rich Text Format) file. The graphs are inserted into the file as Windows metafiles.

Automatic Update

The List, Residuals, and Numeric Summary windows are automatically updated when any changes are made in the algorithm's settings.

Updating the Data Table

Generate/8910.gif When exiting this procedure with the OK button, an option will be presented to update TableCurve 2D's main data table with the smoothed data.

If Background Thread Fitting is active, the fitting will be initiated as soon as the smoothing is accepted and the data is rescanned.