[SciPy-Dev] 1/f noise generation

Nathaniel Smith njs at pobox.com
Fri Aug 11 16:54:55 EDT 2017


On Wed, Aug 9, 2017 at 10:19 PM, Phillip Feldman
<phillip.m.feldman at gmail.com> wrote:
> Firstly, white noise means only that the power spectral density is flat, or
> equivalently, that the autocorrelation function is zero everywhere except at
> lag zero.
>
> One can generate Gaussian noise with an arbitrary power spectral density by
> filtering white Gaussian noise with a suitable filter. The output of the
> filter is the convolution of the impulse response of the filter with the
> autocorrelation function of white noise, which gives us the impulse response
> of the filter. So, from the convolution theorem and the definition of the
> PSD, the PSD of the output is the squared magnitude of the frequency
> response of filter.

It's not actually possible to generate true 1/f noise this way --
technically 1/f noise is non-stationary and doesn't have a PSD. (You
can run a PSD estimator on any finite sample of 1/f noise, and get
some answer, but as your samples get larger your estimate won't
converge, because you keep discovering more and more power at lower
and lower frequencies.) So there are specialized methods for
generating 1/f noise, involving things like fractional differencing or
wavelets.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the SciPy-Dev mailing list