Phase ambiguity in PSK carrier recovery

The 'squarer'-based form of carrier recovery looks ideal, but unfortunately it suffers from one significant drawback – the process of halving the frequency of the twice carrier term introduces a 180o phase ambiguity into the carrier reference.
Consider the case of a 1, 0, 1, 0, 1, 0, ... filtered data stream entering the squaring circuit. The output will be a twice carrier term, with zero-crossings at twice the rate of the input. Feeding this signal to a 'divide by two' circuit, it is clear that the divider logic can be triggered by either of the zero-crossings in the twice carrier waveform, and can have no knowledge of which one relates to the correct zero crossing (and hence phase) of the input. The result is that the recovered carrier may be coherent with 0o phase error, or it may be inverted with 180o phase error. Feeding the inverted reference to the coherent detector will result in all of the detected data being inverted!

This problem can be resolved by sending a training sequence known to the receiver from which it can deduce that data inversion has occurred and correct accordingly. The training sequence approach does not work well, however, if the channel is frequently interrupted (for example, in a fading mobile environment), resulting in periodic loss of carrier reference. Each time the carrier reference is re-established, an unknown phase ambiguity will again be present, requiring a repeated retransmission of the training sequence. This phase ambiguity problem is also present within the Costas loop even though it does not have an implicit divider circuit.