Simulation of various receiver diversity combining strategies in python.
View the Project on GitHub vdesmond/receiver-diversity-combining
Simulation of various diversity combining strategies at receiver side, namely:
The simulation is done for Rayleigh and Rician fading channels, assuming constant trasmission power and QPSK modulation.
In wireless communications, each wave interaction with the objects in the propagation environment results in a large number of sent signal replicas with different attenuation, phase shift, and delay arriving to the receiver input. The superposition of these replicas at the receive side, and the mobility of transmitters and/or receivers, cause time- variability of the received signal amplitude, i.e. at the receive side signal there are amplification or signal attenuation. This phenomenon is referred to, in the literature, as fading.
Rayleigh, Rice, Nakagami-m, Nakagami-q and Weibull distribution are commonly used for modeling signal propagation in environments with multiple signal paths, which depend greatly on fading phenomenon. The application of specific model is conditioned by the specific propagation environment.
In order to improve the system performance in the case of significant fading different methods are used, but diversity combining techniques are most frequently applied. Diversity combining is the technique applied to combine the multiple received signals of a diversity reception device into a single improved signal. The most commonly used techniques of combining signals after application of diversity techniques are:
SC is the simplest and most commonly used method for combining signals in Diversity system, which is based on choosing the branch with the most favourable SNR. SC receiver estimates the current value of SNR in all branches and selects the one with the most favourable SNR.
MRC is the optimal linear technique of signal combination in the Diversity system, which provides the best statistical results in limiting the impact of fading. The signal in each of Diversity branches is, before summarizing, multiplied by the matching weighting factor, thus equating phases of all signals, and the branches with more favorable SNR are taken with greater contribution.
This ensures that the signal with more power has greater contribution in the received sum of signals. Therefore, it is necessary to have measurement of SNR in all branches, and that is why this technique is expensive for practical implementation
When applying EGC technique of combining signals, phase-changes of signals in all diversity branches are compensated, and then signals are summed. Unlike the MRC technique, all summands have the same weighting factor, so it is not required to measure and estimate SNR in all diversity branches. That’s why this technique is simpler and cheaper for practical implementation.
Slightly worse performances comparing to MRC techniques implementation are the tradeoffs of simpler and cheaper practical implementation
DC is basically just summing up all the signals from diversity branches without any phase-change compensation. This generally leads to very poor performance, especially in Rayleigh Fading channel where there is no LOS, and has no practical use. However for simulation purposes, this technique is also included.
Selection Combining
Equal Gain Combining
Maximal Ratio Combining
The code in this repository makes extensive use of Numpy module to simulate simple CDMA-based communication. The program takes in following arguments using argparse
.
-s SAMPLENUM
, --samplenum SAMPLENUM
). Default is 100000
-b BRANCHES
, --branches BRANCHES
). Default is 3
-e START_SNR END_SNR SPACING
, --snr START_SNR END_SNR SPACING
). Default is -7 5 2
-m M1 M2 ...
, --mode M1 M2 ...
). egc mrc selc
egc
: Equal Gain Combiningmrc
: Maximal Ratio Combiningselc
: Selective Ratio Combiningdirc
: Direct Combining-p TYPE
, --plot TYPE
). Required Argument default
: Independent plot for each strategy for respective channel fadingchannel-comparision
: Comparing Rayleigh and Rician channel fading for given modesmode-comparision
: Comparing 2 modes for each of the given modes for respective channel fadingThe code contains the following 2 files
Main file containing the simulation code along with some plotting functions Takes in command line arguments
Utility file containing the methods for receiver diversity combining along with some helper methods
Note: The default path for saving plots is docs. Change this as per your requirements in line plt.savefig()
for 3 plotting functions
Additional comments providing a rough overview of the codeflow is also given
python main.py -h
to see help message (Optional)python main.py
with the required arguments corresponding to the flagsDEBUG
. (Default is INFO
)
Done with
Done with
Done with
Note: for branch L = 1, all strategies behave the same, so it is not shown here.
[1] An Overview and Analysis of BER for three Diversity Techniques in Wireless Communication Systems
[2] Performance Analysis of Diversity Techniques for Wireless Communication System
[3] Diversity Combining, Wikipedia
[4] Lecture 11: Diversity (EE 359: Wireless Communications)
[1] T. Rappaport, Wireless Communications: Principles and Practice, 2nd ed., (Upper Saddle River, N.J.: Prentice Hall, 2002).
This software is licensed under the terms of the MIT License. The images in docs are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.