Let's start with a simple temporal law, that I want to analyze in the frequency domain :

$x(t)=\frac{1}{2}(A+Bcos(2\pi \nu_0 t+\phi_0))$, with :

  • $A=4$
  • $B=10$
  • $\nu_0=10^8$
  • $\phi_0=10^8$

I made a simple DFT (in Ruby) with $N=256$ samples at $f_s=6.10^8$ and got the following results, that are self explanatory, hopefully :

{:freq=> 0, :ampl=>1.9661708933907966, :phase=>0.0}
...non significant amplitudes...
{:freq=>41, :ampl=>0.8468197908638829, :phase=>0.502386551741981},
{:freq=>42, :ampl=>2.0871309982776522, :phase=>0.5146361931223131},
{:freq=>43, :ampl=>4.115492878192129,  :phase=>0.5268855235929356},
{:freq=>44, :ampl=>1.0144367909506748, :phase=>0.5391345296503323},
...non significant amplitudes...

I clearly retreive A : $1.96 = \frac{A}{2}$ gives $A = 3.9 \approx 4$. Good.

As for $\nu_0$, this seems correct also :
$f_{analysis}(43)=\frac{43f_s}{256}=100781250.0\approx 10^8=\nu_0$.

For $B$ and $\phi_0$, things are more difficult, because (I guess) of DFT frequency leakage. Direct reading of my result gives $$2\times 4.11=8.22 \not\approx B=10$$

As experts, how would you get acceptable $B$ and $\phi_0$, from my results ?

  • $\begingroup$ Is phi_0 supposed to be 10^8? Why do you insist on analyzing in frequency domain? $\endgroup$
    – jan
    Oct 22, 2013 at 16:33

2 Answers 2


Parameter extraction of a sinusoid, whose frequency is arbitrary, using the DFT is NOT easy. [By the way, the initial phase of a sinusoid, your phi_0 variable, can only be in the range of –pi –to- +pi radians. How can your phi_0 be 100 million(!)?] Jan's comment, implying that time-domain processing should be considered, is a good comment. Time-domain averaging, for example, will give you the value of A/2.

One possibility is to apply your real-valued x(n) input sequence to a Hilbert transformer to generate a y(n) sequence. After properly delaying x(n) you'll then have an analytic (complex) sequence c(n) = x(n) + jy(n). Computing the magnitude sequence |c(n)| will give you the instantaneous magnitude of your original sinusoidal x(n) sequence. Computing the arctangent of the c(n) sequence will give you the instantaneous phase of your original x(n) sequence. Applying your instantaneous phase sequence to a digital differentiator give you the instantaneous frequency of your original x(n) sequence.

I've left out several implementation considerations here, but I just wanted to point out that you might want to explore time-domain processing in order to avoid DFT spectral leakage problems.

  • $\begingroup$ Thx for your answer...and also for the invaluable quality of your books ! $\endgroup$
    – JCLL
    Sep 14, 2015 at 12:16

Interpolation is one method used to estimate parameters of non-periodic-in-FFT-aperture signals. Parabolic or, better yet, Sinc interpolation will help with estimating both the frequency and the amplitude peak B. For phase interpolation, I find it easier to use something like a pre or post fftshift to move the phase 0 reference to the middle of your data, then interpolating an estimated phase from the fft, then offsetting the phase back relative to wherever using the frequency estimate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.