Savitzky-Golay Algorithm

Local Algorithm - One-Dimensional Algorithm

Savitzky-Golay algorithm performs a local polynomial regression on a given sequence of values. The basic formula (for filter width L=2M+1 and polynomial order k) is stated as follows:

ˆY[n]=12M+1Mk=MA[k]Y[nk],

where Y[n] and ˆY[n] denote the raw and processed data sequences, respectively. The values of A[k], the Savitzky-Golay coefficient vector, depends on the choice of polynomial order k. Note that the Savitzky-Golay coefficient vector can be pre-computed based on the idea to make for each point a local least-square polynomial fit.

Input Parameters

Parameter Type Constraint Description Remarks
Y[n] Y[n]RN NN Input data sequence of length N The algorithm assumes that input values contain no outliers and improper values such as ‘nan’, ‘inf’, ‘null’.
L LN L=2M+1,MN    
k kN      

Output Parameters

Parameter Type Constraint Description Remarks
ˆY[n] ˆY[n]RN NN Output data sequence of length N  

Tool Support

Single Steps using the Algorithm

References

  • A. Savitzky, M.J.E. Golay, Smoothing and Differentiation of Data by Simplified Least Squares Procedures, Analytical Chemistry, vol. 36, Issue 8, pp 1627-1639, 1964.
  • S.J. Orfanidis, Introduction to Signal Processing, Prentice-Hall, Englewood Cliffs, NJ, 1996.