# mpsk demodulation using digital sample

I am trying to receive and demodulate a 8PSK modulated sinusoidal waveform (real not complex) which is constant envelop and changing only in phase of the continuous sinusoid carrier every Symbol Period. Here symbol 0(000) to 7(111) are mapped to sinusoidal phase of 0:45:360 degree respectively

For further explanation let me set some parameters

Ts = 1 Hz //8PSK Symbol rate
Fc = 8 Hz //center frequency


Now at the receiver I am multiplying with the same carrier and sampling the resultant at lets say Fs = 64 Hz.

I want to find out the transmitted symbol which is actually phase of the received signal from these discrete samples in two cases:

1st assuming receiver carrier phase is in sync with transmitter carrier phase

2nd assuming receiver carrier phase has some fix delta phase difference.

I tried low pass filtering the samples and plotting which does give different levels as per the actual phase modulated but difference between two consecutive phase (45 degree apart) is not linear hence direct thresholding based on average level in symbol period is not working correctly.

Any pointers are welcome.

• how are you 8PSK-modulating directly in passband exactly (code or formulas)? What is your pulse shape? – Marcus Müller Dec 15 '17 at 16:58
• No pulse shaping. Changing the phase of the carrier using DDS at every symbol start time with 8 different phase words for 8psk symbol. – Mukul Dec 16 '17 at 5:03

Not mentioned but from what description you gave it sounds like you have no concern about the Transmitter and Receiver clocks being asynchronous (meaning drifting in phase relative to each other); I assume then that you have confidence in the phase lock of your recovered carrier.

This would not be my preferred approach to do 8-PSK demodulation, but since you are on that path and had specific questions how you could pursue that route, let me offer the following suggestions. First, when you multiply the two signals (your carrier and the received signal) the result is the sum and difference of the frequencies (and phase) of the two signals. The sum is a 16 Hz signal that you would filter out, and the difference is the cosine of the phase since:

$$cos(\alpha)cos(\beta) = \frac{1}{2}cos(\alpha+\beta)+\frac{1}{2}cos(\alpha-\beta)$$

so $cos(2\pi f_c t)cos(2\pi f_c t + \phi) = \frac{1}{2}cos(\phi)$ after low pass filtering.

Most significantly this alone has phase ambiguity since it only resolves 0° to 180° uniquely (for instance the output of 0 corresponds to both 90° and 270°). This can be resolved by using two multipliers; one where you multiply by sine and the other by cosine to get full non-ambiguous 0° to 360° phase demodulation (One output is I and the other is Q and the result is mapping out a circle given by I + jQ.

If you were only interested in phase resolution from 0° to 180°, then I would recommend a saturated multiplication (or specifically and equivalently an X-OR gate) as this would have a linear response of output voltage versus phase after low pass filtering. However in the proper IQ approach above, this would have the deleterious effect of turning the preferred circular response (with all phases then equidistant) into a square.

Probably already obvious but mentioning just in case that it is important to hard limit your signal prior to phase demodulation as the result is also directly sensitive to amplitude (a change in amplitude of the input will lead to a change in amplitude of the output). When you have sufficiently positive SNR, the hard limit operation on the phase modulated signal will actually give you further noise suppression as well (as it eliminates the AM components of the noise).

For other approaches in an all digital receiver, consider using a complex baseband signal and some of the phase detector approaches described in this link High modulation index PSK - carrier recovery. You are already there with the approach of using two multipliers with a sine and cosine carrier with the addition of a Hilbert Transform to the input signal that is on the 8 Hz carrier.

You are taking 64 samples per second, consisting of 8 samples per period of a sinusoid of frequency 8 Hz. The information that you need to determine is which of the 8 possible phases of the sinusoid you are observing. In the absence of noise (which you have not mentioned at all), just look at the first sample. It will have value in the set $\left\{0, \pm 1, \pm \frac{1}{\sqrt 2}\right\}$. If the value is either $+1$ or $-1$, you know for sure which phase you are looking at. So, if the value is one of the other three possibilities, look at the second sample. The only possibilities for the pair of samples are $$\left(0,\frac{1}{\sqrt 2}\right), \left(0,-\frac{1}{\sqrt 2}\right), \left(\frac{1}{\sqrt 2},1\right),\left(\frac{1}{\sqrt 2},0\right), \left(-\frac{1}{\sqrt 2},-1\right),\left(-\frac{1}{\sqrt 2},0\right)$$ which identifies the phase in the remaining six cases. No muss, no fuss, no low-pass filtering etc.

An even simpler version leading to a single-step process is to always look at the pair of the first and second samples and just add $\left(1,\frac{1}{\sqrt 2}\right)$ and $\left(-1,-\frac{1}{\sqrt 2}\right)$ to the list displayed above.

Oh, you meant to say in the presence of noise but just plain forgot? Well, given the paucity of information in your original question, just adding this statement will not help in the least, cf. Marcus Müller's comment on your question.

• Yes I need to decode finally in presence of noise and channel. As mentioned correctly by you the level difference between 0 and 45 degree is 0.707 but between 45 and 90 degree phase is 0.707 and 1 which is not linear. Once noise and channel comes into picture decision for different phases may not be in same proportion and may lead to error. – Mukul Dec 16 '17 at 4:08