(9 votes, average: 3.33 out of 5)
Loading ...

# MSK transmitter and receiver

by on June 16, 2009

In a post on Minimum Shift Keying (MSK), we had discussed that MSK uses two frequencies which are separated by $\frac{1}{2T}$ and phase discontinuity is avoided in symbol boundaries. In that post, we had discussed MSK as a continuous phase transmit signal and showed that phase changes through 0, 90, 180 and 270 degrees. In this post, we will discuss MSK transmission as a variant of offset-QPSK technique. Further, we will discuss the receiver structure and show that bit error rate with coherent demodulation of MSK (using $2T$ time) is equivalent to that of BPSK modulation. The channel assumed is AWGN.

## MSK transmitter

Using bit-sequence and the explanation provided in the excellent paper  Minimum shift keying: A spectrally efficient modulation Subbarayan Pasupathy, IEEE Communications Magazine, July 1979 as a reference,  let us proceed as follows:

a) Consider a 8 bit sequence which is BPSK modulated as [+1, +1, -1, -1, -1, +1, +1 , +1] having symbol duration of $T$.

b) The same sequence can be sent over QPSK modulation, where even bits are send on I-arm and the odd bits are send over Q-arm. To keep the same data rate, the bits on the I/Q arm are send for $2T$ symbol periods.

Figure: Transmission of BPSK/QPSK modulation

c) Now, a variant of QPSK called offset-QPSK (O-QPSK) can be generated by having a relative delay between the I-arm and Q-arm by symbol period $T$.

Note: The advantage of O-QPSK is that phase of the signal can jump at a maximum of only 90 degrees (when compared to 180 degrees in QPSK). Having a smaller phase jump ensures that the spectrum of the waveform is cleaner even when there are distortions in the transmitter.

d) Researchers have found that they can make the phase transitions zero, if  rectangular pulse shapes used in O-QPSK are replaced by sinusoidal pulse shapes i.e by using $\cos(\frac{\pi}{2T})$ and $\sin(\frac{\pi}{2T})$ on the I and Q arm respectively. This is also known as Minimum Shift Keying (MSK) !

Figure: Transmission of O-QPSK/MSK modulation

Assuming that the carrier frequency is $f_c$, the MSK transmission can be written as

$x(t) = x_{e}(t)\cos(\frac{\pi}{2T})\cos(2\pi f_ct) + x_{o}(t)\sin(\frac{\pi}{2T})\sin(2\pi f_ct)$,

where

$x_{e}$are the even pulse sequence (send on the I arm) and

$x_o$are the odd pulse sequence (send on the Q arm).

Using trigonometric identities, the above equation can also be written as,

$x(t) = \cos\left(2\pi f_c t + b_k(t)\frac{\pi t}{2T} +\phi_k\right)$,

where

$b_k = -x_ex_o$ and

$\begin{array}{llr}\phi_k & = 0 , & if x_e = 0\\ & = \pi, & if x_e = -1 \end{array}$.

We can see that MSK can indeed be visualized as a form of frequency shift keying (FSK), where the two frequencies are $fc+\frac{1}{4T}$ and $fc-\frac{1}{4T}$.

Note: This equation is comparable to that described in the post Simulating MSK transmission

The MSK transmitter block diagram is shown below

Figure: Block diagram of MSK transmitter

## MSK Receiver

The receiver for the MSK transmission can be constructed as follows:

a) Down convert the RF signal to I and Q arms by I/Q down conversion

b) Multiply the I and Q arms by $\cos(\frac{\pi}{2T})$ and $\sin(\frac{\pi}{2T})$ respectively

c) Integrate over the a period of $2T$

d) On I arm, perform hard decision decoding on the integrator output at every $2T$ to get the even bits  $x_{e}$

e) On Q arm, delay by time $T$, perform hard decision decoding on the integrator output at every $2T$ to get the odd bits $x_o$

The block diagram is shown below:

Figure: MSK receiver block diagram

## Simulation Model

The Matlab/Octave script performs the following

(a) Generate random binary sequence of +1’s and -1’s.

(b) Group them into even and odd symbols

(c) Perform rectangular pulse shaping on the even and odd symbols, delay the odd symbols by $T$

(d) Multiply the even and odd symbols by $\cos(\frac{\pi}{2T})$ and $\sin(\frac{\pi}{2T})$ respectively and transmit

(e) Add additive white Gaussian noise (AWGN) for the given value of $\frac{E_b}{N_0}$

(f) Multiply the I and Q arm by  $\cos(\frac{\pi}{2T})$ and $\sin(\frac{\pi}{2T})$ respectively and integrate over period $2T$

(g) Using the I arm, recover even bits by performing hard decision decoding on integrator output every $2T$ time

(h) Using the Q arm, recover even bits by performing hard decision decoding on integrator output delayed by time $T$ every $2T$ time

(i) Count the bit errors

(j) Repeat for multiple values of $\frac{E_b}{N_0}$ and plot the simulation and theoretical results.

Figure: BER plot for MSK transmission/reception in AWGN channel

## Observations

1./ The BER with MSK is identical to BER with BPSK modulation. This is because MSK demodulation in the above simulation is performed by integrating the received symbol over  time $2T$.

2./ Note that it is indeed possible to demodulate MSK by observing only over time $T$ and demodulate it as a FSK with two carriers at $fc+\frac{1}{4T}$ and $fc-\frac{1}{4T}$. If such a demodulation is performed, then the BER with MSK will be 3dB poorer (comparable to FSK demodulation) when compared to BPSK modulation.

## Reference

Minimum shift keying: A spectrally efficient modulation Subbarayan Pasupathy, IEEE Communications Magazine, July 1979

D id you like this article? Make sure that you do not miss a new article by subscribing to RSS feed OR subscribing to e-mail newsletter. Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.

{ 47 comments… read them below or add one }

MD.Fahad .Qureshi October 3, 2012 at 6:06 pm

hi krishna i am doing project on msk ,plz help me how i can implepent the circuit diagram plz help me i am troble.

Reply

Krishna Sankar October 5, 2012 at 5:06 am

@Fahad: I have written two articles involving MSK. Hope this helps
http://www.dsplog.com/tag/msk/

Reply

sree May 9, 2012 at 11:15 pm

Hi, may i know how do you combine the quadrature and the in phase components to view frequency modulated MSK signal.
Thanks

Reply

Krishna Sankar May 15, 2012 at 5:40 am

@sree: Extracting from the article:
(f) Multiply the I and Q arm by cos(pi/2T) and sin(pi/2T) respectively and integrate over period
(g) Using the I arm, recover even bits by performing hard decision decoding on integrator output every time
(h) Using the Q arm, recover even bits by performing hard decision decoding on integrator output delayed by time every time

Reply

Neumann May 30, 2011 at 8:21 pm

Hi Krishna,
thanks for your comments to msk modulation. I am busy to construct some software solutions for msk decoding.
Looking at your receiver block diagram, the integration over 2T, is this an moving average, sum over 2T samples after every sample, or only every n*2T samples?

Thank you and good luck.

Emil Neumann , Schwerte Germany

Reply

Krishna Sankar May 31, 2011 at 5:33 am

@Neumann: A moving average over a window of 2T samples

Reply

Sarah June 15, 2010 at 6:07 pm

this was the time intv i was using. The solution you gave me previously is fine for the exp msk version but doesnt work for this one.

time_sampling = [0:1/fs:T];
time_sampling = time_sampling(1:end-1);% gets ride of the final value
%Produces the time intervals

Reply

Sarah June 15, 2010 at 6:01 pm

Hi,

I used this equation to modulate MSK

xt = cos(2*pi*(fc+frequency_differance_repeat).*time_sampling_repeated + Phase_value_array_repeat );

This equation is from your website. It works fine.
The i multiplied the received (xt) signal by the following (first stage of the receiver as instructed on your website):
( i hvnt added noise yet)

%even arm
stage1_cos = xt.*(cos(2*fc*pi*time_sampling_repeated)).*(cos(pi.*time_sampling_repeated/2*T));

%odd arm
stage1_sin = xt.*(sin(2*fc*pi*time_sampling_repeated)).*(sin(pi.*time_sampling_repeated/2*T));

How do i recover the signal from here. I’m still having a problem with evaluating the intergtration from 0 to 2T for the above signal.

Reply

Krishna Sankar June 21, 2010 at 5:42 am

@Sarah: Well, if your sampling period is 1/Ts, you need to sum over 2T/Ts samples
I am unable to write the precise code as I do not follow your code well. But am sure that you will be able to figure this out. Good luck.

Reply

Sarah April 14, 2010 at 4:54 pm

Just have one more basic question.

in the above steps:

(f) Multiply the I and Q arm by and respectively and integrate over period 2T
if you already have a matrix of numbers in I and Q, how do u actually intergrate it over 2T

Reply

Krishna Sankar April 18, 2010 at 2:08 pm

@Sarah: The convolution operation with taps as all ones for duration of 2T takes care of the integration of 2T
conv(real(yt).*ct,ones(1,2*T))

Reply

Sarah April 14, 2010 at 4:31 pm

Hi,
i was just going thru the code you have written to evaluate MSK receiver. I just have a few questions regarding it. Im currently doing my final year project on this stuff so wondering if u cn help me understand the code better.

In your code this is what you have written:

%% MSK receiver
% multiplying with cosine and sine waveforms
xE = conv(real(yt).*ct,ones(1,2*T));
xO = conv(imag(yt).*st,ones(1,2*T));

bHat = zeros(1,N);
bHat(1:2:end) = xE(2*T+1:2*T:end-2*T) > 0 ; % even bits
bHat(2:2:end) = xO(3*T+1:2*T:end-T) > 0 ; % odd bits

I wanted to know what the last two lines of this is doing. And how u worked out 2*T+1:2*T:end-2*T.

Reply

Krishna Sankar April 18, 2010 at 2:07 pm

@Sarah: Well,
a) starting from 2T+1 ensures that the first 2T symbols are ignored (to account for the delay of the integration by 2T)
b) the step size of 2T ensures that we take one symbol from the even, then from odd, then even and so on…

Reply

pradeep April 8, 2010 at 6:39 pm

hi krishna,

i am comparing the DPSK and MSK modulations to different parameters. Can u please help me in two queries.
1. Is the error performance of BPSK and MSK are similar when MSK is done in sinusoidal wavedorm.
2. How can i extend both the modulations to complex systems such as OFDM.
Can i get a M-file regarding that.
thanks in advance

Reply

pradeep April 8, 2010 at 6:05 pm

hi krishna,

i am comparing the DPSK and MSK modulations to different parameters. Can u please help me in two queries.
1. Is the error performance of BPSK and MSK are similar.
2. How can i extend both the modulations to complex systems such as OFDM.
Can i get a M-file regarding that.
thanks in advance

Reply

Krishna Sankar April 14, 2010 at 5:22 am

@pradeep:
1/ MSK using received samples integrated over 2T symbol periods will have BER comparable to BPSK. Please refer to the following post
http://www.dsplog.com/2009/06/16/msk-transmitter-receiver/
2/ I have discussed BPSK in OFDM case. Please refer
http://www.dsplog.com/2008/06/10/ofdm-bpsk-bit-error/

Reply

pradeep April 14, 2010 at 5:03 pm

thanks for ur replay krishna

Reply

kos April 7, 2010 at 2:53 am

hi Krishna, can you let me know when most probably you might have time to do that? I am really eager to see it. But anyways, thanks a lot in advance!

Reply

Krishna Sankar April 13, 2010 at 5:31 am

@kos: I cannot put a time limit, but maybe in the coming months. I just restarted the posting after around one month of lull and now discussing TETRA specifications

Reply

Djaybee April 2, 2010 at 6:15 pm

Hi Krishna,

I want to ask you something. Can you explain me why you divide by 20 the ratio Eb/N0 when you want want to add the noise to the signal. In my opinion, the ratio Eb/N0 is like ratio of energy and you have to divide it by 10 isn’t it ?

Thanks in advance.

Reply

Krishna Sankar April 4, 2010 at 3:18 am

@Djaybee: Yes, its an energy ratio. However, note that the scaling is applied on a voltage signal. Hence the factor of 20

Reply

Marzuk Afgan March 31, 2010 at 1:34 am

Hello,

Thanks for your work. I would like have a little more info about the matlab code. In MSK reciever, while retrieving data from the carrier, You have convolve with ones (1,8). Would you please explain, what exactly has been done with this convolution? Is it mandatory for OQPSK modulation?

Thanks in advance

Reply

Krishna Sankar March 31, 2010 at 4:56 am

@Marzuk Afgan: The convolution is done to integrate over a period of 2T

Reply

kos March 26, 2010 at 3:17 am

hi Krishna, is there any difference between above your implementation and ieee 802.15.4(zigbee) standard’s oqpsk with half-sine pulse shaping? thanks!

Reply

Krishna Sankar March 28, 2010 at 1:42 pm

@kos: Sorry, I have not looked into the Zigbee standard.

Reply

kos March 30, 2010 at 11:23 pm

they discuss it in this paper, if you have time can you look at it. My interest is the Figure 4 in that paper. They use also OQPSK but with half-sinusoidal pulse shaping…? I think that if you could modify your MSK transmitter a bit, it should be worked out. Plz, if you have time can you spend some time on this? Thanks a lot in advance!!!

Reply

Krishna Sankar March 31, 2010 at 5:01 am

@kos: I had a quick look at the paper. Is it using half sinusoidal pulse shaping? I did not find any text explicitly mentioning that

Reply

kos March 31, 2010 at 7:47 am

Hi Krishna, yes it is using half-sine pulse shaping. Thanks a lot for your time spent on this issue. ftp://lenst.det.unifi.it/pub/LenLar/proceedings/2007/ICC2007/DATA/S09S01P05.PDF

in this paper they show it in equation (2). Thanks a lot in advance!

kos March 31, 2010 at 8:00 am

Hi Krishna, they also show it in this paper

http://140.116.72.245/~zak/ZigBee/Docs/IEEE802.15.4.pdf

in section 6.5. Thanks a lot in advance!!!

kos March 31, 2010 at 8:17 am
kos March 31, 2010 at 7:35 pm

Hi Krishna, yes it is using half-sine pulse shaping. They mention it in the following links:
1) here ftp://lenst.det.unifi.it/pub/LenLar/proceedings/2007/ICC2007/DATA/S09S01P05.PDF they show it in equation 2, also Figure 1 shows how the data is entered to the oqpsk modulator;
2) in this one http://140.116.72.245/~zak/ZigBee/Docs/IEEE802.15.4.pdf they describe it in section 6.5;
3) they also show it here, http://books.google.com/books?id=m5NYbUpqXY0C&pg=PA148&dq=zigbee+%2B+half+sinusoidal&cd=1#v=onepage&q=&f=false

Thanks a lot for spending time on this issue!!!

kos March 31, 2010 at 7:38 pm

Hi Krishna, sorry for the fourth reply it is actually the copy of the previous three in one. When I first opened the firefox, it did not show my replies for that reason I thought my replies where deleted… Thanks in advance!!!

Riki February 24, 2010 at 2:06 am

hi Krishna, thanks for your post. do you have a code for ieee 802.14.5 Physical layer OQPSK with half sine pulse shaping? thanks a lot!

Reply

Krishna Sankar March 31, 2010 at 5:15 am

@Riki: Sorry, I do not have. But are you sure that 802.14.5 uses half pulse shaping?

Reply

Jose Antonio November 21, 2009 at 3:36 pm

Hello
I’m doing a project for connecting two systems through an MSK modulation scheme in Matlab. Coherent transmission and reception is OK but the reception incoherent does not, you could help me with some idea.
Thanks

Reply

Krishna Sankar December 6, 2009 at 4:26 pm

@Jose Antonio: You are looking for an in-coherent demodulation of MSK, hmm. I cannot think of anything, but do you have some references? I will try to read up and tell you.

Reply

Wig July 24, 2009 at 11:24 am

Very useful, and I have a question, because of my knowledge, MSK reveiver is using by Viterbi Algorithm , but…. when I simulated MSK BER using VA , it can produce a big problem , and I don’t know why , can you
give me some suggest,please….

thank you very much

Reply

Krishna Sankar July 28, 2009 at 4:19 am

@Wig: For the simulations in this post, I treated MSK as a variant of Offset QPSK and demodulated accordingly. Though I have not tried demodulation using the knowledge of phase transitions and corresponding Viterbi decoding, I believe BER should be matching with curve obtained for BPSK.
Good luck in your algorithm explorations.

Reply

baljit January 25, 2010 at 11:15 am

sir..i’m working on a paper “typical channel coding and modulation scheme for satellite communication system”.I’n this paper it analyzes the characteristic of the satellite commu. system as well as the satellite communi. channel and introduces the basic principlle and outstanding advantages of cinvolutional code and msk modulation.BER performance of conv. code and msk is simulated with matlab/simulink.the conclusion based on the simulation result provide reference to the design of the satellite communication system…
sir…what modification i can apply on this scheme…and could you please send me the matlab code for msk+convolution using awgn channel..I’ll BE VERY THANKFUL TO YOU…

Reply

sohbet July 2, 2009 at 6:12 pm

hi good thank you blog

Reply

Krishna Sankar April 4, 2010 at 3:43 am

@kos: I was looking at equations (1), (2) in the paper – and they look identical to the MSK waveform. Agree?
Infact, I found a R&S article on Zigbee stating the same http://www2.rohde-schwarz.com/file_1180/1EF55_1E.pdf

Reply

Krishna Sankar April 4, 2010 at 3:43 am

@kos: Ok

Reply

Krishna Sankar April 4, 2010 at 3:44 am

@kos: No problem

Reply

kos April 5, 2010 at 10:33 pm

Hi Krishna, thanks a lot for your reply. Can you modify msk-transmitter-receiver into one which will be resembling zigbee-transmitter-recevier? Thanks a lot in advance!

Reply

Krishna Sankar April 6, 2010 at 4:46 am

@kos: Well, I have not written any post on Zigbee standards till date. Will keep that in the to-do list….

Reply

kos April 7, 2010 at 12:50 am

Thanks!

Reply

kos April 13, 2010 at 2:19 am

Hi Krishna, when probably you would have time to do that? I am really eager to see that. Anyways, thanks a lot for considering!

Reply

Previous post:

Next post: