A time signal contains the complete information in time domain, i.e., the
amplitude of the signal at any given moment
. However, no information is explicitly
available in
in terms of its frequency contents. On the other hand, the spectrum
of the signal obtained by the Fourier transform (or any other
orthogonal transform such as discrete cosine transform) is extracted from the entire
time duration of the signal, it contains complete information in frequency domain in
terms of the magnitudes and phases of the frequency component at any given frequency
,
but there is no information explicitly available in the spectrum regarding the temporal
characteristics of the signal, such as when in time certain frequency contents appear.
In this sense, neither
in time domain nor
in frequency domain provides
complete description of the signal. In other words, we can have either temporal or
spectral locality regarding the information contained in the signal, but never both.
To address this dilemma, the short-time Fourier transform (STFT), also called windowed
Fourier transform, can be used. The signal to be Fourier analyzed is first
truncated by a time window function
which is zero outside a certain time
interval
, such as a square or Gaussian window, before it is transformed to the
frequency domain. Now any characteristics appearing in the spectrum will be known to
be from within this particular time window. In time domain, the windowed signal is:
We can further assume the windowed signal repeats itself outside the window, i.e.,
it becomes a periodic signal with period . The spectrum of this periodic signal
is discrete, with a gap
between every two consecutive frequency components,
i.e.,