Extract the unwrapped phase of a complex input
DSP System Toolbox / Signal Operations
The Phase Extractor block extracts the unwrapped phase of a complex input.
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

Consider an input frame of length N:
$$\left(\begin{array}{l}{x}_{1}\\ {x}_{2}\\ \vdots \\ {x}_{N}\end{array}\right)$$
The step
method acts on this frame and produces this output:
$$\left(\begin{array}{l}{\Phi}_{1}\\ {\Phi}_{2}\\ \vdots \\ {\Phi}_{N}\end{array}\right)$$
where:
$${\Phi}_{i}={\Phi}_{i1}+\text{angle}({x}_{i1}^{*}{x}_{i})$$
Here, i runs from 1 to N. The angle
function returns the phase angle in radians.
If the input signal consists of multiple frames:
If you set TreatFramesIndependently
to
true
, the step
method treats each
frame independently. Therefore, in each frame, the step
method calculates the phase using the preceding formula where:
$${\Phi}_{0}$$ is 0.
$${x}_{0}$$ is 1.
If you set TreatFramesIndependently
to
false
, the step
method ignores
boundaries between frames. Therefore, in each frame, the
step
method calculates the phase using the preceding
formula where:
$${\Phi}_{0}$$ is the last unwrapped phase from the previous frame.
$${x}_{0}$$ is the last sample from the previous frame.