Table Of Contents

Tones and Noise (Frequency Domain » Evenly Spaced Tones) (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Generates a waveform that is the sum of integer cycle sine tones with evenly spaced 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 determines how many tones are generated.

    datatype_icon

    frequency specifications

    Start frequency and delta frequency of the tone.

    datatype_icon

    start frequency

    Lowest tone frequency generated.

    This value must be an integer multiple of sample rate/samples.

    Default: 10

    datatype_icon

    delta frequency

    Magnitude of the spacing between adjacent tone frequencies.

    delta frequency must be an integer multiple of sample rate/samples.

    If start frequency is 100 Hz, delta frequency is 10 Hz, and the tone amplitudes array contains three elements, the tone frequencies generated are 100 Hz, 110 Hz, and 120 Hz.

    Default: 100

    datatype_icon

    phase relationship

    Distribution of the phases of the sine tones. The phase distribution affects the Peak/RMS ratio of the overall waveform.

    Name Value Description
    random 0

    Each phase is chosen randomly between 0 and 360 degrees.

    linear difference 1

    The phase difference between adjacent frequency tones varies linearly from 0 to 360 degrees. This gives the best Peak/RMS ratio but might cause the signal to have periodic components within the period of the overall waveform.

    linear phase 2

    The phase varies linearly from 0 to 360 degrees.

    Default: random

    datatype_icon

    seed

    Causes reseeding of the noise sample generator when the value is greater than 0.

    This node ignores seed if phase relationship is Linear.

    Default: -1

    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 amplitudes. This node generates the sine tones according to the following steps:

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

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics