Forums

Implementation of OQPSK-demodulator in matlab

Started by bamse May 9, 2004
Hello

I have made a program in matlab that can demodulate an OQPSK-modulated
signal with noise (additive white gaussian noise). The carrier is
phase-shifted with an arbitrary constant between 0 and 2*pi.

Here is what I do to demodulate the signal:

When the signal is received at time t=0 I know the following will happen for
the first T seconds:

1) If there is no or little noise and the carrier has not been phase-shifted
the I-phase should go from 0 to 1 while the Q-phase remains 0.
2) According to IEEE 802.15.4 (zigbee standard) the first symbol must be the
symbol (I,Q)=(-1,-1).

If s(t) is the signal received I lowpassfilter s(t)*cos(2*pi*f*t+p(t)) and
s(t)*sin(2*pi*f*t+p(t)) where p(t)=0 to begin with and f is the carrier
frequency. By doing this I now have the (possibly rotated) coordinates
(I,Q).

I trace the received (I,Q) from time t=0 to time t=T and calculate a
trend-line of where (I,Q) is going from t=0 to t=T. This trend-line is
actually a vector and the vector is one of the basis-vectors in the
signal-space. So I calculate the angle between this basisvector and the
vector (1,0). As I expect a symbol (-1,-1) I know that the angle has to be
180 degrees. So if it is not the calculated angle directly tells me how much
the signal has been phase-shifted (rotated). So I just derotate the signal
by adjusting p(t) such that the first symbol received will be (-1,-1). After
that I just compare the received (I,Q) with the expected (I,Q) and any
difference results in an adjustment of p(t).

Is this right?

Thanks.

Jakob


> > 1) If there is no or little noise and the carrier has not been
phase-shifted
> the I-phase should go from 0 to 1 while the Q-phase remains 0.
Correction: The I-phase should go from 0 to -1 during the first T seconds...