INVPSD

IThe 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. This number is supposed to be larger than 1 and less than 200.
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 rounded to the nearest whole integer using the NINT FORTRAN function. During a simulation, INVPSD can be called with up to a maximum of 20 different integer seeds.

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. Frequency in Log-Log Scale
Figure 6 Regenerated Time Signal
See other General available.