Logo   Information, Signal, Images et ViSion C.N.R.S.   GdR   M.E.S.R.

Time-frequency resolution

The time resolution of the STFT can be obtained by considering for $x$ a Dirac impulse:

\begin{displaymath}x(t)=\delta(t-t_0) \ \Rightarrow\ F_x(t,\nu;h)=\exp{[-j2\pi t_0 \nu]}
\ h(t-t_0).\end{displaymath}

Thus, the time resolution of the STFT is proportional to the effective duration of the analysis window $h$. Similarly, to obtain the frequency-resolution, we have to consider a complex sinusoid (a Dirac impulse in the frequency domain):

\begin{displaymath}x(t)=\exp{[j2\pi \nu_0 t]} \ \Rightarrow\ F_x(t,\nu;h)=\exp{[-j2\pi t
\nu_0]}\ H(\nu-\nu_0).\end{displaymath}

So the frequency-resolution of the STFT is proportional to the effective bandwidth of the analysis window $h$. Consequently, for the STFT, we have a trade-off between time and frequency resolutions: on one hand, a good time resolution requires a short window $h(t)$ ; on the other hand, a good frequency resolution requires a narrow-band filter i.e. a long window $h(t)$. But unfortunately, these wishes can not be simultaneously granted. This limitation is a consequence of the Heisenberg-Gabor inequality. Two instructive cases can be considered:

  1. The first one corresponds to a perfect time resolution: the window $h(t)$ is chosen as a Dirac impulse:

    \begin{displaymath}h(t)=\delta(t) \ \Rightarrow\ F_x(t,\nu;h)=x(t)\ \exp{[-j2\pi \nu t]}\end{displaymath}

    the STFT is perfectly localized in time, but does not provide any frequency resolution.

    * Example: This can be computed easily using the Time-Frequency Toolbox: we consider for $x$ a linear frequency modulation with a gaussian amplitude modulation (see fig. 3.5).

         >> x=real(amgauss(128).*fmlin(128));
         >> h=1;
         >> tfrstft(x,1:128,128,h);
    
    Figure 3.5: Perfect time resolution with the STFT, but with no frequency resolution : the window $h$ is chosen as a Dirac impulse
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at1fig5.eps}}\end{figure}
    The signal is perfectly localized in time (a section for a given frequency of the modulus of the STFT corresponds exactly to the modulus of the signal), but the frequency resolution is null.

  2. The second is that of perfect frequency resolution, obtained with a constant window

    \begin{displaymath}h(t)=1\ (H(\nu)=\delta(\nu))\ \ \Rightarrow\ \ F_x(t,\nu;h)=X(\nu)\end{displaymath}

    here the STFT reduces to the Fourier transform of $x(t)$, and does not provide any time resolution (see fig. 3.6).
         >> h=ones(127,1);
         >> tfrstft(x,1:128,128,h);
    
    Figure 3.6: Perfect frequency resolution with the STFT : the window $h$ is chosen as a constant
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at1fig6.eps}}\end{figure}
    The result obtained for $F_x(t,\nu;h)$ is not exactly $X(\nu)$, because the window $h$ has not an infinite duration. Thus, some side effects appear.

To illustrate the influence of the shape and length of the analysis window $h$, we consider two transient signals having the same gaussian amplitude and constant frequency, with different arrival times (using the M-file atoms.m):

     >> sig=atoms(128,[45,.25,32,1;85,.25,32,1]);
Here is the result obtained with a Hamming analysis window of 65points (see fig. 3.7):
     >> h=window(65,'hamming');
     >> tfrstft(sig,1:128,128,h);
Figure 3.7: Two gaussian atoms analyzed by the STFT using a Hamming window $h$ of 65points : it is difficult to discriminate the two components in time
\begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at1fig7.eps}}\end{figure}
The frequency resolution is very good, but it is almost impossible to discriminate the two components in time. If we now consider a short Hamming window of 17points (see fig. 3.8)
     >> h=window(17,'hamming');
     >> tfrstft(sig,1:128,128,h);
Figure 3.8: Same gaussian atoms analyzed by the STFT using a Hamming window $h$ of 17points : frequency resolution is poorer, but the two components can be easily distinguished
\begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at1fig8.eps}}\end{figure}
the frequency resolution is poorer, but the time resolution is sufficiently good to distinguish the two components. For more information on the choice of the window, see [Har78].

Eric Chassande-Mottin 2005-10-26

© GdR ISIS - Contact