π/2 BPSK (pi/2 BPSK): 5G NR PHY modulation

The 5G New Radio (NR) supports quadrature phase shift keying (QPSK), 16- quadrature amplitude modulation (16-QAM), 64 QAM and 256 QAM modulation schemes for both uplink and downlink [1][2]. This is same as in LTE.

Additionally, 5G NR supports π/2-BPSK in uplink (to be combined with OFDM with CP or DFT-s OFDM with CP)[1][2]. Utilization of π/2-BPSK in the uplink is aimed at providing further reduction of peak-to-average power ratio (PAPR) and boosting RF amplifier power efficiency at lower data-rates.

π/2 BPSK

π/2 BPSK uses two sets of BPSK constellations that are shifted by 90°. The constellation sets are selected depending on the position of the bits in the input sequence. Figure (1) depicts the two constellation sets for π/2 BPSK that are defined as per equation (1)

\[d[i] = \frac{e^{j \frac{\pi}{2} \left( i \; mod \; 2\right) }}{ \sqrt{2}} \left[ \left(1 – 2b[i] \right) + j \left(1 – 2b[i] \right)\right] \quad \quad (1) \]

b[i] = input bits; i = position or index of input bits; d[i] = mapped bits (constellation points)

Ideal pi by 2 BPSK constellation as per 3GPP TS 38.211 5G specification odd even bits
Figure 1: Two rotated constellation sets for use in π/2 BPSK

Equation (2) is for conventional BPSK – given for comparison. Figure (2) and Figure (3) depicts the ideal constellations and waveforms for BPSK and π/2 BPSK, when a long sequence of random input bits are input to the BPSK and π/2 BPSK modulators respectively. From the waveform, you may note that π/2 BPSK has more phase transitions than BPSK. Therefore π/2 BPSK also helps in better synchronization, especially for cases with long runs of 1s and 0s in the input sequence.

\[d[i] = \frac{1}{ \sqrt{2}} \left[ \left(1 – 2b[i] \right) + j \left(1 – 2b[i] \right)\right] \quad \quad (2)\]
Figure 2: Ideal BPSK and π/2 BPSK constellations
Figure 3: Waveforms of BPSK and π/2 BPSK for same sequence of input bits

Figure 4, illustrates the constellations for BPSK and π/2 BPSK when the sequence of mapped bits are corrupted by noise.

Figure 4: BPSK and π/2 BPSK constellation for Eb/N0=50dB

Note: Though the π/2 BPSK constellation looks like a QPSK constellation, they are not the same. Give it a thought !!!

References

[1] 3GPP TS 38.201: Physical layer; General description (Release 16)
[2] 3GPP TS 38.211: Physical channels and modulation (Release 16)
[3] Gustav Gerald Vos, ‘Two-tone in-phase pi/2 binary phase-shift keying communication’, US patent number 10,931,492

Rician flat-fading channel – simulation

In wireless environments, transmitted signal may be subjected to multiple scatterings before arriving at the receiver. This gives rise to random fluctuations in the received signal and this phenomenon is called fading. The scattered version of the signal is designated as non line of sight (NLOS) component. If the number of NLOS components are sufficiently large, the fading process is approximated as the sum of large number of complex Gaussian process whose probability-density-function follows Rayleigh distribution.

Rayleigh distribution is well suited for the absence of a dominant line of sight (LOS) path between the transmitter and the receiver. If a line of sight path do exist, the envelope distribution is no longer Rayleigh, but Rician (or Ricean). If there exists a dominant LOS component, the fading process can be represented as the sum of complex exponential and a narrowband complex Gaussian process g(t). If the LOS component arrive at the receiver at an angle of arrival (AoA) θ, phase ɸ and with the maximum Doppler frequency fD, the fading process in baseband can be represented as (refer [1])

\[h(t)= \underbrace{\sqrt{\frac{K \Omega}{K +1}}}_\text{A:=} e^{\left( j2 \pi f_D cos(\theta)t+\phi \right)} + \underbrace{\sqrt{\frac{\Omega}{K+1}}}_\text{S:=}g(t)\]

where, K represents the Rician K factor given as the ratio of power of the LOS component A2 to the power of the scattered components (S2) marked in the equation above.

\[K=\frac{A^2}{S^2}\]

The received signal power Ω is the sum of power in LOS component and the power in scattered components, given as Ω=A2+S2. The above mentioned fading process is called Rician fading process. The best and worst-case Rician fading channels are associated with K=∞ and K=0 respectively. A Ricean fading channel with K=∞ is a Gaussian channel with a strong LOS path. Ricean channel with K=0 represents a Rayleigh channel with no LOS path.

The statistical model for generating flat-fading Rician samples is discussed in detail in chapter 11 section 11.3.1 in the book Wireless communication systems in Matlab (see the related article here). With respect to the simulation model shown in Figure 1(b), given a K factor, the samples for the Rician flat-fading samples are drawn from the following random variable

\[h= | X + jY |\]

where X,Y ~ N(μ,σ2) are Gaussian random variables with non-zero mean μ and standard deviation σ as given in references [2] and [3].

\[\mu = g_1 =\sqrt{\frac{K}{2\left(K+1\right)}} \quad \quad \sigma = g_2 = \sqrt{\frac{1}{2\left(K+1\right)}}\]

Kindly refer the book Wireless communication systems in Matlab for the script on generating channel samples for Ricean flat-fading.

Figure 1: Simulation model for modulation and detection over flat fading channel

Simulation and performance results

In chapter 5 of the book Wireless communication systems in Matlab, the code implementation for complex baseband models for various digital modulators and demodulator are given. The computation and generation of AWGN noise is also given in the book. Using these models, we can create a unified simulation for code for simulating the performance of various modulation techniques over Rician flat-fading channel the simulation model shown in Figure 1(b).

An unified approach is employed to simulate the performance of any of the given modulation technique – MPSK, MQAM or MPAM. The simulation code (given in the book) will automatically choose the selected modulation type, performs Monte Carlo simulation, computes symbol error rates and plots them against the theoretical symbol error rate curves. The simulated performance results obtained for various modulations are shown in the Figure 2.

Figure 2: Performance of various modulations over Ricean flat fading channel

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

References

[1] C. Tepedelenlioglu, A. Abdi, and G. B. Giannakis, The Ricean K factor: Estimation and performance analysis, IEEE Trans. Wireless Communication ,vol. 2, no. 4, pp. 799–810, Jul. 2003.↗
[2] R. F. Lopes, I. Glover, M. P. Sousa, W. T. A. Lopes, and M. S. de Alencar, A simulation framework for spectrum sensing, 13th International Symposium on Wireless Personal Multimedia Communications (WPMC 2010), Out. 2010.
[3] M. C. Jeruchim, P. Balaban, and K. S. Shanmugan, Simulation of Communication Systems, Methodology, Modeling, and Techniques, second edition Kluwer Academic Publishers, 2000.↗

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

BPSK bit error rate simulation in Python & Matlab

Key focus: Simulate bit error rate performance of Binary Phase Shift Keying (BPSK) modulation over AWGN channel using complex baseband equivalent model in Python & Matlab.

Why complex baseband equivalent model

The passband model and equivalent baseband model are fundamental models for simulating a communication system. In the passband model, also called as waveform simulation model, the transmitted signal, channel noise and the received signal are all represented by samples of waveforms. Since every detail of the RF carrier gets simulated, it consumes more memory and time.

In the case of discrete-time equivalent baseband model, only the value of a symbol at the symbol-sampling time instant is considered. Therefore, it consumes less memory and yields results in a very short span of time when compared to the passband models. Such models operate near zero frequency, suppressing the RF carrier and hence the number of samples required for simulation is greatly reduced. They are more suitable for performance analysis simulations. If the behavior of the system is well understood, the model can be simplified further.

Passband model and converting it to equivalent complex baseband model is discussed in this article.

Simulation of bit error rate performance of BPSK using passband simulation model is discussed in this article.

Figure 1: BPSK constellation

BPSK constellation

In binary phase shift keying, all the information gets encoded in the phase of the carrier signal. The BPSK modulator accepts a series of information symbols drawn from the set m {0,1}, modulates them and transmits the modulated symbols over a channel.

The general expression for generating a M-PSK signal set is given by

Here, M denotes the modulation order and it defines the number of constellation points in the reference constellation. The value of M depends on the parameter k – the number of bits we wish to squeeze in a single M-PSK symbol. For example if we wish to squeeze in 3 bits (k=3) in one transmit symbol, then M = 2k = 23 = 8 and this results in 8-PSK configuration. M=2 gives BPSK (Binary Phase Shift Keying) configuration. The parameter A is the amplitude scaling factor, fc is the carrier frequency and g(t) is the pulse shape that satisfies orthonormal properties of basis functions.

Using trigonometric identity, equation (1) can be separated into cosine and sine basis functions as follows

Therefore, the signaling set {si,sq} or the constellation points for M-PSK modulation is given by,

For BPSK (M=2), the constellation points on the I-Q plane (Figure 1) are given by

Simulation methodology

Note: If you are interested in knowing more about BPSK modulation and demodulation, kindly visit this article.

In this simulation methodology, there is no need to simulate each and every sample of the BPSK waveform as per equation (1). Only the value of a symbol at the symbol-sampling time instant is considered. The steps for simulation of performance of BPSK over AWGN channel is as follows (Figure 2)

  1. Generate a sequence of random bits of ones and zeros of certain length (Nsym typically set in the order of 10000)
  2. Using the constellation points, map the bits to modulated symbols (For example, bit ‘0’ is mapped to amplitude value A, and bit ‘1’ is mapped to amplitude value -A)
  3. Compute the total power in the sequence of modulated symbols and add noise for the given EbN0 (SNR) value (read this article on how to do this). The noise added symbols are the received symbols at the receiver.
  4. Use thresholding technique, to detect the bits in the receiver. Based on the constellation diagram above, the detector at the receiver has to decide whether the receiver bit is above or below the threshold 0.
  5. Compare the detected bits against the transmitted bits and compute the bit error rate (BER).
  6. Plot the simulated BER against the SNR values and compare it with the theoretical BER curve for BPSK over AWGN (expressions for theoretical BER is available in this article)
Figure 2: Simulation methodology for performance of BPSK modulation over AWGN channel

Let’s simulate the performance of BPSK over AWGN channel in Python & Matlab.

Simulation using Python

Following standalone code simulates the bit error rate performance of BPSK modulation over AWGN using Python version 3. The results are plotted in Figure 3.

For more such examples refer the book (available as PDF and paperback) Digital Modulations using Python

#Eb/N0 Vs BER for BPSK over AWGN (complex baseband model)
# © Author: Mathuranathan Viswanathan (gaussianwaves.com)
import numpy as np #for numerical computing
import matplotlib.pyplot as plt #for plotting functions
from scipy.special import erfc #erfc/Q function

#---------Input Fields------------------------
nSym = 10**5 # Number of symbols to transmit
EbN0dBs = np.arange(start=-4,stop = 13, step = 2) # Eb/N0 range in dB for simulation
BER_sim = np.zeros(len(EbN0dBs)) # simulated Bit error rates

M=2 #Number of points in BPSK constellation
m = np.arange(0,M) #all possible input symbols
A = 1; #amplitude
constellation = A*np.cos(m/M*2*np.pi)  #reference constellation for BPSK

#------------ Transmitter---------------
inputSyms = np.random.randint(low=0, high = M, size=nSym) #Random 1's and 0's as input to BPSK modulator
s = constellation[inputSyms] #modulated symbols

fig, ax1 = plt.subplots(nrows=1,ncols = 1)
ax1.plot(np.real(constellation),np.imag(constellation),'*')

#----------- Channel --------------
#Compute power in modulatedSyms and add AWGN noise for given SNRs
for j,EbN0dB in enumerate(EbN0dBs):
    gamma = 10**(EbN0dB/10) #SNRs to linear scale
    P=sum(abs(s)**2)/len(s) #Actual power in the vector
    N0=P/gamma # Find the noise spectral density
    n = np.sqrt(N0/2)*np.random.standard_normal(s.shape) # computed noise vector
    r = s + n # received signal
    
    #-------------- Receiver ------------
    detectedSyms = (r <= 0).astype(int) #thresolding at value 0
    BER_sim[j] = np.sum(detectedSyms != inputSyms)/nSym #calculate BER

BER_theory = 0.5*erfc(np.sqrt(10**(EbN0dBs/10)))

fig, ax = plt.subplots(nrows=1,ncols = 1)
ax.semilogy(EbN0dBs,BER_sim,color='r',marker='o',linestyle='',label='BPSK Sim')
ax.semilogy(EbN0dBs,BER_theory,marker='',linestyle='-',label='BPSK Theory')
ax.set_xlabel('$E_b/N_0(dB)$');ax.set_ylabel('BER ($P_b$)')
ax.set_title('Probability of Bit Error for BPSK over AWGN channel')
ax.set_xlim(-5,13);ax.grid(True);
ax.legend();plt.show()

Simulation using Matlab

Following code simulates the bit error rate performance of BPSK modulation over AWGN using basic installation of Matlab. You will need the add_awgn_noise function that was discussed in this article. The results will be same as Figure 3.

For more such examples refer the book (available as PDF and paperback) Digital Modulations using Matlab: build simulation models from scratch

%Eb/N0 Vs BER for BPSK over AWGN (complex baseband model)
% © Author: Mathuranathan Viswanathan (gaussianwaves.com)
clearvars; clc;
%---------Input Fields------------------------
nSym=10^6;%Number of symbols to transmit
EbN0dB = -4:2:14; % Eb/N0 range in dB for simulation

BER_sim = zeros(1,length(EbN0dB));%simulated Symbol error rates
    
M=2; %number of constellation points in BPSK
m = [0,1];%all possible input bits
A = 1; %amplitude
constellation = A*cos(m/M*2*pi);%constellation points

d=floor(M.*rand(1,nSym));%uniform random symbols from 1:M
s=constellation(d+1);%BPSK modulated symbols
    
for i=1:length(EbN0dB)
    r  = add_awgn_noise(s,EbN0dB(i));%add AWGN noise
    dCap = (r<=0);%threshold detector
    BER_sim(i) = sum((d~=dCap))/nSym;%SER computation
end

semilogy(EbN0dB,BER_sim,'-*');
xlabel('Eb/N0(dB)');ylabel('BER (Pb)');
title(['Probability of Bit Error for BPSK over AWGN']);

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Reference

[1] Andrea Goldsmith, “Wireless Communications”, ISBN: 978-0521837163, Cambridge University Press; 1 edition, August 8, 2005.↗

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Constellation diagram – investigate phase transitions

The phase transition properties of the different variants of QPSK schemes and MSK, are easily investigated using constellation diagram. Let’s demonstrate how to plot the signal space constellations, for the various modulations used in the transmitter.

Typically, in practical applications, the baseband modulated waveforms are passed through a pulse shaping filter for combating the phenomenon of intersymbol interference (ISI). The goal is to plot the constellation plots of various pulse-shaped baseband waveforms of the QPSK, O-QPSK and π/4-DQPSK schemes. A variety of pulse shaping filters are available and raised cosine filter is specifically chosen for this demo. The raised cosine (RC) pulse comes with an adjustable transition band roll-off parameter α, using which the decay of the transition band can be controlled.

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
All books available in ebook (PDF) and Paperback formats

The RC pulse shaping function is expressed in frequency domain as

Equivalently, in time domain, the impulse response corresponds to

A simple evaluation of the equation (2) produces singularities (undefined points) at p(t = 0) and p(t = ±Tsym/(2α)). The value of the raised cosine pulse at these singularities can be obtained by applying L’Hospital’s rule [1] and the values are

Using the equations above, the raised cosine filter is implemented as a function (refer the books Digital Modulations using Python and Digital Modulations using Matlab for the code).

The function is then tested. It generates a raised cosine pulse for the given symbol duration Tsym = 1s and plots the time-domain view and the frequency response as shown in Figure 1. From the plot, it can be observed that the RC pulse falls off at the rate of 1/|t|3 as t→∞, which is a significant improvement when compared to the decay rate of a sinc pulse which is 1/|t|. It satisfies Nyquist criterion for zero ISI – the pulse hits zero crossings at desired sampling instants. The transition bands in the frequency domain can be made gradual (by controlling α) when compared to that of a sinc pulse.

Figure 1: Raised-cosine pulse and its manifestation in frequency domain

Plotting constellation diagram

Now that we have constructed a function for raised cosine pulse shaping filter, the next step is to generate modulated waveforms (using QPSK, O-QPSK and π/4-DQPSK schemes), pass them through a raised cosine filter having a roll-off factor, say α = 0.3 and finally plot the constellation. The constellation for MSK modulated waveform is also plotted.

Figure 2: Constellations plots for: (a) a = 0.3 RC-filtered QPSK, (b) α = 0.3 RC-filtered O-QPSK, (c) α = 0.3 RC-filtered π/4-DQPSK and (d) MSK

Conclusions

The resulting simulated plot is shown in the Figure 2. From the resulting constellation diagram, following conclusions can be reached.

  • Conventional QPSK has 180° phase transitions and hence it requires linear amplifiers with high Q factor
  • The phase transitions of Offset-QPSK are limited to 90° (the 180° phase transitions are eliminated)
  • The signaling points for π/4-DQPSK is toggled between two sets of QPSK constellations that are shifted by 45° with respect to each other. Both the 90° and 180° phase transitions are absent in this constellation. Therefore, this scheme produces the lower envelope variations than the rest of the two QPSK schemes.
  • MSK is a continuous phase modulation, therefore no abrupt phase transition occurs when a symbol changes. This is indicated by the smooth circle in the constellation plot. Hence, a band-limited MSK signal will not suffer any envelope variation, whereas, the rest of the QPSK schemes suffer varied levels of envelope variations, when they are band-limited.

References

[1] Clay S. Turner, Raised Cosine and Root Raised Cosine Formulae, Wireless Systems Engineering, Inc, (May 29, 2007) V1.2↗

In this chapter

Digital Modulators and Demodulators - Passband Simulation Models
Introduction
Binary Phase Shift Keying (BPSK)
 □ BPSK transmitter
 □ BPSK receiver
 □ End-to-end simulation
Coherent detection of Differentially Encoded BPSK (DEBPSK)
● Differential BPSK (D-BPSK)
 □ Sub-optimum receiver for DBPSK
 □ Optimum noncoherent receiver for DBPSK
Quadrature Phase Shift Keying (QPSK)
 □ QPSK transmitter
 □ QPSK receiver
 □ Performance simulation over AWGN
● Offset QPSK (O-QPSK)
● π/p=4-DQPSK
● Continuous Phase Modulation (CPM)
 □ Motivation behind CPM
 □ Continuous Phase Frequency Shift Keying (CPFSK) modulation
 □ Minimum Shift Keying (MSK)
Investigating phase transition properties
● Power Spectral Density (PSD) plots
Gaussian Minimum Shift Keying (GMSK)
 □ Pre-modulation Gaussian Low Pass Filter
 □ Quadrature implementation of GMSK modulator
 □ GMSK spectra
 □ GMSK demodulator
 □ Performance
● Frequency Shift Keying (FSK)
 □ Binary-FSK (BFSK)
 □ Orthogonality condition for non-coherent BFSK detection
 □ Orthogonality condition for coherent BFSK
 □ Modulator
 □ Coherent Demodulator
 □ Non-coherent Demodulator
 □ Performance simulation
 □ Power spectral density

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Maximum Ratio Combining (MRC) architecture simulation

In the previous post on Single Input Multiple Output (SIMO) models for receive diversity, various receiver diversity techniques were outlined. One of them is maximum ratio combining, the focus of the topic here.

Channel model

Assuming flat slow fading channel, the received signal model is given by

where, is the channel impulse response, is the received signal, is the transmitted signal and is the additive Gaussian white noise.

Assuming small scale Rayleigh fading, the channel impulse response is modeled as complex Gaussian random variable with zero mean and variance

Therefore, the instantaneous channel power is exponentially distributed

In the context of AWGN channel, the signal-to-noise ratio (SNR) for a given channel condition, is a constant. But in the case of fading channels, the signal-to-noise ratio is no longer a constant as the signal is fluctuating when passed through a fading channel. Therefore, for fading channel, the SNR has a random variable component built into it. Hence, we just don’t call it SNR, instead it is called instantaneous SNR which depends on the current conditions of the channel (or equivalently, the value of the random variable at that instant). Since the SNR is a random variable, we can also talk about its expected (average) value, which is called average SNR. Denoting the average SNR as and for convenience, let’s assume that the average power of the channel is unity, i.e,

The instantaneous SNR is given by

Therefore, like the channel impulse response, the instantaneous SNR is also exponentially distributed

Maximum Ratio Combining (MRC)

The selection combining technique is the simplest technique, where in, the received signal from the antenna that experiences the highest SNR (i.e, the strongest signal from N received signals) is chosen for processing at the receiver. Therefore this technique throws away of observations. Whereas, in maximum ratio combining (MRC) all observations are used.

MRC works on the signal in spatial domain and is very similar to what a matched filter in frequency domain does to the incoming signal. MRC maximizes the inner product of the weights and the signal vector.

Figure 1: Processing the received samples at the receiver

The maximum ratio combining technique, uses all the received signal elements (Figure 1), it weighs them and combines the weighted signals so that the output SNR is maximized. Requiring the knowledge of the individual channels , the weights are chosen as

With the weights set as , the output of the MRC combiner is

Therefore, the output SNR after MRC processing is

MRC processing results in the weighted average of the received signals and hence the overall output SNR is equal to the sum of the SNRs of all individual receive signals, which yields the maximum possible diversity gain of . This is the maximum achievable SNR for all possible receive diversity schemes (selection combining, equal gain combining, etc..,).

Generally, two figures of merits are used to gauge the performance of the diversity schemes – outage probability and error rate performance for PSK modulation.

Outage probability

As we know, fading channels are characterized by deep fades, i.e, the period when the signal level falls below a certain threshold or certain noise level. During such fades, the user experiences signal outage. We would like to compute the probability, in certain fading channel, that a user will experience signal outage. This is called outage probability. Outage probability can be easily computed if we know the probability distribution characteristics of the fading.

The outage probability with which the instantaneous output SNR of MRC falls below a given SNR target is

For high average SNR conditions , the outage probability can be approximated as

Python code

import numpy as np
import matplotlib.pyplot as plt
from scipy.special import factorial

gamma_ratio_dB = np.arange(start=-10,stop=40,step=2)
Ns = [1,2,3,4,10,20] #number of received signal paths

gamma_ratio = 10**(gamma_ratio_dB/10) #Average SNR/SNR threshold in dB

fig, ax = plt.subplots(1, 1)

for N in Ns:
        n = np.arange(start=0,stop=N,step=1)
        P_outage = 1 - np.exp(-1/gamma_ratio)*np.sum(((1/gamma_ratio)**n[:,None])/factorial(n[:,None]),axis=0)
        ax.semilogy(gamma_ratio_dB,P_outage,label='N='+str(N))

ax.legend()
ax.set_xlim(-10,40);ax.set_ylim(0.0001,1.1)
ax.set_title('MRC outage probability (Rayleigh fading channel)')
ax.set_xlabel(r'$10log_{10}\left(\Gamma/\gamma_t\right)$')
ax.set_ylabel('Outage probability');fig.show()
Figure 2: Outage probability of MRC processing in Rayleigh fading channel

Figure 2, plots the outage probability against (the ratio of average SNR and the SNR threshold) for different values – the number of received signals received over an Rayleigh flat fading channel. For example, the outage probability dramatically improves when going from branch to branches. At outage probability of 0.01% (projected y-value in the graph at ), there is an approximate reduction in the required SNR.

Error rate performance

In the case of receive diversity schemes with antennas, the received signal vector is given by

Considering the QPSK modulated symbols that are transmitted (denoted as ), the maximum likelihood detection criterion for detecting the transmitted symbols by the equalizer block at the receiver is given by,

The solution to this problem can be obtained using the least squares method (refer equation 8.17 given in chapter 8 of this book)

The solution can be re-written as

As an example, the symbol error rate performance of a QPSK modulated transmission over a Rayleigh flat fading SIMO channel, for a range of values for the number of receive antennas () is simulated here. Maximum ratio combining is used in the receiver.

The code utilizes the modem class discussed in the book here. The modem class incorporates modulation and demodulation techniques for PSK,PAM,QAM and FSK modulation schemes. It uses the object oriented programming method for implementing the various modems.

The addition of Gaussian white noise needs to be multidimensional. The method discussed in this article is extended here for computing and adding the required amount of noise across the branches of signals.

Figure 3: Symbol error rate Vs EbN0 for QPSK over i.i.d Rayleigh flat fading channel with MRC processing at the receiver
"""
Eb/N0 Vs SER for PSK over Rayleigh flat fading with MRC
@author: Mathuranathan Viswanathan
Created on Jan 16, 2020
"""
import numpy as np # for numerical computing
import matplotlib.pyplot as plt # for plotting functions
#from matplotlib import cm # colormap for color palette
from numpy.random import standard_normal

from DigiCommPy.modem import PSKModem
from DigiCommPy.channels import awgn

#---------Input Fields------------------------
nSym = 10**6 # Number of symbols to transmit
EbN0dBs = np.arange(start=-20,stop = 36, step = 2) # Eb/N0 range in dB for simulation
N = [1,2,4,8,10] # [1,2,3,4,10,20] #number of diversity branches
M = 4 #M-ary PSK modulation

k=np.log2(M)
EsN0dBs = 10*np.log10(k)+EbN0dBs # EsN0dB calculation

fig, ax = plt.subplots(nrows=1,ncols = 1) #To plot figure

for nRx in N: #simulate for each # of received branchs
        #Random input symbols to modulator
        inputSyms = np.random.randint(low=0, high = M, size=nSym)
        modem = PSKModem(M)
        s = modem.modulate(inputSyms) #modulated PSK symbols

        #nRx signal branches
        s_diversity = np.kron(np.ones((nRx,1)),s);

        ser_sim = np.zeros(len(EbN0dBs)) # simulated symbol error rates

        for i,EsN0dB in enumerate(EsN0dBs):

                #Rayleigh flat fading channel as channel matrix
                h = np.sqrt(1/2)*(standard_normal((nRx,nSym))+1j*standard_normal((nRx,nSym)))
                signal = h*s_diversity #effect of channel on the modulated signal

                #Computing the signal power and adding noise
                gamma = 10**(EsN0dB/10) #converting EsN0dB to linear scale
                P = np.sum(np.abs(signal)**2,axis=1)/nSym #calculate power in each branch of signal
                N0 = P/gamma #required noise spectral density for each branch
                #Scale each row of noise with the calculated noise spectral density
                noise = (standard_normal(signal.shape)+1j*standard_normal(signal.shape))*np.sqrt(N0/2)[:,None]

                r = signal+noise #received signal branches

                #Receiver processing
                equalized = np.sum(r*np.conj(h),axis=0) #equalized signal

                detectedSyms = modem.demodulate(equalized) #demodulation decisions
                ser_sim[i] = np.sum(detectedSyms != inputSyms)/nSym

        #ax.grid(True,which='both');
        ax.semilogy(EbN0dBs,ser_sim,label='N='+str(nRx))#plot simulated error rates

ax.set_xlim(-20,35);ax.set_ylim(0.0001,1.1);ax.grid(True,which='both');
ax.set_xlabel('Eb/N0(dB)');ax.set_ylabel('Symbol Error Rate($P_s$)')
ax.set_title('SER performance for QPSK over Rayleigh fading channel with MRC')
ax.legend();fig.show()

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

References

[1] Andrea Goldsmith, “Wireless Communications”, ISBN: 978-0521837163, Cambridge University Press, 1 edition.↗

[2] Barry-Lee-Messerschmitt, “Digital Communication”, ISBN: 978-0792375487 , Springer, 3rd edition, September 30, 2003.↗

Articles in this series

Articles in this series
[1] Introduction to Multiple Antenna Systems
[2] MIMO - Diversity and Spatial Multiplexing
[3] Characterizing a MIMO channel - Channel State Information (CSI) and Condition number
[4] Capacity of a SISO system over a fading channel
[5] Ergodic Capacity of a SISO system over a Rayleigh Fading channel - Simulation in Matlab
[6] Capacity of a MIMO system over Fading Channels
[7] Single Input Multiple Output (SIMO) models for receive diversity
[8] Receiver diversity - Selection Combining
[9] Receiver diversity – Maximum Ratio Combining (MRC)

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Selection Combining – architecture simulation

In the previous post on Single Input Multiple Output (SIMO) models for receive diversity, various receiver diversity techniques were outlined. One of them is selection combining, the focus of the topic here.

Channel model

Assuming flat slow fading channel, the received signal model is given by

where, is the channel impulse response, is the received signal, is the transmitted signal and is the additive Gaussian white noise.

Assuming small scale Rayleigh fading, the channel impulse response is modeled as complex Gaussian random variable with zero mean and variance

Therefore, the instantaneous channel power is exponentially distributed

In the context of AWGN channel, the signal-to-noise ratio (SNR) for a given channel condition, is a constant. But in the case of fading channels, the signal-to-noise ratio is no longer a constant as the signal is fluctuating when passed through a fading channel. Therefore, for fading channel, the SNR has a random variable component built into it. Hence, we just don’t call it SNR, instead it is called instantaneous SNR which depends on the current conditions of the channel (or equivalently, the value of the random variable at that instant). Since the SNR is a random variable, we can also talk about its expected (average) value, which is called average SNR.

Denoting the average SNR as and for convenience, let’s assume that the average power of the channel is unity, i.e,

The instantaneous SNR is given by

Therefore, like the channel impulse response, the instantaneous SNR is also exponentially distributed

Selection Combining

In selection combining, the received signal from the antenna that experiences the highest SNR (i.e, the strongest signal from N received signals) is chosen for processing at the receiver (Figure 1).

That is, the weight of the path that has the highest is chosen.

Therefore, the output SNR (at the combiner output) is the maximum SNR of all the received signals

Figure 1: Processing the received samples at the receiver

As we know, fading channels are characterized by fades, i.e, the period when the signal level falls below a certain threshold or certain noise level. During such fades, the user experiences signal outage. We would like to compute the probability, in certain fading channel, that a user will experience signal outage. This is called outage probability. Outage probability can be easily computed if we know the probability distribution characteristics of the fading.

For a selection combining scheme, for an user to experience outage, the SNR of all the received branches should fall below the given threshold $\gamma_{t}$. In otherwords, the output SNR at the combiner is below the threshold . The outage probability of selection combining receiver is given by

For high average SNR conditions , the outage probability can be approximated as

Python code

import numpy as np
import matplotlib.pyplot as plt

gamma_ratio_dB = np.arange(start=-10,stop=41,step=2)
Ns = [1,2,3,4,10,20] #number of received signal paths

gamma_ratio = 10**(gamma_ratio_dB/10) #Average SNR/SNR threshold in dB

fig, ax = plt.subplots(1, 1)
for N in Ns:
        P_outage = (1 - np.exp(-1/gamma_ratio))**N
        ax.semilogy(gamma_ratio_dB,P_outage,label='N='+str(N))

ax.legend()
ax.set_xlim(-10,40);ax.set_ylim(0.0001,1.1)
ax.set_title('Selection combining outage probability (Rayleigh fading channel)')
ax.set_xlabel(r'$10log_{10}\left(\Gamma/\gamma_t\right)$')
ax.set_ylabel('Outage probability');fig.show()
Figure 2: Outage probability of selection combining in Rayleigh fading channel

Figure 2, plots the outage probability against (the ratio of average SNR and the SNR threshold) for different values – the number of received signals received over an Rayleigh flat fading channel. For example, the outage probability dramatically improves when going from branch to branches. At outage probability of 0.01% (y-value in the graph at ), there is an approximate reduction in the required SNR.

Error rate performance

As an example, the symbol error rate performance of a QPSK modulated transmission over a Rayleigh flat fading SIMO channel, for a range of values for the number of receive antennas () is simulated here. Selection combining is used in the receiver. After the selection combining the received signal is equalized by multiplying the selected branch with the conjugate of the corresponding channel sample.

The code utilizes the modem class discussed in the book here. The modem class incorporates modulation and demodulation techniques for PSK,PAM,QAM and FSK modulation schemes. It uses the object oriented programming method for implementing the various modems.

The addition of Gaussian white noise needs to be multidimensional. The method discussed in this article is extended here for computing and adding the required amount of noise across the branches of signals.

Figure 3: Symbol error rate Vs EbN0 for QPSK over i.i.d Rayleigh flat fading channel with Selection Combining at the receiver
"""
Eb/N0 Vs SER for PSK over Rayleigh flat fading with Selection Combining
@author: Mathuranathan Viswanathan
Created on Dec 10, 2019
"""
import numpy as np # for numerical computing
import matplotlib.pyplot as plt # for plotting functions
#from matplotlib import cm # colormap for color palette
from numpy.random import standard_normal

from DigiCommPy.modem import PSKModem

#---------Input Fields------------------------
nSym = 10**6 # Number of symbols to transmit
EbN0dBs = np.arange(start=0,stop = 36, step = 2) # Eb/N0 range in dB for simulation
N = [1,2,4,8,10] # [1,2,3,4,10,20] #number of diversity branches
M = 4 #M-ary PSK modulation

k=np.log2(M)
EsN0dBs = 10*np.log10(k)+EbN0dBs # EsN0dB calculation

fig, ax = plt.subplots(nrows=1,ncols = 1) #To plot figure

for nRx in N: #simulate for each # of received branchs
        #Random input symbols to modulator
        inputSyms = np.random.randint(low=0, high = M, size=nSym)
        modem = PSKModem(M)
        s = modem.modulate(inputSyms) #modulated PSK symbols

        #nRx signal branches
        s_diversity = np.kron(np.ones((nRx,1)),s);

        ser_sim = np.zeros(len(EbN0dBs)) # simulated symbol error rates

        for i,EsN0dB in enumerate(EsN0dBs):

                #Rayleigh flat fading channel as channel matrix
                h = np.sqrt(1/2)*(standard_normal((nRx,nSym))+1j*standard_normal((nRx,nSym)))
                signal = h*s_diversity #effect of channel on the modulated signal

                #Computing the signal power and adding noise
                gamma = 10**(EsN0dB/10) #converting EsN0dB to linear scale
                P = np.sum(np.abs(signal)**2,axis=1)/nSym #calculate power in each branch of signal
                N0 = P/gamma #required noise spectral density for each branch
                #Scale each row of noise with the calculated noise spectral density
                noise = (standard_normal(signal.shape)+1j*standard_normal(signal.shape))*np.sqrt(N0/2)[:,None]

                r = signal+noise #received signal branches

                #Receiver processing
                idx = np.abs(h).argmax(axis=0) #indices of max |h| values along all branches
                
                hSelected = h[idx,np.arange(h.shape[1])] #branches with max |h| values
                ySelected = r[idx,np.arange(r.shape[1])] #output of selection combiner
                equalized = ySelected*np.conj(hSelected) #equalized signal

                detectedSyms = modem.demodulate(equalized) #demodulation decisions
                ser_sim[i] = np.sum(detectedSyms != inputSyms)/nSym

        print(ser_sim)
        #ax.grid(True,which='both');
        ax.semilogy(EbN0dBs,ser_sim,label='N='+str(nRx))#plot simulated error rates

ax.set_xlim(0,35);ax.set_ylim(0.00001,1.1);ax.grid(True,which='both');
ax.set_xlabel('Eb/N0(dB)');ax.set_ylabel('Symbol Error Rate($P_s$)')
ax.set_title('SER performance for QPSK over Rayleigh fading channel with Selection Diversity')
ax.legend();fig.show()

Rate this post: Note: There is a rating embedded within this post, please visit this post to rate it.

References

[1] Andrea Goldsmith, “Wireless Communications”, ISBN: 978-0521837163, Cambridge University Press, 1 edition.↗

[2] Barry-Lee-Messerschmitt, “Digital Communication”, ISBN: 978-0792375487 , Springer, 3rd edition, September 30, 2003.↗

Articles in this series

Articles in this series
[1] Introduction to Multiple Antenna Systems
[2] MIMO - Diversity and Spatial Multiplexing
[3] Characterizing a MIMO channel - Channel State Information (CSI) and Condition number
[4] Capacity of a SISO system over a fading channel
[5] Ergodic Capacity of a SISO system over a Rayleigh Fading channel - Simulation in Matlab
[6] Capacity of a MIMO system over Fading Channels
[7] Single Input Multiple Output (SIMO) models for receive diversity
[8] Receiver diversity - Selection Combining
[9] Receiver diversity – Maximum Ratio Combining (MRC)

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

GMSK implementation and simulation – part 1

What’s the need for GMSK

Minimum shift keying (MSK) is a special case of binary CPFSK with modulation index . It has features such as constant envelope, compact spectrum and good error rate performance. The fundamental problem with MSK is that the spectrum is not compact enough to satisfy the stringent requirements with respect to out-of-band radiation for technologies like GSM and DECT standard. These technologies have very high data rates approaching the RF channel bandwidth. A plot of MSK spectrum (Figure 1) will reveal that the sidelobes with significant energy, extend well beyond the transmission data rate. This is problematic, since it causes severe out-of-band interference in systems with closely spaced adjacent channels.

Minimum shift keying (MSK) is a special case of binary CPFSK with modulation index . It has features such as constant envelope, compact spectrum and good error rate performance. The fundamental problem with MSK is that the spectrum is not compact enough to satisfy the stringent requirements with respect to out-of-band radiation for technologies like GSM and DECT standard. These technologies have very high data rates approaching the RF channel bandwidth. A plot of MSK spectrum (Figure 1) will reveal that the sidelobes with significant energy, extend well beyond the transmission data rate. This is problematic, since it causes severe out-of-band interference in systems with closely spaced adjacent channels.

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
All books available in ebook (PDF) and Paperback formats

Figure 1: PSD estimates for BPSK, QPSK and MSK signals

To satisfy such requirements, the MSK spectrum can be easily manipulated by using a pre-modulation low pass filter (LPF). The pre-modulation LPF should have the following properties and it is found that a Gaussian LPF will satisfy all of them [1]

  • Sharp cut-off and narrow bandwidth – needed to suppress high frequency components.
  • Lower overshoot in the impulse response – providing protection against excessive instantaneous frequency deviations.
  • Preservation of filter output pulse area – thereby coherent detection can be applicable.

Pre-modulation Gaussian low pass filter

Gaussian Minimum Shift Keying (GMSK) is a modified MSK modulation technique, where the spectrum of MSK is manipulated by passing the rectangular shaped information pulses through a Gaussian LPF prior to the frequency modulation of the carrier. A typical Gaussian LPF, used in GMSK modulation standards, is defined by the zero-mean Gaussian (bell-shaped) impulse response.

The parameter is the 3-dB bandwidth of the LPF, which is determined from a parameter called as discussed next. If the input to the filter is an isolated unit rectangular pulse (), the response of the filter will be [2]

where,

It is important to note the distinction between the two equations – (1) and (2). The equation for defines the impulse response of the LPF, whereas the equation for , also called as frequency pulse shaping function, defines the LPF’s output when the filter gets excited with a rectangular pulse. This distinction is captured in Figure 2.

Figure 2: Gaussian LPF: Relating h(t) and g(t)

The aim of using GMSK modulation is to have a controlled MSK spectrum. Effectively, a variable parameter called , the product of 3-dB bandwidth of the LPF and the desired data-rate , is often used by the designers to control the amount of spectrum efficiency required for the desired application. As a consequence, the 3-dB bandwidth of the aforementioned LPF is controlled by the design parameter. The range for the parameter is given as . When , the impulse response becomes a Dirac delta function , resulting in a transparent LPF and hence this configuration corresponds to MSK modulation.

The Matlab function to implement the Gaussian LPF’s impulse response (equation (1)), is given in the book (For Python implementation, refer this book). The Gaussian impulse response is of infinite duration and hence in digital implementations it has to be defined for a finite interval, as dictated by the function argument in the code shown next. For example, in GSM standard, is chosen as 0.3 and the time truncation is done to three bit-intervals .

It is also necessary to normalize the filter coefficients of the computed LPF as

Based on the gaussianLPF Matlab function, given in the book (For Python implementation, refer this book), we can compute and plot the impulse response and the response to an isolated unit rectangular pulse – . The resulting plot is shown in Figure 3.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

References

[1] Murota, K. and Hirade, K., GMSK Modulation for Digital Mobile Radio Telephony, IEEE Transactions on Communications, vol COM-29, No. 7. pp. 1044-1050, July 1981.↗
[2] Marvin K. Simon, Bandwidth-Efficient Digital Modulation with Application to Deep Space Communications, JPL Deep Space Communications and Navigation Series,Wiley-Interscience, Hoboken, New Jersey, 2003, ISBN 0-471-44536-3,pp-57.↗

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Digital Modulators and Demodulators - Passband Simulation Models
Introduction
Binary Phase Shift Keying (BPSK)
 □ BPSK transmitter
 □ BPSK receiver
 □ End-to-end simulation
Coherent detection of Differentially Encoded BPSK (DEBPSK)
● Differential BPSK (D-BPSK)
 □ Sub-optimum receiver for DBPSK
 □ Optimum noncoherent receiver for DBPSK
Quadrature Phase Shift Keying (QPSK)
 □ QPSK transmitter
 □ QPSK receiver
 □ Performance simulation over AWGN
● Offset QPSK (O-QPSK)
● π/p=4-DQPSK
● Continuous Phase Modulation (CPM)
 □ Motivation behind CPM
 □ Continuous Phase Frequency Shift Keying (CPFSK) modulation
 □ Minimum Shift Keying (MSK)
Investigating phase transition properties
● Power Spectral Density (PSD) plots
Gaussian Minimum Shift Keying (GMSK)
 □ Pre-modulation Gaussian Low Pass Filter
 □ Quadrature implementation of GMSK modulator
 □ GMSK spectra
 □ GMSK demodulator
 □ Performance
● Frequency Shift Keying (FSK)
 □ Binary-FSK (BFSK)
 □ Orthogonality condition for non-coherent BFSK detection
 □ Orthogonality condition for coherent BFSK
 □ Modulator
 □ Coherent Demodulator
 □ Non-coherent Demodulator
 □ Performance simulation
 □ Power spectral density

Differentially encoded BPSK: coherent detection

In coherent detection, the receiver derives its demodulation frequency and phase references using a carrier synchronization loop. Such synchronization circuits may introduce phase ambiguity in the detected phase, which could lead to erroneous decisions in the demodulated bits. For example, Costas loop exhibits phase ambiguity of integral multiples of radians at the lock-in points. As a consequence, the carrier recovery may lock in radians out-of-phase thereby leading to a situation where all the detected bits are completely inverted when compared to the bits during perfect carrier synchronization. Phase ambiguity can be efficiently combated by applying differential encoding at the BPSK modulator input (Figure 1) and by performing differential decoding at the output of the coherent demodulator at the receiver side (Figure 2).

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
All books available in ebook (PDF) and Paperback formats

Figure 1: Differential encoded BPSK transmission

In ordinary BPSK transmission, the information is encoded as absolute phases: for binary 1 and for binary 0. With differential encoding, the information is encoded as the phase difference between two successive samples. Assuming is the message bit intended for transmission, the differential encoded output is given as

The differentially encoded bits are then BPSK modulated and transmitted. On the receiver side, the BPSK sequence is coherently detected and then decoded using a differential decoder. The differential decoding is mathematically represented as

This method can deal with the phase ambiguity introduced by synchronization circuits. However, it suffers from performance penalty due to the fact that the differential decoding produces wrong bits when: a) the preceding bit is in error and the present bit is not in error , or b) when the preceding bit is not in error and the present bit is in error. After differential decoding, the average bit error rate of coherently detected BPSK over AWGN channel is given by

Figure 2: Coherent detection of differentially encoded BPSK signal

Following is the Matlab implementation of the waveform simulation model for the method discussed above. Both the differential encoding and differential decoding blocks, illustrated in Figures 1 and 2, are linear time-invariant filters. The differential encoder is realized using IIR type digital filter and the differential decoder is realized as FIR filter.

File 1: dbpsk_coherent_detection.m: Coherent detection of D-BPSK over AWGN channel

Refer Digital Modulations using Matlab : Build Simulation Models from Scratch for full Matlab code. Refer Digital Modulations using Python for full Python code.

Figure 3 shows the simulated BER points together with the theoretical BER curves for differentially encoded BPSK and the conventional coherently detected BPSK system over AWGN channel.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Topics in this chapter

Digital Modulators and Demodulators - Passband Simulation Models
Introduction
Binary Phase Shift Keying (BPSK)
 □ BPSK transmitter
 □ BPSK receiver
 □ End-to-end simulation
Coherent detection of Differentially Encoded BPSK (DEBPSK)
● Differential BPSK (D-BPSK)
 □ Sub-optimum receiver for DBPSK
 □ Optimum noncoherent receiver for DBPSK
Quadrature Phase Shift Keying (QPSK)
 □ QPSK transmitter
 □ QPSK receiver
 □ Performance simulation over AWGN
● Offset QPSK (O-QPSK)
● π/p=4-DQPSK
● Continuous Phase Modulation (CPM)
 □ Motivation behind CPM
 □ Continuous Phase Frequency Shift Keying (CPFSK) modulation
 □ Minimum Shift Keying (MSK)
Investigating phase transition properties
● Power Spectral Density (PSD) plots
Gaussian Minimum Shift Keying (GMSK)
 □ Pre-modulation Gaussian Low Pass Filter
 □ Quadrature implementation of GMSK modulator
 □ GMSK spectra
 □ GMSK demodulator
 □ Performance
● Frequency Shift Keying (FSK)
 □ Binary-FSK (BFSK)
 □ Orthogonality condition for non-coherent BFSK detection
 □ Orthogonality condition for coherent BFSK
 □ Modulator
 □ Coherent Demodulator
 □ Non-coherent Demodulator
 □ Performance simulation
 □ Power spectral density

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

QAM Modulation using Karnaugh-map walks

This article focused on constructing constellation for rectangular QAM modulation using Karnaugh-map walks. Exploit inherent property of Karnaugh-maps to construct Gray coded QAM constellation points.

Figure 1: Karnaugh-Map walks
Figure 2: Karnaugh-Map walks

M-ary Quadrature Amplitude Modulation (M-QAM)

In MQAM modulations, the information bits are encoded as variations in the amplitude and the phase of the signal. The M-QAM modulator transmits a series of information symbols drawn from the set , with each transmitted symbol holding k bits of information (). To restrict the erroneous receiver decisions to single bit errors, the information symbols are Gray coded. The information symbols are then digitally modulated using a rectangular M-QAM technique, whose signal set is given by

Karnaugh Map Walks and Gray Codes:

In any M-QAM constellation, in order to restrict the erroneous symbol decisions to single bit errors, the adjacent symbols in the transmitter constellation should not differ by more than one bit. This is usually achieved by converting the input symbols to Gray coded symbols and then mapping it to the desired QAM constellation. But this intermediate step can be skipped altogether by using a Look-Up-Table (LUT) approach which properly translates the input symbol to appropriate position in the constellation.

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
All books available in ebook (PDF) and Paperback formats

We will exploit the inherent property of Karnaugh Maps to generate the look-up table of dimension (where ) for the gray coded M-QAM constellation which is rectangular and symmetric (M=4, 16, 64, 256, …). The first step in constructing a QAM constellation is to convert a sequential numbers representing the message symbols to gray coded format. The function to convert decimal numbers to Gray codes is given next.

function [grayCoded]=dec2gray(decInput)
%convert decimal to Gray code representation
%example: x= [0 1 2 3 4 5 6 7] %decimal
%y=dec2gray(x); %returns y = [ 0 1 3 2 6 7 5 4] %Gray coded
[rows,cols]=size(decInput);
grayCoded=zeros(rows,cols);
for i=1:rows
   for j=1:cols
    grayCoded(i,j)=bitxor(bitshift(decInput(i,j),-1),decInput(i,j));
   end
end

If you are familiar with Karnaugh Maps (K-Maps) [1], it is easier for you to identify that the K-Maps are constructed based on Gray Codes. By the nature of the construction of K-Maps, the address of the adjacent cells differ by only one bit. If we supper impose the given M-QAM constellation on the K-Map and walk through the address of each cell in certain pattern, it gives the Gray-coded M-QAM constellation.

As mentioned, a walk through the K-Map will produce a sequence of gray codes. Moreover, if the walk can be looped back to the origin or starting point, it will generate a sequence of cyclic Gray codes. Different walking patterns are possible on K-Maps that generate different sequences of Gray codes. Some of the walks on a \(4 \times 4\) K-Map are shown in Figures 1 and 2. This can be readily extended to any K-Map configuration of higher order.

In walk types 1,3 and 4, the address of the starting point and end point differ by only one bit and the corresponding cells are adjacent to each other. In effect, the walk can be looped to give cyclic Gray codes. But in type 2 walk, the starting cell (0000 ) and the ending cell (1101) are not adjacent to each other and thus the Gray code generated using this pattern of walk is not cyclic. By far, type 1 walk is the simplest. All we have to do is alternate the direction of the walk for every row and read the gray coded address.

The Matlab function constructQAM.m given in the book implements (refer the book Digital Modulations using Matlab for the full Matlab code, python code is available in the book Digital Modulations using Python) the walk type 1 for constructing a MQAM constellation.

Rectangular QAM from PAM constellation

There exist other constellation shapes (like circular, triangular constellations) that are more efficient (in terms of energy required to achieve same the error probability) than the standard rectangular constellation. Rectangular (symmetric or square) constellations are the preferred choice of implementation due to its simplicity in implementing modulation and demodulation.

Any rectangular QAM constellation is equivalent to superimposing two Amplitude Shift Keying (ASK) signals (also called Pulse Amplitude Modulation – PAM) on quadrature carriers. For example, 16-QAM constellation points can be generated from two 4-PAM signals, similarly the 64-QAM constellation points can be generated from two 8-PAM signals. The generic equation to generate PAM signals of dimension D is

For generating 16-QAM, the dimension D of PAM is set to . Thus for constructing a M-QAM constellation, the PAM dimension is set as . Matlab code for dynamically generating M-QAM constellation points based on Karnaugh map Gray code walk is given below. The resulting ideal constellations for Gray coded 16-QAM and 64-QAM are shown in following figure.

Rate this article : Note: There is a rating embedded within this post, please visit this post to rate it.

For further reading

[1] C. E. Stroud, “Karnaugh Maps (K-map) – Combinational Logic Minimization”, course notes, Auburn University↗

Related topics in this chapter

Digital Modulators and Demodulators - Complex Baseband Equivalent Models
Introduction
Complex baseband representation of modulated signal
Complex baseband representation of channel response
● Modulators for amplitude and phase modulations
 □ Pulse Amplitude Modulation (M-PAM)
 □ Phase Shift Keying Modulation (M-PSK)
 □ Quadrature Amplitude Modulation (M-QAM)
● Demodulators for amplitude and phase modulations
 □ M-PAM detection
 □ M-PSK detection
 □ M-QAM detection
 □ Optimum detector on IQ plane using minimum Euclidean distance
● M-ary FSK modulation and detection
 □ Modulator for M orthogonal signals
 □ M-FSK detection

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

 

Symbol Timing Recovery for QPSK (digital modulations)

The goal of timing recovery is to estimate and correct the sampling instants and phase at the receiver, such that it allows the receiver to decode the transmitted symbols reliably.

What is Symbol timing Recovery :

When transmitting data across a communication system, three things are important: frequency of transmission, phase information and the symbol rate.

In coherent detection/demodulation, both the transmitter and receiver posses the knowledge of exact symbol sampling timing and symbol phase (and/or symbol frequency). While everything is set at the transmitter, the receiver is at the mercy of recovery algorithms to regenerate these information from the incoming signal itself. If the transmission is a passband transmission, the carrier recovery algorithm also recovers the carrier frequency. For phase sensitive systems like BPSK, QPSK etc.., the carrier recovery algorithm recovers the symbol phase so that it is synchronous with the transmitted symbol.

The first part in such a receiver architecture of a MPSK transmitting system is multiplying the incoming signal with sine and cosine components of the carrier wave.

The sine and cosine components are generated using a carrier recovery block (Phase Lock Loop (PLL) or setting a local oscillator to track the variations).

Once the in-phase and quadrature signals are separated out properly, the next task is to match each symbol with the transmitted pulse shape such that the overall SNR of the system improves.

Implementing this in digital domain, the architecture described so far would look like this (Note: the subscript of the incoming signal has changed from analog domain to digital domain – i.e. to )

In the digital architecture above, the matched filter is implemented as a simple finite impulse response (FIR) filter whose impulse response is matched to that of the transmitter pulse shape. It helps the receiver in timing recovery and also it improves the overall SNR of the system by suppressing some amount of noise. The incoming signal up to the point before the matched filter, may have fluctuations in the amplitude. The matched filter also behaves like an averaging filter that smooths out the variations in the signal.

Note that in this digital version, the incoming signal is already a sampled signal. It has already passed through an analog to digital converter that sampled the signal at some sampling rate. From the symbol perspective, the symbols have to be sampled at optimum sampling instant to extract its content properly.

This requires a re-sampler, which resamples the averaged signal at the optimum sampling instant. If the original sampling instant is before or after the optimum sampling point, the timing recovery signal will help to re-sample (re-adjust sampling times) accordingly.

Let’s take a simple BPSK transmitter for illustration. This would be equivalent to any of the single arms (in-phase and quadrature phase arms) of a QPSK transmitter or receiver.

An alternate data pattern (symbols) – [+1,-1,+1,+1,\cdots,] is transmitted across the channel. Assume that each symbol occupies Tsym=8 sample time.

clear all; clc;
n=10; %Number of data symbols
Tsym=8; %Symbol time interms of sample time or oversampling rate equivalently
%data=2*(rand(n,1)<0.5)-1;
data=[1 -1 1 -1 1 -1 1 -1 1 -1]'; %BPSK data
bpsk=reshape(repmat(data,1,Tsym)',n*Tsym,1); %BPSK signal

figure('Color',[1 1 1]);
subplot(3,1,1);
plot(bpsk);
title('Ideal BPSK symbols');
xlabel('Sample index [n]');
ylabel('Amplitude')
set(gca,'XTick',0:8:80);
axis([1 80 -2 2]); grid on;

Lets add white gaussian noise (awgn). A random noise of standard deviation 0.25 is generated and added with the generated BPSK symbols.

noise=0.25*randn(size(bpsk)); %Adding some amount of noise
received=bpsk+noise; %Received signal with noise

subplot(3,1,2);
plot(received);
title('Transmitted BPSK symbols (with noise)');
xlabel('Sample index [n]');
ylabel('Amplitude')
set(gca,'XTick',0:8:80);
axis([1 80 -2 2]); grid on;

From the first plot, we see that the transmitted pulse is a rectangular pulse that spans Tsym samples. In the illustration, Tsym=8. The best averaging filter (matched filter) for this case is a rectangular filter (though they are not preferred in practice, I am just using it for simplifying the illustration) that spans 8 samples. Such a rectangular pulse can be mathematically represented in terms of unit step function as

(Another type of averaging filter – “Moving Average Filter” is implemented here)

The resulting rectangular pulse will have a value of 0.5 at the edges of the sampling instants (index 0 and 7) and a value of ‘1’ at the remaining indices in between the edges. Such a rectangular function is indicated below.

The incoming signal is convolved with the averaging filter and the resultant output is given below

impRes=[0.5 ones(1,6) 0.5]; %Averaging Filter -> u[n]-u[n-Tsamp]
yy=conv(received,impRes,'full');
subplot(3,1,3);
plot(yy);
title('Matched Filter (Averaging Filter) output');
xlabel('Sample index [n]');
ylabel('Amplitude');

set(gca,'XTick',0:8:80);
axis([1 80 -10 10]); grid on;

We can note that the averaged output peaks at the locations where the symbol transition occurs. Thus, when the signal is sampled at those ideal locations, the BPSK symbols [+1,-1,+1, …] can be recovered perfectly.

In practice, a square root raised cosine (SRRC) filter is used both at the transmitter and the receiver (as a matched filter) to mitigate inter-symbol interference. An implementation of SRRC filter in Matlab is given here

But the problem here is: “How does the receiver know the ideal sampling instants?”. The solution is “someone has to supply those ideal sampling instants”. A symbol time recovery circuit is used for this purpose.

Coming back to the receiver architecture, lets add a symbol time recovery circuit that supplies the recovered timing instants. The signal will be re-sampled at those instants supplied by the recovery circuit.

The Algorithm behind Symbol Timing Recovery:

Different algorithms exist for symbol timing recovery and synchronization. An “Early/Late Symbol Recovery algorithm” is illustrated here.

The algorithm starts by selecting an arbitrary sample at some time (denoted by T). It captures the two adjacent samples (on either side of the sampling instant T) that are separated by δ seconds. The sample at the index T-δ is called Early Sample and the sample at the index T+δ is called Late Sample. The timing error is generated by comparing the amplitudes of the early and late samples. The next symbol sampling time instant is either advanced or delayed based on the sign of difference between the early and late sample.

1) If the Early Sample = Late Sample : The peak occurs at the on-time sampling instant T. No adjustment in the timing is needed.
2) If |Early Sample| > |Late Sample| : Late timing, the sampling time is offset so that the next symbol is sampled T-δ/2 seconds after the current sampling time.
3) If |Early Sample| < |Late Sample| : Early timing, the sampling time is offset so that the next symbol is sampled T+δ/2 seconds after the current sampling time.

These three situations are shown next.

There exist many variations to the above mentioned algorithm. The Early/Late synchronization technique given here is the simplest one taken for illustration.

Let’s complete the architecture with a signal quantization and constellation de-mapping block which gives out the estimated demodulated symbols.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

For Further Reading:

[1] Technique for implementing an Early-Late Gate Synchronization structure for DPSK.↗
[2] Ying Li et al,”Hardware Implementation of Symbol Synchronization for Underwater FSK”, IEEE International Conference on Sensor Networks, Ubiquitous, and Trustworthy Computing (SUTC), p 82 – 88, 2010.↗
[3] Heinrich Meyr & Gerd Ascheid,”Digital Communication Receivers: Synchronization in Digital Communication Volume I, Phase-, Frequency-Locked Loops, and Amplitude Control (Wiley and Signal Processing)”,John Wiley & Sons; Volume 1 edition (March 1990),ISBN-13: 978-0471501930.↗
[4] Umberto Mengali,”Synchronization Techniques for Digital Receivers (Applications of Communications Theory)”,Springer; 1997 edition (October 31, 1997),ISBN-13: 978-0306457258.↗

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing