# A Rayleigh Fading Simulator with Temporal and Spatial Correlation

Just to recap, building an LTE fading simulator with the desired temporal and spatial correlation is a three step procedure.

1. Generate Rayleigh fading sequences using Smith’s method which is based on Clarke and Gan’s fading model.

2. Introduce spatial correlation based upon the spatial correlation matrices defined in 3GPP 36.101.

3. Use these spatially and temporally correlated sequences as the filter taps for the LTE channel models.

We have already discussed step 1 and 3 in our previous posts. We now focus on step 2, generating spatially correlated channels coefficients.

3GPP has defined spatial correlation matrices for the Node-B and the UE. These are defined for 1,2 and 4 transmit and receive antennas. These are reproduced below.

Spatial Correlation Matrix

The parameters ‘alpha’ and ‘beta’ are defined as:

Low Correlation
alpha=0, beta=0

Medium Correlation
alpha=0.3, beta=0.9

High Correlation
alpha=0.9, beta=0.9

The combined effect of antenna correlation at the transmitter and receiver is obtained by taking the Kronecker product of individual correlation matrices e.g. for a 2×2 case the correlation matrix is given as:

Correlation Matrix for 2×2 MIMO

Multiplying the square root of the correlation matrix with the vector of channel coefficients is equivalent to taking a weighted average e.g. for the channel between transmit antenna 1 and receive antenna 1 the correlated channel coefficient h11corr is given as:

h11corr=w1*h11+w2*h12+w3*h21+w4*h22

where w1=1 and w2, w3 and w4 are less than one and greater than zero. For the high correlation case described above the channel coefficient is calculated as:

h11corr=0.7179*h11+0.4500*h12+0.4500*h21+0.2821*h22

From a practical point of antenna correlation is dependent on the antenna separation. Greater the antenna spacing lower is the antenna correlation and better the system performance. However, a base station requires much higher antenna spacing than a UE to achieve the same level of antenna correlation. This is due to the fact the base station antennas are placed much higher than a UE. Therefore the signals arriving at the base station are usually confined to smaller angles and experience similar fading. A UE on the other hand has a lot of obstacles in the surrounding areas which results in higher angle spread and uncorrelated fading between the different paths.

# Antenna Radiation Pattern and Antenna Tilt

An introductory text in Communication Theory would tell you that antennas radiate uniformly in all directions and the power received at a given distance ‘d’ is proportional to 1/(d)^2. Such an antenna is called an isotropic radiator. However, real world antennas are not isotropic radiators. They transmit energy in only those directions where it is needed. The Gain of a antenna is defined as the ratio of the power transmitted (or received) in a given direction to the power transmitted in that direction by an isotropic source and is expressed in dBi.

Although antenna Gain is a three dimensional quantity, the Gain is usually given along horizontal and vertical planes passing through the center of the antenna. The Horizontal and Vertical Gain patterns for a popular base station antenna Kathrein 742215 are shown in the figure below.

Kathrein 742215 Gain Pattern

The actual Gain is given with respect to the maximum Gain which is a function of the frequency e.g. in the 1710-1880 MHz band the maximum Gain has a value of 17.7dBi. Another important parameter is the Half Power Beam Width (HPBW) which has values of 68 degree and 7.1 degree in the horizontal and vertical planes respectively. HPBW is defined as the angle in degrees within which the power level is equal to or above the -3 dB level of the maximum.

Also shown in the above figure are approximate Horizontal Gain patterns for two antennas that have been rotated at 120 degrees and 240 degrees. Together these three antennas cover the region defined as a cell. There would obviously be lesser coverage in areas around the intersection of two beams.

A somewhat more interesting pattern is in the vertical direction where the HPBW is only 7.1 degrees. Thus it is very important to direct this beam in the right direction. A perfectly horizontal beam would result in a large cell radius but may also result in weak signal areas around the base station. A solution to this problem is to give a small tilt to the antenna in the downward direction, usually 5-10 degrees. This would reduce the cell radius but allow for a more uniform distribution of energy within the cell. In reality the signal from the main beam and side lobes (one significant side lobe around -15 dB) would bounce off the ground and buildings around the cell site and spread the signal around the cell.

Antenna Tilt of 10 Degrees

The above figure gives a 2D view of signal propagation from an elevated antenna with a downward tilt of 10 degrees in an urban environment.

# Alamouti Scheme

So we have seen that multiple transmit antennas provide the same gain as multiple receive antennas if the channel state information can be fed back to the transmitter. But what if the channel state information cannot be fed back to the transmitter (or it can be done but not quickly enough). The solution to this problem is the so called “Alamouti Scheme”. In this scheme two symbols are simultaneously transmitted from two transmit antennas and in the next time slot phase shifted versions of these two symbols are transmitted over the two transmit antennas. The channel is assumed to be quasi static i.e. it is static over the duration of two time slots but then changes for the next two time slots. A combining scheme is used at the receiver which separates the two symbols.

```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% l: Length of symbol sequence
% EbNo: Energy per bit to noise power spectral density
% ber: Output bit error rate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function[ber]=err_rate7(l,EbNo)
s1i=2*(round(rand(1,l))-0.5);
s1q=2*(round(rand(1,l))-0.5);
s1=s1i+j*s1q;
s2i=2*(round(rand(1,l))-0.5);
s2q=2*(round(rand(1,l))-0.5);
s2=s2i+j*s2q;

n1=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
n2=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h1=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
h2=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));

r1=h1.*(sqrt(1/2)*s1)+h2.*(sqrt(1/2)*s2)+n1;
r2=-h1.*conj(sqrt(1/2)*s2)+h2.*conj(sqrt(1/2)*s1)+n2;
s1_=conj(h1).*r1+h2.*conj(r2);
s2_=conj(h2).*r1-h1.*conj(r2);
s1i_=sign(real(s1_));
s1q_=sign(imag(s1_));

ber1=(l-sum(s1i==s1i_))/l;
ber2=(l-sum(s1q==s1q_))/l;
ber=mean([ber1 ber2]);
return
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```

It is observed that this scheme is 3dB worse than MRC (and transmit diversity with CSI). This reason for this is that unlike MRC the signals are transmitted from two transmit antennas thus the power is halved at each transmit antenna (this scheme is also 3dB worse than transmit diversity with CSI at transmitter because although both schemes transmit half the power from each source but in this scheme the noise power is doubled due to the combining scheme working over two time slots).

# Transmit Diversity using Channel State Information

We saw that equal gain combining and maximal ratio combining result in tremendous improvement in bit error rate performance in a Rayleigh fading channel. These are receive diversity schemes i.e. schemes that work with multiple receive antennas. Now let us turn our attention to schemes that work with multiple transmit antennas. We know that the main aim of a combining scheme is to coherently add the signals. If the same signal is transmitted from multiple transmit antennas the resulting signals would not add up coherently when they arrive at the receiver (remember that each path introduces a random phase shift). One solution to this problem is that the channel state information (CSI) be fed back to the transmitter. So if this done quickly enough, before the channel state changes, the phase of the signals at the transmit side could be pre-adjusted so that when these signals arrive at the receiver they combine constructively.

```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function[ber]=err_rate5(l,EbNo)
si=2*(round(rand(1,l))-0.5);
sq=2*(round(rand(1,l))-0.5);
s=si+j*sq;
n=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h1=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
h2=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
sr1=(1/sqrt(2))*s.*(conj(h1)./abs(h1));
sr2=(1/sqrt(2))*s.*(conj(h2)./abs(h2));
r=h1.*sr1+h2.*sr2+n;
si_=sign(real(r));
sq_=sign(imag(r));
ber1=(l-sum(si==si_))/l;
ber2=(l-sum(sq==sq_))/l;
ber=mean([ber1 ber2]);
return
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```

It is observed that above scheme has exactly the same bit error rate performance as equal gain combining. The reason for this is that in the above scheme the noise at the receiver is halved (single receiver means single noise component) but the transmit power is also halved from each of the transmit antennas (to keep the total transmit power same). Thus it does not matter whether the phase adjustment happens at the receiver or the transmitter. But the important question is that can the channel state information be fed back to the transmitter quickly enough?

# Maximal Ratio Combining in Rayleigh Fading

We just saw the advantage an equal gain combiner (a combining scheme that just adds the signals after co-phasing them) provides in a Rayleigh fading channel. Lets now look at a variant of this scheme called maximal ratio combining (MRC). In MRC the signals arriving at the receivers are weighted by the channel gains i.e. a stronger signal is weighted more than a weaker signal before combining. It must be noted that in an actual system the received signals are both scaled and phase shifted thus an MRC receiver multiplies the received signals by the complex conjugate of the channel coefficients before addition.

```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function[ber]=err_rate4(l,EbNo)
si=2*(round(rand(1,l))-0.5);
sq=2*(round(rand(1,l))-0.5);
s=si+j*sq;
n1=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h1=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
n2=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h2=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
r1=abs(h1).*s+n1;
r2=abs(h2).*s+n2;
r=abs(h1).*r1+abs(h2).*r2;
si_=sign(real(r));
sq_=sign(imag(r));
ber1=(l-sum(si==si_))/l;
ber2=(l-sum(sq==sq_))/l;
ber=mean([ber1 ber2]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```

OR (using the complex channel coefficient)

```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function[ber]=err_rate4(l,EbNo)
si=2*(round(rand(1,l))-0.5);
sq=2*(round(rand(1,l))-0.5);
s=si+j*sq;
n1=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h1=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
n2=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h2=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
r1=h1.*s+n1;
r2=h2.*s+n2;
r=conj(h1).*r1+conj(h2).*r2;
si_=sign(real(r));
sq_=sign(imag(r));
ber1=(l-sum(si==si_))/l;
ber2=(l-sum(sq==sq_))/l;
ber=mean([ber1 ber2]);
return
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```

We see that there is an incremental improvement in BER using MRC instead of EGC (1dB can sometimes be significant).

Maximal Ratio Combining

Note:

1. The performance of MRC is the same using both the techniques given above.

2. Phase rotation of the noise component does not effect the BER performance.

# Equal Gain Combining in Rayleigh Fading

When wireless signals travel from a single transmit antenna to multiple receive antennas they experience different fading conditions. While signal from one path may experience a deep fade the signal from another path may be stronger. Therefore selecting the stronger of the two signals (selection combining, threshold combining) or adding the signals (equal gain combining, maximal ratio combining) would always yield much better results (lower bit error rate). However, there must be sufficient spacing between the different receive antennas for the received signals to be dissimilar (uncorrelated). In the simulation below we consider a 1-Tx, 2-Rx scenario. The signals arriving at the two receive antennas are added together before detection.

```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function[ber]=err_rate4(l,EbNo)
si=2*(round(rand(1,l))-0.5);
sq=2*(round(rand(1,l))-0.5);
s=si+j*sq;
n1=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h1=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
n2=(1/sqrt(2*10^(EbNo/10)))*(randn(1,l)+j*randn(1,l));
h2=(1/sqrt(2))*((randn(1,l))+j*(randn(1,l)));
r1=abs(h1).*s+n1;
r2=abs(h2).*s+n2;
r=r1+r2;
si_=sign(real(r));
sq_=sign(imag(r));
ber1=(l-sum(si==si_))/l;
ber2=(l-sum(sq==sq_))/l;
ber=mean([ber1 ber2]);
return
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```
Equal Gain Combining

Note:

1. Not only the signals on the two paths experience uncorrelated fading but the the noise at the receiver front ends is also uncorrelated.

2. In reality the signals over both the paths would also experience random phase shifts but these can be removed before the combining process at the receiver.