Tutorial on Scaling of the Discrete Fourier Transform and the Implied Physical Units of the Spectra of Time-Discrete Signals
This text was originally presented as
Jens Ahrens, Carl Andersson, Patrik Höstmad, Wolfgang Kropp, “Tutorial on Scaling of the Discrete Fourier Transform and the Implied Physical Units of the Spectra of Time-Discrete Signals” in 148th Convention of the AES, e-Brief 56, May 2020 [ pdf ].
Please reference the text using this.
The combination of the time-discrete property of digital signals together with the commonly employed definition of the discrete Fourier transform (DFT) can cause ambiguity when interpreting magnitude spectra with respect to the physical unit of the signal under consideration. Standardized scaling of spectra increases the comparability of frequency-domain data that are published in scientific articles or data sheets of commercial products. We present and discuss in this tutorial a collection of the most relevant scaling options for DFT spectra to yield amplitude spectra, power spectra, and power density spectra, and we illustrate how an implied physical unit of the underlying signal is reflected by the magnitude of the spectrum. The tutorial is accompanied by Matlab/Octave scripts that demonstrate the different cases.
The Fourier transform (FT) is one of the most common mathematical operations in acoustics and audio. Definitions for continuous signals (CFT) as well as for discrete signals (DFT) exist. When speaking of a discrete signal, we refer to a signal that exhibits a dependency on a discrete variable such as time or space. We assume the instantaneous amplitude of the signal to be known with infinite accuracy.
Discrete signals require a somewhat different treatment than continuous ones because discrete signals are not physical. One aspect with which this becomes evident is interpreting the magnitude of the spectrum of a discrete signal, which is greatly facilitated when the spectrum is scaled. Although the scaling methods that we present here are widely known, we are not aware of a compact resource that summarizes the important information in an educational manner. This tutorial aims at filling this gap. Our treatment will be simplifying in a latent manner in the sense that we leave out certain less tangible details of the matter and focus on the fundamental concepts. We refer the reader to the references based on which we compiled this tutorial [1], [2, Sec. 4.2] [3, Ch. 4], [4, Ch. 6] and to the supplementary materials that we provide \cite{github_scaling}. For ease of compactness, we omit stating proofs.
After a brief excursion to the CFT in Sec. 2, scaling options for the DFT are presented in Sec. 3.1 and 3.2. Sec. 3.3 introduces the concept single-sided spectra, which the scaling approach requires to produce a representation of the spectrum that can be interpreted conveniently. Examples are presented. Further aspects are discussed in Sec. 4 and 5.
We assume the following definition of the CFT:
Let us assume that
Interpretation of the spectrum of the DFT in terms of the units is not as straightforward as with the CFT. We assume the following definition of the DFT in this tutorial:
A continuous signal
yields an amplitude spectrum, i.e. a spectrum
Fig. 1:
The square of this spectrum constitutes a power spectrum, $$ \tag{5}\label{eq:power_spectrum} \overline{\overline{X}}(k) = \vert\overline{X}(k)\vert^2 = \frac{1}{N^2} \vert X(k)\vert^2 $$
the values of which are directly proportional to the power in each bin
As we will demonstrate in Sec. 3.3, for a continuous signal
The most important alternative to amplitude and power spectra is the power spectral density (PSD) or power density spectrum
with the implied unit
It is also possible to create an amplitude density spectrum like \eqref{eq:cft}. However, the usefulness of this with discrete signals is not obvious.
When computing
It is helpful in many situations -- such as the context of this paper -- to convert the (symmetric) double-sided spectrum, i.e.,
Let us assume in the following a spectrum
The asterisk
We therefore define the single-sided spectrum
Note that for odd
To highlight the usefulness of the single-sided representation, Fig. 2 depicts the single-sided amplitude spectrum $$\vert \overline{X}\text{SS}(k)\vert $$ (cf. \eqref{eq:amplitude_spectrum}) of a signal $$x(n)$$ that represents a pure sine wave with amplitude $$1~\mathrm{V}$$ and an amplitude offset (DC) of $$1~\mathrm{V}$$. The amplitude of the sine wave as well as and the DC can be directly deduced from $$\vert \overline{X}\text{SS}(k)\vert $$.
Fig. 2: Illustration of single-sided amplitude spectra. The upper plot depicts
However, the picture is very different when interpreting amplitude spectra of broadband signals as illustrated in Fig. 3. The spectrum of a sine wave with additive noise is depicted for two different lengths
Fig. 3: Single-sided amplitude spectra $$\vert \overline{X}\text{SS}(k)\vert $$ on a logarithmic scale of a sine of amplitude 1 and implied unit $$\mathrm{V}$$ with additive white noise. $$f\text{s} = 100~\mathrm{kHz}$$. Left:
When the analysis of the noise in the signal from Fig. 3 is of interest, a power density scaling is more favorable. Fig. 4 presents the single-sided power density spectrum $$\underline{\overline{\overline{X}}}\text{SS}(k)$$ of the signal from Fig. 3 for different sampling frequencies $$f\text{s}$$ and different lengths
Fig. 4: Single-sided power spectral density $$\vert \underline{\overline{\overline{X}}}\text{SS}(k)\vert $$ of the signal from Fig. 3 for different sampling frequencies $$f\text{s}$$ and lengths
Note that while
$$ \tag{9} \overline{\overline{X}}\text{SS}(k) = \begin{cases} \frac{1}{2} \vert\overline{X}\text{SS}(k)\vert^2 \quad\forall 0 < k < \frac{N}{2}\ \ \ , \vert\overline{X}_\text{SS}(k)\vert^2 \quad\forall k =0, k = \frac{N}{2} \end{cases} $$
for single-sided spectra (and similarly for the PSD). This can be interpreted in terms of the crest factor of sine waves of
$$ \tag{10}\label{eq:rms_spectrum} \overline{X}\text{RMS}(k) = \begin{cases} \frac{1}{\sqrt{2}}\overline{X}\text{SS}(k) \quad \forall 0 < k < \frac{N}{2} \ \ \ \ \ \ \overline{X}_\text{SS}(k) \quad\forall k =0, k = \frac{N}{2} \end{cases} \ \ . $$
We term $$\overline{X}\text{RMS}(k)$$ RMS spectrum. It represents the RMS amplitudes of the discrete tones in the signal, and $$\overline{\overline{X}}\text{SS}(k) = \vert \overline{X}\text{RMS}(k)\vert^2$$ holds. A similar definition can be established for an RMS density spectrum $$\underline{\overline{X}}\text{RMS}(k)$$. Note that RMS-spectra are inherently single sided and have no equivalent double-sided representation.
It is common in spectral analysis of discrete signals to apply a window
$$ \begin{align} \tag{11}\label{eq:window_scaling_1} \overline{X}_w(k) &= \frac{1}{\sum_n w(n)} X_w(k) \ \tag{12}\label{eq:window_scaling_3} \overline{\overline{X}}_w(k) &= \frac{1}{(\sum_n w(n))^2} \vert X_w(k)\vert^2 \ \tag{13}\label{eq:window_scaling_4} \underline{\overline{\overline{X}}}w(k) &= \frac{1}{f\text{s} \sum_n w^2(n)} \vert X_w(k)\vert^2 \end{align} $$
where
A complex number
Since the complex exponential is dimensionless,
The transfer function
The combination of scaling and the single-sided representation of the DFT spectra of purely real signals allow for spectral representations like amplitude spectra, power spectra, and power density spectra of discrete signals that can be conveniently interpreted in terms of the implied physical units. Different scaling is required for discrete tones and for stochastic signals to make the scaled magnitude spectrum of one of the two signal types independent of the length of the Fourier transform and the sampling frequency. This causes a fundamental dilemma when analysing signals that contain both types of elementary signals.
When taking the into account with what frequency
Eq. \eqref{eq:k} was used in all figures in this paper that depict spectra to express the horizontal axis in Hz.
The RMS
Inserting Parseval's theorem given by
into \eqref{eq:rms_t} allows for computing the RMS from the spectrum
- G. Heinzel, A. R�üdiger, R. Schilling. Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows. Tech. Rep. http://hdl.handle.net/11858/00-001M-0000-0013-557A-5, 2002.
- J. G. Proakis and D. G. Manolakis. Digital Signal Processing: Principles Algorithms and Applications. Prentice-Hall, Upper Saddle River, New Jersey, USA, 3rd edition, 1996.
- L. Tan and J. Jiang. Digital Signal Processing: Fundamentals and Applications. Academic Press, Amsterdam, The Netherlands, 2nd edition, 2013.
- D. C. Swanson. Signal Processing for Intelligent Sensor Systems with MATLAB. CRC Press, London, UK, 2017.
- E. Williams. Fourier Acoustics: Sound Radiation and Nearfield Acoustical Holography. Academic Press, New York, 1999.
Footnotes
-
We speak of an implied unit as, strictly speaking, discrete signals do not have a physical unit. If $$x(n)$$ is the discrete representation of a physical signal $$x(t)$$, then we consider $$[x(t)]$$, the unit of $$x(t)$$, the implied unit of $$x(n)$$. ↩
-
Note that magnitude spectra are typically plotted on a logarithmic scale, i.e. $$20\log_{10}\vert X(k)\vert $$ when representing amplitude or $$10\log_{10}\vert X(k)\vert$$ when representing power or energy. We chose a linear scale here for ease of demonstration. ↩
-
With electrical signals, the power $$P$$ is obtained as $$P=U^2/R$$, with $$U$$ being the effective (RMS) voltage and $$R$$ being a resistance. The RMS spectrum $$\overline{X}_\text{RMS}(k)$$ is defined in \eqref{eq:rms_spectrum}, and its square is directly proportional to $$\overline{\overline{X}}(k)$$ via \eqref{eq:single-sided}. ↩