Minimum Shift Keying (MSK) is one of the most spectrally efficient modulation schemes available. Due to its constant envelope, it is resilient to non-linear distortion and was therefore chosen as the modulation technique for the GSM cell phone standard.
MSK is a special case of Continuous-Phase Frequency Shift Keying (CPFSK) which is a special case of a general class of modulation schemes known as Continuous-Phase Modulation (CPM). It is worth noting that CPM (and hence CPFSK) is a non-linear modulation and hence by extension MSK is a non-linear modulation as well. Nevertheless, it can also be cast as a linear modulation scheme, namely Offset Quadrature Phase Shift Keying (OQPSK), which is a special case of Phase Shift Keying (PSK). As a borderline case, these relationships are illustrated in the figure below.
Figure 1: MSK as a special case of both non-linear and linear modulation schemes
At this point, you would be thinking about the following question: How can a modulation be both non-linear and linear? As we see later in this tutorial, originally MSK is a non-linear modulation but a certain depiction of its actual digital symbols known as pseudo-symbols turns it into an OQPSK representation.
Modulation is a simple topic to understand but owing to the above description, MSK can sometimes be an intimidating concept. Here, our purpose is to present it in an uncomplicated manner by building it through the fundamentals.
The starting point is one of the simplest digital modulations possible: FSK.
Binary Frequency Shift Keying (BFSK)
In Frequency Shift Keying (FSK), digital information is transmitted by changing the frequency of a carrier signal. Naturally, Binary FSK (BFSK) is the simplest form of FSK where the two bits 0 and 1 correspond to two distinct carrier frequencies F0 and F1 to be sent over the air. The bits can be translated into symbols through the relations
0→−1
1→+1
This enables us to write the frequencies Fi with i ϵ {0,1} as
Fi=Fc+(−1)i+1⋅ΔF=Fc±ΔF
where Fc is the nominal carrier frequency and ΔF is the peak frequency deviation from this carrier frequency. Consequently,
s(t)=Acos2πFit=Acos[2π{Fc±ΔF}t]—−Eq (1)
where 0≤t≤Tb
Figure 2 below displays a BFSK waveform for a random stream of data at a rate of Rb=1/Tb. Note that we are not distinguishing between a bit period and a symbol period because both are the same for a binary modulation technique.
Figure 2: A Binary Frequency Shift Keying (BFSK) waveform
As is evident from Figure 2 above, the phase transitions at the boundaries of bit transitions are — in general — discontinuous. In case you are interested, an FSK signal can be demodulated through several methods such as quadrature demod, correlators or matched filtering, a Phase Locked Loop (PLL), bandpass filters, limiter discriminator, and so on.
Minimum Frequency Spacing
Although any two distinct frequencies F0 and F1 can be used for communication purpose, it greatly helps in receiver design if the two distinct signals are orthogonal to each other, i.e.,
Tb∫0s1(t)s0(t) dt=0
A question that arises at this stage is the following: how close can the two frequencies F0 and F1 be? Or in other words, what is the smallest possible value of ΔF? The reason for asking this question is spectral efficiency. The closer the two frequencies, the more the number of channels available for other users in the same spectrum.
For a BFSK case,
Tb∫0cos2πF1tcos2πF0t dt=0
or
Tb∫0cos2π(F1+F0)t dt+Tb∫0cos2π(F1–F0)t dt=0sin2π(F1+F0)t2π(F1+F0)|Tb0+sin2π(F1−F0)t2π(F1−F0)|Tb0=0sin2π(F1+F0)Tb2π(F1+F0)+sin2π(F1−F0)Tb2π(F1−F0)=0
Since F1+F0=2Fc≫1 while −1≤sinx≤1, the first term goes to zero and we can write
sin2π(F1−F0)Tb=0
which is true for (remember sinkπ=0 for integer k)
2π(F1−F0)Tb=kπ
From here, the orthogonality condition can be concluded as
F1−F0=k2Tb
This also yields the minimum frequency separation for k=1.
F1−F0=12Tb=Rb2
for orthogonal signaling. Thus, the peak frequency deviation ΔF can be computed as
ΔF=F1−F02=14Tb=Rb4
MSK as Continuous-Phase FSK
From the above information, a BFSK signal with minimum tone spacing can be constructed by replacing ΔF by Rb/4 in Eq (1) as
s(t)=Acos[2π{Fc±Rb4}t],=Acos[2πFct±2πRb4t],0≤t≤Tb
This is a CP-BFSK signal with minimum tone spacing defined over a single bit interval 0≤t≤Tb. There are two more steps to construct an actual MSK waveform.
- In a real communication system, the signal is constructed by transmitting a sequence of bits bn in succession, where n is the bit index. As we have seen earlier, bits bn ϵ {0,1} are converted to symbols an.
an ϵ {−1,+1}
Then, in the interval nTb≤t≤(n+1)Tb, the above signal can be written as
s(t)=Acos[2πFct+2πanRb4(t−nTb)],nTb≤t≤(n+1)Tb where n is the bit index within a long bit stream and the second term indicates the underlying baseband message. - Observe in the above equation that the phase continuity is not necessarily maintained from one symbol to the next. To ensure phase continuity, we must add a phase component for each symbol as
s(t)=Acos[2πFct+2πanRb4(t−nTb)+θn]nTb≤t≤(n+1)Tb—−Eq (2)
For this purpose, the phase at both sides of t=(n+1)Tb must be equal, as illustrated in Figure 3.
Figure 3: Phase on both sides of t=(n+1)Tb must be equal to maintain continuity
Thus, at the instant t=(n+1)Tb, the following equation must be satisfied.
2πanRb4(t−nTb)+θn|t=(n+1)Tb=2πan+1Rb4(t−(n+1)Tb)+θn+1|t=(n+1)Tb
which can be written as θn+1=θn+anπ2
Another way to write the above recursive relation is
θn=θn−1+an−1π2—−Eq (3)
Assume that θ0=0. Then,
θ1=a0π2
θ2=θ1+a1π2=π2(a0+a1)
In general,
θn=π2n−1∑i=0ai—−Eq (4)
When the phase follows this rule during each bit/symbol interval, the phase continuity is ensured and the resulting waveform is shown for an example sequence in Figure 4.
Figure 4: MSK as Continuous-Phase Binary FSK
Notice how Figure 4 is different than Figure 2 in phase continuity.Below, we plot θn as a function of time in Figure 5 to see how it evolves. One can observe that it indeed changes values in steps of π/2 depending on the last data bit.
Figure 5: θn evolving with time
MSK as Offset QPSK
First, write Eq (2) assuming A=1 as s(t)=cos[2πFct+2πanRb4(t−nTb)+θn]=cos[2πFct+2πanRb4t−nanπ2+θn⏟Θn]—−Eq (5) Using Eq (3), we can further manipulate Θn as Θn=θn–nanπ2=θn−1+an−1π2–nanπ2=θn−1+an−1(+1−n+n)π2–nanπ2=θn−1–(n−1)an−1π2+nπ2(an−1–an)=Θn−1+nπ2(an−1–an)—−Eq (6) Notice that Θn=Θn−1 when
- an=an−1 because the second term in Eq (6) becomes zero.
- n is even because the second term in Eq (6) is a multiple of 2π (remember that an−1−an is ±2 when not zero).
We conclude that Θn can only change when an≠an−1 and n is odd. In that case, it will always change by an odd multiple of ±π. In summary, considering modulo-2π operations,
Θn={Θn−1±πan≠an−1,n oddΘn−1otherwise—−Eq (7)
Next, we use the following identities cos(α±β)=cosαcosβ∓sinαsinβsin(α±β)=sinαcosβ±cosαsinβcos(−α)=cosαsin(−α)=–sinα to open Eq (5). s(t)=cos[2πFct+2πanRb4t+Θn]=cos2πFct⋅cos(2πanRb4t+Θn)⏟Term 1–sin2πFct⋅sin(2πanRb4t+Θn)⏟Term 2 Now we process both terms one by one. Term 1=cos(2πanRb4t+Θn)=cos(2πanRb4t)cosΘn–sin(2πanRb4t)sinΘn=cos(2πanRb4t)cosΘn=dI,ncos2πRb4t because Θ0=0 implies sinΘn=0, see Eq (7). Furthermore, an ϵ {−1,+1} and cos(±α)=cosα. We have also defined dI,n=cosΘn Similarly, Term 2 can be expanded as Term 2=sin(2πanRb4t+Θn)=sin(2πanRb4t)cosΘn+cos(2πanRb4t)sinΘn=cosΘn⋅ansin2πRb4t=dQ,nsin2πRb4t since sinΘn=0 as before and sin(−α)=–sin(α). Here, we have defined dQ,n as dQ,n=an⋅cosΘn=an⋅dI,n Finally, plugging both Term 1 and 2 into s(t) for the n-th bit period, s(t)=dI,ncos2πRb4t⋅cos2πFct–dQ,nsin2πRb4t⋅sin2πFct Using the identity cosα=sin(α+π/2), the above equation can be revised as s(t)=dI,nsin(2πRb4t+π2)⋅cos2πFct–dQ,nsin2πRb4t⋅sin2πFct=dI,nsin(2πRb4(t+Tb))⋅cos2πFct–dQ,nsin2πRb4t⋅sin2πFct—−Eq (8)=dI,np(t+122Tb)⋅cos2πFct–dQ,np(t)⋅sin2πFct where p(t) is a half-sinusoidal pulse shape of period 4Tb.
p(t)=sin(2πRb4t)
The above expression resembles an OQPSK waveform for bit n if the bit rate for dI,n and dQ,n is Rb/2 or bit period is 2Tb, since the time offset in the sin term must be half the bit period for OQPSK. So we have to check if dI,n and dQ,n change values every other symbol.
From the definition, dI,n=cosΘn and Eq (7) tells that Θn can only change values for odd n. Hence, dI,n is indeed an Rb/2 rate stream.
On the other hand, dQ,n=an⋅dI,n. Again, Eq (7) says that dI,n can only change when an changes but that means that an⋅dI,n stays the same. Therefore, dQ,n can only change for even n and when an changes values. Consequently, dQ,n is also an Rb/2 rate stream.
Since dI,n changes values for odd n while dQ,n does the same for even n, dQ,n is offset with respect to dI,n by Tb seconds, the same amount as cos2πRb4t in Eq (8). Summing up everything so far, MSK can indeed be represented as an OQPSK waveform. The data rate is the same as in CP-BFSK format since two bits are being transmitted in two bit periods here as well.
This representation is illustrated in Figure 6.
Figure 6: MSK as Offset QPSK
Compare Figure 6 with Figure 4. I did not choose separate blue and red colors in this figure so as not to confuse dns with ans (that can raise a misunderstanding that dI,n is odd ans and dQ,n is even an, which is not correct).
Observe from Figure 6 that dI,n is changing values every two Tbs at odd multiples of Tb, while dQ,n is changing values every two Tbs at even multiples of Tb. Due to this offset behavior, at every Tb, either I or Q waveform is zero at t=Tb while the other reaches its maximum value. This is how phase remains continuous during symbol transitions.
Figure 7 draws Θn as a supplement to above findings.
Figure 7: Θn evolving with time
On a final note, observe from some equations (e.g., (2) and (5)) that the continuous phase has two parts, one of which arises due to the delay of the n-th symbol. This information can be used to refine a phase estimate.
We are also clear now why MSK can act both like a linear and a non-linear modulation. In reality, MSK is a non-linear modulation scheme (see Eq(2)) for an. Pseudo-symbols dn themselves are non-linear functions of information bits. So it is only from dn viewpoint that MSK can be seen as a linear modulation scheme.
A Generalization: From MSK to Continuous-Phase FSK (CP-FSK)
After understanding MSK, it can be expanded into a general modulation scheme known as Continuous-Phase Frequency Shift Keying (CP-FSK). As we see in the next section, CP-FSK is a special case of Continuous-Phase Modulation (CPM), which is a class of non-linear digital modulation schemes in which the phase of the signal is constrained to be continuous from one symbol to the next. As with MSK, the most attractive feature of such a signal is that it has a constant envelope as a result of the amplitude being independent of the modulating information. Consequently, a CPM signal can be amplified without distortion by a non-linear amplifier operating near the saturation point allowing low cost and more efficiency as compared to a linear amplifier.
Usually CP-FSK (and hence CPM) is not a straightforward concept to master. However, starting from MSK, its basics can easily be understood by building on the same expressions. For this purpose,
- Remember that ΔF=Rb/4.
- Modulation symbols can carry more than 1 information bit. For example, 00, 01, 11 and 10 can be sent through four symbols an ϵ {−3,−1,+1+3}. In general, an is a sequence from the alphabet {±1,±3,⋯,±(M−1)}. Thus, we call an as symbols and replace Tb with TM (a symbol time) from here onwards. Symbol rate RM is then 1/TM.
Now let us start with rewriting Eq (2) and Eq (4) and then substituting the former into the latter.
θn=π2n−1∑i=0ai
s(t)=Acos[2πFct+2πanRM4(t−nTM)+θn]=Acos[2πFct+2π12⋅t−nTM2TMan+π2n−1∑i=0ai]=Acos[2πFct+2πhan⋅q(t−nTM)+πhn−1∑i=0ai]
where we have defined the following terms.
h=12q(t)={0t≤0t2TM0≤t≤TM12t≥TM
It turns out that h is a general concept known as
modulation index, which in case of MSK is equal to 1/2. In general, h is defined as
h=2ΔFRM
which describes the peak frequency deviation in terms of a percentage of the symbol rate. With the definition of h, we can write
s(t)=Acos[2πFct+2πh(anq(t−nTM)+12n−1∑i=0ai)]
The above equation is true for the interval nTM≤t≤(n+1)TM. Considering from its definition that q(t) is 1/2 after a symbol interval, we can also write s(t) as
s(t)=Acos[2πFct+2πhn∑i=0aiq(t–iTM)]—−Eq (9)=Acos[2πFct+2πh∫t−∞(n∑i=0aig(u–iTM))du]
where g(t) is defined as the derivative of q(t) as
q(t)=t∫0g(u)du
Notice that in the present case with q(t) defined as above, its derivative g(t) is a rectangular pulse shape. Consequently, ∑iaig(u–iTM) is the standard baseband Pulse Amplitude Modulated (PAM) waveform with rectangular pulse shape and this is how its discontinuities are transformed into a continuous-phase signal.
It is refreshing to conclude that the starting point for a continuous-phase modulated signal is a standard pulse amplitude waveform, in which the discontinuities are smoothed out by the integral operation.
More Generalization: From Continuous-Phase FSK (CP-FSK) to Continuous-Phase Modulation (CPM)
Now referring to Eq (9), the expression for a CPM signal can be written as
s(t)=Acos[2πFct+2πn∑i=0hi⋅aiq(t–iTM)]nT≤t≤(n+1)T
Here, hi is a sequence of modulation indices: a ratio of two relatively prime integers.
h=kp
This is the case of multi-h CPM. When all hi=h, the modulation index is the same for all symbols. This is the category we saw in CP-FSK and MSK above.
Finally, q(t) is a waveform shape known as the phase response of the modulator which is normalized as
q(t)={0t≤0t2T0≤t≤LT12t≥LT
where L is the length of a pulse g(t) in symbols. Since angular frequency is the rate of change of phase, this g(t) is the derivative of q(t) and known as the frequency response of the modulator.
g(t)=dq(t)dt
For any pulse shape g(t), L=1 results in full response CPM, while the other case L>1 is the partial response CPM. Commonly used pulse shapes are rectangular (as used in the case of MSK), raised cosine and Gaussian.
We can see that CPM is in fact a very large class of modulation schemes owing to different pulse shapes g(t), modulation indices hi and the modulation alphabet size M. That is both a blessing and a curse: blessing due to the remarkable variety of signals as its offsprings all yielding excellent spectral and power efficiencies, and curse due to the high receiver complexity. By virtue of Moore’s law, this is becoming less of an issue — thanks to powerful baseband processors in the modern age.
Finally, the following article describes how to acquire carrier and clock synchronization in MSK demodulators.
References
[1] Mengali and D’Andrea, Synchronization Techniques for Digital Receivers, 1997.
[2] John Proakis, Digital Communications, 4th ed, 2001.
Hello. I read your article, Ihave some questions.
1)There are a lot of sources, e.g. “http://www.dsplog.com/2009/06/16/msk-transmitter-receiver/”, “https://en.wikipedia.org/wiki/Minimum-shift_keying”,the article “Minimum shift keying: A spectrally efficient modulation Subbarayan Pasupathy, IEEE Communications Magazine, July 1979” where the coefficients Di,n and Dq,n are suggested to be the odd and even bits of the input bit stream An. You told that it is incorrect. Why?
Thanks in advance. Your site is very interesting.
Thanks for your appreciation. You can have even and odd input bit streams to generate a half-sinusoidal shaped O-QPSK waveform. However, in that case, the 0s and 1s that generate two different carrier frequencies will not be directly coming from the input, but a function of the input bits. Hope that clarifies the question.
Hi Qasim
Thanks for the fantastic tutorials.
Could you help me understand Figure 4 in your MSK tutorial. In the first bit period (0 to Tb), the signal seems to complete a full cycle, so the phase remains zero (both at t=0 and t=Tb). In the next bit period (Tb to 2Tb), the output signal goes through 1.5 cycles, so the phase must have increased by 180 deg. But Figure 5 shows phase changing from 0 to -pi/2 in 1st bit period and from -pi/2 to 0 in the 2nd period. Could you help me please.
Many thanks.
anon
Hi anon.
Great question. When you say that the phase goes from 0 to 180 etc, you are talking about the actual signal, i.e., a single CW that is changing its phase with time.
However, if you look at the equation right after the heading ‘MSK as continuous-phase FSK’, there are two different CWs, one at frequency Fc+Rb/4 and the other at Fc-Rb/4. The phase I’m talking about is introduced in Eq (2) which is the phase at time n **for each bit** represented by its own CW. It only changes at bit intervals and only can take certain values (as described in the article).
Hi Qasim,
Maritime AIS has been based on GMSK. The VDES follow-on also makes use of pi/4 QPSK. Are there reasons for this particular sequence, GMSK -> pi/4 QPSK? MSK and 0-QPSK appear in the diagrams, so thought I would ask:)
Cheers, Noah
For power amplifier efficiency, modulation schemes such as GMSK having a constant envelope and pi/4 QPSK having an envelope that does not pass through zeroes are desirable for communication systems implemented on mobile platforms. This, however, is not the reason for the sequence you mentioned above : ) MSK just by design can be represented as half-sinusoidal shaped O-QPSK.
Hi Qasim,
Excellent explanation on MSK , I cleared many of my doubts in MSK , but in figure 7 phi(n) vs time ,at 8th Tb interval phi got changed from +pi to -pi. How it jumps from +pi to -pi , as per my understanding of equation 7 phi(n) = phi(n-1) when n is even ,so +pi should retain as +pi at 8th symbol interval. So please clarify my doubt.
Oh, thanks for pointing this out. +pi and -pi are the same phases (move 180 degrees from 0 either anticlockwise or clockwise and you will reach the same angle). It’s just that each programming language has its own way of handling floating point numbers as well as computing arctangent routines, which result in +pi sometimes and -pi some other times. Hope it helps.