Table Of Contents

Derivative x(t) (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Performs the discrete differentiation of the sampled signal.

    connector_pane_image
    datatype_icon

    reset

    A Boolean that specifies whether to reset the internal state of the node.

    True Resets the internal state of the node.
    False Does not reset the internal state of the node.

    This input is available only if you wire a double-precision, floating-point number to x(t) or initial condition.

    Default: False

    datatype_icon

    x(t)

    Sampled signal from time 0 to n-1, where n is the number of elements in the sampled signal.

    This input accepts a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers.

    datatype_icon

    derivative method

    Differentiation method.

    This input is available only if you wire a 1D array of double-precision, floating-point number to x(t) or initial condition.

    Name Description
    2nd Order Central The derivative of the sampled signal is defined by the following equation:
    y i = 1 2 d t ( x i + 1 x i 1 )
    for i =0, 1, 2, ..., n-1

    where

    • n is the number of samples
    • x-1 is the first element in the initial condition
    • xn is the first element in the final condition
    4th Order Central The derivative of the sampled signal is defined by the following equation:
    y i = 1 12 d t ( x i + 2 + 8 x i + 1 8 x i 1 + x i 2 )
    for i =0, 1, 2, ..., n-1

    where

    • n is the number of samples
    • x-2 and x-1 are the first and second elements in the initial condition
    • xn and xn+1 are the first and second elements in the final condition
    Forward The derivative of the sampled signal is defined by the following equation:
    y i = 1 d t ( x i + 1 x i )
    for i =0, 1, 2, ..., n-1

    where

    • n is the number of samples
    • xn is the first element in the final condition
    Backward The derivative of the sampled signal is defined by the following equation:
    y i = 1 d t ( x i x i 1 )
    for i =0, 1, 2, ..., n-1

    where

    • n is the number of samples
    • x-1 is the first element in the initial condition

    Default: 2nd Order Central

    datatype_icon

    initial condition

    Initial condition of the sampled signal in the differentiation calculation.

    This input accepts a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers.

    This node uses the first element of the initial condition if the differentiation method is 2nd Order Central or Forward. This node uses the first two elements in the initial condition if the differentiation method is 4th Order Central.

    datatype_icon

    final condition

    Final condition of the sampled signal in the differentiation calculation.

    This input is available only if you wire a 1D array of double-precision, floating-point number to x(t) or initial condition.

    This node uses the first element in the final condition if the differentiation method is 2nd Order Central or Forward. This node uses the first two elements if the differentiation method is 4th Order Central.

    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

    dt

    Sampling interval.

    Default: 1

    datatype_icon

    dx(t)/dt

    Derivative of the sampled signal.

    This output can return a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers.

    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 Derivative

    The differentiation f(t) of a function F(t) is defined by the following equation.

    f ( t ) = d d t F ( t )

    Let Y represent the sampled output sequence dx(t)/dt.

    If derivative method is 2nd Order Central, Y is given by the following equation:

    y i = 1 2 dt ( x i + 1 x i 1 )

    for i = 0, 1, 2, ..., n - 1

    where

    • n is the number of samples in x(t)
    • x-1 is the first element in initial condition
    • xn is the first element in final condition

    If derivative method is 4th Order Central, Y is given by the following equation:

    y i = 1 12 dt ( x i + 2 + 8 x i + 1 8 x i 1 + x i 2 )

    for i = 0, 1, 2, ..., n - 1,

    where

    • n is the number of samples in x(t)
    • x-2 and x-1 are the first and second elements in initial condition
    • xn and xn + 1 are the first and second elements in final condition

    If derivative method is Forward, Y is given by the following equation:

    y i = 1 dt ( x i + 1 x i )

    for i = 0, 1, 2, ..., n - 1

    where n is the number of samples in x(t) and xn is the first element in final condition.

    If derivative method is Backward, Y is given by the following equation:

    y i = 1 dt ( x i x i 1 )

    for i = 0, 1, 2, ..., n - 1

    where n is the number of samples in x(t) and x-1 is the first element in initial condition.

    spd-note-note
    Note  

    If x(t) is a double-precision, floating-point number, Y is given by the above equation and x-1 is the initial condition.

    The initial condition and final condition minimize the error at the boundaries.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics