GRC noise source seems to give same output regardless of seed

Hi Folks,

I am using two ‘Noise Source’ blocks(Noise-Type: Gaussian, Output
Type:complex)in GNU Radio Companion (GRC). I would like the two sets of
outputs to be (ideally) independent on a sample-by-sample basis, and to
that end I have set the seeds of the two blocks to different values,
namely 42 and 99. However, for some reason the outputs of the two blocks
seem to be identical. Am I doing something wrong here (most likely), or
this a bug?

I’m using GRC version ‘GNU Radio Companion 3.5.1git-24-g6333ad78’. I can
provide more version info and a copy of the .grc and .py files if
necessary (they are pretty simple).

Thanks in advance for any help or advice.

Cheers,

Damian.

On Fri, Mar 9, 2012 at 3:53 PM, Damian B. [email protected]
wrote:

provide more version info and a copy of the .grc and .py files if necessary
(they are pretty simple).

Thanks in advance for any help or advice.

Cheers,

Damian

Try using a negative seed.

I remember this being an issue before that we probably didn’t fix (it’s
a
result of the algorithm used to generate the random values, so it’s not
something to be ‘fixed’). Let me know if this works. If nothing else, it
really needs to be in the documentation.

Tom

Hi Tom,

Thanks for the prompt and helpful advice. I have now tried changing the
seeds on the two noise blocks to different negative values (-42 and
-99), and it does indeed appear to have resolved the problem. Or having
one positive (+42) and one negative (-99) also solved the problem.

I think you are right that this should be in the documentation. At the
moment the documentation is very misleading, in that a) The default seed
in the GRC block is 42, which is a great number, but unfortunately is
positive, and b) the documentation when you click on the block says
“noise_source_c(gr_noise_type_t type, float ampl, long seed = 3021) ->
gr_noise_source_c_sptr”, which again hints at a positive seed (i.e. of
+3021).

Cheers, and thanks again.

Damian.

On Tue, Mar 13, 2012 at 10:24 AM, Damian B. [email protected]
wrote:

positive, and b) the documentation when you click on the block says
“noise_source_c(gr_noise_type_t type, float ampl, long seed = 3021) ->
gr_noise_source_c_sptr”, which again hints at a positive seed (i.e. of
+3021).

Cheers, and thanks again.

Damian.

Damian,
Thanks for getting back to me on this. I’m going to change the
documentation to explain it.

And I’m going to change the default values to 0 instead of 42/3201 since
0’s as good as either of those. I don’t want to set it negative, though,
since that would change the output behavior of the block and someone
might
be relying on this for consistency in their measurements or something.

Tom

looks like channel model too (since it has a noise source)

~/src/gnuradio/grc/blocks$ grep 42 *.xml
gr_channel_model.xml: 42
gr_noise_source_x.xml: 42

-Josh

On Tue, Mar 13, 2012 at 5:22 PM, Josh B. [email protected] wrote:

looks like channel model too (since it has a noise source)

~/src/gnuradio/grc/blocks$ grep 42 *.xml
gr_channel_model.xml: 42
gr_noise_source_x.xml: 42

-Josh

Good catch. That one has been updated now, too.

Tom

Hi Tom,

Damian, Thanks for getting back to me on this. I'm going to change the documentation to explain it.

And I’m going to change the default values to 0 instead of 42/3201 since
0’s as good as either of those. I don’t want to set it negative, though,
since that would change the output behavior of the block and someone
might be relying on this for consistency in their measurements or
something.

Tom

That’s great. Thanks again.

Damian.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs