* I think you mean non-white, not nongaussian
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.An alternative method for synthesizing Gaussian noise with an arbitrary power spectral density is to generate tones with unity amplitude and random phase, where the probability of picking any particular tone frequency is proportional to the height of the PSD. The filter method tends to be more computationally efficient. Dr. Phillip M. Feldman *Suzen, Mehmet* msuzen at gmail.com <scipy-dev%40python.org?Subject=Re%3A%20%5BSciPy-Dev%5D%201/f%20noise%20generation&In-Reply-To=%3CCAPtbhHwp3dq6jiWEDhAbVn45ruUXKW%3D0%2BoD1PKvnHVdKjaw7GA%40mail.gmail.com%3E> *Tue Aug 8 08:15:33 EDT 2017* - Previous message (by thread): [SciPy-Dev] 1/f noise generation <https://mail.python.org/pipermail/scipy-dev/2017-August/022035.html> - *Messages sorted by:* [ date ] <https://mail.python.org/pipermail/scipy-dev/2017-August/date.html#22036> [ thread ] <https://mail.python.org/pipermail/scipy-dev/2017-August/thread.html#22036> [ subject ] <https://mail.python.org/pipermail/scipy-dev/2017-August/subject.html#22036> [ author ] <https://mail.python.org/pipermail/scipy-dev/2017-August/author.html#22036> ------------------------------ On 8 August 2017 at 12:58, Neal Becker <ndbecker2 at gmail.com <https://mail.python.org/mailman/listinfo/scipy-dev>> wrote: * Excellent point. white noise means constant PSD, not only Gaussian.
On Wed, Aug 9, 2017 at 10:19 PM, Phillip Feldman <phillip.m.feldman@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
good point! On Fri, Aug 11, 2017 at 4:55 PM Nathaniel Smith <njs@pobox.com> wrote:
On Wed, Aug 9, 2017 at 10:19 PM, Phillip Feldman <phillip.m.feldman@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 _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
Because the integral of 1/f from zero to infinity is infinite, the methods that I described won't work if one really wants to reproduce the 1/f characteristic over all frequency. But, for things like communications systems applications, where any receiving system has a finite bandwidth, one doesn't care about the PSD outside the bandwidth of the system, and one would consequently be simulating something that matches the 1/f characteristic over a finite bandwidth, and does just about anything else outside. A PSD that matches the 1/f curve over an interval [f1, f2], where f1>0, and is zero outside that interval, corresponds to a well-behaved process, and no special methods are required. Phillip On Fri, Aug 11, 2017 at 2:41 PM, Neal Becker <ndbecker2@gmail.com> wrote:
good point!
On Fri, Aug 11, 2017 at 4:55 PM Nathaniel Smith <njs@pobox.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
On Wed, Aug 9, 2017 at 10:19 PM, Phillip Feldman <phillip.m.feldman@gmail.com> wrote: 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 _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
participants (3)
-
Nathaniel Smith -
Neal Becker -
Phillip Feldman