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.
Input 1— Input signal
Specify the input signal as a vector or a matrix. When the input is a matrix, the block treats each column of the signal as an independent channel. The first dimension is the length of the channel. The second dimension is the number of channels. The block treats one dimensional inputs as one channel.
Complex Number Support: Yes
Output 1— Unwrapped phase
The block returns the unwrapped phase of the signal.
The block preserves the input size and dimension, and the output port rate equals the input port rate.
Unwrap phase only within the frame— Unwrap phase only within the frame
When you clear this check box, the block ignores boundaries between the input frames. When you select this check box, the block treats each frame of input data independently, and resets the initial phase value for each new input frame.
Simulate using— Type of simulation to run
Code generation(default) |
Simulate model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time but provides faster simulation speed than
Simulate model using the MATLAB® interpreter. This option shortens startup time but has slower simulation speed than
Consider an input frame of length N:
step method acts on this frame and produces this output:
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
step method treats each
frame independently. Therefore, in each frame, the
method calculates the phase using the preceding formula where:
If you set
step method ignores
boundaries between frames. Therefore, in each frame, the
step method calculates the phase using the preceding
is the last unwrapped phase from the previous frame.
is the last sample from the previous frame.