# Creating infinite continuous time series out of a finite discrete spectrum

I have a power spectrum $$S(\omega)$$: a $$1 \times N$$ real vector that matches frequencies from 0 to 125Hz. I would like to create a time series $$S(t)$$ $$[-\infty that matches this spectrum. I used random phase, calculated IFFT, found the Fourier series coefficients ($$a_0$$,$$A$$,$$B$$) and presented the signal as:

$$S(t) = a_0 + \sum_{k=1}^{N/2}A_k\cos(2{\pi}f_skt/N)+B_k\sin(2{\pi}f_skt/N)$$

When I'm calculating $$PSD\{S(t), 0, I'm getting $$S(\omega)$$ exactly. However, when I'm calculating $$PSD\{S(t), 0 the spectrum becomes a pulse-train, multiplied by $$M/N$$ (as expected from the theory).

Is there a way to overcome this behavior and get exactly $$S(\omega)$$ for $$N \lt M$$?

Example behavior when $$M=5N$$: • If you could include plots demonstrating what you are trying to do and why, that would help. This is somewhat similar to my own attempts to create time domain samples meeting a PSD such as phase noise where I provided a link to a Matlab script that helped me with that here at this post: dsp.stackexchange.com/a/75075/21048 Mar 7 at 20:23