DSPRelated.com
Forums

Equivalence of MSK implementations (OQPSK vs. CPFSK)

Started by Oli Filth August 20, 2006
Dear all,

I've been thinking about MSK, and come to the conclusion that I don't 
get it!  Or at least, I'm not seeing how the CPFSK and OQPSK 
implementations are equivalent, in the sense of producing identical 
output transitions for the same input sequence.

As I understand it, we can implement MSK as CPFSK using a VCO:

s[n]    +-----+      y(t)
------->| VCO |------->
         +-----+

or we can implement it as pulse-shaped OQPSK using I/Q modulation:

                            +------+     +---+
            +-------------->| g(t) |---->| X |-----+
            | I             +------+     +---+     |
            |                              ^       v
s[n]    +-----+                          cos    +---+     y(t)
------->| S-P |                                 | + |------>
         +-----+                          sin    +---+
            |                              v       ^
            | Q   +---+     +------+     +---+     |
            +---->| T |---->| g(t) |---->| X |-----+
                  +---+     +------+     +---+

where g(t) shapes each pulse as a half-sine over 2T.

However, as far as I can see, these don't produce identical phase 
transitions.  If we look at the transitions for 1's and 0's on the 
constellation diagrams (I hope ASCII is sufficient to illustrate this):

VCO implementation:
       [ 0 = clockwise
         1 = anti-clockwise ]

        0
   /---->  X  <----\
   |       |  1    |
   |       |       |
   v 1     |       v 0
  X--------+--------X
0 ^       |     1 ^
   |       |       |
   |    1  |       |
   \---->  X  <----/
             0

I/Q implementation:
       [ 0 = down from x-axis or left from y-axis
         1 = up from x-axis or right from y-axis ]

        1
   /---->  X  <----\
   |       |  1    |
   |       |       |
   v 0     |       v 1
  X--------+--------X
0 ^       |     1 ^
   |       |       |
   |    0  |       |
   \---->  X  <----/
             0

They're clearly not the same [1].

I've heard talk of using differential pre-coding on one or other of the 
schemes, for instance an old discussion here 
http://groups.google.co.uk/group/comp.dsp/browse_frm/thread/1beb4fd110428f6e 
mentions this.  But I still don't see how that would turn one state 
diagram into the other.

Can anyone provide clarity?



[1] I realise that each method could be done a couple of different ways 
depending on how we arrange polarities, but these just result in mirror 
images/rotations.


-- 
Oli
Oli Filth wrote:

> Dear all, > > I've been thinking about MSK, and come to the conclusion that I don't > get it! Or at least, I'm not seeing how the CPFSK and OQPSK > implementations are equivalent, in the sense of producing identical > output transitions for the same input sequence. > > As I understand it, we can implement MSK as CPFSK using a VCO: > > s[n] +-----+ y(t) > ------->| VCO |-------> > +-----+ > > or we can implement it as pulse-shaped OQPSK using I/Q modulation: > > +------+ +---+ > +-------------->| g(t) |---->| X |-----+ > | I +------+ +---+ | > | ^ v > s[n] +-----+ cos +---+ y(t) > ------->| S-P | | + |------> > +-----+ sin +---+ > | v ^ > | Q +---+ +------+ +---+ | > +---->| T |---->| g(t) |---->| X |-----+ > +---+ +------+ +---+ > > where g(t) shapes each pulse as a half-sine over 2T. > > However, as far as I can see, these don't produce identical phase > transitions. If we look at the transitions for 1's and 0's on the > constellation diagrams (I hope ASCII is sufficient to illustrate this): > > VCO implementation: > [ 0 = clockwise > 1 = anti-clockwise ] > > 0 > /----> X <----\ > | | 1 | > | | | > v 1 | v 0 > X--------+--------X > 0 ^ | 1 ^ > | | | > | 1 | | > \----> X <----/ > 0 > > I/Q implementation: > [ 0 = down from x-axis or left from y-axis > 1 = up from x-axis or right from y-axis ] > > 1 > /----> X <----\ > | | 1 | > | | | > v 0 | v 1 > X--------+--------X > 0 ^ | 1 ^ > | | | > | 0 | | > \----> X <----/ > 0 > > They're clearly not the same [1]. > > I've heard talk of using differential pre-coding on one or other of the > schemes, for instance an old discussion here > http://groups.google.co.uk/group/comp.dsp/browse_frm/thread/1beb4fd110428f6e > mentions this. But I still don't see how that would turn one state > diagram into the other. > > Can anyone provide clarity? > > > > [1] I realise that each method could be done a couple of different ways > depending on how we arrange polarities, but these just result in mirror > images/rotations. > >
In the I/Q implementation you do the differential pre-coding thing, i.e. 00011100110011010101 becomes X0010010101010111111 This _should_, if I haven't lost my mind, result in an identical output to the FSK case. This may even be explained in http://www.wescottdesign.com/articles/MSK/mskTop.html, but I wrote it 16 years ago and a few details have escaped me. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Hi Oli,

I had a hard time understanding your transition diagrams, so
I don't know if I can answer your question (since I don't
really understand it). 

However, I did do some analysis on this as part of one of
the homeworks for my digital comm class at NCSU. I placed
it on-line at

  http://www.digitalsignallabs.com/mskoqpsk.pdf

See especially Appendix A. It might help.
-- 
%  Randy Yates                  % "...the answer lies within your soul
%% Fuquay-Varina, NC            %       'cause no one knows which side
%%% 919-577-9882                %                   the coin will fall."
%%%% <yates@ieee.org>           %  'Big Wheels', *Out of the Blue*, ELO
http://home.earthlink.net/~yatescr
Randy Yates said the following on 21/08/2006 04:21:
> I had a hard time understanding your transition diagrams, so > I don't know if I can answer your question (since I don't > really understand it). > > However, I did do some analysis on this as part of one of > the homeworks for my digital comm class at NCSU. I placed > it on-line at > > http://www.digitalsignallabs.com/mskoqpsk.pdf > > See especially Appendix A. It might help.
Hi Randy, Thanks for the link. My diagrams are meant to represent constellations, with points (X) at 0, 90, 180 and 270 degrees. The double-ended arrows are meant to represent transitions around the unit circle (it's the best I could do with ASCII!). However, in effect, they are state diagrams; my first diagram is in fact equivalent to Figure 1 in your link. My second diagram shows the phase/state transitions (as I see them) for shaped OQPSK, where the "states" are the phase-values at the beginning of each new pulse. Consider the case when {I, Q} = {&#4294967295;1, 0}, so that a new Q pulse is about to begin: * The instantaneous phase is currently at +90 or -90. * If the next bit: * is 0: the pulse will be -ve, so Q will go -ve, towards 180. * is 1: the pulse will be +ve, so Q will go +ve, towards 0. Similar events occurs when {I, Q} = {0, &#4294967295;1}. In fact, I think this discrepancy between the two methods is illustrated by Section 2.1 in your homework! If you compare the phases listed in Table 1 against the instantaneous phases at nT in Figure 3, they don't correspond, even if you flip the I and/or Q waveforms, or reverse the mappings in the CPFSK state diagram. Tim suggests that we differentially pre-code the I/Q implementation; I'm gonna play around with it, and see if it works out. -- Oli

Oli Filth wrote:

> Dear all, > > I've been thinking about MSK, and come to the conclusion that I don't > get it! Or at least, I'm not seeing how the CPFSK and OQPSK > implementations are equivalent, in the sense of producing identical > output transitions for the same input sequence.
OQPSK is not identical to CPFSK. However, if you implement the OQPSK with the sine pulse shaping and the differential encoding, you can produce the signal identical to MSK. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Tim Wescott said the following on 21/08/2006 03:27:
> Oli Filth wrote: >> >> VCO implementation: >> [ 0 = clockwise >> 1 = anti-clockwise ] >> >> 0 >> /----> X <----\ >> | | 1 | >> | | | >> v 1 | v 0 >> X--------+--------X >> 0 ^ | 1 ^ >> | | | >> | 1 | | >> \----> X <----/ >> 0 >> >> I/Q implementation: >> [ 0 = down from x-axis or left from y-axis >> 1 = up from x-axis or right from y-axis ] >> >> 1 >> /----> X <----\ >> | | 1 | >> | | | >> v 0 | v 1 >> X--------+--------X >> 0 ^ | 1 ^ >> | | | >> | 0 | | >> \----> X <----/ >> 0 >> > In the I/Q implementation you do the differential pre-coding thing, i.e. > > 00011100110011010101 > > becomes > > X0010010101010111111 > > This _should_, if I haven't lost my mind, result in an identical output > to the FSK case.
Hi Tim, The differential pre-coding means that if the input stays the same, we get a 0, and if the input changes, we get a 1. Therefore, in the 2nd diagram above, we can replace all 0's with "constant", and all 1's with "change". However, in that diagram, in the bottom-left quadrant, both directions are 0, i.e. "constant". This means that if we start at 180 or -90, for a non-changing sequence, the phase will just alternate between 180 and -90, rather than rotate around the whole circle. There are other discrepancies too, but this was the easiest to explain.
> This may even be explained in > http://www.wescottdesign.com/articles/MSK/mskTop.html, but I wrote it 16 > years ago and a few details have escaped me.
I've had a look at this; you get the "right" result, I think, but I can't work out why yet. I will persist... -- Oli
Oli Filth said the following on 21/08/2006 14:13:
> Consider the case when {I, Q} = {&#4294967295;1, 0}, so that a > new Q pulse is about to begin:
Oops, I got the angles wrong!! The next bit should be: * The instantaneous phase is currently at *0 or 180*. * If the next bit: * is 0: the pulse will be -ve, so Q will go -ve, towards *-90*. * is 1: the pulse will be +ve, so Q will go +ve, towards *+90*. -- Oli
Oli Filth wrote:

> Tim Wescott said the following on 21/08/2006 03:27: > >> Oli Filth wrote: >> >>> >>> VCO implementation: >>> [ 0 = clockwise >>> 1 = anti-clockwise ] >>> >>> 0 >>> /----> X <----\ >>> | | 1 | >>> | | | >>> v 1 | v 0 >>> X--------+--------X >>> 0 ^ | 1 ^ >>> | | | >>> | 1 | | >>> \----> X <----/ >>> 0 >>> >>> I/Q implementation: >>> [ 0 = down from x-axis or left from y-axis >>> 1 = up from x-axis or right from y-axis ] >>> >>> 1 >>> /----> X <----\ >>> | | 1 | >>> | | | >>> v 0 | v 1 >>> X--------+--------X >>> 0 ^ | 1 ^ >>> | | | >>> | 0 | | >>> \----> X <----/ >>> 0 >>> >> In the I/Q implementation you do the differential pre-coding thing, i.e. >> >> 00011100110011010101 >> >> becomes >> >> X0010010101010111111 >> >> This _should_, if I haven't lost my mind, result in an identical >> output to the FSK case. > > > Hi Tim, > > The differential pre-coding means that if the input stays the same, we > get a 0, and if the input changes, we get a 1. Therefore, in the 2nd > diagram above, we can replace all 0's with "constant", and all 1's with > "change". > > However, in that diagram, in the bottom-left quadrant, both directions > are 0, i.e. "constant". This means that if we start at 180 or -90, for > a non-changing sequence, the phase will just alternate between 180 and > -90, rather than rotate around the whole circle. > > There are other discrepancies too, but this was the easiest to explain. > > >> This may even be explained in >> http://www.wescottdesign.com/articles/MSK/mskTop.html, but I wrote it >> 16 years ago and a few details have escaped me. > > > I've had a look at this; you get the "right" result, I think, but I > can't work out why yet. I will persist... > > >
I remember now! You must be multiplying your I and Q values by time-shifted half-cosine waves, so for an all-one input stream your I output is abs(cos(wt)). But to make it all work you want to multiply your I values by cos(wt) and your Q values by sin(wt). Then a 1 input naturally makes the phase advance, and a 0 input naturally makes it retreat. This make sense? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Oli Filth wrote:
> Dear all, > > I've been thinking about MSK, and come to the conclusion that I don't > get it! Or at least, I'm not seeing how the CPFSK and OQPSK > implementations are equivalent, in the sense of producing identical > output transitions for the same input sequence. > > As I understand it, we can implement MSK as CPFSK using a VCO: > > s[n] +-----+ y(t) > ------->| VCO |-------> > +-----+ > > or we can implement it as pulse-shaped OQPSK using I/Q modulation: > > +------+ +---+ > +-------------->| g(t) |---->| X |-----+ > | I +------+ +---+ | > | ^ v > s[n] +-----+ cos +---+ y(t) > ------->| S-P | | + |------> > +-----+ sin +---+ > | v ^ > | Q +---+ +------+ +---+ | > +---->| T |---->| g(t) |---->| X |-----+ > +---+ +------+ +---+ > > where g(t) shapes each pulse as a half-sine over 2T. > > However, as far as I can see, these don't produce identical phase > transitions. If we look at the transitions for 1's and 0's on the > constellation diagrams (I hope ASCII is sufficient to illustrate this): > > VCO implementation: > [ 0 = clockwise > 1 = anti-clockwise ] > > 0 > /----> X <----\ > | | 1 | > | | | > v 1 | v 0 > X--------+--------X > 0 ^ | 1 ^ > | | | > | 1 | | > \----> X <----/ > 0 > > I/Q implementation: > [ 0 = down from x-axis or left from y-axis > 1 = up from x-axis or right from y-axis ] > > 1 > /----> X <----\ > | | 1 | > | | | > v 0 | v 1 > X--------+--------X > 0 ^ | 1 ^ > | | | > | 0 | | > \----> X <----/ > 0 > > They're clearly not the same [1]. > > I've heard talk of using differential pre-coding on one or other of the > schemes, for instance an old discussion here > http://groups.google.co.uk/group/comp.dsp/browse_frm/thread/1beb4fd110428f6e > mentions this. But I still don't see how that would turn one state > diagram into the other. > > Can anyone provide clarity? > > > > [1] I realise that each method could be done a couple of different ways > depending on how we arrange polarities, but these just result in mirror > images/rotations. > > > -- > Oli
This might help: http://www.cadence.com/whitepapers/CMOSRFICArchforIEEE80215.pdf -Lasse
Tim Wescott said the following on 21/08/2006 16:33:
> Oli Filth wrote: > >> Tim Wescott said the following on 21/08/2006 03:27: >> >>> Oli Filth wrote: >>> >>>> I/Q implementation: >>>> [ 0 = down from x-axis or left from y-axis >>>> 1 = up from x-axis or right from y-axis ] >>>> >>>> 1 >>>> /----> X <----\ >>>> | | 1 | >>>> | | | >>>> v 0 | v 1 >>>> X--------+--------X >>>> 0 ^ | 1 ^ >>>> | | | >>>> | 0 | | >>>> \----> X <----/ >>>> 0 >>>> >>> In the I/Q implementation you do the differential pre-coding thing, i.e. >>> >>> 00011100110011010101 >>> >>> becomes >>> >>> X0010010101010111111 >>> >>> This _should_, if I haven't lost my mind, result in an identical >>> output to the FSK case. >> >> However, in that diagram, in the bottom-left quadrant, both directions >> are 0, i.e. "constant". This means that if we start at 180 or -90, >> for a non-changing sequence, the phase will just alternate between 180 >> and -90, rather than rotate around the whole circle. >> >> There are other discrepancies too, but this was the easiest to explain. >> >> > I remember now! > > You must be multiplying your I and Q values by time-shifted half-cosine > waves, so for an all-one input stream your I output is abs(cos(wt)). But > to make it all work you want to multiply your I values by cos(wt) and > your Q values by sin(wt). Then a 1 input naturally makes the phase > advance, and a 0 input naturally makes it retreat. > > This make sense?
Indeed! This works out (almost) perfectly. However, having looked at your thesis, I believe that you made one small error. On p.16, if you compare your bit-sequence (a) with the output waveform (g), you'll see that 1's don't always correspond to the same frequency (take the first and last bit period, for instance). After playing around in MATLAB for a while, it looks like one needs to use a feedback differential precoder, i.e.: s'[n] = s[n] XOR s'[n-1] rather than the feedforward precoder which you used: s'[n] = s[n] XOR s[n-1] Therefore my original block diagram should become: +---+ +---+ +---+ +---->| T |---->| X |------>| X |------+ | I +---+ +---+ +---+ | | ^ ^ v s'[n] +-----+ cos(w_m.t) cos(w_c.t) +---+ y(t) ------->| S-P | | + |------> +-----+ sin(w_m.t) sin(w_c.t) +---+ | v v ^ | Q +---+ +---+ | +-------------->| X |------>| X |------+ +---+ +---+ where w_c is the angular carrier frequency, and w_m = pi.r_b/2 (where r_b is the bit rate). The corollary of this (and I say this *extremely* tentatively!) is that Proakis is wrong! In Digital Communications (4th ed.), p.194, he gives the PSK model for MSK which is equivalent to my original block diagram, i.e. I and Q convolved by a half-sinusoid, and with no pre-coding. -- Oli