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


The spectrogram

If we consider the squared modulus of the STFT, we obtain a spectral energy density of the locally windowed signal $x(u)\ h^*(u-t)$:

\begin{displaymath}S_x(t,\nu) = \left\vert\int_{-\infty}^{+\infty} x(u)\ h^*(u-t)\ e^{-j2\pi \nu
u}\ du\right\vert^2.\end{displaymath}

This defines the spectrogram, which is a real-valued and non-negative distribution. Since the window $h$ of the STFT is assumed of unit energy, the spectrogram satisfies the global energy distribution property:

\begin{displaymath}\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} S_x(t,\nu)\ dt\ d\nu =
E_x.\end{displaymath}

Thus, we can interpret the spectrogram as a measure of the energy of the signal contained in the time-frequency domain centered on the point $(t,\nu)$ and whose shape is independent of this localization.

  • Properties

    • Time and frequency covariance

      A direct consequence of the definition of the spectrogram is that it preserves time and frequency shifts:

      \begin{eqnarray*}
y(t)=x(t-t_0) &\ \Rightarrow\ & S_y(t,\nu)=S_x(t-t_0,\nu)\\
y...
...[j2\pi \nu_0 t]} &\ \Rightarrow\ &
S_y(t,\nu)=S_x(t,\nu-\nu_0).
\end{eqnarray*}


      Thus, the spectrogram is an element of the class of quadratic time-frequency distributions that are covariant by translation in time and in frequency. This class, developed in the next chapter, is called the Cohen's class.

    • Time-frequency resolution

      The spectrogram being the squared magnitude of the STFT, it is obvious that the time-frequency resolution of the spectrogram is limited exactly as it is for the STFT. In particular, it exists again a trade-off between time resolution and frequency resolution. This poor resolution property is the main drawback of this representation.

    • Interference structure

      As it is a quadratic (or bilinear) representation, the spectrogram of the sum of two signals is not the sum of the two spectrograms (quadratic superposition principle):

      \begin{displaymath}y(t)=x_1(t)+x_2(t) \ \Rightarrow\
S_y(t,\nu)=S_{x_1}(t,\nu)+S_{x_2}(t,\nu)+2\Re{\{S_{x_1,x_2}(t,\nu)\}}\end{displaymath}

      where $S_{x_1,x_2}(t,\nu) = F_{x_1}(t,\nu) F_{x_2}^*(t,\nu)$ is the cross-spectrogram and $\Re{}$ denotes the real part. Thus, as every quadratic distribution, the spectrogram presents interference terms, given by $S_{x_1,x_2}(t,\nu)$. However, one can show [Hla91] that these interference terms are restricted to those regions of the time-frequency plane where the auto-spectrograms $S_{x_1}(t,\nu)$ and $S_{x_2}(t,\nu)$ overlap. Thus, if the signal components $x_1(t)$ and $x_2(t)$ are sufficiently distant so that their spectrograms do not overlap significantly, then the interference term will nearly be identically zero. This property, which is a practical advantage of the spectrogram, is in fact a consequence of the spectrogram's poor resolution.

  • Examples

    To illustrate the resolution trade-off of the spectrogram and its interference structure, we consider a two-component signal composed of two parallel chirps, and we analyze it with the M-file tfrsp.m of the Time-Frequency Toolbox (the M-file specgram.m of the Signal Processing Toolbox is equivalent, except that tfrsp.m offers the possibility to change the analysis window) (see fig. 3.15 and fig. 3.16).

         >> sig=fmlin(128,0,0.4)+fmlin(128,0.1,0.5);
         >> h1=window(23,'gauss'); 
         >> figure(1); tfrsp(sig,1:128,128,h1);
         >> h2=window(63,'gauss'); 
         >> figure(2); tfrsp(sig,1:128,128,h2);
    
    Figure 3.15: Spectrogram of two parallel chirps, using a short gaussian analysis window : cross-terms are present between the two FM components
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at4fig1.eps}}\end{figure}
    Figure 3.16: Spectrogram of two parallel chirps, using a long gaussian analysis window : cross-terms are still present, due to the too small distance in the time-frequency plan between the FM components
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at4fig2.eps}}\end{figure}
    In these two cases, the two FM components of the signal are not sufficiently distant to have distinct spectrograms, whatever the window length is. Consequently, interference terms are present, and disturb the readability of the time-frequency representation. If we consider more distant components (see fig. 3.17 and fig. 3.18),
         >> sig=fmlin(128,0,0.3)+fmlin(128,0.2,0.5);
         >> h1=window(23,'gauss'); 
         >> figure(1); tfrsp(sig,1:128,128,h1);
         >> h2=window(63,'gauss'); 
         >> figure(2); tfrsp(sig,1:128,128,h2);
    
    Figure 3.17: Spectrogram of two more distant parallel chirps, using a short gaussian analysis window
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at4fig3.eps}}\end{figure}
    Figure 3.18: Spectrogram of two parallel chirps, using a long gaussian analysis window
    \begin{figure}
\epsfxsize =10cm\epsfysize =8cm
\centerline{\epsfbox{figure/at4fig4.eps}}\end{figure}
    the two auto-spectrograms do not overlap and no interference term appear. We can also see the effect of a short window (h1) and a long window (h2) on the time-frequency resolution. In the present case, the long window h2 is preferable since as the frequency progression is not very fast, the quasi-stationary assumption will be correct over h2 (so time resolution is not as important as frequency resolution in this case) and the frequency resolution will be quite good ; whereas if the window is short (h1), the time resolution will be good, which is not very useful, and the frequency resolution will be poor.

Eric Chassande-Mottin 2005-10-26

© GdR ISIS - Contact