Starting from:

$30

EE2025-Assignment 1 Digital Modulation and Demodulation Solved

Programming Language: You can use Matlab, Python or any other tool for this programming assignment.

The Problem: You will implement digital modulation and demodulation to communicate a binary image file across an additive white Gaussian noise channel. The image file binary image is included with this assignment in numpy and Matlab formats. This is a 110×100 array, where each element is a 0 or a 1. Here, a 0 represents a black pixel and 1 is a white pixel. You can load and render the image in python and Matlab as follows. Do not copy-paste these commands, but manually type them in the command window or terminal.

Python:

import numpy as np

from matplotlib import pyplot as plt MonaLisa = np.load(‘binary image.npy’) plt.imshow(MonaLisa,‘gray’), plt.show()

Matlab:

load binary image.mat imshow(MonaLisa, [0 1])

The image, in all, contains 110 × 100 = 11000 information bits. You will modulate and transmit them using 4-QAM modulation scheme with carrier frequency 2 MHz and symbol duration 1 micro sec, i.e., 2 bits are transmitted per micro second. The receiver will use the optimal demodulator, i.e., the maximum-likelihood detector or the minimum distance detector.

You will simulate the communication for 4 values of Eb/No: −10,−5,0,5 dB. For each of these scenarios, you will plot the received image (which will be noisy) and report the number of pixels that were wrongly demodulated. These four figures and the corresponding number of wrong pixels must be reported in a single pdf file.

Channel model and modulation scheme: The carrier frequency fc = 2 MHz and symbol duration T = 1µ sec. Since each symbol carries 2 bits, the overall communication duration is 11000 × T/2 = 5.5 msec. The transmitted waveform s(t) for duration 0 ≤ t < 0.0055 is determined as follows. We first order the pixels or information bits in a sequence b1,...,b11000. For each i = 1,...,5500, we transmit one 4-QAM symbol in the time window (i − 1)T ≤ t < iT that modulates the bits b2i−1 and b2i. The transmitted waveform in this interval is given by

s(t) = x2i−1 cos(2πfct) + x2i sin(2πfct), for (i − 1)T ≤ t < iT,

where xj = +1 if bj = 0 and xj = −1 if bj = 1. Given this modulation scheme, you must calculate the energy per information bit Eb. This will be required to determine the value of noise power spectral density No/2.

The noise w(t) is modelled as a Gaussian random process with power spectral density equal to No/2 across all frequencies. For a given value of Eb/No, you can calculate No since Eb is already known. The received waveform is

r(t) = s(t) + w(t) for 0 ≤ t < 0.0055.

1

The Discrete-Time Model: Since we need to simulate the communication scheme using Matlab/python, we need to discretize the channel model. We will use a sampling rate of fs = 50 MHz. We will assume that the received waveform r(t) is first passed through an ideal low-pass filter with bandwidth −fs/2 < f < fs/2, and then sampled at rate fs samples per second. The total number of samples of r(t) will be fs ×0.0055 = 275000, since the communication duration is 5.5 msec. We will make the simplifying assumption that the low pass filtering operation does not distort the transmitted waveform s(t). Under this assumption, the nth sample is

r[n] = s[n] + w[n] = r(nTs) = s(nTs) + w(nTs), for n = 0,1,...,274999,

where Ts = 1/fs. The transmitted signal is captured by the sequence s[n] = s(nTs) and noise by w[n]. The noise signal w[n] is modelled as composed of independent and identically distributed Gaussian random variables with mean zero and variance fs × No/2.

Note that the number of samples per QAM symbol is fs × T = 50, i.e., samples r[0],...,r[49] correspond to bits b1 and b2; the next 50 samples correspond to bits b3 and b4, and so on. The receiver uses minimum distance decoding on r[0],...,r[49] to demodulate b1 and b2, and uses the next 50 samples to demodulate b3 and b4, and so on.



Verifying your simulation results: The bit error rate (BER) of 4-QAM modulation scheme is Q(p2Eb/No), where Q is the Gaussian tail function. Thus, the number of pixels that are wrongly demodulated will be approximately equal to 11000 × BER. You can use this rule-of-thumb to verify if your program is correct.

More products