Random Signals
🏃🏻 Getting Started Guide
This document can be executed directly on the Bohrium Notebook. To begin, click the Connect button located at the top of the interface, then select the digital-signal-processing:Digital-Signal-Processing-Lecture Image and choose your desired machine configuration to proceed.
📖 Source
This Notebook is from a famous Signal Processing Lecture. The notebooks constitute the lecture notes to the masters course Digital Signal Processing read by Sascha Spors, Institute of Communications Engineering, Universität Rostock.
This jupyter notebook is part of a collection of notebooks on various topics of Digital Signal Processing. Please direct questions and suggestions to Sascha.Spors@uni-rostock.de.
White Noise
Definition
White noise is a wide-sense stationary (WSS) random signal with constant power spectral density (PSD)
where denotes the power per frequency. White noise draws its name from the analogy to white light. It refers typically to an idealized model of a random signal, e.g. emerging from measurement noise. The auto-correlation function (ACF) of white noise can be derived by inverse discrete-time Fourier transformation (DTFT) of the PSD
This result implies that white noise has to be a zero-mean random process. It can be concluded from the ACF that two neighboring samples and are uncorrelated. Hence they show no dependencies in the statistical sense. Although this is often assumed, the probability density function (PDF) of white noise is not necessarily given by the normal distribution. In general, it is required to additionally state the amplitude distribution when denoting a signal as white noise.
Example - Amplifier Noise
Additive white Gaussian noise (AWGN) is often used as a model for amplifier noise. In order to evaluate if this holds for a typical audio amplifier, the noise captured from a microphone preamplifier at full amplification with open connectors is analyzed statistically. For the remainder, a function is defined to estimate and plot the PDF and ACF of a given random signal.
Now the pre-captured noise is loaded and analyzed
/tmp/ipykernel_785/2513969861.py:25: MatplotlibDeprecationWarning: The 'use_line_collection' parameter of stem() was deprecated in Matplotlib 3.6 and will be removed two minor releases later. If any parameter follows 'use_line_collection', they should be passed as keyword, not positionally. plt.stem(kappa, acf, use_line_collection=True)
Inspecting the PDF reveals that it fits quite well to a normal distribution. The ACF consists of a pronounced peak. from which can be concluded that the samples are approximately uncorrelated. Hence, the amplifier noise can be modeled reasonably well as additive white Gaussian noise. The parameters of the normal distribution (mean , variance ) are estimated as
Mean: -1.537e-05 Variance: 1.140e-07
Excercise
- What relative level does the amplifier noise have when the maximum amplitude of the amplifier is assumed to be ?
Solution: The average power of a mean-free random signal is given by its variance, here . Due to the very low mean in comparison to the maximum amplitude, the noise can be assumed to be mean-free. Hence, the relative level of the noise is then given as . Numerical evaluation yields
Level of amplifier noise: -69.43 dB
Example - Generation of White Noise with Different Amplitude Distributions
Toolboxes for numerical mathematics like Numpy
or scipy.stats
provide functions to draw uncorrelated random samples with a given amplitude distribution.
Uniformly distributed white noise
For samples drawn from a zero-mean random process with uniform amplitude distribution, the PDF and ACF are estimated as
/tmp/ipykernel_785/2513969861.py:25: MatplotlibDeprecationWarning: The 'use_line_collection' parameter of stem() was deprecated in Matplotlib 3.6 and will be removed two minor releases later. If any parameter follows 'use_line_collection', they should be passed as keyword, not positionally. plt.stem(kappa, acf, use_line_collection=True)
Lets listen to uniformly distributed white noise
Laplace distributed white noise
For samples drawn from a zero-mean random process with with Laplace amplitude distribution, the PDF and ACF are estimated as
/tmp/ipykernel_785/2513969861.py:25: MatplotlibDeprecationWarning: The 'use_line_collection' parameter of stem() was deprecated in Matplotlib 3.6 and will be removed two minor releases later. If any parameter follows 'use_line_collection', they should be passed as keyword, not positionally. plt.stem(kappa, acf, use_line_collection=True)
Exercise
- Do both random processes represent white noise?
- Estimate the power spectral density of both examples.
- How does the ACF change if you lower the length
size
of the random signal. Why?
Solution: Both processes represent white noise since the ACF can be approximated reasonably well as Dirac impulse . The weight of the Dirac impulse is equal to . In case of the uniformly distributed white noise , in case of the Laplace distributed white noise . Decreasing the length size
of the signal increases the statistical uncertainties in the estimate of the ACF.
Copyright
This notebook is provided as Open Educational Resource. Feel free to use the notebook for your own purposes. The text is licensed under Creative Commons Attribution 4.0, the code of the IPython examples under the MIT license. Please attribute the work as follows: Sascha Spors, Digital Signal Processing - Lecture notes featuring computational examples.