Reply by Andreas Huennebeck July 13, 20062006-07-13
bademiya wrote:

> Just another query. When i generate white noise, how do i know or check at > what sampling rate am i sampling the white noise? As of now, i'm just > generating the noise as explained in my earlier posts. I just want to > estimate the bandwidth of my white noise generated.
If you clock out the generated data with fs, then in theory the bandwidth is fs/2 (as defined by the Shannon theorem). In practice the bandwidth will be lower due to the reconstruction filter behind the DAC. Check the manual for these limits. bye Andreas -- Andreas H�nnebeck | email: acmh@gmx.de ----- privat ---- | www : http://www.huennebeck-online.de Fax/Anrufbeantworter: 0721/151-284301 GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
Reply by bademiya July 13, 20062006-07-13
Thank you all for your help. It has been very useful to me so far. 

Just another query. When i generate white noise, how do i know or check at
what sampling rate am i sampling the white noise? As of now, i'm just
generating the noise as explained in my earlier posts. I just want to
estimate the bandwidth of my white noise generated. 

Amit.
Reply by Andreas Huennebeck July 12, 20062006-07-12
bademiya wrote:

>>Calculate the amplitude so that the output of the soundcard is at maximum >>level. See my other posting. > > Thanks for your help. However, i am not using a soundcard to generate the > noise. I'm using the Analog Devices BF561 board to generate the white > noise.
Then check the documentaion of this board for the maximum integer value the DAC at the output can handle. Set the amplitude to this value. bye Andreas -- Andreas H�nnebeck | email: acmh@gmx.de ----- privat ---- | www : http://www.huennebeck-online.de Fax/Anrufbeantworter: 0721/151-284301 GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
Reply by Jerry Avins July 12, 20062006-07-12
bademiya wrote:
> Hi. > > Once again, i have another query. I have written a program using Steve > Park's rngs file. By reading the rngs file, i understand that the output, > which is Random(), is any number between 0 and 1 in a double data type. > However, the one given Andreas has a possible range between -1 and 1 if i > set the amplitude as 1.
... Surely, you want zero mean. Why double? How many bits do you need? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Jerry Avins July 12, 20062006-07-12
bademiya wrote:
>> Calculate the amplitude so that the output of the soundcard is at maximum >> level. See my other posting. >> >> Tschau >> Andreas >> -- >> Andreas H�nnebeck | email: acmh@gmx.de >> ----- privat ---- | www : http://www.huennebeck-online.de >> Fax/Anrufbeantworter: 0721/151-284301 >> GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc >> PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc >> >> > > Thanks for your help. However, i am not using a soundcard to generate the > noise. I'm using the Analog Devices BF561 board to generate the white > noise.
It doesn't matter where the DAC is. When it gets smaller numbers, it makes less sound. What is the maximum value with each method? What must you do to make them the same? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Randy Yates July 12, 20062006-07-12
Randy Yates wrote:
> Hi Amit, > > As Andreas stated in another post, you really should be > using Maximal-Length Sequences (MLS) for this type of > application.
Correction: "Maximum" Length Sequences. --RY
Reply by Randy Yates July 12, 20062006-07-12
Hi Amit,

As Andreas stated in another post, you really should be
using Maximal-Length Sequences (MLS) for this type of
application. Their autocorrelation properties are better-suited.

So this will "leap-frog" your question and make the whole
Park "rng" question moot. The MLS will also be easier
to generate using fixed-point arithmetic.

I won't even try to go into MLS - it's better if you
pick it up from a Google or, better, reading some
papers. I think the landmark paper on the subject
is "Transfer-Function Measurement with Maximum-Length
Sequences" by Rife and Vanderkooy, Journal of
the Audio Engineering Society.

--Randy


bademiya wrote:
> Hi. > > Once again, i have another query. I have written a program using Steve > Park's rngs file. By reading the rngs file, i understand that the output, > which is Random(), is any number between 0 and 1 in a double data type. > However, the one given Andreas has a possible range between -1 and 1 if i > set the amplitude as 1. > > The question is here is that what should be the output range of the white > noise? I understand that the BF561 is a fixed-point processor and the > format by default is normally the Q0.15 format which gives a very high > precision but has only a range between -1 and +1. Moreover, the ways to > generate white noise involves the use of the double data type in both the > ways that have been explained to me so far. My supervisor here has advised > me against using the double data type as it will involve a lot of computing > and may limit the scope of my programming. Therefore, i have changed > everything to float data type instead. > > Using Steve Park's rngs, i have just written these lines to output the > white noise to the speakers: > > for(i = 0; i < 20000; i++){ > iChannel0LeftOut = 2 * (Random() - 0.5); > iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; > } > > Is this the appropriate way to generate white noise or am i making some > error here? As you can see, i have limited the output to be between -1 and > +1. > > Amit.
Reply by bademiya July 12, 20062006-07-12
>Calculate the amplitude so that the output of the soundcard is at maximum >level. See my other posting. > >Tschau >Andreas >-- >Andreas H&#4294967295;nnebeck | email: acmh@gmx.de >----- privat ---- | www : http://www.huennebeck-online.de >Fax/Anrufbeantworter: 0721/151-284301 >GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc >PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc > >
Thanks for your help. However, i am not using a soundcard to generate the noise. I'm using the Analog Devices BF561 board to generate the white noise.
Reply by bademiya July 12, 20062006-07-12
Hi.

Once again, i have another query. I have written a program using Steve
Park's rngs file. By reading the rngs file, i understand that the output,
which is Random(), is any number between 0 and 1 in a double data type.
However, the one given Andreas has a possible range between -1 and 1 if i
set the amplitude as 1. 

The question is here is that what should be the output range of the white
noise? I understand that the BF561 is a fixed-point processor and the
format by default is normally the Q0.15 format which gives a very high
precision but has only a range between -1 and +1. Moreover, the ways to
generate white noise involves the use of the double data type in both the
ways that have been explained to me so far. My supervisor here has advised
me against using the double data type as it will involve a lot of computing
and may limit the scope of my programming. Therefore, i have changed
everything to float data type instead.

Using Steve Park's rngs, i have just written these lines to output the
white noise to the speakers:

               for(i = 0; i < 20000; i++){
                  iChannel0LeftOut = 2 * (Random() - 0.5);
  		  iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;
               }

Is this the appropriate way to generate white noise or am i making some
error here? As you can see, i have limited the output to be between -1 and
+1.

Amit.
Reply by Andreas Huennebeck July 12, 20062006-07-12
bademiya wrote:

> Ok. I have generated 2 different programs using the 2 algorithms provided > by Andreas and the other by Randy. I have noticed some differences between > the two and i'm not too sure which is better. The one by Andreas is much > louder and i have used an amplitude of 10. The one by Randy's whereby i > used Steve Park's rngs file has a much softer volume but eitherwise they > both sound the same. Which one in your opinion should i be using?
Calculate the amplitude so that the output of the soundcard is at maximum level. See my other posting. Tschau Andreas -- Andreas H&#4294967295;nnebeck | email: acmh@gmx.de ----- privat ---- | www : http://www.huennebeck-online.de Fax/Anrufbeantworter: 0721/151-284301 GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc