Sie sind auf Seite 1von 6

Simulink Computer Lab

ENGN4536/ENGN6536 - Wireless Communications


October 4, 2011

1 Objectives
We aim to evaluate the performance of several transmission techniques, and
in particular to observe the advantage brought by having multiple antennas
at destination. To this end, we simulate the transmission with Simulink. We
generate a sequence of bits, modulate them in a QPSK modulation and transmit
them. On the destination side, several decoding techniques are considered,
depending on the number of receive antennas. The estimated bit sequence is
then compared to the original one to compute the bit error probability (BER).
The channel links and noises at the receiver are modeled by complex Gaussian random variables.

2 SISO channel
We rst consider a single antenna source and a single antenna destination. In
this case, the received signals are
y[t] =

Pt h[t]x[t] + w[t]

(1)

where t (1, . . . , T ) is the time index, T is the frame length, Pt is the transmit
power, h = (h[1], . . . , h[T ]) is the array of channel fadings, x = (x[1], . . . , x[T ]) is
the array of modulated signals and w = (x[1], . . . , x[T ]) is the array of additive
white Gaussian noises (AWGN) with variance 2 .
In order to recover the message, the received signal is multiplied by the
complex conjugate of the channel fadings so that
ysiso [t] = h [t]y[t] =

Pt |h[t]|2 x[t] + h [t]w[t].


| {z }

(2)

The resulting noise w[t]


= h [t]w[t] is also an AWGN with variance |h[t]|2 2 .
2
Since |h[t]| is a positive real value, it is enough to check in which quadrant lies
ysiso [t] to compute an estimate x
[t] of the original QPSK symbol.

y[t]
w[t]

x[t]

2.1

Simulink procedure

Open Matlab and Simulink (type simulink in the Matlab command line). The
transmission chain of a SISO transmission is given to you as an example. Open
the model CLab_SISO.

The signal-to-noise ratio (SNR) is dened as


SN R =

E s Pt
2

(3)

where Es is energy of a modulated symbol, Pt is the transmit power and 2 is


the noise variance. In the example, the QPSK symbols are normalized so that
Es = 1 and the noises have unit variance, so the SNR only depends on the
transmit power.
1. Run the simulation and observe the dierent signals. You can observe a
signal sequence with a scope. Just drag a scope from the Simulink library
and draw an arrow from the signal you want to observe to the input of
the scope.
2. By changing the transmit power, vary the SNR and observe the impact
on performance.
3. Run the simulation for SNR from 0 to 30 dB (with a step of 5 dB) and save
the BER values in a Matlab array. Be careful, to obtain reliable values,
the framelength has to be long enough.
4. Using the Matlab command semilogy, plot the performance curve in terms
of BER as a function of the SNR in dB.
2

3 SIMO channel
We now assume that the destination is equipped with two receiving antennas.
In this case, the received signals at each antenna are
y1 [t] = h1 [t]x[t] + w1 [t]

(4)

(5)
We assume both noises sequences w1 and w2 are AWGN with the same variance
2 = 1.
y2 [t] = h2 [t]x[t] + w2 [t]

3.1

Simple addition

We rst simply sum the two signals to obtain


y1 [t] + y2 [t] = (h1 [t] + h2 [t])x[t] + w1 [t] + w2 [t]

(6)

The message can be detected by multiplying the resulting signals by the


conjugate of the equivalent channel.
ysa [t] = (h1 [t] + h2 [t])(y1 [t] + y2 [t])
= |h1 [t] + h2 [t]|2 x[t] + (h1 [t] + h2 [t])(w1 [t] + w2 [t])
{z
}
|

(7)

Once again, |h1 [t] + h2 [t]|2 being a positive real number, it is enough to check
in which quadrant ysa [t] lies.
3.1.1

Simulink procedure

Create a new model and save it as uniID_name.


1. Using the example for the SISO case, the predened blocks in the CLab
library and the commun blocks in the Simulink library, model the transmission of a bit sequence for the the case of two antennas at the reception
with a simple addition.
Hint: the same input signal need to go through two parallel branches,
each of them multiplying the signal by an independent channel fading,
and adding an independent noise.
2. By changing the transmit power, vary the SNR and observe the impact
on performance.
3. Run the simulation for SNR from 0 to 30 dB (with a step of 5 dB) and
save the BER values in a Matlab or Excel table.
4. On the same graph (use the Matlab commande hold on), plot the new
performance curve. Compare and comment. (some questions you should
ask yourself: does it provide diversity? why?)
3

3.2

Maximum Ratio Combining

In order to improve performance, we now smartly combine the signals received


by both antennas.
ymrc [t] = h1 [t]y1 [t] + h2 [t]y2 [t]
= (|h1 [t]|2 + |h2 [t]|2 ) x[t] + h1 [t]w1 [t] + h2 [t]w2 [t]
|
{z
}

(8)

Once again, |h1 [t]|2 + |h2 [t]|2 being a positive real number, it is enough to check
in which quadrant ymrc [t] lies.
3.2.1

Simulink procedure

Do NOT delete the transmission chain for the simple addition case. Just create
a new transmission chain underneath.
1. Model the transmission of a bit sequence for the the case of two antennas
at the reception with an MRC.
Hint: the transmitter side remains the same, only the receiver has to be
rewritten.
2. By changing the transmit power, vary the SNR and observe the impact
on performance.
3. Run the simulation for SNR from 0 to 30 dB (with a step of 5 dB) and
save the BER values in a Matlab or Excel table.
4. On the same graph, plot the new performance curve. Compare and comment.
3.3

Equal Gain Combining

Here, unfortunately, we have access to the phase but not the attenuation of the
fadings. We can use this information by combining the signals received by both
antennas using the EGC technique.
yegc [t] = ej1 [t] [t]y1 [t] + ej2 [t] [t]y2 [t]
= (|h1 [t]| + |h2 [t]|) x[t] + ej1 [t] [t]w1 [t] + ej2 [t] [t]w2 [t]
|
{z
}

(9)

where 1 [t] and 2 [t] are the phases of the channel fadings h1 [t] and h2 [t],
respectively.

3.3.1

Simulink procedure

1. Model the transmission of a bit sequence for the the case of two antennas
at the reception with an EGC.

[t]
Hint 1: you can use ej1 [t] = |hh11[t]|
2
Hint 2: in addition to the previously used blocks, you need the Divide
block.
2. By changing the transmit power, vary the SNR and observe the impact
on performance.
3. Run the simulation for SNR from 0 to 30 dB (with a step of 5 dB) and
save the BER values in a Matlab or Excel table.
4. On the same graph, plot the new performance curve. Compare and comment.
3.4

Selection Diversity

In order to simplify the decoding processing, we now smartly choose which signal
to use, according to its receives SNR at destination. Because the noises have
the same variance at each antenna, this is equivalent to choosing the channel
whith the better fading.
arg max |hi |2
(10)
i{1,2}

Because a single receive signal is considered, the receiver is then similar to


the one is the SISO case.
3.4.1

Simulink procedure

1. Model the transmission of a bit sequence for the the case of two antennas
at the reception with selection diversity.
Hint: in addition to the previously used blocks, you need the switch block.
One input of the switch block is |h1 |2 |h2 |2 that has to be compared to
0.
2. By changing the transmit power, vary the SNR and observe the impact
on performance.
3. Run the simulation for SNR from 0 to 30 dB (with a step of 5 dB) and
save the BER values in a Matlab or Excel table.
4. On the same graph, plot the new performance curve. Compare and comment.

4 Appendix: Available predened blocks


The following predened blocks are available:
Bit generator: outputs a sequence of uniformly distributed bits
Complex Gaussian variable: outputs a random variable following a complex Gaussian distribution with mean 0 and variance 1
QPSK modulator: converts a bit sequence into an array of QPSK symbols
Slice: converts a sequence of complex signals to an array of QPSK symbols
QPSK demodulator: converts an array of QPSK symbols into a bit se-

quence

Error probability: compares the two input bit sequences and computes

the error probability (be careful to put the correct framelength as the
parameter)

Conjugation: conjugates the input signal

These predened blocks are available in the le Clab_lib. To use a block, just
drag it into your model.

Das könnte Ihnen auch gefallen