Phase error is the difference between the phase of the vector representing the demodulated symbol and the ideal vector.

where

In + jQn is the vector representing the symbol being measured at index n

is the ideal vector close to the actual symbol being measured

 N is the number of symbols to be measured.