Table Of Contents

Tones and Noise (Frequency Domain » Arbitrary Tones) (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Generates a waveform that is the sum of integer cycle sine tones with arbitrary frequencies.

    connector_pane_image
    datatype_icon

    coerce frequencies?

    A Boolean that specifies whether to coerce the tone frequencies.

    True Coerces the specific tone frequencies to the nearest multiple of fs/n.
    False Does not coerce the specific tone frequencies to the nearest multiple of fs/n.

    Default: False

    datatype_icon

    amplitude

    Value that the sum of all the tones is scaled to and the largest absolute value that the waveform contains.

    Default: -1

    datatype_icon

    reset

    A Boolean that specifies whether to reset the phase to the initial phase value and the timestamp to 0.

    True Resets the phase to the initial phase value and the timestamp to 0.
    False Does not reset the phase to the initial phase value and the timestamp to 0.

    Default: False

    datatype_icon

    tone amplitudes

    An array in which each element is a single tone amplitude.

    The size of this array must match the size of the tone frequencies array and the size of the tone phases array.

    datatype_icon

    tone frequencies

    An array in which each element is a single tone frequency.

    The size of this array must match the size of the tone amplitudes array and the size of the tone phases array.

    datatype_icon

    tone phases

    An array in which each element is a single tone phase in degrees.

    The size of this array must match the size of the tone frequencies array and the size of the tone amplitudes array.

    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

    sample rate

    Sampling rate in samples per second.

    Default: 1000

    datatype_icon

    samples

    Number of samples in the signal.

    This input is available only if you configure this node to return a waveform or an array of double-precision, floating-point numbers.

    Default: 1000

    datatype_icon

    t0

    Timestamp of the output signal. If this input is unwired, this node uses the current time as the timestamp of the output signal.

    This input is available only if you configure this node to return a waveform.

    datatype_icon

    signal

    Generated signal.

    This output can return a waveform or an array of double-precision, floating-point numbers.

    datatype_icon

    crest factor

    Ratio of the Peak voltage to the RMS voltage of the output signal.

    datatype_icon

    actual tone frequencies

    Tone frequencies generated after accounting for coercion and the Nyquist criteria.

    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 Generating the Waveform Signal

    The frequency domain representation of this waveform is a sequence of impulses at the specified tone frequencies and zero at all other frequencies. The number of tones is determined by the size of the input tone frequencies, tone amplitudes, and tone phases. This node generates the sine tones according to the following steps:

    1. Uses the frequency, phase, amplitude, and samples information with the inverse fast Fourier transform (FFT) to create a raw array.
    2. Scales the raw array so that the largest absolute value is equal to amplitude.
    3. Bundles the waveform. The t0 element of the waveform always is set equal to 0 and the dt element is set equal to 1/sample rate.

    This node assumes tone phases to be referenced to the sine function. For example, if tone phases is n degrees, the phase of the output signal referenced to the sine function is also n degrees. To reference tone phases to the cosine function, add 90 degrees. Be aware that adjusting the reference function may change the crest factor.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics