# A [Very] Rough Approximation to “White Noise” with Sine Waves

This might be a silly question, but I'm pretty rusty on my signals. The problem is the following: I'm using a program which does not have a random signal generator, but I can sum up sines; and I need to have a "white noise" signal.

What would be a good way to "approximate" a white noise signal with sines?

I know that I'll need an infinite amount of sines... but understand that I can't do that, I'm limited to the program limitations. So my specific questions are the following:

1) Should the frequencies of the sine waves be below or(and?) above the Nyquist frequency?

2) Say I've chosen I want "white noise" in frequencies 10Hz-100Hz, and I can only use 10 sines. Should I equally space the frequencies inside this range? Or choose them at random?

3) Now that I have my frequencies, what magnitudes should I assign these sines if I want to have a specific "Gaussian" distribution of my "white noise" signal values?

Hope this question doesn't cringe upon anybody that likes "pure" white noise!

Phase and amplitude of this sinusoids should be random, so you need Gaussian random number generator. If you don't have the random number generator then might want to think about implementing one, here is, I believe, the most popular algorithm: Box-Muller transform.

Depending on your application and device, you might also want to use other noise source (i.e. Online generators, highly amplified signal from a probe).

• While it's not wrong to use a gaussian distribution for cosine and sine amplitudes, it's not strictly necessary either. If the frequencies of the sinusoids are placed at random frequencies, then their time domain contributions add up like independent random variables and the central limit theorem gives a gaussian amplitude distribution no matter which magnitude distribution you use for the sinusoids. That is as long as the amplitudes are distributed isotropically in the complex plane. – Jazzmaniac Jun 14 '15 at 9:23

1) Below. Anything above will be aliased below anyway.

2) Equally spaced. White noise has constant power spectral density and I imagine this would be a better approximation than random.

3) From Wikipedia:

under most types of discrete Fourier transform, such as FFT and Hartley, the transform W of w will be a Gaussian white noise vector, too; that is, its n Fourier coefficients will be independent Gaussian variables with zero mean and the same variance $\sigma^2$.

Based on that I'd recommend random distribution of magnitudes. I'd use a complex number with real and imaginary parts as separate random variables, then use absolute value of the complex number as the magnitude of the sinusoid and the argument as the phase.

• Disclaimer: not really my area of expertise, so a better answer may be out there.
• Equal spacing is not really recommended, because that will introduce a rather short period for the repetition of the noise signal. Instead, adding sinusoids with very small greatest common divisor will produce very long non repeating sequences. – Jazzmaniac Jun 14 '15 at 9:20