You are on page 1of 29

[dspLog] Signal Processing for Communication

 
[dspLog   

Signal processing for Communication

Krishna Pillai

All Rights Reserved Krishna Pillai, [dspLog] Copyright :  2007­2008 


[dspLog] Signal Processing for Communication

Change Log

Version Date Author Changes


1.00 28­Sep­2008 Krishna Pillai Initial Draft

All Rights Reserved Copyright :  2007­2008  Page 2


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Table of Contents
1. Background................................................................................................................................................4
TARGET AUDIENCE..........................................................................................................................................4
PROBABLE CONTENTS......................................................................................................................................4
AUTHOR.......................................................................................................................................................4
2. Error Rates in AWGN...............................................................................................................................5
BER FOR BPSK IN AWGN..........................................................................................................................5
Channel Model.......................................................................................................................................................5
Computing the probability of error........................................................................................................................5
Simulation model...................................................................................................................................................7
SYMBOL ERROR RATE FOR 4­PAM..................................................................................................................8
Channel Model.......................................................................................................................................................8
Computing the symbol error rate...........................................................................................................................8
Simulation Model.................................................................................................................................................10
SYMBOL ERROR RATE FOR QPSK (4­QAM).................................................................................................11
Noise model.........................................................................................................................................................12
Computing the probability of error......................................................................................................................12
Simulation Model.................................................................................................................................................13
SYMBOL ERROR RATE FOR 16QAM MODULATION...........................................................................................14
Noise model.........................................................................................................................................................15
Computing the probability of error......................................................................................................................15
Simulation model.................................................................................................................................................17
SYMBOL ERROR RATE FOR 16­PSK MODULATION............................................................................................18
Deriving the symbol error rate.............................................................................................................................19
Simulation model.................................................................................................................................................21
16QAM BIT ERROR RATE (BER) WITH GRAY MAPPING.................................................................................22
Gray coded bit mapping in 16­QAM modulation................................................................................................22
Symbol Error and Bit Error probability..............................................................................................................23
Bit energy and symbol energy.............................................................................................................................23
16QAM BER........................................................................................................................................................24
Simulation model.................................................................................................................................................24
BPSK BER WITH OFDM MODULATION.......................................................................................................25
OFDM modulation...............................................................................................................................................25
Cyclic prefix.........................................................................................................................................................26
Frequency spread.................................................................................................................................................26
Relation between Eb/No and Es/No in OFDM....................................................................................................26
Simulation model.................................................................................................................................................26
3. References.................................................................................................................................................28

All Rights Reserved Copyright :  2007­2008  Page 3


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

1.  Background 
The  blog  [dspLog]  started some in February 2007 on the Blogger platform and was 
hosted at http://dsplog.blogspot.com with the following objective:
Explain and discuss the basic text book concepts in digital signal processing  
and digital communication using simple Octave scripts.

Seeing consistent increase in traffic over the 6­7 months from inception, it was decided 
to move to an independent platform hosted at www.dsplog.com.

Target audience
● Students taking courses in digital signal processing/digital communication and requiring help to 
understand some of the concepts.
● Practicing engineers who are fresh to the domain of digital signal processing and requiring help.
● Experienced  engineers  can  share  tips  and  tricks  associated  with  the digital  signal  processing 
trade.  

Probable contents
● Understanding basic concepts pertaining to FIR/IIR filtering
● Sample rate conversion
● Bit and Symbol error probabilities for typical digital communication
● Orthogonal Frequency Division Multiplexing
● more… 

Author
Krishna Pillai is a Signal Processing Engineer at an Indian firm based out of Bangalore, India. His typical 
activities on a working day involve identifying and modeling digital signal processing algorithms for 
wireless receivers.

All Rights Reserved Copyright :  2007­2008  Page 4


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

2. Error Rates in AWGN
Over   a   one  year   period,   error   rates   for   most   of   the   modulation   schemes   like 
BPSK, QPSK, PAM, QAM are in Additive White Gaussian Noise (AWGN) environment 
have been discussed in the [dspLog]. This e­Book summarizes the

BER for BPSK in AWGN
Let us derive the equation for bit error probability wit BPSK modulation scheme. With 
Binary Phase Shift Keying (BPSK), the binary digits 1 and 0 maybe represented by the 
analog levels   and  respectively.

Figure: Simplified block diagram with BPSK transmitter­receiver

Channel Model
The transmitted waveform gets corrupted by noise  , typically referred to as Additive   White Gaussian 
Noise (AWGN).
Additive : As the noise gets 'added' (and not multiplied) to the received signal
White : The spectrum of the noise if flat for all frequencies.
Gaussian  :   The   values   of   the   noise     follows   the   Gaussian   probability   distribution   function, 

 with   and  .

Computing the probability of error
Using the derivation provided in Section 5.2.1 of [COMM­PROAKIS] as reference.  
The received signal,   OR   corresponding to transmitted bit 1 OR 0 

All Rights Reserved Copyright :  2007­2008  Page 5


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

respectively.
The conditional probability distribution function (PDF) of  for the two cases are:

 .

Figure: Conditional probability density function with BPSK modulation
For decoding, a decision rule with threshold as 0 might be optimal i.e.
for received signal   and   .
With this threshold, the probability of error given   is transmitted is (the area in blue region):

, where

the complementary error function,  .

Similarly, the probability of error given   is transmitted is (the area in green region):

All Rights Reserved Copyright :  2007­2008  Page 6


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

The total probability of bit error,

Assuming,     and     are   equally   probable   i.e.   ,   the  bit   error 


probability is,

Simulation model
Octave/Matlab source code for computing the bit error probability with BPSK modulation from theory 
and simulation. The code performs the following:
(a) Generation of random BPSK modulated symbols +1's and ­1's
(b) Passing them through Additive White Gaussian Noise channel
(c) Demodulation of the received symbol based on the location in the constellation
(d) Counting the number of errors
(e) Repeating the same for multiple Eb/No value.
Click here to download the Matlab/Octave script for simulating BPSK bit error rate.

All Rights Reserved Copyright :  2007­2008  Page 7


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Bit error curve for BPSK modulation ­ theory, simulation

Symbol Error rate for 4­PAM
Consider that the alphabets used for a 4­PAM is   (Refer example 5­
34 in [DIG­COMM­BARRY­LEE­MESSERSCHMITT] ).
The average energy of the constellation assuming all the alphabets are equally likely is,

The constellation plot for a 4­PAM signal after normalization can be as shown below.

All Rights Reserved Copyright :  2007­2008  Page 8


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Constellation plot for 4 PAM modulation

Channel Model
Now comes the interesting task ­ analysis of symbol error probability for the modulation scheme 
in additive white Gaussian noise condition. The noise     follows the Gaussian probability distribution 

function,   with   and  .

Computing the symbol error rate
Using the derivation provided in Section 5.2.1 of [COMM­PROAKIS] as reference:
The received signal can be
 or   or   or  .
Let us first consider the case   was transmitted. 
The conditional probability distribution function (PDF) of  given   was transmitted is :

Figure: Probability distribution function when the alphabet +3 is sent
Using midway point between +1 and +3 as the detection threshold, i.e. for received 
signal

  .

With this threshold, the probability of error given   is transmitted is (the area in blue region):

All Rights Reserved Copyright :  2007­2008  Page 9


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Note: The complementary error function,  .

Given that the constellation of +3 and ­3 is symmetric, it is reasonably intuitive that the probability of 
error given   is transmitted is also,

Case where   is transmitted
The conditional probability distribution function (PDF) of  given   was transmitted is :

Figure: Probability distribution function when the alphabet +1 is sent
The probability of error given   is transmitted is (the area in green and red region):

Given that the constellation for +1 and ­1 is symmetric, it is reasonably intuitive that the probability of 
error given   is transmitted is also,

All Rights Reserved Copyright :  2007­2008  Page 10


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Total probability of symbol error
Given that all the alphabets are equally likely, the total probability of symbol error is,
.

Assuming,   and    ,  are equally probable i.e.  , 


the symbol error probability is,

Simulation Model
The Matlab/Octave script for generating a 4­PAM transmission, pass it through additive white Gaussian 
noise and demodulation at the receiver will be useful for understanding the concept further. The symbol 
error rate plots obtained from simulations compare well with the theoretical derivations.
Click here to download: Matlab/Octave script for simulating 4PAM symbol error rate

Figure: Symbol Error Rate for 4­PAM modulation

All Rights Reserved Copyright :  2007­2008  Page 11


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Symbol Error Rate for QPSK (4­QAM)
Given that we have discussed symbol error rate probability for a 4­PAM modulation, let us know focus on 
finding the symbol error probability for a QPSK (4­QAM) modulation scheme.
Background

Consider that the alphabets used for a QPSK (4­QAM) is   (Refer example 5­
35 in [DIG­COMM­BARRY­LEE­MESSERSCHMITT] ).

Figure: Constellation plot for QPSK (4­QAM) constellation

The scaling factor of   is for normalizing the average energy of the transmitted symbols to 1, 
assuming that all the constellation points are equally likely.

Noise model
Assuming that the additive noise   follows the Gaussian probability distribution function,

 with   and  .

Computing the probability of error
Consider the symbol 
The conditional probability distribution function (PDF) of  given   was transmitted is:

All Rights Reserved Copyright :  2007­2008  Page 12


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Probability density function for QPSK (4QAM) modulation
As can be seen from the above figure, the symbol   is decoded correctly only if  falls in the area in the 
hashed region i.e.
.
Probability of real component of   greater than 0, given   was transmitted is (i.e. area outside the red 
region)

, where

the complementary error function,  .

Similarly, probability of imaginary component of   greater than 0, given   was transmitted is (i.e. area 


outside the blue region).

The probability of   being decoded correctly is,

All Rights Reserved Copyright :  2007­2008  Page 13


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Total symbol error probability
The symbol will be in error, it atleast one of the symbol is decoded incorrectly. The probability of symbol 
error is,

For higher values of  , the second term in the equation becomes negligible and the probability of error 
can be approximated as,

Simulation Model
Simple   Matlab/Octave   script   for   generating   QPSK   transmission,   adding   white   Gaussian   noise   and 
decoding  the received symbol for various   values.

Click here to download: Matlab/Octave script for computing the symbol error rate for QPSK modulation

Figure: Symbol Error Rate for QPSK (4QAM) modulation

All Rights Reserved Copyright :  2007­2008  Page 14


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Observations
1. Can see good agreement between the simulated and theoretical plots for 4­QAM modulation

2. When compared with 4­PAM modulation, the 4­QAM modulation requires only around 2dB lower   
for achieving a symbol error rate of  .

Symbol Error Rate for 16QAM modulation
Given that we have went over the symbol error probability for 4­PAM and symbol error rate for 4­QAM , 
let   us   extend   the   understanding   to   find   the   symbol   error   probability   for   16­QAM   (16   Quadrature 
Amplitude  Modulation).   Consider   a   typical   16­QAM   modulation   scheme   where   the   alphabets   (Refer 
example 5­37 in  [DIG­COMM­BARRY­LEE­MESSERSCHMITT] ).

 are used.

The average energy of the 16­QAM constellation is   (here). The 16­QAM 
constellation is as shown in the figure below

All Rights Reserved Copyright :  2007­2008  Page 15


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: 16­QAM constellation

Noise model
Assuming that the additive noise   follows the Gaussian probability distribution function,

 with   and  .

Computing the probability of error
Consider the symbol in the inside, for example 
The conditional probability distribution function (PDF) of  given   was transmitted is:

All Rights Reserved Copyright :  2007­2008  Page 16


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

As can be seen from the above figure, the symbol   is decoded correctly only if  falls in the area in the 


black hashed region i.e.

Using the equations from (symbol error probability of 4­PAM as reference)

The probability of   being decoded incorrectly is,

Consider the symbol in the corner, for example 
The conditional probability distribution function (PDF) of  given   was transmitted is:

As can be seen from the above figure, the symbol   is decoded correctly only if  falls in the area in the 


red hashed region i.e.

Using the equations from (symbol error probability of 4­QAM as reference)

The probability of   being decoded incorrectly is,

Consider the symbol which is not in the corner OR not in the inside, for example 
The conditional probability distribution function (PDF) of  given   was transmitted is:

All Rights Reserved Copyright :  2007­2008  Page 17


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

As can be seen from the above figure, the symbol   is decoded correctly only if  falls in the area in 


the blue hashed region i.e.

Using the above two cases are reference,

The probability of   being decoded incorrectly is,

Total probability of symbol error
Assuming that all the symbols are equally likely (4 in the middle, 4 in the corner and the rest 8), the total 
probability of symbol error is,

Simulation model
Simple Matlab/Octave code for generating 16QAM constellation, transmission through AWGN channel 
and computing the simulated symbol error rate.
Click here to download : Matlab/Octave script for simulating 16QAM symbol error rate

All Rights Reserved Copyright :  2007­2008  Page 18


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Symbol Error Rate curve for 16QAM modulation
Observations

Can observe that for low   values, the theoretical results seem to be 'pessimistic' 'optimistic' 
compared to the simulated results. This is because for the approximated theoretical equation, the 
 term was ignored. However, this approximation is valid only when the   term is 
small, which need not be necessarily true for low   values.

Symbol Error Rate for 16­PSK modulation
Consider a general M­PSK modulation, where the alphabets,

 are used.

(Refer example 5­38 in [DIG­COMM­BARRY­LEE­MESSERSCHMITT] )

All Rights Reserved Copyright :  2007­2008  Page 19


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: 16­PSK constellation plot 

Deriving the symbol error rate
Let us the consider the symbol on the real axis, i.e
 .

The received symbol  .
Where the additive noise   follows the Gaussian probability distribution function,

 with   and  .

The conditional probability distribution function (PDF) of received symbol   given   was transmitted i


s:

.
As can be seen from the figure above, due to the addition of noise, the transmitted symbol gets spreaded. 
However, if the received symbol is present with in the boundary defined by the magenta lines, then the 
symbol will be demodulated correctly.
To derive the symbol error rate, the objective is to find the probability that the phase of the received 
symbol lies within this boundary defined by the magenta lines i.e. from   to  .

All Rights Reserved Copyright :  2007­2008  Page 20


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

For simplifying the derivation, let us make the following assumptions:

(a) The signal to noise ratio,   is reasonably high.

For a reasonably high value of  , then the real part of the received symbol is not afected by noise i.e.,

 and
the imaginary part of the received symbol is equal to noise, i.e.
.
(b) The value of M is reasonably high (typically M >4 suffice)
For a reasonably high value of M, the constellation points are closely spaced. Given so, the distance of the 
constellation point   to the magenta line can be approximated as  .

Figure: Distance between constellation points
Given the above two assumptions, it can be observed that the symbol   will be decoded incorrectly, if 
the  imaginary component  of received  symbol     isgreater than   . The  probability of    

being  greater than   is,

All Rights Reserved Copyright :  2007­2008  Page 21


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Changing the variable to  ,

Note: The complementary error function,  .

Similarly, the symbol   will be decoded incorrectly, if the imaginary component of received symbol   
is less than  . The probability of   being less than   is,

The total probability of error given   was transmitted is,

Total symbol error rate
The symbol will be in error, if atleast one of the symbol gets decoded incorrectly. Hence the total symbol 
error rate from M­PSK modulation is,

Simulation model
Simple   Matlab/Octave   script   for   simulating   transmission   and   reception   of   an   M­PSK   modulation   is 
attached.  It  can  be   observed  that   the  simulated   symbol  error  rate  compares   well  with  the  theoretical 
symbol error rate.
Click   here   to   download:  Matlab/Octave   script   for   simulating   symbol   error   rate   curve   for   16   PSK 
modulation

All Rights Reserved Copyright :  2007­2008  Page 22


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Symbol Error rate curve for 16PSK modulation

16QAM Bit Error Rate (BER) with Gray mapping
Let us derive the theoretical 16QAM bit error rate (BER) with Gray coded constellation mapping in 
additive white Gaussian noise conditions. Further, the Matlab/Octave simulation script can be used to 
confirm that the simulation is in good agreement with theory.

Gray coded bit mapping in 16­QAM modulation
As we discussed in the previous post on Binary to Gray code for 16QAM, the 4 bits in each constellation 
point can be considered as two bits each on independent 4­PAM modulation on I­axis and Q­axis 
respectively.

b0b1 I b2b3 Q
00 ­3 00 ­3
01 ­1 01 ­1
11 +1 11 +1
10 +3 10 +3
Table: Gray coded constellation mapping for 16­QAM

All Rights Reserved Copyright :  2007­2008  Page 23


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: 16QAM constellation plot with Gray coded mapping

Symbol Error and Bit Error probability
As can be seen from the above constellation diagram, with Gray coded bit mapping, adjacent constellation 
symbols differ by only one bit. So, if the noise causes the constellation to cross the decision threshold, 
only  1 out of  bits will be in error. So the relation between bit error and symbol error is,

Note:

For   very   low   value   of   ,   it   may   so   happen   that   the   noise   causes   the   constellation   to   fall   near   a 
diagonally  located constellation point. In that case, the each symbol error will cause two bit errors. Hence 
the need for  approximate  operator in the above equation. However, for reasonably high value of   , the 
chances of  such events are negligible.

Bit energy and symbol energy
As we learned from the post discussing Bit error rate for 16PSK, since each symbol consists of  
bits, the symbol to noise ratio k times the bit to noise ratio i.e,

 where,

All Rights Reserved Copyright :  2007­2008  Page 24


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

16QAM BER
From the post detailing the derivation of 16QAM Symbol error rate, we know that the symbol error is,

Combining the above two equations, the bit error rate for Gray coded 16QAM in Additive White 
Gaussian Noise is

Simulation model
The Matlab/Octave script performs the following:
(a) Generation of random binary sequence
(b) Assigning group of 4 bits to each 16­QAM constellation symbol per the Gray mapping
(c) Addition of white Gaussian Noise
(d) Demodulation of 16­QAM 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.
Click here to download : Script for computing 16QAM BER with Gray mapping

All Rights Reserved Copyright :  2007­2008  Page 25


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

Figure: Bit Error Rate plot for 16QAM modulation with Gray mapping

BPSK BER with OFDM modulation
In this post, we will discuss a simple OFDM transmitter and receiver, find the relation between Eb/No (Bit 
to Noise ratio) and Es/No (Signal to Noise ratio) and compute the bit error rate with BPSK.

OFDM modulation
Let us use the OFDM system loosely based on IEEE 802.11a specifications.

Parameter Value
FFT size. nFFT 64
Number of used subcarriers. nDSC 52
FFT Sampling frequency 20MHz
Subcarrier spacing 312.5kHz
Used subcarrier index {­26 to ­1, +1 to +26}
Cylcic prefix duration, Tcp 0.8us
Data symbol duration, Td 3.2us
Total Symbol duration, Ts 4us
You may refer to post Understanding an OFDM Transmission for getting a better understanding of the 

All Rights Reserved Copyright :  2007­2008  Page 26


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

above mentioned parameters.

Cyclic prefix
In   an   OFDM   transmission,   we   know   that   the   transmission   of   cyclic   prefix   does   not   carry   'extra' 
information  in Additive White Gaussian Noise channel. The signal energy is spread over time    
whereas the  bit energy is spread over the time   i.e.

Simplifying,

Frequency spread
In OFDM transmission, all the available subcarriers from the DFT is not used for data transmission. 
Typically some subcarriers at the edge are left unused to ensure spectrum roll off. For the example 
scenario, out of the available bandwidth from ­10MHz to +10MHz, only subcarriers from ­8.1250MHz 
(­26/64*20MHz) to +8.1250MHz (+26/64*20MHz) are used.
This means that the signal energy is spread over a bandwidth of 16.250MHz, whereas noise is spread over 
bandwidth of 20MHz (­10MHz to +10MHz), i.e.

Simplifying,

Relation between Eb/No and Es/No in OFDM
Combining the above two aspects, the relation between symbol energy and the bit energy is as follows:

Expressing in decibels,

Simulation model
The attached Matlab/Octave simulation script performs the following:
(a) Generation of random binary sequence
(b) BPSK modulation i.e bit 0 represented as ­1 and bit 1 represented as +1

All Rights Reserved Copyright :  2007­2008  Page 27


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

(c) Assigning to multiple OFDM symbols where data subcarriers from ­26 to ­1 and +1 to +26 are used, 
adding cyclic prefix, concatenation of multiple symbols to form a long transmit sequence
(d) Adding White Gaussian Noise
(e) Grouping the received vector into multiple symbols, removing cyclic prefix, taking the desired 
subcarriers
(f) Demodulation and conversion to bits
(g) Counting the number of bit errors
Click here to download: Script for BER computation of BPSK using OFDM

Figure: Bit Error Rate plot for BPSK using OFDM modulation
Can observe that the simulated bit error rate is in good agreement with the theoretical bit error rate for 
BPSK modulation i.e.

All Rights Reserved Copyright :  2007­2008  Page 28


Krishna Pillai, [dspLog]
[dspLog] Signal Processing for Communication

3. References
[DIGITAL COMMUNICATION: PROAKIS] Digital Communications by John Proakis

[DIG­COMM­BARRY­LEE­MESSERSCHMITT]  
 
Digital Communication:
  by John R. Barry, Edward A. Lee, David G. Messerschmitt
   

[COMMUNICATION SYSTEMS: PROAKIS, SALEHI]  
Fundamentals of Communication Systems, by John G. Proakis, Masoud Salehi

All Rights Reserved Copyright :  2007­2008  Page 29


Krishna Pillai, [dspLog]

You might also like