0% found this document useful (0 votes)
30 views3 pages

DCS Assignment03

Uploaded by

Awais Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

DCS Assignment03

Uploaded by

Awais Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Question: Reproduce figure 3.14 on MATLAB, using equation 3.70 and 3.

71

Bit Error Rate:


This MATLAB code calculates and plots the bit error rate (BER) for different modulation
schemes against varying values of ( E_b/N_0 ) (the energy per bit to noise power spectral
density ratio) in decibels.

Here's a brief explanation of what the code does: -

• It first defines a range of (E_b/N_0 ) values from 0 to 40 dB with a step size of 0.1 dB.
• It then converts these values to linear scale (EbN0) using the formula
• ({EbN0} = 10^{\frac{{EbN0\_dB}}{10}}).
• -Next, it calculates the BER for three different modulation schemes: orthogonal,
antipodal, and on-off keying (OOK), using the corresponding formulas.
• Finally, it plots the BER values for orthogonal and antipodal modulation schemes on a
logarithmic scale against ( E_b/N_0 ) values and adds labels, legends, and a grid to the
plot for better visualization. The plot shows the BER performance of orthogonal and
antipodal modulation schemes as a function of ( E_b/N_0 ) ratio. The legend identifies
which curve corresponds to which modulation scheme, and the grid lines assist in reading
the values accurately.

MATLAB Code:
EbN0_dB = 0:0.1:40;

EbN0 = 10.^(EbN0_dB/10);

BER_Orthogonal = erfc(sqrt(EbN0));

BER_Antipodal = erfc(sqrt(2*EbN0));

BER_OOK = erfc(sqrt(0.5*EbN0));

semilogy(EbN0_dB,BER_Orthogonal,EbN0_dB, BER_Antipodal)

legend('Orthogonal','Antipodal')

grid on

ylabel('BER')

title('Bit Error Rate')


Graph

Bit Error Rate (OOK):


This MATLAB code calculates and plots the bit error rate (BER) for on-off keying (OOK)
modulation against varying values of (E_b/N_0) (the energy per bit to noise power spectral
density ratio) in decibels.

• The code calculates the BER specifically for the OOK modulation scheme
using the formula for OOK BER:
({BER} = {erfc}(sqrt{0.5*{EbN0}}) ).
• It plots the BER values for OOK modulation on a logarithmic scale against
(E_b/N_0) values.
• The legend identifies that the plotted curve corresponds to OOK modulation.
• Grid lines are added for better visualization, and labels are provided for the axes
and the plot title. This plot visualizes the BER performance of OOK modulation as a
function of ( E_b/N_0 ) ratio.
MATLAB Code:
EbN0_dB = 0:0.1:40;

EbN0 = 10.^(EbN0_dB/10);

%BER_Orthogonal = erfc(sqrt(EbN0));

%BER_Antipodal = erfc(sqrt(2*EbN0));

BER_OOK = erfc(sqrt(0.5*EbN0));

semilogy(EbN0_dB,BER_OOK)

legend('OOK')

%legend('Orthogonal','Antipodal')

grid on

ylabel('BER')

title('Bit Error Rate')

Graph

You might also like