# 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.

## Creation

### Syntax

``phUnwrap = dsp.PhaseUnwrapper``
``phUnwrap = dsp.PhaseUnwrapper(Name,Value)``

### Description

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

example

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

## 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.

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 $\pi$ (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 $\pi$.

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

## Usage

### Syntax

``output = phUnwrap(input)``

### Description

example

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

### 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

 `step` Run System object algorithm `release` Release resources and allow changes to System object property values and input characteristics `reset` Reset internal states of System object

## Examples

expand all

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent `step` syntax. For example, myObject(x) becomes step(myObject,x).

```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;```

## 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.