Extract the unwrapped phase of a complex input
The dsp.PhaseExtractor
System object™ extracts the unwrapped phase of a real or a complex input.
To extract the unwrapped phase of a signal input:
Create the dsp.PhaseExtractor
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
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)
Consider an input frame of length N:
The object acts on this frame and produces this output:
where:
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 object treats each frame independently. Therefore, in each frame, the object
calculates the phase using the preceding formula where:
is 0.
is 1.
If you set TreatFramesIndependently
to
false
, the object ignores boundaries between frames. Therefore, in
each frame, the step
method calculates the phase using the preceding
formula where:
is the last unwrapped phase from the previous frame.
is the last sample from the previous frame.