(4 votes, average: 5.00 out of 5)

# Bit error rate for 16PSK modulation using Gray mapping

by on May 18, 2008

In this post, let us derive the theoretical bit error probability for 16PSK modulation using Gray coded mapping. For deriving the equation, we will refer material from the following posts:

As discussed in the previous posts, the key feature of Gray code is that adjacent symbols differ by only one bit. The 16PSK constellation with Gray mapping can be as shown in the figure below.

Figure: 16PSK constellation plot with Gray coded bit-mapping

From the discussion on symbol error rate for 16PSK in AWGN, we have proved that the symbol error rate for an M-PSK modulation is,

$P_{s}=erfc\left[\sqrt{\frac{E_s}{N_0}}sin(\frac{\pi}{M})\right]$.

## Relation between bit energy Eb/No to symbol energy Es/No

As can be seen from the constellation plot, for a 16PSK modulation, each symbol transmits $k=4$ bits. In general, for an M-PSK modulation the number bits in each constellation symbol is,

$k=\log_2(M)$.

Since each symbol consists of $k$ bits, the symbol to noise ratio $\frac{E_s}{N_0}$ is $k$ times the bit to noise ratio $\frac{E_b}{N_0}$, ie.

$\frac{E_s}{N_0}=k\frac{E_b}{N_0}$.

## Relation between symbol error and bit error

For reasonable symbol to noise ratio $\frac{E_s}{N_0}$, the symbol will be in error when noise causes the symbol to fall in the adjacent symbol bin. Now thanks to the Gray coded mapping, even if the symbol goes into the adjacent symbol there will be only 1 bit in error from the $k$bits. So, the relation between symbol error and bit error is,

$P_b \approx \frac{Ps}{k}$.

Note:

For very low symbol to noise ratio, the noise can cause the symbol to fall into the non-adjacent symbol bin. This may cause more than 1 bit error for each symbol error. However, we can ignore this case considering that we are interested only in reasonably high values of symbol to noise ratio.

## Probability of bit error for M-PSK modulation

Combining the above two equations, the bit error probability for a general M-PSK modulation is,

$P_{b}=\frac{1}{k}erfc\left[\sqrt{\frac{kE_b}{N_0}}sin(\frac{\pi}{M})\right]$.

(Of course for 16-PSK, M=16).

## Matlab/Octave script for simulation 16-PSK BER

The Matlab/Octave script performs the following:

(a) Generation of random 1′s and 0′s

(b) Assigning group of 4 bits to each constellation symbol per the Gray mapping

(c) Addition of white Gaussian Noise

(d) Demodulation of PSK symbols and

(e) De-mapping per decimal to Gray conversion

(f) Counting the number of bit errors

(g) Running this for each value of Eb/No in steps of 1dB.

Figure: Bit error rate plot for 16PSK modulation using Gray mapping

Observations

1. The simulated results show good agreement with the theoretical results.

2. For low Eb/No values, we can see that the simulated bit error rate is slightly higher than that expected by theory. As explained above, this can be attributed to noise causing symbol to fall into the non-adjacent bin.

Hope this helps,
Krishna

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.

alan January 30, 2015 at 3:21 am

Thank you very much.

Only a question.
You wrote in observation “2. For low Eb/No values, we can see that the simulated bit error rate is slightly higher than that expected by theory. As explained above, this can be attributed to noise causing symbol to fall into the non-adjacent bin.”

Maybe, low Eb/No make your approximation in calculation of Ps not applicable, instead . Or not?

mira December 22, 2014 at 7:57 pm

hi,
At first thanks for the article,can you help me please to find a way to code 8PSK modulation without Gray coding and thanks

news November 2, 2014 at 2:28 am

Plans are secured for the development of a swimming center and a much
larger building to provide for meetings. People again turned to
astrology during the late 19th h and 20th centuries
when spiritualism made a comeback. You want personal
tuition for something as important as this, and you want your
course to be really enjoyable.

khushi August 25, 2012 at 6:54 pm

sir please explain Gray coded constellation mapping part in this script

Krishna Sankar August 29, 2012 at 5:20 am
norseen July 27, 2012 at 4:27 pm

dear sir,
i want
theoryBer_16QAM

Krishna Sankar August 1, 2012 at 6:15 am

@norseen: Please take a look at
16QAM Bit Error Rate (BER) with Gray mapping
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/

Krishna Sankar August 1, 2012 at 6:16 am

@norseen: Please take a look at
16QAM Bit Error Rate with Gray mapping
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/

Mohammed May 10, 2012 at 2:42 pm

Yes it is throwing an error.

Mohammed April 27, 2012 at 11:10 pm

just changing M=16 to 8 does not work..How can i do the same code for 8QAM??? pls help

Krishna Sankar May 2, 2012 at 4:54 am

@Mohammed: The script is throwing an error?

Mohammed April 27, 2012 at 10:57 pm

Hello Sir! i would really appreciate if for the 16QAM bit error rate instead of adding Gaussian noise other types of noise eg: impulsive is added.How can i do that?Pls help

Krishna Sankar May 2, 2012 at 4:53 am

@Mohammed: You can change the noise model from AWGN.

shweta sharma May 16, 2011 at 6:53 pm

hello sir!!!!!!!!!!
plz. sir help me in finding 32 psk matlab code.

Krishna Sankar May 23, 2011 at 3:16 am

@shweta: The script used in this post can be easily extended to 32PSK case (by changing to M=32)

shweta May 13, 2012 at 10:15 am

thank u sir.sir if we increase the BER. The signal to noise ratio will decrease or not? plz reply…..

Krishna Sankar May 15, 2012 at 5:51 am

@shweta: It’s the other way – a lower signal to noise ratio will cause higher bit error rate.

Deep November 12, 2010 at 10:25 am

hi man how are u ?
i just want to ask that for 8-PSK is the same for 16-PSK and the only difference is change M from 16 to 8 ???
i look forward to hear from you

regards
Deep

Krishna Sankar November 14, 2010 at 10:26 am

@Deep: Yes, changing 16 to 8 should suffice.

omer June 14, 2010 at 1:44 am

hello:
i’d like to order anything about “The decorrelating detector”
thnx.

Krishna Sankar June 21, 2010 at 5:57 am

@omer: Are you referring to decorrelating detector used in spread spectrum cases? Sorry, I do not have articles on that.

maytham April 25, 2010 at 11:21 am

dear krishna….
iam working on ofdm system with rayleigh channel multipath using jakes model and the syntax that is availanle in matlab ‘chan=rayleighchan(ts,fd,tau,gaindb)’ but i face aproblem that when i send the data bits through this channel with three paths i always get bit error rate equal to 0.5 or little less so iam asking you if could help me to exceed this problem pls…send me the answer if you could on email…
thanks…

Krishna Sankar April 27, 2010 at 5:00 am

@maytham: Are you equalizing for the effect of the channel in receiver?

Mahadevan Srinivasan January 8, 2010 at 8:48 am

Hi,

I have a question on the part “Relation between symbol error and bit error”. I have read in many books and know for a fact that Pb = Ps / k, but I have not heard a reasonable explanation for that fact. Could you elaborate?

brunx January 6, 2010 at 11:33 pm

Sir,
When 16PSK is to convert into passband, how can I recover the phase in the demodulator stage? Do you know some method or equation in order to simulate it?

Thanks again, sir.

brunx January 4, 2010 at 5:09 pm

Sir,
Is it possible that the modulated signal from this simulation can be viewed in time domain? As if your looking it in the oscilloscope.

Thank you sir

rashed December 16, 2009 at 9:01 pm

dear sir,
i want
1.matalb script for simulating BER for QPSK modulation in AWGN chnanel.
2.matlab script for simulating BER for 16QAM modulation in AWGN chnanel.
3.Matlab script for simulating BER for 64QAM modulation in AWGN chnanel.
could u help me please i will very greatful to you.

Krishna Sankar December 23, 2009 at 5:25 am
Ruby December 1, 2009 at 10:35 pm

Hi sir,
i want matlab script for comparing bit error probabilities of the 16 QAM and 16 PSK schemes using OFDM.
i will be very thankful to u.

Krishna Sankar December 7, 2009 at 5:06 am

@Ruby: Hope the post helps
http://www.dsplog.com/2008/03/29/comparing-16psk-vs-16qam-for-symbol-error-rate/

You can easily adapt to the OFDM case.

Ruby December 1, 2009 at 10:33 pm

Hi sir,
i want matlab script for comparing bit error probabilities of the 16 QAM and 16 PSK schemes using OFDM.

Krishna Sankar December 7, 2009 at 5:05 am
shafqat abbas November 28, 2009 at 8:53 pm

i need the matlab code of coherent detection multiple phase shift keying

Krishna Sankar December 7, 2009 at 4:43 am

@shafqat abbas: Hope the post on symbol error rate with 16psk helps
http://www.dsplog.com/2008/03/18/symbol-error-rate-for-16psk/

gokalp November 22, 2009 at 10:31 pm

hi..ı need QPSK modulatıon with gray mapping technique as a matlab code immediatelly.if you have please post ıt.thank u

Krishna Sankar December 6, 2009 at 4:31 pm

@gokalp: Sorry, I do not have posts on BER for QPSK with Gray mapping. But, it should be reasonably straightforward to scale down 16QAM BER with Gray mapping to the 4QAM case
http://www.dsplog.com/2008/06/05/16qam-bit-error-gray-mapping/

Good luck.

BusyWasp November 17, 2009 at 7:57 pm

Hi,
i wana matlab script for comparing bit error probabilities of the 64 QAM and 64 PSK schemes, plz?

Krishna Sankar December 6, 2009 at 3:39 pm

I have discussed the M-QAM case, which you can adapt to 64-QAM.

The post and code in 16-PSK is also discussing M-PSK case.
http://www.dsplog.com/2008/03/18/symbol-error-rate-for-16psk/

Good luck.

Iqtadar hussain November 11, 2009 at 7:16 pm

sir i need matlab script for hamming code (Bit error rate plot for hamming code)

Krishna Sankar November 13, 2009 at 5:35 am
sumit October 10, 2009 at 9:40 am

hello,
sorry i find that.

sumit October 10, 2009 at 9:00 am

hello,
where is matlab script for psk-16 with gray code? I found here only psk-16 without gray code. but i need that. can u post that?