Third-order Spectral Representation Method

The third-order Spectral Representation Method (or Bispectral Representation Method) is a generalization of the SpectralRepresentation for processes possessing a known power spectrum and bispectrum. Implementation follows from references [50] and [51]. The multi-variate formulation from reference [52] is not currently implemented.

BispectralRepresentation Class

The BispectralRepresentation class is imported using the following command:

>>> from UQpy.stochastic_process.BispectralRepresentation import BispectralRepresentation

Methods

class BispectralRepresentation(n_samples, power_spectrum, bispectrum, time_interval, frequency_interval, n_time_intervals, n_frequency_intervals, case='uni', random_state=None)[source]

A class to simulate non-Gaussian stochastic processes from a given power spectrum and bispectrum based on the 3-rd order Spectral Representation Method. This class can simulate uni-variate, one-dimensional and multi-dimensional stochastic processes.

Parameters:
  • n_samples (int) – Number of samples of the stochastic process to be simulated. The run() method is automatically called if n_samples is provided. If n_samples is not provided, then the BispectralRepresentation object is created but samples are not generated.

  • power_spectrum (Union[list, ndarray]) –

    The discretized power spectrum. - For uni-variate, one-dimensional processes power_spectrum will be list or numpy.ndarray of length n_frequency_intervals.

    • For uni-variate, multi-dimensional processes, power_spectrum will be a list or numpy.ndarray of size (n_frequency_intervals[0], ..., n_frequency_intervals[n_dimensions-1])

  • bispectrum (Union[list, ndarray]) –

    The prescribed bispectrum. - For uni-variate, one-dimensional processes, bispectrum will be a list or numpy.ndarray of size (n_frequency_intervals, n_frequency_intervals)

    • For uni-variate, multi-dimensional processes, bispectrum will be a list or numpy.ndarray of size (n_frequency_intervals[0], ..., n_frequency_intervals[n_dimensions-1], n_frequency_intervals[0], ..., n_frequency_intervals[n_dimensions-1])

  • time_interval (Union[list, ndarray]) – Length of time discretizations (\(\Delta t\)) for each dimension of size n_dimensions.

  • frequency_interval (Union[list, ndarray]) – Length of frequency discretizations (\(\Delta \omega\)) for each dimension of size n_dimensions.

  • n_time_intervals (Union[list, ndarray]) – Number of time discretizations for each dimensions of size n_dimensions.

  • n_frequency_intervals (Union[list, ndarray]) – Number of frequency discretizations for each dimension of size n_dimensions.

  • random_state (Union[None, int, RandomState]) – Random seed used to initialize the pseudo-random number generator. Default is None. If an int is provided, this sets the seed for an object of numpy.random.RandomState. Otherwise, the object itself can be passed directly.

run(n_samples)[source]

Execute the random sampling in the BispectralRepresentation class.

The run() method is the function that performs random sampling in the BispectralRepresentation class. If n_samples is provided, the run() method is automatically called when the BispectralRepresentation object is defined. The user may also call the run() method directly to generate samples. The run() method of the BispectralRepresentation class can be invoked many times and each time the generated samples are appended to the existing samples.

Parameters:

n_samples (int) – Number of samples of the stochastic process to be simulated. If the run() method is invoked multiple times, the newly generated samples will be appended to the existing samples.

The run() method has no returns, although it creates and/or appends the samples attribute of the BispectralRepresentation class.

Attributes

BispectralRepresentation.n_dimensions: int

The dimensionality of the stochastic process.

BispectralRepresentation.bispectrum_amplitude: float

The amplitude of the bispectrum.

BispectralRepresentation.bispectrum_real: float

The real part of the bispectrum.

BispectralRepresentation.bispectrum_imaginary: float

The imaginary part of the bispectrum.

BispectralRepresentation.biphase: ndarray

The biphase values of the bispectrum.

BispectralRepresentation.phi: ndarray

The random phase angles used in the simulation of the stochastic process. The shape of the phase angles (n_samples, n_variables, n_frequency_intervals[0], ..., n_frequency_intervals[n_dimensions-1])

BispectralRepresentation.samples: ndarray

Generated samples. The shape of the samples is (n_samples, n_variables, n_time_intervals[0], ..., n_time_intervals[n_dimensions-1])

BispectralRepresentation.n_variables: int

Number of variables in the stochastic process.

Examples