Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] adxv_v2_0.tar.gz(190 Kbytes)
Manuscript Title: New version of PLNoise: a package for exact numerical simulation of power-law noises
Authors: Edoardo Milotti
Program title: PLNoise
Catalogue identifier: ADXV_v2_0
Distribution format: tar.gz
Journal reference: Comput. Phys. Commun. 177(2007)391
Programming language: ANSI C.
Computer: Any computer with an ANSI C compiler: the package has been tested with gcc version 3.2.3 on Red Hat Linux 3.2.3-52 and gcc version 4.0.0 and 4.0.1 on Apple Mac OS X-10.4.
Operating system: All operating systems capable of running an ANSI C compiler.
RAM: the code of the test program is very compact (about 60 Kbytes), but the program works with list management and allocates memory dynamically; in a typical run with average list length 2 . 104, the RAM taken by the list is 200 Kbytes.
Keywords: 1/fαnoise generation, colored noise generation, uneven sampling, Gaussian noise, 1/f noise, black noise, fGn, fBm.
PACS: 02.50.Ey, 05.40.Ca, 02.70.Uu.
Classification: 4.13.

External routines: The package needs external routines to generate uniform and exponential deviates. The implementation described here uses the random number generation library ranlib freely available from Netlib [1], but it has also been successfully tested with the random number routines in Numerical Recipes [2]. Notice that ranlib requires a pair of routines from the linear algebra package LINPACK, and that the distribution of ranlib includes the C source of these routines, in case LINPACK is not installed on the target machine.

Does the new version supersede the previous version?: Yes

Nature of problem:
Exact generation of different types of colored noise.

Solution method:
Random superposition of relaxation processes [3], possibly followed by an integration step to produce noise with spectral index > 2.

Reasons for new version:
Extension to 1/fα noises with spectral index 2 < α ≤ 4; the new version generates both noises with spectral with spectral index 0 < α ≤ 2 and with 2 < α ≤ 4.

Summary of revisions:
Although the overall structure remains the same, one routine has been added and several changes have been made throughout the code to include the new integration step.

Unusual features:
The algorithm is theoretically guaranteed to be exact, and unlike all other existing generators it can generate samples with uneven spacing.

Additional comments:
The program requires an initialization step; for some parameter sets this may become rather heavy.

Running time:
running time varies widely with different input parameters, however in a test run like the one in section 3 in the long write-up, the generation routine took on average about 75 μs for each sample.

[1] B. W. Brown, J. Lovato, and K. Russell: ranlib, available from Netlib (http://www.netlib.org/random/index.html, select the C version ranlib.c).
[2] W. H. Press, S. A. Teulkolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C: The Art of Scientific Computing, 2nd ed. pp. 274-290 (Cambridge Univ. Press., Cambridge, 1992).
[3] E. Milotti, Phys. Rev. E 72, 056701 (2005).