Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | gaussian white noise using only integer arithmetic

There are 10 messages in this thread.

You are currently looking at messages 0 to 10.


gaussian white noise using only integer arithmetic - Dimiter - 2003-10-02 01:39:00

Hi Guys,

I need to generate gaussian white noise on an integer DSP.

I have the fast Numerical Recipes generator but it has a log, a sqrt
and divides in it.

Does anyone know where I can find one or where I can read about how to
write one?

Thanks

Dimiter
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Andor Bariska - 2003-10-02 04:52:00



Dimiter wrote:
> Hi Guys,
> 
> I need to generate gaussian white noise on an integer DSP.
> 
> I have the fast Numerical Recipes generator but it has a log, a sqrt
> and divides in it.
> 
> Does anyone know where I can find one or where I can read about how to
> write one?

This has already been discussed many times in comp.dsp. You can search 
the archives of comp.dsp with google groups (which seems to be working 
again, incidentially).

Also try
http://www.dspguru.com/howto/tech/wgn.htm

Regards,
Andor

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Stan Pawlukiewicz - 2003-10-02 09:26:00

Dimiter wrote:
> Hi Guys,
> 
> I need to generate gaussian white noise on an integer DSP.
> 
> I have the fast Numerical Recipes generator but it has a log, a sqrt
> and divides in it.
> 
> Does anyone know where I can find one or where I can read about how to
> write one?
> 
> Thanks
> 
> Dimiter

The simplest approximate method is to add 12 uniform independently 
distributed random numbers, subtract 6, and divide by 12.




______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Andor Bariska - 2003-10-02 11:21:00

Stan Pawlukiewicz wrote:
> Dimiter wrote:
> 
>> Hi Guys,
>>
>> I need to generate gaussian white noise on an integer DSP.
>>
>> I have the fast Numerical Recipes generator but it has a log, a sqrt
>> and divides in it.
>>
>> Does anyone know where I can find one or where I can read about how to
>> write one?
>>
>> Thanks
>>
>> Dimiter
> 
> 
> The simplest approximate method is to add 12 uniform independently 
> distributed random numbers

Why 12?

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Stan Pawlukiewicz - 2003-10-02 11:38:00

Andor Bariska wrote:
> Stan Pawlukiewicz wrote:
> 
>> Dimiter wrote:
>>
>>> Hi Guys,
>>>
>>> I need to generate gaussian white noise on an integer DSP.
>>>
>>> I have the fast Numerical Recipes generator but it has a log, a sqrt
>>> and divides in it.
>>>
>>> Does anyone know where I can find one or where I can read about how to
>>> write one?
>>>
>>> Thanks
>>>
>>> Dimiter
>>
>>
>>
>> The simplest approximate method is to add 12 uniform independently 
>> distributed random numbers
> 
> 
> Why 12?
> 

Empirical rule of thumb.  A professor I had suggested this as a cheap 
method sufficient to do simulations with Kalman filters.


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Stan Pawlukiewicz - 2003-10-02 11:43:00

Stan Pawlukiewicz wrote:
> Andor Bariska wrote:
> 
>> Stan Pawlukiewicz wrote:
>>
>>> Dimiter wrote:
>>>
>>>> Hi Guys,
>>>>
>>>> I need to generate gaussian white noise on an integer DSP.
>>>>
>>>> I have the fast Numerical Recipes generator but it has a log, a sqrt
>>>> and divides in it.
>>>>
>>>> Does anyone know where I can find one or where I can read about how to
>>>> write one?
>>>>
>>>> Thanks
>>>>
>>>> Dimiter
>>>
>>>
>>>
>>>
>>> The simplest approximate method is to add 12 uniform independently 
>>> distributed random numbers
>>
>>
>>
>> Why 12?
>>
> 
> Empirical rule of thumb.  A professor I had suggested this as a cheap 
> method sufficient to do simulations with Kalman filters.
> 
> 

And also since the variance of a uniform on (0,1) is 1/12, adding 12 
gives you a variance of 1.  The the divide by 12 I mentioned before 
isn't necessary.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Gordon Sande - 2003-10-02 11:49:00

In article <blhgq2$k6t$1...@newslocal.mitre.org>,
Stan Pawlukiewicz <stanp@nospam_mitre.org> wrote:

>Subject: Re: gaussian white noise using only integer arithmetic
>From: Stan Pawlukiewicz <stanp@nospam_mitre.org>
>Reply-To: <3f7c4281$1...@pfaff2.ethz.ch>
>Organization: The MITRE Organization
>Date: Thu, 02 Oct 2003 11:38:42 -0400
>Newsgroups: comp.dsp
>
>Andor Bariska wrote:
>> Stan Pawlukiewicz wrote:
>> 
>>> Dimiter wrote:
>>>
>>>> Hi Guys,
>>>>
>>>> I need to generate gaussian white noise on an integer DSP.
>>>>
>>>> I have the fast Numerical Recipes generator but it has a log, a sqrt
>>>> and divides in it.
>>>>
>>>> Does anyone know where I can find one or where I can read about how to
>>>> write one?
>>>>
>>>> Thanks
>>>>
>>>> Dimiter
>>>
>>>
>>>
>>> The simplest approximate method is to add 12 uniform independently 
>>> distributed random numbers
>> 
>> 
>> Why 12?
>> 

Add 12 uniform random numbers over (0,1) and subtract 6.
The subtract 6 makes for a zero mean.
The add 12 makes for a unit variance.
So the result is standard "reasonable if you are not very fussy" normal.

>Empirical rule of thumb.  A professor I had suggested this as a cheap 
>method sufficient to do simulations with Kalman filters.
>
>




______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Peter Kabal - 2003-10-02 12:38:00

You might want to look at a technical report on the web:

Generating Gaussian Pseudo-Random Deviates

http://www.tsp.ece.mcgill.ca/MMSP/Documents/Reports/2000/KabalR2000c.pdf

It examines the accuracy of the sum of 12 uniforms approach and suggests a
new algorithm that should be easy to implement in fixed point arithmetic.

"Dimiter" <d...@sonartech.com.au> wrote in message
news:d...@posting.google.com...
> Hi Guys,
>
> I need to generate gaussian white noise on an integer DSP.
>
> I have the fast Numerical Recipes generator but it has a log, a sqrt
> and divides in it.
>
> Does anyone know where I can find one or where I can read about how to
> write one?
>
> Thanks
>
> Dimiter


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Jerry Avins - 2003-10-04 13:59:00

Stan Pawlukiewicz wrote:

> Dimiter wrote:
>=20
>> Hi Guys,
>>
>> I need to generate gaussian white noise on an integer DSP.
>>
>> I have the fast Numerical Recipes generator but it has a log, a sqrt
>> and divides in it.
>>
>> Does anyone know where I can find one or where I can read about how to=

>> write one?
>>
>> Thanks
>>
>> Dimiter
>=20
>=20
> The simplest approximate method is to add 12 uniform independently=20
> distributed random numbers, subtract 6, and divide by 12.
>=20
>=20

12 are enough, but it might be faster (and a smidgeon better) to add 16,
subtract 8, then shift right 4 places.

Jerry
--=20
When a discovery is new, people say, "It isn't true."
When it becomes demonstrably true, they say, "It isn't useful."
Later, when its utility is evident, they say, "So what?  It's old."
                                     a paraphrase of William James
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise using only integer arithmetic - Jerry Avins - 2003-10-05 00:27:00

Jerry Avins wrote:

=2E..

> 12 are enough, but it might be faster (and a smidgeon better) to add 16=
,
> subtract 8, then shift right 4 places.

Adding half, then subtracting the other half gives zero mean directly.
It means two loops, though, so it won't be faster unless the loop is=20
unrolled.

Jerry
--=20
"I view the progress of science as ... the slow erosion of the
  tendency to dichotomize."                    Barbara Smuts, U. Mich.
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.