I have a sinusoidal signal embedded in noise, and I would like to estimate it's amplitude and frequency, so I can subtract it out.
I realize that an FFT can do the job for me, and that's what I've been doing - I took an FFT of the input signal, and looked at the frequency bin with the highest amplitude, used that as an estimate for the frequency of the wave, and then subtract it out.
But the problem is that the frequency is accurate to only half a bin, and the bin size can be fairly large (since my sample size is typically ~ 100 points), and hence the error in wavelength is big. This leaves fairly large residuals once I subtract.
So as step two, I used the frequency from the FFT as an estimate, and I used the Levenberg-Marquardt algorithm to fit for the frequency, phase and amplitude. This solution worked wonderfully for toy data that I generated, but it fails quite frequently on real data, because of the noise. The amplitude of the noise can be as large (at most) as the amplitude of the signal.
I figured that I can estimate the wavelength using an autocorrelation, but I'm not sure how to interpret the results in the case of more than one frequency component.
Question: Are there any methods of estimating the wavelength of the wave that aren't FFT? I figure since fitting for the frequency is failing with noise, I could try fitting for the wavelength, but any other suggestions are welcome!
Note: I haven't really tried padding with zeros while performing the FFT because the noise seems to go up in the fourier plane if I do, but I'll try it and report the success here.