DSPRelated.com
Forums

pink noise

Started by wajid lone September 27, 2005
Hi everybody

I m generating pink noise (1/f noise) using following procedure.
1. Generate uniformly distributed white noise.

2. Calculate the fastFourier transform (FFT),

3. Impose 1=f distribution on the power spectrum

4. Calculate inverse FFT.
I have used following code for generating pink noise
rand('seed',1);
x=rand(30000,1);
yt(x);
y=(abs(y).^2);
f=(1:30000);
f=f';
y1=(f.^(-0.5)).*y;

pink_noise = real(ifft(y1));
But results are not correct. Can anybody help for solving the problem.
with regards
Wajid


Hi Wajid,
The only thing that you should do extra is to add
phase information (as randomly "uniform" varying
between -pi and pi) and after multiplying with
magnitude y (magnitude should be normally distributed) y * exp(-(fi))

and then taking the inverse fft will be enough for you
to obtain 1/f noise.

Cheers,

Tolga Esat Ozkurt --- wajid lone <kh_wajid@kh_w...> wrote:

> Hi everybody
>
> I m generating pink noise (1/f noise) using
> following procedure. >
> 1. Generate uniformly distributed white noise.
>
> 2. Calculate the fastFourier transform (FFT),
>
> 3. Impose 1=f distribution on the power spectrum
>
> 4. Calculate inverse FFT. >
> I have used following code for generating pink noise >
>
> rand('seed',1);
> x=rand(30000,1);
> yt(x);
> y=(abs(y).^2);
> f=(1:30000);
> f=f';
> y1=(f.^(-0.5)).*y;
>
> pink_noise = real(ifft(y1)); >
> But results are not correct. Can anybody help for
> solving the problem. >
> with regards >
> Wajid

__________________________________