I have a brain activity simulator that is capable of receiving various stimuli. Both generated signals and input stimulus are causal: a single sample is created every time step. I use a sinusoidal stimulus that I would like to CONVOLVE (not superpose) with Gaussian noise ~N(1,s). I tried to multiply the stimulus spectrum by white noise (disregarding the fact that white noise PSD is constant) and do IFFT, but it didn't seem to work (it didn't affect the brain activity output as expected). Any ideas on how can it be done (I'm looking for the formula if there is one)? Again, both the stimulus and the random noise are generated one sample at a time.
Samples from an AWGN time domain process also have an AWGN distribution in frequency (the PSD is constant but a histogram of the real and imaginary components of the FFT for samples of AWGN will reveal that they too are Gaussian distributed, and independent over each frequency bin, thus “AWGN”). Another way to see this is to note how each bin in the DFT would be a sum of independent and identically distributed random values and thus approaching a Gaussian given the Central Limit Theorem.
That said, an approach to convolve experimental samples of AWGN in time with a waveform would be to create samples of a complex Gaussian process as the frequency bins (as demonstrated here using 'randn' in Matlab, Octave and Python numpy.random), multiply that with the FFT of the waveform of interest, and take the IFFT of that result. The result is the circular convolution in time, if that is suitable for the intended application. If linear convolution is required, additional zero padding can be done to avoid the time domain aliasing.
This post touches on related concepts of noise in time and frequency.