In this paper, three- and four-parameter least squares (LS) sine fitting algorithms are investigated. It is pointed out that the three-parameter fitting is well conditioned in its standard form, both for short and long records. Then, the conditioning of the four-parameter fitting (4PF) is investigated. A scaling factor is derived in order to ensure good conditioning of the equations. A Monte Carlo analysis is carried out to demonstrate that in practical cases, using this scaling factor ensures good conditioning for the four-parameter system. It is also shown that parameters can be determined precisely using direct pseudoinverse calculation for both methods. Hence, in this case, there is no need to use the computationally more demanding decomposition methods, although these are generally recommended for the solution of LS problems. In addition, data centering for time instants is introduced in order to further improve the numerical properties of the 4PF. It is shown that with this method, the four-parameter problem can be approximated with a diagonal matrix. Finally, an evaluation method is presented to significantly decrease roundoff errors of the widely used LS methods.
['Balázs Renczes', 'István Kollár', 'Tamas Daboczi']
Efficient Implementation of Least Squares Sine Fitting Algorithms