Table Of Contents

Unwrap Phase (G Dataflow)

Version:
    Last Modified: March 31, 2017

    Unwraps an array of phases by eliminating discontinuities whose absolute values exceed either pi or 180.

    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 input phase.

    Default: False

    datatype_icon

    input phase

    Input array of phases to unwrap.

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

    datatype_icon

    phase unit

    Units for the input phases and unwrapped phases.

    Name Value Description
    radian in, radian out 0 Radian in, radian out
    radian in, degree out 1 Radian in, degree out
    degree in, degree out 2 Degree in, degree out
    degree in, radian out 3 Degree in, radian out

    Default: radian in, radian out

    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

    unwrapped phase

    Unwrapped phases.

    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 Unwrapping Phases

    When the difference between two adjacent values in input phase exceeds π , and phase unit is Radian in, radian out, this node uses the following equation to calculate unwrapped phase:

    P _ O u t [ i ] = { P [ i ] P [ i ] P [ i 1 ] 2 π + 0.5 * 2 π i = 1 , , N 1 P [ i ] i = 0

    where

    • P_out is unwrapped phase
    • P is input phase
    • N is the length of input phase
    • is the floor operation

    This node uses similar equations to calculate unwrapped phase for the other units you specify in phase unit.

    Effects of Unwrapping Phases

    The following two graphs show the effects of unwrapping the phase. The first graph shows the original phase before unwrapping, and the second graph shows the phase after unwrapping.

    Unwrapping Phase Response of a Linear Time-Invariant System

    You can apply this node to the computed phase response of a linear time-invariant system. The phase response is defined as the complex angle of the frequency response of a system. You compute the phase response as angles within [- π , π ], or, in other words, as angles within one circle of 2* π radians. Because multiples of 2* π wrap when you compute the phase response, often there are discontinuities in the phase response from one frequency bin to the next.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics