# Frequency and amplitude estimation with missing samples

My input signal is given by $$x[n] = A\sin(2\pi f n/F_s + \varphi)$$ The signal is uniformly sampled at a sampling rate of $F_s$[Hz]. However some of the samples are missing. Assume that there are not many missing samples and that their location is known (i.e. I know the timestamp for each sample), I am interested in estimating $A$ and $f$.

My initial approach is to interpolate the vector and use standard methods (e.g. FFT). Another thought is to perform some kind non-linear regression (which I am unfamiliar with).

Any help would be appreciated.

## 1 Answer

I think best method for your is to use non-linear regression. These methods do not need to use equidistant data. I answered on similar questions (fft-bin-interpolation). Below is citation from this answer:

If your signal is quite similar to sinus with noise, then I think you can estimate frequency by using fitting or regression methods. Search Internet with keywords: "fit", "regression", "least square" and "sine". You can find a lot of program code, tools and so on. For example (I do not try it) - sine-function-fit See also good discussion in StackExchange "Given a data set, how do you do a sinusoidal regression on paper? What are the equations, algorithms?" There are a lot of good books and manuals for fitting/regression. I can recommend classical book Numerical Recipes. See chapter "Modeling of Data". Especially "Fitting Data to a Straight Line" for base understanding and "Nonlinear Models" for understanding method of solution your problem. It is possible that there are specific methods for sine function.

Implementation of regression in your case can be effective. You must solve minimization problem for system by size of 3 (for amplitude, frequency and phase). Calculation of coefficients of this system is sums of some functions from all your points - O(N).