Complex Phase Difference

Output phase difference between two complex input signals

Library

Utility Blocks

Description

The Complex Phase Difference block accepts two complex input signals that have the same size and frame status. The output is the phase difference from the second to the first, measured in radians. The elements of the output are between -π and π.

The input signals can have any size or frame status. This block processes each pair of elements independently.

Examples

expand all

Open the complex phase difference model. The model generates random integers and applies QPSK modulation. The first QPSK modulator has a phase offset of 0, while the second has a pi/4 phase offset. The Complex Phase Difference block determines the phase difference. The data is passed to the workspace from the To Workspace block.

Run the model.

Display the phase difference.

phDiff =

   -0.7854

The phase difference is equal to -pi/4 as expected.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a