e book dsplog error rates awgn
TRANSCRIPT
[dspLog] Signal Processing for Communication
[dspLog[dspLog ] ] Signal processing for Communication
Krishna Pillai
All Rights Reserved Krishna Pillai, [dspLog] Copyright : 20072008
[dspLog] Signal Processing for Communication
Change LogChange Log
Version Date Author Changes
1.00 28Sep2008 Krishna Pillai Initial Draft
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 2
[dspLog] Signal Processing for Communication
Table of ContentsTable of Contents1. Background................................................................................................................................................4
TARGET AUDIENCE..........................................................................................................................................4PROBABLE CONTENTS......................................................................................................................................4AUTHOR.......................................................................................................................................................4
2. Error Rates in AWGN...............................................................................................................................5BER FOR BPSK IN AWGN..........................................................................................................................5
Channel Model.......................................................................................................................................................5Computing the probability of error........................................................................................................................5Simulation model...................................................................................................................................................7
SYMBOL ERROR RATE FOR 4PAM..................................................................................................................8Channel Model.......................................................................................................................................................8Computing the symbol error rate...........................................................................................................................8Simulation Model.................................................................................................................................................10
SYMBOL ERROR RATE FOR QPSK (4QAM).................................................................................................11Noise model.........................................................................................................................................................12Computing the probability of error......................................................................................................................12Simulation Model.................................................................................................................................................13
SYMBOL ERROR RATE FOR 16QAM MODULATION...........................................................................................14Noise model.........................................................................................................................................................15Computing the probability of error......................................................................................................................15Simulation model.................................................................................................................................................17
SYMBOL ERROR RATE FOR 16PSK MODULATION............................................................................................18Deriving the symbol error rate.............................................................................................................................19Simulation model.................................................................................................................................................21
16QAM BIT ERROR RATE (BER) WITH GRAY MAPPING.................................................................................22Gray coded bit mapping in 16QAM modulation................................................................................................22Symbol Error and Bit Error probability..............................................................................................................23Bit energy and symbol energy.............................................................................................................................2316QAM BER........................................................................................................................................................24Simulation model.................................................................................................................................................24
BPSK BER WITH OFDM MODULATION.......................................................................................................25OFDM modulation...............................................................................................................................................25Cyclic prefix.........................................................................................................................................................26Frequency spread.................................................................................................................................................26Relation between Eb/No and Es/No in OFDM....................................................................................................26Simulation model.................................................................................................................................................26
3. References.................................................................................................................................................28
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 3
[dspLog] Signal Processing for Communication
1. 1. BackgroundBackground 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 67 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…
AuthorKrishna 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 : 20072008 Krishna Pillai, [dspLog]
Page 4
[dspLog] Signal Processing for Communication
2. 2. Error Rates in AWGNError Rates in AWGNOver 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 eBook summarizes the
BER for BPSK in AWGNLet 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 transmitterreceiver
Channel ModelThe 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 errorUsing the derivation provided in Section 5.2.1 of [COMMPROAKIS] as reference.
The received signal, OR corresponding to transmitted bit 1 OR 0
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 5
[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 : 20072008 Krishna Pillai, [dspLog]
Page 6
[dspLog] Signal Processing for Communication
.
The total probability of bit error,
.
Assuming, and are equally probable i.e. , the bit error probability is,
.
Simulation modelOctave/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 : 20072008 Krishna Pillai, [dspLog]
Page 7
[dspLog] Signal Processing for Communication
Figure: Bit error curve for BPSK modulation theory, simulation
Symbol Error rate for 4PAMConsider that the alphabets used for a 4PAM is (Refer example 5
34 in [DIGCOMMBARRYLEEMESSERSCHMITT]).
The average energy of the constellation assuming all the alphabets are equally likely is,
.
The constellation plot for a 4PAM signal after normalization can be as shown below.
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 8
[dspLog] Signal Processing for Communication
Figure: Constellation plot for 4 PAM modulation
Channel ModelNow 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 rateUsing the derivation provided in Section 5.2.1 of [COMMPROAKIS] 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 : 20072008 Krishna Pillai, [dspLog]
Page 9
[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 : 20072008 Krishna Pillai, [dspLog]
Page 10
[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 ModelThe Matlab/Octave script for generating a 4PAM 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 4PAM modulation
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 11
[dspLog] Signal Processing for Communication
Symbol Error Rate for QPSK (4QAM)Given that we have discussed symbol error rate probability for a 4PAM modulation, let us know focus on finding the symbol error probability for a QPSK (4QAM) modulation scheme.
Background
Consider that the alphabets used for a QPSK (4QAM) is (Refer example 5
35 in [DIGCOMMBARRYLEEMESSERSCHMITT]).
Figure: Constellation plot for QPSK (4QAM) 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 modelAssuming that the additive noise follows the Gaussian probability distribution function,
with and .
Computing the probability of errorConsider the symbol
The conditional probability distribution function (PDF) of given was transmitted is:
.
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 12
[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 : 20072008 Krishna Pillai, [dspLog]
Page 13
[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 ModelSimple 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 : 20072008 Krishna Pillai, [dspLog]
Page 14
[dspLog] Signal Processing for Communication
Observations
1. Can see good agreement between the simulated and theoretical plots for 4QAM modulation
2. When compared with 4PAM modulation, the 4QAM modulation requires only around 2dB lower
for achieving a symbol error rate of .
Symbol Error Rate for 16QAM modulationGiven that we have went over the symbol error probability for 4PAM and symbol error rate for 4QAM , let us extend the understanding to find the symbol error probability for 16QAM (16 Quadrature
Amplitude Modulation). Consider a typical 16QAM modulation scheme where the alphabets (Refer example 537 in [DIGCOMMBARRYLEEMESSERSCHMITT] ).
are used.
The average energy of the 16QAM constellation is (here). The 16QAM constellation is as shown in the figure below
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 15
[dspLog] Signal Processing for Communication
Figure: 16QAM constellation
Noise modelAssuming that the additive noise follows the Gaussian probability distribution function,
with and .
Computing the probability of errorConsider the symbol in the inside, for example
The conditional probability distribution function (PDF) of given was transmitted is:
.
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 16
[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 4PAM 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 4QAM 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 : 20072008 Krishna Pillai, [dspLog]
Page 17
[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 modelSimple 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 : 20072008 Krishna Pillai, [dspLog]
Page 18
[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 16PSK modulationConsider a general MPSK modulation, where the alphabets,
are used.
(Refer example 538 in [DIGCOMMBARRYLEEMESSERSCHMITT] )
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 19
[dspLog] Signal Processing for Communication
Figure: 16PSK constellation plot
Deriving the symbol error rateLet 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 is:
.
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 : 20072008 Krishna Pillai, [dspLog]
Page 20
[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 : 20072008 Krishna Pillai, [dspLog]
Page 21
[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 MPSK modulation is,
.
Simulation modelSimple Matlab/Octave script for simulating transmission and reception of an MPSK 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 : 20072008 Krishna Pillai, [dspLog]
Page 22
[dspLog] Signal Processing for Communication
Figure: Symbol Error rate curve for 16PSK modulation
16QAM Bit Error Rate (BER) with Gray mappingLet 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 16QAM modulationAs 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 4PAM modulation on Iaxis and Qaxis 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 16QAM
All Rights Reserved Copyright : 20072008 Krishna Pillai, [dspLog]
Page 23
[dspLog] Signal Processing for Communication
Figure: 16QAM constellation plot with Gray coded mapping
Symbol Error and Bit Error probabilityAs 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 energyAs 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 : 20072008 Krishna Pillai, [dspLog]
Page 24
[dspLog] Signal Processing for Communication
.
16QAM BERFrom 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 modelThe Matlab/Octave script performs the following:
(a) Generation of random binary sequence
(b) Assigning group of 4 bits to each 16QAM constellation symbol per the Gray mapping
(c) Addition of white Gaussian Noise
(d) Demodulation of 16QAM symbols and
(e) Demapping 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 : 20072008 Krishna Pillai, [dspLog]
Page 25
[dspLog] Signal Processing for Communication
Figure: Bit Error Rate plot for 16QAM modulation with Gray mapping
BPSK BER with OFDM modulationIn 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 modulationLet 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 : 20072008 Krishna Pillai, [dspLog]
Page 26
[dspLog] Signal Processing for Communication
above mentioned parameters.
Cyclic prefixIn 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 spreadIn 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 OFDMCombining the above two aspects, the relation between symbol energy and the bit energy is as follows:
.
Expressing in decibels,
.
Simulation modelThe 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 : 20072008 Krishna Pillai, [dspLog]
Page 27
[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 : 20072008 Krishna Pillai, [dspLog]
Page 28
[dspLog] Signal Processing for Communication
3. 3. ReferencesReferences[DIGITAL COMMUNICATION: PROAKIS] Digital Communications by John Proakis
[DIGCOMMBARRYLEEMESSERSCHMITT]
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 : 20072008 Krishna Pillai, [dspLog]
Page 29