

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Digital Communications (TL3 71 ) Abdul Waheed Umrani Assignment 1: M-ary Modulations and BER Tool Due on October 10, 202 4 There are two parts to the Assignment 1. 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 MATLAB and BERTool to run a Monte Carlo simulation in MATLAB. Part I.
Part II. 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+10log10(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, 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 Number of errors BER Monte Carlo BER exact 1000 10000 100000 1000000 c. Use BERTool to generate and plot a Monte Carlo simulation of the BER curve for 64QAM for EbN0 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 theory 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? 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 on the number of samples per symbol Tsymbol. For the Monte Carlo simulation, we will consider the following parameters: a maximum number of errors and number of bits = 107.