Table Of Contents

Unevenly Sampled Signal Spectrum (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Calculates the power spectrum of a signal that is unevenly spaced in time.

    connector_pane_image
    datatype_icon

    x

    The data material at the discrete- and unevenly-spaced times.

    datatype_icon

    x time

    The discrete- and unevenly-spaced times.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    power spectrum

    The power spectrum, in the sense of the Lomb normalized periodogram.

    datatype_icon

    power spectrum frequency

    The frequency points at which this node calculates the power spectrum.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Algorithm for Calculating the Power Spectrum Using the Lomb Normalized Periodogram

    Given the data xk at the time points tk, the following equations define the data material x and the discrete- and unevenly-spaced times x time:

    x = { x 0 , x 1 , ... , x n 1 }

    and

    x times = { t 0 , t 1 , ... , t n 1 }

    Furthermore,

    x ¯ = 1 n k = 0 n 1 x k

    and

    σ 2 = 1 n 1 k = 0 n 1 ( x k x ¯ ) 2

    Then the Lomb normalized periodogram is defined by the following equation:

    p ( ω ) = 1 2 σ 2 ( [ k = 0 n 1 ( x k x ¯ ) cos ω ( t k τ ) ] 2 k = 0 n 1 cos 2 ω ( t k τ ) + [ k = 0 n 1 ( x k x ¯ ) sin ω ( t k τ ) ] 2 k = 0 n 1 sin 2 ω ( t k τ ) )

    with

    τ = 1 2 ω arctan ( k = 0 n 1 sin 2 ω t k k = 0 n 1 cos 2 ω t k )

    The following diagram shows the spectrum of length 256 of a signal that has been sampled at unequal intervals of time. The signal is a combination of sine waves of frequencies 20, 40, 60, and 80 Hz. The duration of the signal is 1 sec. The sampling frequency was chosen as 256 Hz, giving the frequency resolution of 1 Hz.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics