Re: Gaussian Noise Generation
- From: dbd <dbd@xxxxxxxx>
- Date: Wed, 01 Aug 2007 10:49:13 -0700
On Aug 1, 7:56 am, cincy...@xxxxxxxxx wrote:
On Aug 1, 10:39 am, Chris Barrett
<"chrisbarret"@0123456789abcdefghijk113322.none> wrote:
cincy...@xxxxxxxxx wrote:
On Aug 1, 9:09 am, Chris Barrett
<"chrisbarret"@0123456789abcdefghijk113322.none> wrote:
So for a Gaussian noise sequence y[i], would I write that as
x[i] - M
y[i] = ----------- ,
sigma
where x[i] are the identically distributed samples, M is the mean of
x[i], and sigma is the standard deviation of x[i]?
You need to sum up some (finite variance) IID samples before
subtracting the mean and dividing by the standard deviation. So, x[i]
is your collection of random samples and each sample has mean M and
variance sigma^2, your Gaussian sample would be:
[ sum_(i=0)^(N-1) x[i] ] - NM
y[i] = -------------------------------------------
sigma * sqrt(N)
where N is the number of samples in your sum. As others have
recommended, 8-12 is a decent number.
Jason
But this only gives one sample. Do I do this for sets of 8-12 samples?
In other words, should I use this equation:
[ sum_(i=0)^(N-1) x[i+Nj] ] - NM
y[j] = -------------------------------------------
sigma * sqrt(N)
where x[i] has been replaced by x[i+Nj] ?
Like others have suggested, you can use a linear filter (i.e. a boxcar
filter) to generate the running sum of the last N samples from your
random generator, then apply the mean/variance correction once for
each sample. You can implement this more efficiently so you don't have
to compute the full sum for every output sample.
Jason
Using separate sums of uniform deviates generates samples of an iid
gaussian approximation. The filter process applied next colors the
samples.
Performing the first summation as part of a running filter strongly
colors the samples in a strongly low pass manner. You can always fix
this by desampling by N as that would take you back to the first case
and the same efficiency. If you want the coloration from the boxcar
filter for your samples there is a savings.
Dale B. Dalrymple
http://dbdimages.com
.
- References:
- Re: Gaussian Noise Generation
- From: Chris Barrett
- Re: Gaussian Noise Generation
- From: cincydsp
- Re: Gaussian Noise Generation
- From: Chris Barrett
- Re: Gaussian Noise Generation
- From: cincydsp
- Re: Gaussian Noise Generation
- Prev by Date: CW detection on DSP
- Next by Date: Help With Interpretation of Pole Locations in Z-Plane
- Previous by thread: Re: Gaussian Noise Generation
- Next by thread: Re: Gaussian Noise Generation
- Index(es):
Relevant Pages
|