Digital Communications Matlab Simulink Project. Ahmad Khaled, Sec. 1 BN. 03.
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 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
and
where fc is some reference frequency, Tb is the periodic time of the base signal and Eb is the signal energy per bit.
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.
The transmitted/received signals are plotted on the Quadrature-Amplitude and phase plane.
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.
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
and then the transmitted signals can be expressed as four points:
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.
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 the points assigned are usually on a lattice as well. Note that M=4 yields QPSK.
Same as the others but with QAM modulation/demodulation blocks and with setting M=16 or M=64.
The QAM16 scheme is shown first, followed by the QAM64.
The performance figure for the QAM16 is shown first, followed by the QAM64.
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
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).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.