File Exchange

image thumbnail

Pink, Red, Blue and Violet Noise Generation with Matlab

version 1.8.0.0 (6.09 KB) by Hristo Zhivomirov
Pink, red, blue and violet noise generation via spectral processing of a white noise.

56 Downloads

Updated 03 Dec 2018

View License

The present submission is a set of four Matlab functions that provides a generation of:
1) Pink (flicker) noise - power spectral density slope -3 dB/oct., -10 dB/dec.
2) Red (Brownian) noise - power spectral density slope -6 dB/oct., -20 dB/dec.
3) Blue noise - power spectral density slope +3 dB/oct., +10 dB/dec.
4) Violet (Purple) noise - power spectral density slope +6 dB/oct., +20 dB/dec.

A few examples are given to clarify the usage of the functions. For convenience, the input and output arguments are given in the beginning of each function. The generated noise signal has a unity standard deviation and zero mean value.

The code is based on the theory described in:

[1] H. Zhivomirov. A Method for Colored Noise Generation. Romanian Journal of Acoustics and Vibration, ISSN: 1584-7284, Vol. XV, No. 1, pp. 14-19, 2018. (http://rjav.sra.ro/index.php/rjav/article/view/40/29)

Cite As

H. Zhivomirov. A Method for Colored Noise Generation. Romanian Journal of Acoustics and Vibration, ISSN: 1584-7284, Vol. XV, No. 1, pp. 14-19, 2018. (http://rjav.sra.ro/index.php/rjav/article/view/40/29)

Hristo Zhivomirov (2019). Pink, Red, Blue and Violet Noise Generation with Matlab (https://www.mathworks.com/matlabcentral/fileexchange/42919-pink-red-blue-and-violet-noise-generation-with-matlab), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Friedrich

May I suggest including an additional filter stage so that pink noise complying with IEC 60268-1 can be generated? In essence, it requires a 12dB/oct high pass at 22.4Hz, and a 18 dB/oct low pass at 22.4kHz.

Han Zerui

Coco

Good Job !
How is it possible to pull out a signal time history only a pink noise ?
Many thanks

Hi Pankaj Singh! Thanks so much for the kind comment! You can find the answer of your question at example2.m file.

Best regards,
Hristo Zhivomirov

Great code. Very helpful. I have one question. This functions generates the noise samples irrespective of SNR values. But I need to generate different noise samples for different SNR values (as in the case of AWGN). How can I do it?

Updates

1.8.0.0

A new reference literature has been added.

1.7.0.0

A new version of the codes has been uploaded.

1.6.0.0

A new version of the codes has been uploaded.

1.5.0.0

A new version of the codes has been uploaded.

1.4.0.0

A new version of the codes has been uploaded.

1.3.0.0

A new version of the codes has been uploaded.

1.2.0.0

A semantic error has been corrected in the code.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: randnd