Context
I need to extract the parameters of a single harmonic in a signal.
For instance if
$$ x(t) = A \sin (\omega_0t + d_0) + B \sin (\omega_2t + d_2) $$ then $f(x, \omega_0) = (A, d_0)$. This can be done offline.
Please consider the fact that $t$ does not cover a full number of periods!
Of course I used a fft() and then extracted the coefficient corresponding to the interesting frequency. The problem is that I compute the whole spectrum when I'm interested in only one value.
What I tried and read
I first tried to use the definition of the DFT (or to project my signal on a sine/cosine plane) by using:
$$ A e^{jd_0} = \frac{2}{N} \sum_t e^{j\omega_0 t} x(t) , $$ with $N$ the number of samples of $t$.
This is what is proposed here: FFT for a single frequency
This works however only for a full number of periods of the interesting frequency: I can cut my signal to get reasonable results but I'd rather not (and it's not always possible)
What can I do else?
