COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### White noise generation in the frequency domain

• Email
• Follow

```Hello all,

I'd like to synthesise white noise in the frequency domain, the reason
for that is that I need to make it go through a bank of filters so
it's more convenient if I don't have to perform a FFT on it. I've
tried that before, unfortunately strange artifacts would appear in the
form of diagonal streaks on the noise's spectrogram. I have no idea
what this can be due to. The technique I used was to generate each
complex bin by having a magnitude of 1.0 and a random phase, normally
distributed from 0=B0 to 360=B0.

That seemed like a sensible approach, considered the circular complex
distribution of frequency domain bins it would give me, however it
yields those undesirable diagonal streaks, basically long random dark
lines in the noisy spectrogram with fainter perpendicular equivalents.
Is there anything wrong with the approach? What could these diagonal
streaks be due to? How would you go about doing what I'm trying to do?

```
 0
Reply Michel0528 (498) 9/22/2008 6:41:34 AM

See related articles to this posting

```Michel Rouzic wrote:
> The technique I used was to generate each
> complex bin by having a magnitude of 1.0 and a random phase, normally
> distributed from 0=EF=BF=BD to 360=EF=BF=BD.

Try a uniform distribution of phase from 0 to 360 degrees.

Greg
```
 0
Reply gberchin6039 (152) 9/22/2008 1:25:07 PM

```Michel Rouzic wrote:

> I'd like to synthesise white noise in the frequency domain, the reason
> for that is that I need to make it go through a bank of filters so
> it's more convenient if I don't have to perform a FFT on it. I've
> tried that before, unfortunately strange artifacts would appear in the
> form of diagonal streaks on the noise's spectrogram. I have no idea
> what this can be due to. The technique I used was to generate each
> complex bin by having a magnitude of 1.0 and a random phase, normally
> distributed from 0� to 360�.

How are you generating the random numbers?  There have been stories
for years on periodicities in random number generators.  One well
known one is that groups of three consecutive numbers have some
unrandom properties.  You might be seeing a similar effect.

-- glen

```
 0
Reply gah (12850) 9/22/2008 2:01:05 PM

```
Michel Rouzic wrote:

> Hello all,
>=20
> I'd like to synthesise white noise in the frequency domain, the reason
> for that is that I need to make it go through a bank of filters so
> it's more convenient if I don't have to perform a FFT on it. I've
> tried that before, unfortunately strange artifacts would appear in the
> form of diagonal streaks on the noise's spectrogram. I have no idea
> what this can be due to. The technique I used was to generate each
> complex bin by having a magnitude of 1.0 and a random phase, normally
> distributed from 0=B0 to 360=B0.

This is not right. That way are generating a sum of the synchronously=20
phase manipulated signals with the breaks of phase at the same point.=20
there will be the artifacts at the edges of the subsequent FFT blocks,=20
and you will see it in the frequency domain, too. You have to make=20
random magnitude in the addition to the random phase.

DSP and Mixed Signal Design Consultant
http://www.abvolt.com

```
 0
Reply antispam_bogus (2949) 9/22/2008 2:03:01 PM

```Vladimir Vassilevsky wrote:

> This is not right. That way are generating a sum of the synchronously
> phase manipulated signals with the breaks of phase at the same point.
> there will be the artifacts at the edges of the subsequent FFT blocks,
> and you will see it in the frequency domain, too. You have to make
> random magnitude in the addition to the random phase.

I think that your description of the problem is right but your
solution is wrong.  The resulting "white" noise will be pseudorandom
with period equal to the FFT size.  But using a random FFT magnitude
won't change that.  The Fourier Transform of white noise has constant
magnitude and random phase.

Greg
```
 0
Reply gberchin6039 (152) 9/22/2008 2:31:56 PM

```
Greg Berchin wrote:

>
>
>>This is not right. That way are generating a sum of the synchronously
>>phase manipulated signals with the breaks of phase at the same point.
>>there will be the artifacts at the edges of the subsequent FFT blocks,
>>and you will see it in the frequency domain, too. You have to make
>>random magnitude in the addition to the random phase.
>
>
> I think that your description of the problem is right but your
> solution is wrong.  The resulting "white" noise will be pseudorandom
> with period equal to the FFT size.

I meant generating the different FFT contents for each and every frame.

>  But using a random FFT magnitude
> won't change that.  The Fourier Transform of white noise has constant
> magnitude and random phase.

This applies to the continious time Fourier Transform and the infinitely
long piece of the white noise. For the finite parameters and discrete
sequences, both amplitude and phase will be random.

DSP and Mixed Signal Design Consultant
http://www.abvolt.com
```
 0
Reply antispam_bogus (2949) 9/22/2008 2:49:34 PM

```Vladimir Vassilevsky wrote:

> This applies to the continious time Fourier Transform and the infinitely
> long piece of the white noise. For the finite parameters and discrete
> sequences, both amplitude and phase will be random.

Do you mean that the DFT squared magnitude will be random with mean
equal to the variance of the noise (suitably scaled so that the DFT/
IDFT math works out)?  I can sort of justify that intuitively.

Greg
```
 0
Reply gberchin6039 (152) 9/22/2008 3:36:32 PM

```Greg Berchin  <gberchin@sentientscience.com> wrote:

>> This is not right. That way are generating a sum of the synchronously
>> phase manipulated signals with the breaks of phase at the same point.
>> there will be the artifacts at the edges of the subsequent FFT blocks,
>> and you will see it in the frequency domain, too. You have to make
>> random magnitude in the addition to the random phase.

>I think that your description of the problem is right but your
>solution is wrong.  The resulting "white" noise will be pseudorandom
>with period equal to the FFT size.  But using a random FFT magnitude
>won't change that.  The Fourier Transform of white noise has constant
>magnitude and random phase.

The Fourier transform of a white noise process has constant magnitude.

Whereas the values of the discrete Fourier transform of a white
noise signal have a normal distribution.

Major difference.

Steve
```
 0
Reply spope33 (691) 9/22/2008 8:44:46 PM

```On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spope33@speedymail.org
(Steve Pope) wrote:

>Whereas the values of the discrete Fourier transform of a white
>noise signal have a normal distribution.

I'm not doubting the statements from you and Vladimir, but I've never
seen the derivation of this.  Where did you find this info?

Greg
```
 0
Reply gberchin (81) 9/22/2008 11:16:44 PM

```Greg Berchin  <gberchin@comicast.net> wrote:

>On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spope33@speedymail.org

>>Whereas the values of the discrete Fourier transform of a white
>>noise signal have a normal distribution.

>I'm not doubting the statements from you and Vladimir, but I've never
>seen the derivation of this.  Where did you find this info?

Let's see... the DFT is a linear operation, that is to say,
any given output of a DFT is a linear combination of the
inputs to the DFT, so if the inputs are all normal, then any
output is normal, since the sum of normal variables is normal.

This applies to both the real part of an output, and the
imaginary part of an output.  They would each be normal.

Steve
```
 0
Reply spope33 (691) 9/22/2008 11:25:41 PM

```>I'd like to synthesise white noise in the frequency domain, the reason
>for that is that I need to make it go through a bank of filters so
>it's more convenient if I don't have to perform a FFT on it. I've
>tried that before, unfortunately strange artifacts would appear in the
>form of diagonal streaks on the noise's spectrogram. I have no idea
>what this can be due to. The technique I used was to generate each
>complex bin by having a magnitude of 1.0 and a random phase, normally
>distributed from 0=B0 to 360=B0.

The following two are equivalent:
1) generating white noise and taking its Fourier transform
2) generating white noise directly in the Fourier domain

That is, to say, there is no such as frequency domain noise, really.
Fourier transform is an orthogonal transform, hence FFT of an i.i.d.
sequence of normal random variables is an i.i.d. sequence of normal random
variables.

>
>That seemed like a sensible approach, considered the circular complex
>distribution of frequency domain bins it would give me, however it
>yields those undesirable diagonal streaks, basically long random dark
>lines in the noisy spectrogram with fainter perpendicular equivalents.
>Is there anything wrong with the approach? What could these diagonal
>streaks be due to? How would you go about doing what I'm trying to do?

As others have pointed, you should not fix the magnitude.  Try generating
real and imaginary parts separately, and summing them as follows:
x = sigma/sqrt(2) * ( randn(n,1) + i * randn(n,1) );
in Matlab language. You can use this to characterize white noise in the
"frequency domain" as you wish. (The variance of each element in the
sequence x is sigma^2, make sure you use the correct value. In
communications sigma^2/2 is used often for noise variance, and this can be
confusing.)

Emre
```
 0
Reply eguven (123) 9/22/2008 11:40:08 PM

```>The Fourier transform of a white noise process has constant magnitude.

I hate to nitpick, but the above statement is confusing.  What is meant
here is that the Fourier transform of the autocorrelation of the white
noise process is flat (i.e., constant magnitude), which goes by the name
"power spectral density".

Otherwise, as previously stated, Fourier transform of white noise is white
noise. It has random magnitude.

Emre
```
 0
Reply eguven (123) 9/22/2008 11:43:29 PM

```On Sep 22, 7:25=A0pm, spop...@speedymail.org (Steve Pope) wrote:
> Greg Berchin =A0<gberc...@comicast.net> wrote:
>
> >On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spop...@speedymail.org
> >>Whereas the values of the discrete Fourier transform of a white
> >>noise signal have a normal distribution.
> >I'm not doubting the statements from you and Vladimir, but I've never
> >seen the derivation of this. =A0Where did you find this info?
>
> Let's see... the DFT is a linear operation, that is to say,
> any given output of a DFT is a linear combination of the
> inputs to the DFT, so if the inputs are all normal, then any
> output is normal, since the sum of normal variables is normal.
>
> This applies to both the real part of an output, and the
> imaginary part of an output. =A0They would each be normal.

Noise needn't be bormally distributed in order to be white. Why would
its parts be Gaussian?

Jerry
```
 0
Reply jya (12872) 9/22/2008 11:51:54 PM

```>( In communications sigma^2/2 is used often for noise variance, and this
can be
>confusing.)

In above statement I meant sigma^2 = N_0 / 2.  It has been some time since
I used this in the context of my telecommunications courses.  Can anyone
remind me why this is?  Why is there a need to divide N_0 by 2, whereas
defining another constant as the variance N = N_0/2 would simplify the
notation... or so it seems to me.

Thanks,

Emre
```
 0
Reply eguven (123) 9/23/2008 12:14:59 AM

```emre <eguven@ece.neu.edu> replies to my post,

>>The Fourier transform of a white noise process has constant magnitude.

>I hate to nitpick, but the above statement is confusing.  What is meant
>here is that the Fourier transform of the autocorrelation of the white
>noise process is flat (i.e., constant magnitude), which goes by the name
>"power spectral density".

Nope, that isn't what I meant.  The Fourier transform (not the
discrete fourier transform) of a power signal arising from
stationary, random process that is white and Gaussian will be
constant.

It is a little confusing because not all power signals have
Fourier transforms, but I would say this is one of them.

> Otherwise, as previously stated, Fourier transform of white noise
> is white noise.

I think you're talking discrete Fourier transform here.

Steve
```
 0
Reply spope33 (691) 9/23/2008 1:35:37 AM

```Jerry Avins  <jya@ieee.org> wrote:

>On Sep 22, 7:25�pm, spop...@speedymail.org (Steve Pope) wrote:

>> Greg Berchin �<gberc...@comicast.net> wrote:

>> >On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spop...@speedymail.org
>> >>Whereas the values of the discrete Fourier transform of a white
>> >>noise signal have a normal distribution.
>> >I'm not doubting the statements from you and Vladimir, but I've never
>> >seen the derivation of this. �Where did you find this info?

>> Let's see... the DFT is a linear operation, that is to say,
>> any given output of a DFT is a linear combination of the
>> inputs to the DFT, so if the inputs are all normal, then any
>> output is normal, since the sum of normal variables is normal.

>> This applies to both the real part of an output, and the
>> imaginary part of an output. �They would each be normal.

>Noise needn't be bormally distributed in order to be white. Why would
>its parts be Gaussian?

You're right.  My statement above applies only to Gaussian
white noise.

Steve
```
 0
Reply spope33 (691) 9/23/2008 1:36:27 AM

```>emre <eguven@ece.neu.edu> replies to my post,
>
>>>The Fourier transform of a white noise process has constant magnitude.
>
>>I hate to nitpick, but the above statement is confusing.  What is meant
>>here is that the Fourier transform of the autocorrelation of the white
>>noise process is flat (i.e., constant magnitude), which goes by the
name
>>"power spectral density".
>
>Nope, that isn't what I meant.  The Fourier transform (not the
>discrete fourier transform) of a power signal arising from
>stationary, random process that is white and Gaussian will be
>constant.

Steve, I don't see how this can be true.  Are you saying that a one-to-one
transformation, that is the Fourier transform (FT), of a random signal is
not random?  But this is a contradiction, since there is only one function
(scaled delta) that is the (inverse) FT of a constant function.

>It is a little confusing because not all power signals have
>Fourier transforms, but I would say this is one of them.

This is a separate issue from the one above, but it  further adds to the
confusion.

>> Otherwise, as previously stated, Fourier transform of white noise
>> is white noise.
>
>I think you're talking discrete Fourier transform here.

Right.

Emre
```
 0
Reply eguven (123) 9/23/2008 2:28:00 AM

```emre <eguven@ece.neu.edu> wrote:

>>emre <eguven@ece.neu.edu> replies to my post,

>>>>The Fourier transform of a white noise process has constant magnitude.

>>>I hate to nitpick, but the above statement is confusing.  What is meant
>>>here is that the Fourier transform of the autocorrelation of the white
>>>noise process is flat (i.e., constant magnitude), which goes by the
>name
>>>"power spectral density".

>>Nope, that isn't what I meant.  The Fourier transform (not the
>>discrete fourier transform) of a power signal arising from
>>stationary, random process that is white and Gaussian will be
>>constant.

>Steve, I don't see how this can be true.

Well firstly, my statement up at top ("constant magnitude") is
what I intended, not "constant".

> Are you saying that a one-to-one transformation, that is
> the Fourier transform (FT), of a random signal is not random?
> But this is a contradiction, since there is only one function
> (scaled delta) that is the (inverse) FT of a constant function.

If it is not constant magnitude, then I think you have a dilemma:
at what frequencies would it have above-average magnitude?
Logically there can't be any.

>>It is a little confusing because not all power signals have
>>Fourier transforms, but I would say this is one of them.

>This is a separate issue from the one above, but it  further adds to the
>confusion.

Well, one way the confusion might go away if we decide such a signal
has no Fourier transform.

Steve
```
 0
Reply spope33 (691) 9/23/2008 3:22:51 AM

```
Greg Berchin wrote:
> Michel Rouzic wrote:
> > The technique I used was to generate each
> > complex bin by having a magnitude of 1.0 and a random phase, normally
> > distributed from 0=EF=BF=BD to 360=EF=BF=BD.
>
> Try a uniform distribution of phase from 0 to 360 degrees.
>
> Greg

Wait, I thought normal meant uniform.. well I meant uniform, not
Gaussian.
```
 0
Reply Michel0528 (498) 9/23/2008 7:55:22 AM

```emre wrote:
> As others have pointed, you should not fix the magnitude.  Try generating
> real and imaginary parts separately, and summing them as follows:
> x = sigma/sqrt(2) * ( randn(n,1) + i * randn(n,1) );
> in Matlab language. You can use this to characterize white noise in the
> "frequency domain" as you wish. (The variance of each element in the
> sequence x is sigma^2, make sure you use the correct value. In
> communications sigma^2/2 is used often for noise variance, and this can be
> confusing.)
>
> Emre

Sorry but I don't use Matlab (I code all in C) and my mathematics
background is a bit weak. What do you mean by "sigma" in the context
of "sigma/sqrt(2)"? Does it have anything to do with the summation
operator?

Also, if you generate the real and imaginary parts separately,
wouldn't the distribution of the samples in the complex plane be a
square?
```
 0
Reply Michel0528 (498) 9/23/2008 8:09:08 AM

```emre wrote:

> Are you saying that a one-to-one
> transformation, that is the Fourier transform (FT), of a random signal is
> not random?  But this is a contradiction, since there is only one function
> (scaled delta) that is the (inverse) FT of a constant function.

There's a bit of apples and oranges comparison here.  The real part
and the imaginary part of the FT of a random signal may very well be
zero-mean random (but not necessarily normally distributed).  But the
mean, since it is everywhere nonnegative, and its distribution will
depend upon the distribution exhibited by the real and imaginary
parts.  The phase can be zero mean, but it is unlikely that it will
exhibit any distribution other than uniform.

Greg
```
 0
Reply gberchin6039 (152) 9/23/2008 11:34:23 AM

```On Sep 23, 7:34=A0am, Greg Berchin <gberc...@sentientscience.com> wrote:
> emre wrote:
> > Are you saying that a one-to-one
> > transformation, that is the Fourier transform (FT), of a random signal =
is
> > not random? =A0But this is a contradiction, since there is only one fun=
ction
> > (scaled delta) that is the (inverse) FT of a constant function.
>
> There's a bit of apples and oranges comparison here. =A0The real part
> and the imaginary part of the FT of a random signal may very well be
> zero-mean random (but not necessarily normally distributed). =A0But the
> OP asked about magnitude and phase. =A0The magnitude cannot be zero
> mean, since it is everywhere nonnegative, and its distribution will
> depend upon the distribution exhibited by the real and imaginary
> parts. =A0The phase can be zero mean, but it is unlikely that it will
> exhibit any distribution other than uniform.

If both the real and imaginary parts are Gaussian, the magnitude will
be Rayleigh.

Jerry
```
 0
Reply jya (12872) 9/23/2008 3:00:12 PM

```>If it is not constant magnitude, then I think you have a dilemma:
>at what frequencies would it have above-average magnitude?
>Logically there can't be any.

As Jerry just pointed, if the real and imaginary parts are independent
Gaussian (with same variance), then the magnitude is Rayleigh distributed
random.  It is not constant.  The precise statement should be that the
average (expected value) of the magnitude is constant over frequencies.
This is the characteristic of white noise.  I believe this is what you
really meant.

Emre

```
 0
Reply eguven (123) 9/23/2008 3:26:18 PM

```>Sorry but I don't use Matlab (I code all in C) and my mathematics
>background is a bit weak. What do you mean by "sigma" in the context
>of "sigma/sqrt(2)"? Does it have anything to do with the summation
>operator?

sigma (the Greek letter written in small -- not capital as in summation
operator) is usually used to denote the standard variation (the square root
of the variance) of a normal (Gaussian) random variable.

>Also, if you generate the real and imaginary parts separately,
>wouldn't the distribution of the samples in the complex plane be a
>square?

Close.  It is called "circularly symmetric". It is interesting, but it is
the case that real and imaginary parts of the noise turn out to be
independent in many cases, most prominently for thermal noise.

If you are trying to simulate thermal noise in your measurement device,
then Gaussian distribution is likely the right thing to use.  If your
original signal is real, then you have to take care about the generation
directly in the frequency domain, because the FT of a real signal has
conjugate symmetry: you should generate half of the samples (say, those
corresponding to positive frequency indices,) and set the other half to the
according the the conjugate symmetry.  You can refer to any good signal
processing book for this property.

If you would like to catch up on these things, I believe you could use
Schaum's Outlines, on Probability, Random Variables, and Random Processes,
and Digital Signal Processing. They are both affordable and easy to
follow.

Hope this helps.

Emre
```
 0
Reply eguven (123) 9/23/2008 3:38:42 PM

```>If you would like to catch up on these things, I believe you could use
>Schaum's Outlines, on Probability, Random Variables, and Random
Processes,
>and Digital Signal Processing. They are both affordable and easy to
>follow.

Actually, I haven't read the latter one above, but people seem to be happy
with Schaum's Outline of Signal Processing (not digital, there is no review
on that at Amazon.)  Depending on the time you can commit, I would also
recommend other signal processing texts, such as Rich Lyons' for starters,
and possibly Oppenheim's after that...

As far as the topic of Probability is concerned, Schaum's Outline may
indeed be a good starting point. You might later choose to read H. Stark's
"Probability, Random Processes, and Estimation Theory".

Emre

```
 0
Reply eguven (123) 9/23/2008 3:58:47 PM

```>recommend other signal processing texts, such as Rich Lyons' for
starters,

I meant Richard Lyons..  Sorry.
```
 0
Reply eguven (123) 9/23/2008 4:06:11 PM

```On Mon, 22 Sep 2008 07:31:56 -0700, Greg Berchin wrote:

>
>> This is not right. That way are generating a sum of the synchronously
>> phase manipulated signals with the breaks of phase at the same point.
>> there will be the artifacts at the edges of the subsequent FFT blocks,
>> and you will see it in the frequency domain, too. You have to make
>> random magnitude in the addition to the random phase.
>
> I think that your description of the problem is right but your solution
> is wrong.  The resulting "white" noise will be pseudorandom with period
> equal to the FFT size.  But using a random FFT magnitude won't change
> that.  The Fourier Transform of white noise has constant magnitude and
> random phase.
>
> Greg

Nuh uh.  The _expected_ value of the Fourier transform of white noise has
constant magnitude and random phase, but not the _actual_ value.

To choose a simple example, the FFT of a series of zero-mean, iid
Gaussian samples will have bins whose complex and real parts are all iid
Gaussian variables.  But they will _not_ have constant magnitude.

This concept extends to the continuous time Fourier transform, but then
if you choose to start with really white noise you have to wrestle with
all the infinities.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
```
 0
Reply tim177 (4434) 9/23/2008 4:07:27 PM

```On Mon, 22 Sep 2008 19:16:44 -0400, Greg Berchin wrote:

> On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spope33@speedymail.org (Steve
> Pope) wrote:
>
>>Whereas the values of the discrete Fourier transform of a white noise
>>signal have a normal distribution.
>
> I'm not doubting the statements from you and Vladimir, but I've never
> seen the derivation of this.  Where did you find this info?
>
> Greg

Well, each bin of the FFT is a weighted sum of the original sample --
only the weights have a special relationship to the weights of the other
bins.

So, the weighted sum of a series of iid Gaussian variables is...

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
```
 0
Reply tim177 (4434) 9/23/2008 4:08:51 PM

```On Mon, 22 Sep 2008 16:51:54 -0700, Jerry Avins wrote:

> On Sep 22, 7:25 pm, spop...@speedymail.org (Steve Pope) wrote:
>> Greg Berchin  <gberc...@comicast.net> wrote:
>>
>> >On Mon, 22 Sep 2008 20:44:46 +0000 (UTC), spop...@speedymail.org
>> >>Whereas the values of the discrete Fourier transform of a white noise
>> >>signal have a normal distribution.
>> >I'm not doubting the statements from you and Vladimir, but I've never
>> >seen the derivation of this.  Where did you find this info?
>>
>> Let's see... the DFT is a linear operation, that is to say, any given
>> output of a DFT is a linear combination of the inputs to the DFT, so if
>> the inputs are all normal, then any output is normal, since the sum of
>> normal variables is normal.
>>
>> This applies to both the real part of an output, and the imaginary part
>> of an output.  They would each be normal.
>
> Noise needn't be bormally distributed in order to be white. Why would
> its parts be Gaussian?
>
> Jerry

Good point.  But I'll bet that most samples, after "fft-izing" will look
Gaussian.  If they don't you could use a longer sample (for stationary
noise).  Only pathological cases (like most accurate models of
atmospheric noise at LF and MF) would have the requisite infinite
variance to make this expedient less than speedy.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
```
 0
Reply tim177 (4434) 9/23/2008 4:12:06 PM

28 Replies
51 Views

Similar Articles

12/10/2013 2:34:17 AM
[PageSpeed]