Gel 7014 Digital Communications A20: Bertool and Modulation M-Qam, M-MPSK, M-FSK Evm vs. Ber

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

GEL 7014 Digital Communications A20

Homework A2
BERTool and Modulation M-QAM, M-MPSK, M-FSK
EVM vs. BER

VSA agilent

MATLAB AWGN

real- time
Data RRC filter Σ RRC filter oscilloscope
(RTO)

spectrum analyzer
(ESA)

There are three parts to the homework assignment.

I. This part uses BERTool to easily display BER curves for multiple modulations. You will
calculate the loss against the QPSK for these modulations and validate that the graphs
give the same loss as the loss provided by the calculations.
II. This part uses Agilent's VSA software to estimate the SNR, and from the estimate of
the SNR, subsequently estimate the BER. The signal is generated in Matlab by the pro-
vided HWA2.m file. Matlab also provides calculations on the SNR estimate, to help you
verify your results using VSA software.
III. This part uses Matlab and BERTool to run a Monte Carlo simulation in Matlab.

1
1. Open the "BERTool" tool in Matlab. What are the default settings:
a. What is the type of channel?
b. What is the type and order of themo dulation?
c. What is the level of Eb/N0 considered? b
d. Is there channel coding?

2. BER comparison for several types of modulation.


a. Using BERTool, trace the theoretical curves for the following modulations:
QPSK, coherent BFSK, noncoherent 8FSK, 16PSK and 16QAM.
b. Check the analytical equations of losses against QPSK with the curves dis-
played.

Table 1: Loss of different modulations compared to QPSK


Mod loss w.r.t. QPSK loss w.r.t. QPSK loss w.r.t. QPSK
(theoretical equation) (in dB, in theory)) (in dB, BERToolchart)

QPSK
BFSK
(noncoh)
8FSK
(coherent)

16PSK

16QAM

2
VSA by Agilent
3. Constellation investigation, eye diagrams and EVM
a. Using MATLAB, generate 8PSK and 64 QAM signal sequences with RRC pulses r=0.5.
Use a unique "seed" (per student), but repeat this "seed" for each MATLAB simu-
lation!
b. Complete Tables 3 to 5 by taking appropriate steps for 8PSK and 64QAM.
c. Hand in a single PDF file with:
i. Completed tables
ii. Graphics (for two best SNR values is enough)
 The normalized constellation and the reference constellation.
 The spectrum, with the 90%-power bandwidth indicated.
iii. A discussion of the results
 An analysis of the constellations (reference and measured) as a
function of SNR. What do you notice in particular when comparing
the most noisy symbol in each case? Why is that so?
 How do the parameters EVM and BER indicate system perfor-
mance?
 How do the parameters EVM and BER differ from each other in es-
timating system performance?
 Compare theoretical BER and BER estimated via EVM.
 In which case is the EVM a bad estimate to predict the BER. Why is
that so? (Hint: You need to know how VSA calculates the EVM.)
 Compare the theoretical bandwidth and the bandwidth you meas-
ure. Also make a comparison of spectral efficiency. You also need to
comment and explain your results.

PROCEDURE:
 Using the VSA software, load the SetupDev2no3.setx file using
file => recall => recall setup
 Open the window MeasSetup => Digital Demod Properties.
 Choose the Format tab and select the appropriate modulation (8PSK or
64QAM).
 In the Filter tab, use an RRC measurement filter and a RC reference filter.
 Using the HW2.m file, generate the requested signals by inputting the appro-
priate SNR. For this exercise, always select gray coding; the program produces
a text file containing the signal to be loaded into the VSA software.
 Using VSA, go into file => recall => recall recording and select the text file of
the Matlab-generated signal.
 In order to have a good signal trace, return to the MeasSetup => Digital De-
mod Properties window. In the Format tab, use a maximum value in the Result
Length option.
 You should also change the number of points per symbol to 20.

3
Table 2: 8PSK measurements for various SNR values
8PSK
SNR Eb/N0
EVMVSA SNR=1/(EVMVSA)2
(dB) (dB) BEREVM BERtheo
%rms (dB)
Matlab Matlab
40
30
20

Table 3: 8PSK BER and Spectral Efficiency


8PSK
SNR
(dB) BEREVM BERtheo ηVSA ηtheo
Matlab
40
30
20

Table 4: 64QAM measurements for various SNR values


64QAM
SNR
Eb/N0 (dB) EVMVSA SNRVSA (MER)
(dB) BEREVM BERtheo
Matlab %rms (dB)
Matlab
40
30
20

Table 5: 64QAM BER and Spectral Efficiency


64QAM
SNR
(dB) BEREVM BERtheo ηVSA ηtheo
Matlab
40
30
20

Eb
BERtheo  BER ( SNRMATLAB ) ; SNRMATLAB  theo
N0
E E
BERVSA  BER  SNR ( MER )  ; SNR (MER )  b theo vs. SNR (MER )  b VSA
N0 N0
VSA  R / BWVSA

4
Matlab code for Monte Carlo simulation

4. Here is the Matlab code for the simulation of 64QAM and 8PSK

EbNo=15; n = 10000; M = 64;


hMod = comm.RectangularQAMModulator(M);
hDemod = comm.RectangularQAMDemodulator(M);
hChan = comm.AWGNChannel('NoiseMethod', 'Signal to noise ratio (SNR)');
hErrorCalc = comm.ErrorRate;
snr = EbNo+10*log10(log2(M)); % Because of nonbinary modulation
hChan.SNR = snr; %Assign Channel SNR
msg = randi([0,M-1], n, 1); % Generate message sequence.
txsig = step(hMod, msg); % Modulate.
hChan.SignalPower = (txsig'*txsig)/length(txsig);
rxsig = step(hChan,txsig); % Add noise.
decodmsg = step(hDemod, rxsig); % Demodulate.
serVec = step(hErrorCalc, msg, decodmsg); % Symbol error rate
ber=serVec(1)/log2(M);
numErrors=serVec(2)

a. For 64QAM, EbNo=18 dB, display a "scatterplot" of the received signal (rxsig)
for 10,000 symbols.
b. For 64QAM, EbNo=18 dB, generate n symbols and count errors at reception
(Monte Carlo simulation). Complete the next table and discuss the impact of
the number of errors on the quality of the BER estimate.

n # erreurs BER Monte Carlo BER exact


1,000
10,000
100,000
1,000,000

c. Use BERTool to generate and plot a Monte Carlo simulation of the BER curve
for 64QAM for EbN0 de of 0 to 18 dB by steps of 1 dB. Plot the theoretical BER
curve with the Monte Carlo simulation. Are the curves of simulation and the-
ory the same?
d. Use BERTool to generate and plot a Monte Carlo simulation of the BER curve
for 8PSK for EbN0 of 0 to 18 dB by steps of 1 dB. Show the theoretical BER
curve with the Monte Carlo simulation results. Are the curves of simulation
and theory the same?
e. Add the SER to the graphs in part c and part d. Discuss the difference between
SER and BER. Did the simulation really calculate the BER?

To make a function usable by BERTool, you have to use the template provided with
Matlab. Change the template to simulate the rectangular pulse. Pay attention to the
difference between SNR and Eb/N0 and be careful to consider normalization based

5
on the number of samples per symbol Tsymbol. For the MC simulation, we will consider
the following parameters: a maximum number of errors and number of bits=10 7.

function [ber, numBits] = BERTooltemplate(EbNo, maxNumErrs, maxNumBits)


% Import Java class for BERTool.
import com.mathworks.toolbox.comm.BERTool;

% Initialize variables related to exit criteria.


serVec = zeros(3,1); % Updated BER values

% --- Set up parameters. ---


% --- INSERT YOUR CODE HERE.
% Simulate until number of errors exceeds maxNumErrs
% or number of bits processed exceeds maxNumBits.
while((serVec(2) < maxNumErrs) && (serVec(3) < maxNumBits))

% Check if the user clicked the Stop button of BERTool.


if (BERTool.getSimulationStop)
break;
end

% --- Proceed with simulation.


% --- Be sure to update totErr and numBits.
% --- INSERT YOUR CODE HERE.
end % End of loop

% Assign values to the output variables.


ber = serVec(1)/log2(M);
numBits = serVec(3);

You might also like