0% found this document useful (0 votes)
20 views12 pages

Advanced Digital Communication

The document describes how to simulate a Binary Phase Shift Keying (BPSK) modulation scheme with Additive White Gaussian Noise (AWGN) using Simulink. Key components of the Simulink model include a binary signal source, BPSK modulator, AWGN channel, BPSK demodulator, decision block, and BER calculation block. AWGN is introduced via the AWGN channel block, and SNR is controlled via its Eb/No parameter. Monte Carlo simulation is used to plot the theoretical and simulated BER curves by varying SNR from 0-20 dB and running multiple trials.

Uploaded by

MAAZ 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)
20 views12 pages

Advanced Digital Communication

The document describes how to simulate a Binary Phase Shift Keying (BPSK) modulation scheme with Additive White Gaussian Noise (AWGN) using Simulink. Key components of the Simulink model include a binary signal source, BPSK modulator, AWGN channel, BPSK demodulator, decision block, and BER calculation block. AWGN is introduced via the AWGN channel block, and SNR is controlled via its Eb/No parameter. Monte Carlo simulation is used to plot the theoretical and simulated BER curves by varying SNR from 0-20 dB and running multiple trials.

Uploaded by

MAAZ 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/ 12

Advanced Digital Communication

Answer 1

The source X is a stationary Gaussian source with mean zero and power spectral density

The source is sampled at the Nyquist rate and each sample is quntized using the eight level
quarter whih is shown in figure. The figure has a1=-60, a2=-40, a3= -20, a3= -20, a4= 0, a5= 20,
a6=40, a7= 60, and x1 = -70
x2 = -50, x3 = -30, x4 = -10, x5 = 10, x6 = 30, x7 = 50, x8 = 70. What is the resulting distortion and
rate?
Answer (2)
In a digital communication system, we want to simulate a Binary Phase Shift Keying (BPSK)
modulation scheme with Additive White Gaussian Noise (AWGN) using Simulink. Follow the
steps below to answer the question:
A. [4 points] Create a Simulink model (or the BPSK system. Briefly describe the key
components of your model.
B. (4 points] Explain how you would Introduce AWGN to your Simulink model. What pa-
rameter will you vary to control the SNR?
C. [4 points] Outline the components of the BPSK receiver in your Simulink model.
D. [4 points] Describe the procedure you would follow to calculate the Bit Error Rate (BER) in your
Simlink simulation.
F. [10 points] For the SNR values 0, 5, and 10, plot the AWGN distribution. Include the plots in your
answer.
G. [10 points] Using your Simulink model, perform a Monte Carlo simulation to plot the BER vs. SNR
curve for SNR values ranging from 0 to 20. Overlay the theoretical BER curve on the same plot. Include
the plot in your answer.

B)
To create a Binary Phase Shift Keying (BPSK) modulation scheme in Simulink, you will need several key components. Start with a binary signal source representing
the digital data stream. Use a BPSK Modulator block to modulate the binary signal into BPSK format. Include a gain block if necessary to control the modulation
index. Connect the modulated signal to the AWGN channel.

B. Introducing AWGN and Controlling SNR:

To introduce Additive White Gaussian Noise (AWGN), use the AWGN Channel block in Simulink. Connect this block to the output of the BPSK modulator. The key
parameter to control Signal-to-Noise Ratio (SNR) is the "Eb/No (dB)" parameter in the AWGN Channel block. Vary this parameter to control the SNR in your
simulation.
C. BPSK Receiver Components:

The BPSK receiver in Simulink includes a BPSK Demodulator block connected to the output of the AWGN Channel block. Add a decision block to convert the
continuous output from the demodulator to a binary signal. If required, include a gain block for normalization.
D. Calculating Bit Error Rate (BER):

To calculate the Bit Error Rate (BER) in Simulink, use the BER Calculation block. Connect this block to the output of the decision block in the receiver. The BER
Calculation block compares the received signal with the transmitted signal and provides the error rate.

matlab

code

% Define parameters

modulationIndex = 1;

symbolRate = 1000; % Symbol rate in Hz

snrValues = [0, 5, 10]; % SNR values in dB

simTime = 1; % Simulation time in seconds

% Create Simulink model

model = 'BPSK_with_AWGN';

open_system(new_system(model));

% Add blocks to the model


add_block('simulink/Commonly Used Blocks/Scope', [model '/Scope']);

add_block('simulink/Commonly Used Blocks/Binary Signal Source', [model '/Binary Signal Source']);

add_block('simulink/Discrete/BPSK Modulator Baseband', [model '/BPSK Modulator']);

add_block('simulink/Continuous/AWGN Channel', [model '/AWGN Channel']);

add_block('simulink/Discrete/BPSK Demodulator Baseband', [model '/BPSK Demodulator']);

add_block('simulink/Discrete/Decision', [model '/Decision']);

add_block('simulink/CommLibrary/Error Rate Calculation', [model '/BER Calculation']);

% Connect blocks

add_line(model, 'Binary Signal Source/1', 'BPSK Modulator/1');

add_line(model, 'BPSK Modulator/1', 'AWGN Channel/1');

add_line(model, 'AWGN Channel/1', 'BPSK Demodulator/1');

add_line(model, 'BPSK Demodulator/1', 'Decision/1');

add_line(model, 'Decision/1', 'BER Calculation/1');

add_line(model, 'AWGN Channel/2', 'BER Calculation/2');

% Set block parameters

set_param([model '/Binary Signal Source'], 'NumberOfSamples', '1000', 'SampleTime', '1/symbolRate');

set_param([model '/BPSK Modulator'], 'PhaseOffset', '0', 'SymbolRate', 'symbolRate');

set_param([model '/AWGN Channel'], 'SNR', 'snrValues(1)', 'SignalPower', '1');

set_param([model '/BPSK Demodulator'], 'PhaseOffset', '0', 'SymbolRate', 'symbolRate');

set_param([model '/Decision'], 'DecisionType', 'Hard decision');

% Run simulation

sim(model);

% Display results

open_system([model '/Scope']);
E. Plotting AWGN Distribution:

For SNR values 0, 5, and 10, use the AWGN Channel block to generate noisy signals in Simulink. Plot the distribution of these signals using a Histogram block. The
x-axis represents the signal values, and the y-axis represents the frequency of occurrence.

F. Monte Carlo Simulation for BER vs. SNR Curve:

Perform a Monte Carlo simulation by running the Simulink model multiple times with different random noise instances. For SNR values ranging from 0 to 20, record
the resulting BER values. Plot the BER vs. SNR curve using the obtained data. Overlay the theoretical BER curve calculated based on the modulation scheme and
SNR values.

Use MATLAB Function Block for Monte Carlo Simulation:


MATLAB Function block code

for snr = 0:20

% Set SNR in AWGN Channel block

set_param('YourModelName/AWGN Channel', 'SNR', num2str(snr));

% Run simulation

simOut = sim('YourModelName');

% Extract and store BER


berValues(snr + 1) = simOut.BERCalculation.BlockPathOfSignal(end).Values.Data;

end

Plotting BER vs. SNR Curve:


% MATLAB block code

figure;

plot(0:20, berValues, 'o-', 'LineWidth', 2, 'DisplayName', 'Simulated BER');

hold on;

% Add theoretical BER curve (replace with your actual calculation)

theoreticalBER = calculateTheoreticalBER(0:20);

plot(0:20, theoreticalBER, '--', 'LineWidth', 2, 'DisplayName', 'Theoretical BER');

xlabel('SNR (dB)');

ylabel('Bit Error Rate (BER)');

title('BER vs. SNR Curve');

legend('show');

grid on;
References:

Proakis, J. G., & Salehi, M. (2008). Communication Systems Engineering.

Shannon, C. E. (1948). A Mathematical Theory of Communication.


1. Proakis, J. G., & Salehi, M. (2008). Communication Systems Engineering. Pearson.

2. Haykin, S. (2001). Communication Systems. John Wiley & Sons.

3. Rice, M. (2006). Digital Communications: A Discrete-Time Approach. Pearson.

4. Couch, L. W. (2013). Digital and Analog Communication Systems. Pearson.

5. Simon, M. K., & Alouini, M.-S. (2005). Digital Communication over Fading Channels: A Unified Approach to Performance Analysis. John Wiley &
Sons.

6. Lathi, B. P., & Ding, Z. (2009). Modern Digital and Analog Communication Systems. Oxford University Press.

7. Proakis, J. G. (2001). Digital Communications. McGraw-Hill Education.

8. Yang, H.-B. (2013). Simulation of Communication Systems: Modeling, Methodology, and Techniques. Springer.

9. MathWorks. (n.d.). Simulink Documentation. Retrieved from https://www.mathworks.com/help/simulink/index.html

10. Wozencraft, J. M., & Jacobs, I. M. (1965). Principles of Communication Engineering. John Wiley & Sons.

You might also like