Skip to content

rka97/ELC325-Project

Repository files navigation

ELC325-Project

Digital Communications Matlab Simulink Project. Ahmad Khaled, Sec. 1 BN. 03.

Instructions for Reproducing Figures

This code requires MATLAB, Simulink, and the Digital Communication Toolbox to run. Open MATLAB, then open Main.prj as a Simulink project and run gen_plots.m: this will generate the BER figures for the base models, then run gen_plots_rc.m: this will generate the BER figures for the RC models. The scripts run each of the simulink files for the differnet modulation schemes and records the results. They also also show the scatter plots required, which can be saved using MATLAB's Save As Figure.

BPSK Scheme

Description

BPSK is a kind of Phase Shift Keying: the bits are transmitted by modulating the phase of a constant frequency signal. In Binary Phase Shift Keying (BPSK), only two phases (separated by 180 degrees) are used. The equations describing the transmitted signals are

s_1 (t) = \sqrt{\frac{2E_b}{T_b}} \cos (2 \pi f_c t)

and

s_2 (t) = -\sqrt{\frac{2E_b}{T_b}} \cos (2 \pi f_c t)

where fc is some reference frequency, Tb is the periodic time of the base signal and Eb is the signal energy per bit.

Reproducing the Model

The components are the Random Integer block, the BPSK modulation / demodulation blocks, the AWGN channel block, and blocks for error rate calculation and display. Setting the integer block to generate binary numbers, setting the sample time to 0.002 and connecting the blocks as bpsk.slx should lead to the same model. For raised cosines, add a normal raised cosine filter transmit block before the AWGN channel and add a normal raised cosine filter receive block after the AWGN channel: set the filter span in symbols to 6, the number of output samples to 8, the decimation factor to 8, the rolloff factor to 0.2, and add a receive delay of 6 (because of the filtering window) to the error rate calculation block.

Scatter Plot at Eb/No=10

The transmitted/received signals are plotted on the Quadrature-Amplitude and phase plane.

BPSK Transmitted Constellation

BPSK Received Constellation

RC Scatter Plots

BPSK Transmitted Constellation

BPSK Received Constellation

BER vs Eb/No performance figure

The bit error rate is shown as Eb/No varies from -10 dB to 10 dB. Note that it goes to zero at high Eb/No and this cannot be plotted in a semilog graph of finite precision. BPSK Performance

BPSK Performance

QPSK Scheme

Description

QPSK (Quadriphase-Shift Keying) is also a phase-shift keying scheme, like BPSK, but instead of two phases it uses four different phases, usually spaced out equally (like pi/4, 3pi/4, 5pi/4, and 7pi/4). This results in four points in the signal space. In signal space, we have two basis functions

\phi_1 (t) = \sqrt{ \frac{2}{T_s} } \cos (2 \pi f_c t) \text { and } \phi_2 (t) = \sqrt{ \frac{2}{T_s} } \sin (2 \pi f_c t)

and then the transmitted signals can be expressed as four points:

 \left ( \pm \sqrt{\frac{E_b}{2}}, \pm \sqrt{\frac{E_b}{2}} \right )

Reproducing the Model

Same as BPSK but use QPSK modulation/demodulation blocks and set the integers to be generated in the range 0-3 (i.e. put M=4 in the Integer block). RC is also the same.

Scatter Plot at Eb/No=10

QPSK Transmitted Constellation

QPSK Received Constellation

RC Scatter Plots

QPSK Transmitted Constellation

QPSK Received Constellation

BER vs Eb/No performance figure

QPSK Performance

QPSK Performance

QAM Schemes

Description

QAM is a generalization of M-ary PAM in which each message point is assigned a point in the signal space formed by the two basis functions \phi_1 (t) = \sqrt{ \frac{2}{T_s} } \cos (2 \pi f_c t) \text { and } \phi_2 (t) = \sqrt{ \frac{2}{T_s} } \sin (2 \pi f_c t) the points assigned are usually on a lattice as well. Note that M=4 yields QPSK.

Reproducing the Model

Same as the others but with QAM modulation/demodulation blocks and with setting M=16 or M=64.

Scatter Plot at Eb/No=10

The QAM16 scheme is shown first, followed by the QAM64.

QAM16 Transmitted Constellation

QAM16 Received Constellation

QAM64 Transmitted Constellation

QAM64 Received Constellation

RC Scatter Plots

QAM16 Transmitted Constellation

QAM16 Received Constellation

QAM64 Transmitted Constellation

QAM64 Received Constellation

BER vs Eb/No performance figure

The performance figure for the QAM16 is shown first, followed by the QAM64.

QAM16 Performance

QAM16 Performance

QAM64 Performance

QAM64 Performance

FSK Scheme

FSK (Frequency Shift Keying) is a nonlinear method of passband data transmission. The idea is to transmit a sinusoidal signal whose frequency varies according to the transmitted data. A typical example of such transmission is transmitting signals of the form

s_i (t) = \sqrt{ \frac{2 E_b}{T_b} \cos \left ( 2 \pi f_i t \right ) } \text { when } 0 \leq t \leq T_b \text { and } s_i (t) = 0 \text { otherwise}

for i=1, 2, .., M (M is the set size) and where the frequencies (fi) vary by the transmitted bit. Here we test FSK with M=2 (binary FSK).

Reproducing the Model

Same as the others but set the total frequency to 1 Hz. with FSK modulation/demodulation blocks, set M=2, set the samples per symbol to 10 and set the frequency separation to be 1 Hz. In the RC version all the extra steps are the same as the BPSK RC except that the receive delay is set 1 instead.

Scatter Plot at Eb/No=10

FSK Transmitted Constellation

FSK Received Constellation

RC Scatter Plots

FSK Transmitted Constellation

FSK Received Constellation

BER vs Eb/No performance figure

FSK Performance

FSK Performance

About

Digital Communications Matlab Simulink Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages