Communications Blockset | ![]() ![]() |
Phase Detector
The Logical Operator block, from the Simulink Math library, functions as a phase detector. It applies the XOR operation to the frequencies of the reference signal and the frequency of the output from the Divide Frequency subsystem. The block's output, labeled "Phase difference," is 0 where the two input signals are equal, and 1 where they are not equal.
At steady state, the block's output is a pulse train with frequency of 20
MHz. The reason for this is that both inputs to the block have an average frequency of 10
MHz, but they are out of phase by 1/4 of their period. As a result, the XOR'ed signal is a periodic pulse train with an average frequency of 20
MHz.
You can view the signals these blocks generate by double-clicking on the block labeled "Scope" at the top of the model window.
![]() | Blocks and Subsystems in the Model | Running a Simulation | ![]() |