Main Content

dsp.PhaseUnwrapper

Unwrap signal phase

Description

The dsp.PhaseUnwrapper System object™ unwraps the phase of the input signal specified in radians.

To unwrap the signal phase input:

  1. Create the dsp.PhaseUnwrapper object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

phUnwrap = dsp.PhaseUnwrapper returns a phase unwrapper System object that adds or subtracts appropriate multiples of 2π to each input element to remove phase discontinuities (unwrap).

phUnwrap = dsp.PhaseUnwrapper(Name,Value) returns a phase unwrapper System object with each specified property set to the specified value.

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Set this property to false to unwrap phase discontinuities only within the frame. Set this property to true to also unwrap phase discontinuities between successive frames.

Specify the jump size that the phase unwrapper recognizes as a true phase discontinuity. The default is set to π (rather than a smaller value) to avoid altering legitimate signal features. To increase the phase wrapper sensitivity, set the Tolerance property to a value slightly less than π.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Usage

Description

output = phUnwrap(input) unwraps the phase of the input signal. This is done by adding or subtracting appropriate multiples of 2π to each input element to remove phase discontinuities (unwrap). Each column of the input signal is treated as a separate channel.

example

Input Arguments

expand all

Data input, specified as a vector or a matrix. The phase of the input signal should be in radians.

Data Types: single | double

Output Arguments

expand all

Unwrapped phase of the input, returned as a vector or a matrix. The size and data type of the unwrapped phase output match the size and data type of the input signal.

Data Types: single | double

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

phUnwrap = dsp.PhaseUnwrapper;
p = [0 2/5 4/5 -4/5 -2/5 0 2/5 4/5 -4/5 -2/5 0 2/5 ...
    4/5 -4/5, -2/5]*pi;
y = phUnwrap(p');
figure,stem(p); hold
Current plot held
stem(y, 'r');
legend('Input (blue)','Unwrapped data (red)');
hold off;

Figure contains an axes object. The axes object contains 2 objects of type stem. These objects represent Input (blue), Unwrapped data (red).

Algorithms

This object implements the algorithm, inputs, and outputs described on the Unwrap block reference page. The object properties correspond to the Simulink® block parameters.

Extended Capabilities

Version History

Introduced in R2012a

See Also