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)
b[i] = input bits; i = position or index of input bits; d[i] = mapped bits (constellation points)
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.
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])
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.
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.
Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.
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.
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
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)
Generate a sequence of random bits of ones and zeros of certain length (Nsym typically set in the order of 10000)
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)
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.
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.
Compare the detected bits against the transmitted bits and compute the bit error rate (BER).
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.
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.
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.
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
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.
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.
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.
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.
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, 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,
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.
"""
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.
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
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, 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.
"""
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.
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.
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.
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).
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
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.
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.
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.
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.
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.
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
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
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.
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.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.