Constructs a time series with a PSD that matches the PSD input.


INVPSD(psd, rpflag)


psd       -   A series. The input PSD to match.

rpflag   -   Optional. An integer. Phase construction method.

                           0: Use zero phase to construct time series.

                           1: Use random phase to construct time series (default).


A real time domain series with a PSD identical to the input.


W1: 1..4

W2: psd(W1)

W3: invpsd(W2)

W4: psd(W3)


W1 contains a 4 point linear ramp. The PSD of the series is calculated in W2. A time series with the same PSD as W1 is constructed in W3. The PSD of the constructed time series is displayed in W4. Although the values of W1 and W3 differ, the PSD's of the two series are identical.


W2 == {25, 4, 1}

W4 == {25, 4, 1}


Since random phase is used to construct W3, the values will change if the formula is re-evaluated even if the input does not change. However, W4 will remain identical to W2 for the same input.


W1: 1..4

W2: psd(W1)

W3: invpsd(W2, 0)

W4: psd(W3)


Same as above except the inverse PSD in W3 is calculated with zero phase and the time series is displayed as an autocorrelation sequence. The series in W2 and W4 are identical.


W3 == {1.5858, 2, 4.4142, 2}


Since zero phase was used, the values in W3 will remain constant upon re-evaluation for the same input series. Also notice that


sum(w1) == sum(w3)


INVPSD finds a time series for the given PSD by reconstructing the original FFT of the PSD and computing the inverse FFT. Since the PHASE information is not available with the PSD, an infinite number of time series exist with the same PSD.


If rpflag is 1 (the default), a random, odd symmetric phase is used to reconstruct the time series.


If rpflag is 0, a phase of all zeros is used to reconstruct the time series and the result is plotted as an autocorrelation series.


INVPSD always returns a real time series.

See Also: