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

Receive diversity schemes – channel models

SIMO channel configuration is characterized by 1 transmit antenna and multiple receiver antennas (Figure 1). SIMO configuration is used to provide receive diversity, where the same information is received across independent fading channels to combat fading. When multiple copies of the same data are received across independently fading channels, the amount of fade suffered by each copy of the data will be different. This guarantees that at-least one of the copy will suffer less fading compared to rest of the copies. Thus, the chance of properly receiving the transmitted data increases. In effect, this improves the reliability of the entire system. 

Figure 1: Single Input Multiple Output (SIMO) channel model

The channels are independent and identically distributed (i.i.d) and hence the error event across those independent channels are also independent. The signal to noise ratios (SNR) of the channels are also i.i.d and the every channel has the same average SNR. The is the fundamental assumption of the SIMO model incorporating receive diversity.

For the case of receive antennas, independent received signal copies are

Writing in compact form, the received signal

where,

Figure 2: Processing the received samples at the receiver

The receiver, takes in these received copies, applies weights according to the chosen receive diversity technique (see below) and outputs a single copy (Figure 2). The combined output signal is given by

where, the weight vector is

How are the weights chosen ? The weights are chosen based on the following receive diversity techniques.

Selection Combining (SC)

In selection combining, the received signal from the antenna that experiences the highest SNR is chosen for further processing. That is, the path that has the highest is chosen.

This is the simplest of all the receive diversity techniques. It simply chooses one branch that experiences the highest SNR. It seems to waste the remaining branches in the selection processes. Also, channel phase information is not needed for this technique.

This technique provides SNR gain in the order of .

Maximum Ratio Combining (MRC)

As we saw earlier, the selection combining is the simplest algorithm but it wastes receive elements in the computations. Maximum ratio combining technique uses all the received signals in order to maximize the output SNR. It represents maximum likelihood estimation. The output signal is the weighted sum of all the received branches. The weights for MRC technique is chosen as

Therefore, it requires the knowledge of the channel at the receiver and matching of both magnitude and phase. The output signal, with weight set as , is given by

The SNR gain achieved by this technique is .

Equal Gain Combining (EGC):

The MRC technique requires matching of both magnitude and the phase of the channel. The magnitudes can fluctuate significantly. In equal gain combining, only the phase of the channel is cancelled out. The weights are chosen as

where is the channel phase information. The output signal is given by

The technique suffers small SNR loss compared to MRC, but it is a good alternative for implementation.

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

Generate color noise using Auto-Regressive (AR) model

Key focus: Learn how to generate color noise using auto regressive (AR) model. Apply Yule Walker equations for generating power law noises: pink noise, Brownian noise.

Auto-Regressive (AR) model

An uncorrelated Gaussian random sequence can be transformed into a correlated Gaussian random sequence using an AR time-series model. If a time series random sequence is assumed to be following an auto-regressive model of form,

where is the uncorrelated Gaussian sequence of zero mean and variance , the natural tendency is to estimate the model parameters . Least Squares method can be applied here to find the model parameters, but the computations become cumbersome as the order increases. Fortunately, the AR model coefficients can be solved for using Yule Walker equations.

Yule Walker equations relate auto-regressive model parameters to the auto-correlation of random process . Finding the model parameters using Yule-Walker equations, is a two step process:

1. Given , estimate auto-correlation of the process . If is already specified as a function, utilize it as it is (see auto-correlation equations for Jakes spectrum or Doppler spectrum in section 11.3.2 in the book).

2. Solve Yule Walker equations to find the model parameters and the noise sigma .

Yule-Walker equations

Yule-Walker equations can be compactly written as

Equation (2) Yule Walker equation

Written in matrix form, the Yule-Walker equations that comprises of a set of linear equations and unknown parameters.

Representing equation (3) in a compact form,

The AR model parameters can be found by solving

After solving for the model parameters , the noise variance can be found by applying the estimated values of in equation (2) by setting . The aryule command (in Matlab and Python’s spectrum package) efficiently solves the Yule-Walker equations using Levinson Algorithm [1][2]. Once the model parameters are obtained, the AR model can be implemented as an \emph{infinte impulse response (IIR)} filter of form

Example: power law noise generation

The power law in the power spectrum characterizes the fluctuating observables in many natural systems. Many natural systems exhibit some noise which is a stochastic process with a power spectral density having a power exponent that can take values . Simply put, noise is a colored noise with a power spectral density of over its entire frequency range.

The noise can be classified into different types based on the value of .

Violet noise – = -2, the power spectral density is proportional to .
Blue noise – = -1, the power spectral density is proportional to .
White noise – = 0, the power spectral density is flat across the whole spectrum.
Pink noise – = 1, the power spectral density is proportional to , i.e, it decreases by per octave with increase in frequency.
Brownian noise – = 2, the power spectral density is proportional to , therefore it decreases by per octave with increase in frequency.

The power law noise can be generated by sequencing a zero-mean white noise through an auto-regressive (AR) filter of order :

where, is a zero-mean white noise process. Referring the AR generation method described in [3], the coefficients of the AR filter can be generated as

which can be implemented as an infinite impulse response (IIR) filter using the filter transfer function described in equation (6).

The following script implements this method and the sample results are plotted in the next Figure.

Refer the book for the Matlab code

Figure 1: Simulated color noise samples and their PSD estimates: pink noise (α =1) and Brown noise (α =2)

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

References

[1] Gene H. Golub, Charles F. Van Loan, Matrix Computations, ISBN-9780801854149, Johns Hopkins University Press, 1996, p. 143.↗
[2] J. Durbin, The fitting of time series in models, Review of the International Statistical Institute, 28:233-243, 1960.↗
[3] Kasdin, N.J. Discrete Simulation of Colored Noise and Stochastic Processes and Power Law Noise Generation, Proceedings of the IEEE, Vol. 83, No. 5, 1995, pp. 802-827.↗

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

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

Random Variables - Simulating Probabilistic Systems
● Introduction
Plotting the estimated PDF
● Univariate random variables
 □ Uniform random variable
 □ Bernoulli random variable
 □ Binomial random variable
 □ Exponential random variable
 □ Poisson process
 □ Gaussian random variable
 □ Chi-squared random variable
 □ Non-central Chi-Squared random variable
 □ Chi distributed random variable
 □ Rayleigh random variable
 □ Ricean random variable
 □ Nakagami-m distributed random variable
Central limit theorem - a demonstration
● Generating correlated random variables
 □ Generating two sequences of correlated random variables
 □ Generating multiple sequences of correlated random variables using Cholesky decomposition
Generating correlated Gaussian sequences
 □ Spectral factorization method
 □ Auto-Regressive (AR) model

Generating colored noise with Jakes PSD: Spectral factorization

The aim of this article is to demonstrate the application of spectral factorization method in generating colored noise having Jakes power spectral density. Before continuing, I urge the reader to go through this post: Introduction to generating correlated Gaussian sequences.

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

In spectral factorization method, a filter is designed using the desired frequency domain characteristics (like PSD) to transform an uncorrelated Gaussian sequence into a correlated sequence . In the model shown in Figure 1, the input to the LTI system is a white noise whose amplitude follows Gaussian distribution with zero mean and variance and the power spectral density (PSD) of the white noise is a constant across all frequencies.

The white noise sequence drives the LTI system with frequency response producing the signal of interest . The PSD of the output process is therefore

Figure 1: Relationship among various power spectral densities in a filtering process

If the desired power spectral density of the colored noise sequence is given, assuming , the impulse response of the LTI filter can be found by taking the inverse Fourier transform of the frequency response

Once, the impulse response of the filter is obtained, the colored noise sequence can be produced by driving the filter with a zero-mean white noise sequence of unit variance.

Example: Generating colored noise with Jakes PSD

For example, we wish to generate a Gaussian noise sequence whose power spectral density follows the normalized Jakes power spectral density (see section 11.3.2 in the book) given by

Applying spectral factorization method, the frequency response of the desired filter is

The impulse response of the filter is [1]

where, is the fractional Bessel function of the first kind, is the sampling interval for implementing the digital filter and is a constant. The impulse response of the filter can be normalized by dividing by .

The filter can be implemented as a finite impulse response (FIR) filter structure. However, the FIR implementation requires that the impulse response be truncated to a reasonable length. Such truncation leads to ringing effects due to Gibbs phenomenon. To avoid distortions due to truncation, the filter impulse response is usually windowed using a window function such as Hamming window.

where, the Hamming window is defined as

The function given in the book in section 2.6.1 implements a windowed Jakes filter using the aforementioned equations. The impulse response and the spectral characteristics of the filter are plotted in Figure 2.

Figure 2: Impulse response & spectrum of windowed Jakes filter ( fmax = 10Hz; Ts = 0:01s; N = 512)

A white noise can be transformed into colored noise sequence with Jakes PSD, by processing the white noise through the implemented filter. The script (given in the book in section 2.6.1)  illustrates this concept by transforming a white noise sequence into a colored noise sequence. The simulated noise samples and its PSD are plotted in Figure 3.

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

Reference

[1] Jeruchim et., al, Simulation of communication systems – modeling, methodology, and techniques, second edition, Kluwer academic publishers, 2002, ISBN: 0306462672.↗

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

Random Variables - Simulating Probabilistic Systems
● Introduction
Plotting the estimated PDF
● Univariate random variables
 □ Uniform random variable
 □ Bernoulli random variable
 □ Binomial random variable
 □ Exponential random variable
 □ Poisson process
 □ Gaussian random variable
 □ Chi-squared random variable
 □ Non-central Chi-Squared random variable
 □ Chi distributed random variable
 □ Rayleigh random variable
 □ Ricean random variable
 □ Nakagami-m distributed random variable
Central limit theorem - a demonstration
● Generating correlated random variables
 □ Generating two sequences of correlated random variables
 □ Generating multiple sequences of correlated random variables using Cholesky decomposition
Generating correlated Gaussian sequences
 □ Spectral factorization method
 □ Auto-Regressive (AR) model

Generate correlated Gaussian sequence (colored noise)

Key focus: Colored noise sequence (a.k.a correlated Gaussian sequence), is a non-white random sequence, with non-constant power spectral density across frequencies.

Introduction

Speaking of Gaussian random sequences such as Gaussian noise, we generally think that the power spectral density (PSD) of such Gaussian sequences is flat.We should understand that the PSD of a Gausssian sequence need not be flat. This bring out the difference between white and colored random sequences, as captured in Figure 1.

A white noise sequence is defined as any random sequence whose PSD is constant across all frequencies. Gaussian white noise is a Gaussian random sequence, whose amplitude is gaussian distributed and its PSD is a constant. Viewed in another way, a constant PSD in frequency domain implies that the average auto-correlation function in time-domain is an impulse function (Dirac-delta function). That is, the amplitude of noise at any given time instant is correlated only with itself. Therefore, such sequences are also referred as uncorrelated random sequences. White Gaussian noise processes are completely characterized by its mean and variance.

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

Figure 1: Power spectral densities of white noise and colored noise

A colored noise sequence is simply a non-white random sequence, whose PSD varies with frequency. For a colored noise, the amplitude of noise at any given time instant is correlated with the amplitude of noise occurring at other instants of time. Hence, colored noise sequences will have an auto-correlation function other than the impulse function. Such sequences are also referred as correlated random sequences. Colored
Gaussian noise processes are completely characterized by its mean and the shaped of power spectral density (or the shape of auto-correlation function).

In mobile channel model simulations, it is often required to generate correlated Gaussian random sequences with specified mean and power spectral density (like Jakes PSD or Gaussian PSD given in section 11.3.2 in the book). An uncorrelated Gaussian sequence can be transformed into a correlated sequence through filtering or linear transformation, that preserves the Gaussian distribution property of amplitudes, but alters only the correlation property (equivalently the power spectral density). We shall see two methods to generate colored Gaussian noise for given mean and PSD shape

Spectral factorization method
Auto-regressive (AR) model

Motivation

Let’s say we observe a real world signal that has an arbitrary spectrum . We would like to describe the long sequence of using very few parameters, as in applications like linear predictive coding (LPC). The modeling approach, described here, tries to answer the following two questions:

• Is it possible to model the first order (mean/variance) and second order (correlations, spectrum) statistics of the signal just by shaping a white noise spectrum using a transfer function ? (see Figure 1).
• Does this produce the same statistics (spectrum, correlations, mean and variance) for a white noise input ?

If the answer is yes to the above two questions, we can simply set the modeled parameters of the system and excite the system with white noise, to produce the desired real world signal. This reduces the amount to data we wish to transmit in a communication system application. This approach can be used to transform an uncorrelated white Gaussian noise sequence to a colored Gaussian noise sequence with desired spectral properties.

Linear time invariant (LTI) system model

In the given model, the random signal is observed. Given the observed signal , the goal here is to find a model that best describes the spectral properties of under the following assumptions
• The sequence is WSS (wide sense stationary) and ergodic.
• The input sequence to the LTI system is white noise, whose amplitudes follow Gaussian distribution with zero-mean and variance with flat the power spectral density.
• The LTI system is BIBO (bounded input bounded output) stable.

Read the continuation of this post : Spectral factorization method

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

Reference

[1] Jeruchim et., al, Simulation of communication systems – modeling, methodology, and techniques, second edition, Kluwer academic publishers, 2002, ISBN: 0306462672.↗

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

Random Variables - Simulating Probabilistic Systems
● Introduction
Plotting the estimated PDF
● Univariate random variables
 □ Uniform random variable
 □ Bernoulli random variable
 □ Binomial random variable
 □ Exponential random variable
 □ Poisson process
 □ Gaussian random variable
 □ Chi-squared random variable
 □ Non-central Chi-Squared random variable
 □ Chi distributed random variable
 □ Rayleigh random variable
 □ Ricean random variable
 □ Nakagami-m distributed random variable
Central limit theorem - a demonstration
● Generating correlated random variables
 □ Generating two sequences of correlated random variables
 □ Generating multiple sequences of correlated random variables using Cholesky decomposition
Generating correlated Gaussian sequences
 □ Spectral factorization method
 □ Auto-Regressive (AR) model

Simulate matched filter system with SRRC filtering

Key focus: Let’s learn how to simulate matched filter receiver with square root raised cosine (SRRC) filter, for a pulse amplitude modulation (PAM) system.

Simulation Model

A basic pulse amplitude modulation (PAM) system as DSP implementation, is shown in Figure 1 by adding an upsampler (), pulse shaping function () at the transmitter and a matched filter (), downsampler () combination at the receiver.

Figure 1: DSP implementation of a PAM modulation system with pulse shaping and matched filtering

In this model, a random stream of source bits is first segmented into -bit wide symbols that can take any value from the set . The simulation code directly starts by generating a random set of symbols, that goes into the modulation mapper. Pulse amplitude modulation (MPAM) mapping and de-mapping, described in sections 5.3.1 and 5.4.1, are considered here for simulation. An MPAM modulator maps the -bit information symbols to one of the distinct signaling levels. The MPAM modulated symbols are shown in Figure 2.

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

%Program: MPAM modulation
N = 10ˆ5; %Number of symbols to transmit
MOD_TYPE = 'PAM'; %modulation type
M = 4; %modulation level for the chosen modulation MOD_TYPE
d = ceil(M.*rand(1,N)); %random numbers from 1 to M for input to PAM
u = modulate(MOD_TYPE,M,d);%MPAM modulation
figure; stem(real(u)); %plot modulated symbols
Figure 2: M-PAM modulated Symbols

Each MPAM modulated symbol should last for some duration called symbol time, denoted as . Each modulated symbol will go through a discrete time pulse shaping filter whose impulse response is spaced sample, where denotes the sampling period. To do this, the incoming symbols from the modulation mapper need to be converted to discrete time impulse train by upsampling them by a factor (as per the upsampling equation given here ). The upsampler inserts zeros between each modulated symbols. In practice, is chosen as integral multiples of 4. The upsampler/oversampled output is shown in Figure 3.

%Program: Upsampling
L=4; %Oversampling factor (L samples per symbol period)
v=[u;zeros(L-1,length(u))];%insert L-1 zero between each symbols
%Convert to a single stream
v=v(:).';%now the output is at sampling rate
stem(real(v)); title('Oversampled symbols v(n)');
Figure 3: Modulated symbols upsampled by 4 (left) and the SRRC pulse shaping filter output (right)

In order to fill-in proper values in place of the inserted zeros, interpolation is performed by a pulse shaping filter by convolving the output of the upsampler and the pulse shaping function. The pulse shaping function needs to satisfy Nyquist criterion for zero ISI, otherwise, aliasing effect will wreak havoc. If the amplitude response of the channel is flat and if the noise is white, then the amplitude response of the pulse shaping function can be split equally between the transmitter and receiver. For this simulation the desired Nyquist pulse shape is a raised-cosine pulse shape and the task of raised-cosine filtering is equally split between the transmit and receive filters. This gives rise to square-root raised-cosine (SRRC) filters at the transmitter and receiver. This is a matched filter system, where the receive filter is matched with the transmit pulse shaping filter.

A matched filtering system is a theoretical framework and it is not a specific type of filter. It offers improved noise cancellation by improving the signal noise ratio at the output of the receive filter. The implementation starts with the design of an SRRC filter with roll-off factor . The SRRC filter length is influenced by the parameter – the span of the filter length in units of symbols and the oversampling factor .

Filters will not produce instantaneous output and they take sometime to produce the output. That is, the output of the filter is shifted in time with respect to the input. For symmetric FIR filters of length , the filter delay is . Apart from returning the SRRC pulse function, the filter design function given in this section returns the filter delay. Filter delays are useful in determining the appropriate sampling instances at the receiver. The modulated symbols at the transmitter are passed through the designed filter and the response of the filter is plotted in Figure 3 (right).

%Program: SRRC pulse shaping
%----Pulse shaping-----
beta = 0.3;% roll-off factor for Tx SRRC filter
Nsym=8;%SRRC filter span in symbol durations
L=4; %Oversampling factor (L samples per symbol period)
[p,t,filtDelay] = srrcFunction(beta,L,Nsym);%design filter
s=conv(v,p,'full');%Convolve modulated syms with p[n] filter
figure; plot(real(s),'r'); title('Pulse shaped symbols s(n)');
Figure 4: Received signal with AWGN noise (left) and the output of the matched filter (right)

The pulse shaped signal samples are sent through an AWGN channel, where the transmitted samples are added with noise samples that are generated according to the required (refer AWGN noise model given in this post). The received signal that is corrupted with AWGN noise is shown in Figure 4 (left).

%Program: Adding AWGN noise for given SNR value
EbN0dB = 10; %EbN0 in dB for AWGN channel
snr = 10*log10(log2(M))+EbN0dB; %Converting given Eb/N0 dB to SNR
%log2(M) gives the number of bits in each modulated symbol
r = add_awgn_noise(s,snr,L); %AWGN , add noise for given SNR, r=s+w
%L is the oversampling factor used in simulation
figure; plot(real(r),'r');title('Received signal r(n)');

For the receiver system, we assume that the ADC in the receiver produces an integer number of samples per symbol (i.e, is an integer). In practice, this is not always the case and thus a resampling filter is often included in real world designs. In the discrete time model, the received samples are passed through a matched filter, whose impulse response is matched to the impulse response of the pulse shaping filter as . Since the SRRC pulse is symmetric, we will be using the same SRRC pulse shaping function for the matched filter. The received samples are convolved with the matched filter and the output of the matched filter is shown in Figure 4 (right).

Refer the book Wireless Communication Systems in Matlab for the program on how to perform matched filtering

Next, we assume that the receiver has perfect knowledge of symbol timing instants and therefore, we will not be implementing a symbol timing synchronization subsystem in the receiver. At the receiver, the matched filter symbols are first passed through a downsampler that samples the filter output at correct timing instances.

The sampling instances are influenced by the delay of the FIR filters (SRRC filters in Tx and Rx). For symmetric FIR filters of length , the filter delay is . Since the communication link contains two filters, the total filter delay is . Therefore, the first valid sample occurs at position in the matched filter’s output vector ( is added due to the fact that Matlab array indices starts from 1). The downsampler that follows, starts to sample the signal from this position and returns every symbol. The downsampled output, shown in Figure 5, is then passed through a demodulator that decides on the symbols using an optimum detection technique and remaps them back to the intended message symbols.

Figure 5: Downsampling – output of symbol rate sampler
%Program: Symbol rate sampler and demodulation
%------Symbol rate Sampler-----
uCap = vCap(2*filtDelay+1:L:end-(2*filtDelay))/L;
%downsample by L from 2*filtdelay+1 position result by normalized L,
%as the matched filter result is scaled by L
figure; stem(real(uCap)); hold on;
title('After symbol rate sampler $\hat{u}$(n)',...
'Interpreter','Latex');
dCap = demodulate(MOD_TYPE,M,uCap); %demodulation

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

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

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Precoding for partial response signaling schemes

Introduction to precoding

Intersymbol interference (ISI) is a common problem in telecommunication systems, such as terrestrial television broadcasting, digital data communication systems, and cellular mobile communication systems. Dispersive effects in high-speed data transmission and multipath fading are the main reasons for ISI. To maximize the capacity, the transmission bandwidth must be extended to the entire usable bandwidth of the channel and that also leads to ISI.

To mitigate the effect of ISI, equalization techniques can be applied at the receiver side. Under the assumption of correct decisions, a zero-forcing decision feedback equalization (ZF-DFE) completely removes the ISI and leaves the white noise uncolored. It was also shown that ZF-DFE in combination with powerful coding techniques, allows transmission to approach the channel capacity [1]. DFE is adaptive and works well in the presence of spectral nulls and hence suitable for various PR channels that has spectral nulls. However, DFE suffers from error propagation and is not flexible enough to incorporate itself with powerful channel coding techniques such as trellis-coded modulation (TCM) and low-density parity codes (LDPC).

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

These problems can be practically mitigated by employing precoding techniques at the transmitter side. Precoding eliminates error propagation effects at the source if the channel state information is known precisely at the transmitter. Additionally, precoding at transmitter allows coding techniques to be incorporated in the same way as for channels without ISI. In this text, a partial response (PR) signaling system is taken as an example to demonstrate the concept of precoding.

Precoding system using filters

In a PR signaling scheme, a filter is used at the transmitter to introduce a controlled amount of ISI into the signal. The introduced ISI can be compensated for, at the receiver by employing an inverse filter . In the case of PR1 signaling, the filters would be

Generally, the filter is chosen to be of FIR type and therefore its inverse at the receiver will be of IIR type. If the received signal is affected by noise, the usage of IIR filter at the receiver is prone to error propagation. Therefore, instead of compensating for the ISI at the receiver, a precoder can be implemented at the transmitter as shown in Figure 1.

Figure 1: A pre-equalization system incorporating a modulo-M precoder

Since the precoder is of IIR type, the output can become unbounded. For example, let’s filter a binary data sequence through the precoder used for PR1 signaling scheme .

% Matlab code snippet
>> d=[1,0,1,0,1,0,1,0,1,0]
>> filter(1,[1 1],d)
ans = 1  -1  2  -2  3  -3  4  -4  5  -5

The result indicates that the output becomes unbounded and some additional measure has to be taken to limit the output. Assuming M-ary signaling schemes like MPAM is used for transmission, the unbounded output of the precoder can be bounded by incorporating modulo-M operation.

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

Reference

[1] R. Price, Nonlinear Feedback Equalized PAM versus Capacity for Noisy Filter Channels, in Proceedings of the Int. Conference on Comm. (ICC ’72), 1972, pp. 22.12-22.17

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

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Partial response schemes: impulse & frequency response

Impulse response and frequency response of PR signaling schemes

Consider a minimum bandwidth system in which the filter is represented as a cascaded combination of a partial response filter and a minimum bandwidth filter . Since is a brick-wall filter, the frequency response of the whole system is equivalent to frequency response of the FIR filter , whose transfer function, for various partial response schemes, was listed in Table 1 in the previous post (shown below).

Table 1: Partial response signaling schemes

The hand-crafted Matlab function (given in the book) generates the overall partial response signal for the given transfer function . The function records the impulse response of the filter by sending an impulse through it. These samples are computed at each symbol sampling instants. In order to visualize the pulse shaping functions and to compute the frequency response, the impulse response of are oversampled by a factor . This converts the samples from symbol rate domain to sampling rate domain. The oversampled impulse response of filter is convolved with a sinc filter that satisfies the Nyquist first criterion. This results in the overall response of the equivalent filter (refer Figure 2 in the previous post).

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

The Matlab code to simulate both the impulse response and the frequency response of various PR signaling schemes, is given next (refer book for the Matlab code). The simulated results are plotted in the following Figure.

Figure: Impulse response and frequency response of various Partial response (PR) signaling schemes

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

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

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Partial response (PR) signaling Model

Consider the generic baseband communication system model and its equivalent representation, shown in Figure 1, where the various blocks in the system are represented as filters. To have no ISI at the symbol sampling instants, the equivalent filter should satisfy Nyquist’s first criterion.

Figure 1: A generic communication system model and its equivalent representation

If the system is ideal and noiseless, it can be characterized by samples of the desired impulse response . Let’s represent all the non-zero sample values of the desired impulse response, taken at symbol sampling spacing , as , for .

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

The partial response signaling model, illustrated in Figure 2, is expressed as a cascaded combination of a tapped delay line filter with tap coefficients set to and a filter with frequency response . The filter forces the desired sample values. On the other hand, the filter bandlimits the system response and at the same time it preserves the sample values from the filter . The choice of filter coefficients for the filter and the different choices for for satisfying Nyquist first criterion, result in different impulse response , but renders identical sample values in Figure 2 [1].

Figure 2: A generic partial response (PR) signaling model

To have a system with minimum possible bandwidth, the filter is chosen as

The inverse Fourier transform of results in a sinc pulse. The corresponding overall impulse response of the system is given by

If the bandwidth can be relaxed, other ISI free pulse-shapers like raised cosine can be considered for the filter.

Given the nature of real world channels, it is not always desirable to satisfy Nyquist’s first criterion. For example, the channel in magnetic recording, exhibits spectral null at certain frequencies and therefore it defines the channel’s upper frequency limit. In such cases, it is very difficult to satisfy Nyquist first criterion. An alternative viable solution is to allow a controlled amount of ISI between the adjacent samples at the output of the equivalent filter shown in Figure 2. This deliberate injection of controlled amount of ISI is called partial response (PR) signaling or correlative coding.

Partial Response Signaling Schemes

Several classes of PR signaling schemes and their corresponding transfer functions represented as (where is the delay operator) are shown in Table 1. The unit delay is equal to a delay of 1 symbol duration () in a continuous time system.

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

References

[1] Peter Kabal and Subbarayan Pasupathy, Partial-response signaling, IEEE Transactions on Communications, Vol. 23, No. 9, pp. 921-934, September 1975.↗

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

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

Construct eye diagram from stored signal samples

Eye diagram is a powerful tool to analyze the overall quality of a communication link. It reveals important characteristics of a communication link, that includes timing sensitivity, noise margin, inter-symbol interference (ISI) and zero-crossing jitter. It also shows the optimum sampling time for the receiver, which indicates when to sample the incoming signal for converting it to a symbol stream. It is more useful to plot the eye diagram at the receiver, where it gives visual cues for the engineers to check the signal integrity and to uncover problems in earlier stages of the design process.

Application of eye diagram

For each symbol received through a noisy channel, the receiver has to make the best estimate of what was transmitted. Eventually, this boils down to finding out the optimal decision time for each symbol (through timing recovery circuits) after the signal is processed through the equalizer and the matched filter.

In an eye diagram, each period of the waveform is repeated and overlaid on top of each other, forming an eye like pattern. It is usually visualized at the point just prior to the decisions. It reveals the ability of the receiver to distinguish between signal levels, in the presence of distortions like timing jitters (due to imperfect recovered clocks), noise level in the received signal prior to decision point, etc..,

An ideal eye diagram will show a wider eye that has a lot of margin in both horizontal and vertical direction that allows for lowest possible error rate in the receiver decisions. Figure 1, depicts the eye diagram for 2-PAM modulated square-root raised cosine (β=1) pulse shaped symbols sent through an AWGN channel having EbN0=50 dB (almost no noise condition).

Figure 1: Ideal eye diagram shown for two symbol durations for 2-PAM modulation shaped using square root raised cosine filters.

A narrower eye implies increased sensitivity to noise, since presence of more noise would cause erroneous symbol decisions. In essence, erroneous symbol decisions could be caused by timing jitters (measured in the horizontal direction) or the amplitude variation (measured in the vertical direction) or intersymbol interference (which affects the signal in both directions). Figure 2, depicts the eye diagram for 2-PAM modulated symbols sent through an AWGN channel having EbN0=20 dB (signal to noise ratio).

Figure 2: Eye diagram shown for 2-PAM modulated pulse shaped symbols corrupted with AWGN noise (EbN0=20 dB)

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

Construction of eye diagrams from signals represented in computer memory.

To construct an eye diagram, the signal is divided into equal sections. The number of samples in each section should be proportional to , where is the symbol period (which is related to the oversampling factor by equation (1).

The factor denotes the oversampling factor or upsampling ratio which is given as the ratio of symbol period () and the sampling period () or equivalently, the ratio of sampling rate and the symbol rate

When all such sections are plotted in an overlapping manner, it produces the eye diagram. This is implemented in the following Matlab function. The sample usage of the function is given in the next section of this chapter and the sample outputs are available in the following Figure.

Program 1: plotEyeDiagram.m: Function for plotting eye diagram (kindly refer the book “Wireless Communication Systems using Matlab”)

function [eyeVals]=plotEyeDiagram(x,L,nSamples,offset,nTraces)
%Function to plot eye diagram
%x - input vector representing the signal
%L - oversampling factor (for calculating x-axis in plot)
%nSamples - number of samples per trace - preferably set to integral
% multiple of oversampling factor L(number of bits per symbol)
%offset - initial offset in the data from where to begin plotting
%nTraces - number of traces to plot
%If the signal processing toolbox is not available, put M=1
% and convert the line that says y=interp(x,M) to y=x

.....
Refer the book Wireless Communication systems using Matlab
.....
end

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

Further reading

[1] Tektronix application note: Anatomy of an eye diagram.↗
[2] Anritsu application note: Understanding eye pattern measurements.↗

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

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results