I am trying to write a Monte Carlo physics simulation which involves, given a power spectral density, sampling rate, and total number of samples, generating noise with such a power spectral density. I have some lecture notes which work all of this out in the continuum, but I am having issues translating this to the digital domain.
The continuum formulas are as follows: we have a stochastic noise signal $$A(t) = \int_{-\infty}^{\infty} f(\omega)e^{i\omega t} \frac{d\omega}{\sqrt{2\pi}},$$ where for all $\omega \in \mathbb{R}$, $f(\omega)$ is a Gaussian random variable that satisfies $\langle f(\omega)f(\omega') \rangle = 2\pi S(\omega) \delta(\omega + \omega')$. Here $S(\omega)$ is the power spectral density of the signal. My lecture notes go on to derive using stochastic calculus the average response of certain quantum systems subject to this noise.
I am trying to replicate these results via a Monte Carlo simulation. I've tried to discretize the formulas above as best as possible (with help from this paper), and seem to be getting qualitatively correct results, but am having issues with the scale of my signal. In particular, the power of my noise signal seems to depend strongly on the sampling rate and number of samples I choose, which is obviously not desirable.
So my question is basically: assuming I correctly discretized the above formulas, is there any reason I should still expect a dependence on the sampling rate and number of samples? I would expect there to be some sort of asymptotic behavior, where as the sampling rate gets large enough the signal approaches the continuum limit, but right now I'm getting a quadratic increase in the power of the signal with higher and higher sampling rates (holding number of samples constant).
More generally, I'm curious as to why there doesn't seem to be a lot of information on this problem on the internet. In my mind, sampling noise of a given power spectral density seems like a very natural problem that would be useful in a variety of settings, and yet I have been able to find almost no information on how to do it (and very little code as well). Why is this not a problem that gets much attention?
