This week I started to work on the first milestone of this project: The diversity combining at the receiver side.

**Receiver Diversity**

Fading has an enormous influence on the quality of a physical communication channel and therefore on the quality of communication through that channel.

Fading effects can be mitigated by combining independently fading signal paths. These independent fading paths can be achieved in different dimensions, for example through time, polarization or space. The latter is the dimension we exploit in for MIMO techniques. This is called **space diversity **[1].

A positive side effect of the receiver diversity is the increase of the signal-to-noise ratio (SNR) when combining the different reception signals coherently. This SNR enhancement is called **array gain **[1].

Especially at the receiver side, multiple antennas have an enormous effect on the SNR without the need of increasing the transmit power. The only prize we pay is the additional calculational effort when combining the multiple RX antenna signals to one resulting signal. (And of course the fact, that we have to physically provide multiple antennas.)

**Combining techniques**

In this project, we focus on linear combining techniques, meaning that the output of the combiner is a linear combination of the input branches. The general signal processing of a linear combining block is therefore a simple weighted sum (after [1]):

Y describes a sample that results out of a combination of N received input signals r, each weighted by a complex coefficient α.

**Selection Combining (SC)**

One of the easiest combining methods is simply selecting the path with the best input signal in terms of SNR as output signal. When assuming equal noise at each receiver, this is equal to a selection of the path coefficient with the highest magnitude. This leads to the following combining algorithm (if there are no equal csi coefficients):

The selection combining mitigates the effects of fading by constantly switching to the path with the least attenuation. It has obviously no array gain because it only takes one received signal at each time into account.

**Maximum-Ratio Combining (MRC)**

Optimizing the weighted sum in favor of a maximum SNR results in maximum-ratio combining:

The magnitude weighting of each path is proportional to its path coefficient. Afterwards it is normalized to avoid an amplification of the signal. The phase of the weighting elements is the inverse of the phase shift of its related path coefficient. Therefore, all products of the weighted sum have the same phase. This so called ‘**co-phasing**‘ [1] leads to a constructive interference of the different path signals instead of a random interference that could also lead to a signal cancellation in the case of destructive interference, which would obviously not maximize the SNR.

**Structure of the combining C++ block**

The diversity combiner is implemented in the C++ block diversity_combining_cc. It takes N complex input ports and has one complex output port. The combining technique is stored as a string type in a local variable. This has the advantage, that it can be changed during run-time with a respective setter method. The block is generally working in stream mode but vector passing can be enabled by setting the vector length > 1.

CSI is provided via stream tags with the key ‘csi’. With each incoming CSI stream tag, the weighting vector is calculated with the new data. The idea is, that a stream tag comes with each new symbol, where symbol means a frame of data samples which belong together. The definition of a symbol (and therefore the frequency of tagging CSI) is the job of the system designer who uses this block.

The C++ block goes through the following procedure, each time work() is called:

- Get tags in the current input buffer.
- Process samples before the first tag. The current (or initial) weighting vector is used.
- Iterate over tags.
- Read CSI of tag and calculate the new weighting vector.
- Process symbol by calculating the weighted sum and writing it to the output buffer.

The mathematical structure of the weighted sum is not used in the case of selection combining. Instead a variable stores the currently selected input channel. This saves a lot of multiplications with zero.

**Test setup**

A QA test is written in python to ensure the proper functionality of the block. Each combining technique is tested with different parameters, varying the vector length, the number and position of CSI tags and the number of input channels. The input data and the CSI data is generated randomly.

The expected result is calculated in python independently and is compared with the generated result of the C++ block. The test passes, if the results are equal within the first 4 digits.

The calculation of the expected result is in python as easy as (for MRC):

weighting_vector = np.sqrt(np.divide(np.square(np.abs(csi)), np.sum(np.square(np.abs(csi))))) * np.exp(-1j * np.angle(csi)) expected_result = np.dot(weighting_vector, data)

The array ‘data’ has 2 dimensions and stores the input data of all input channels.

**Outlook**

I already finished the diversity combining module, as described here, this week. After a review of my mentors I am going to do some minor changes and improvements before the code gets merged to master.

As a next step, I am starting to write the proposed in-tree top-level documentation about the diversity combining part. The next coding milestone is the implementation of the Alamouti STBC.

Luca

[1] Andrea Goldsmith. 2005. Wireless Communications. Cambridge University Press, New York, NY, USA.

## 2 thoughts on “Week 00 – Diversity Combining”