Amplitude estimation of sinusoid in known spiky spectral noise What is the "best" way to estimate amplitude of a known-frequency sinusoid in the presence of known spiky spectral noise (i.e. noise comprising a few spectral peaks at known frequencies)?




By "best", I mean highest accuracy and lowest variance for a given sampling period (assume the sampling rate is greater than the Nyquist frequency).
The phases of the spectral noise peaks are unknown, but the phase of the sinusoid of interest can be provided if it's useful.


The approaches I am aware of are:


Perform a DFT at the frequency of interest, and design the window function such that its nulls/zero-crossings are located at the known noise frequencies.
Use a least squares estimator (which is basically a DFT with a rectangular window?, and which wrongly assumes that the noise samples are uncorrelated), e.g. as described in this survey paper.


I can't think of a better way than method (1), which does not benefit from phase information, but I'm wondering if a better approach could be used which may even take advantage of phase information of the signal of interest.

Just as a note, though I don't quite understand why, I noticed that the nulls of a rectangular window fall at integer multiples of the frequency that completes exactly one cycle in the sampling period.
The best fit time domain solution can be found by constructing two two basis vectors with your known frequency and calculate the coefficients directly.  The magnitude and phase can then be directly determined from these values.

Let C be a vector of cosine values over your frame and S be a vector of sine values.  You then want to find $(a,b)$ so that $aC + bS$ is a close as possible to your function.

$$ F = a C + b S $$

Dot this with the basis vectors.

$$ C \cdot F = a C \cdot C + b C \cdot S $$

$$ S \cdot F = a S \cdot C + b S \cdot S $$

Since the dot products are scalars, this is simply a linear system of two equations with two unknowns.  If you have a whole number of cycles in your frame then $ C \cdot S $ and $ S \cdot C $ become zero and the solution is trivial.

Note, this operation is the equivalent of a single bin in a DFT with the right parameters.  That is, pick a DFT frame with a whole number of cycles of your known frequency, and look at the corresponding bin.

The general case, without cycle alignment, can also be solved in the frequency domain with way fewer calculations.  See my blog article:


Phase and Amplitude Calculation for a Pure Real Tone in a DFT: Method 1


Do this for each of your peaks.  For better results, subtract out the peaks you have found before processing the others.