INVPSD

The INVPSD (Inverse Power Spectral Density) function regenerates a time signal from a power spectral density description.

Format

INVPSD (x, id, fo, fi, nf, linlog, seed)

Arguments

 
x
The independent variable.
id
The id number of the spline containing the PSD versus frequency data.
f0
A real variable that specifies the lowest frequency to be regenerated.
f1
A real variable that specifies the highest frequency to be regenerated.
nf
An integer that specifies the number of frequencies. The number of frequencies is unlimited.
linlog
An integer variable that acts as a flag indicating whether the PSD data points are interpolated in the linear or logarithmic domain.
The legal values are:
yes (0) - linear domain
no (1) - logarithmic domain
seed
A real variable that specifies a seed for a random number generator, used to calculate the phase shifts. The seed is a real number that will be cast to an integer using the int() C++ operator. Adams Solver C++ has no limits on the number of different integer seeds that can be used.

Extended Definition

Mathematically, INVPSD is calculated as follows:
The regenerated signal consists of a series of sinusoidal functions where the amplitudes, Ai, are determined in such a way that the effective value for the PSD and the time signal are the same. The phase angle, , is calculated by a pseudo-random number generator.
Using the same seed value will always result in the same set of phase angles.

Examples

For the power spectral density data shown in Figure 5, INVPSD(TIME, spline_1, 1, 10, 20, 0, 0) regenerates the time signal shown in Figure 6.
Figure 5 PSD vs. Frequencey in Log-Log Scale
Figure 6 Regenerated Time Signal