0
$\begingroup$

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<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<t<N\}$, I'm getting $S(\omega)$ exactly. However, when I'm calculating $PSD\{S(t), 0<t<M, N<M\},$ 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$:

Example behaviour when M=5N

$\endgroup$
1
  • $\begingroup$ 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 $\endgroup$ Mar 7, 2023 at 20:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.