Anda di halaman 1dari 2

EEE 437

Computer Assignment on Channel Coding


Course Teacher: Dr. Lutfa Akter
October 2012

Part-1: Consider the rate ½ convolution coder discussed in class. In your main program,
generate a stream of (N) random binary data bits (1s and 0s) and use this as the input to the
convolutional coder.
a) Write a function that will take in the input data stream and return the coded output bit
stream.
For this part, assume that there was no error introduced by the channel.
b) Write a function that will take in the coded data stream and uses a viterbi algorithm to
decode it. The function should return the decoded bit stream.
In the main program, compare the decoded bit stream and the original transmitted data stream. In
the case of error-free transmissions check if your decoder functions properly by making sure that
the decoded bit stream matches the original data stream.

Part-2: Consider a BPSK modulator and demodulator. Generate a stream of (N) random binary
data bits (1s and 0s) and map them to a BPSK modulated symbol steam. That is, you can map a 1
to E b and 0 to - E b . For this simulation assume the energy per bit, E b is equal to 2. Also
assume that the channel adds additive white Gaussian noise that is zero mean and has a variance
equal to σ2 (Assume an E b  of 0 dB and use it to calculate σ2 for the noise). So by adding the
0

noise samples to the transmitted BPSK symbols create the received vector. Optimally
demodulated this vector (using the concepts studied in class!) and compare the demodulated
symbols with the transmitted symbols. Keep a counter for the number of errors that were made
by the demodulator and use that to determine the probability of bit error. Repeat this for different
signal to noise ratio (say 0, 2, 4 and 6 dB) and provide a BER (bit-error-rate or probability of bit
error) vs. SNR curve. Note this should be a semilog plot with BER (in powers of 10) on the y-
axis and SNR (in dB) on the x axis. Also, compare this curve with the theoretical performance
curve (provide both curves in the same plot) and check if it matches.
Note: The number of bits, N, should be large enough to run the simulations until 100 errors are
observed.

Part-3: In this part, first generate a large data stream in the main program. Feed this data stream
to the convolutional coder function that you developed in part-1. The output of the coder should
then be BPSK modulated as described in part-2. Therefore, the difference in this part is that
instead of feeding the data stream directly into the BPSK, modulator, we first channel code it and
then modulate it (Remember to scale the E b by Rc for this case). Now assume that the channel
adds noise with variance σ2. Assume a fixed SNR of 0 dB as in part-2. Create the received vector
and demodulate it similar to part-2. Feed the demodulate bit stream into the decoder function
from part-1. Compare the output of the decoder with your original data stream and evaluate the
probability of bit error for this case. Repeat this for different SNRs and create the semilog plot
between BER vs SNR. Plot the two curves from part-2 and this curve together on one plot and
note down your observations. Check that both the full complexity and the low-complexity viterbi
decoder implementation results in the same probability of bit error performance.

Part-4: Repeat part-3. However, at the receiver end, instead of demodulating first and feeding
the hard decisions (i.e., ls and 0s) into the viterbi algorithm, feed the soft-decisions into the
algorithm. In this case, feed the received vector into the algorithm. Instead of calculating the
hamming distance at each point in the VA, calculate the Euclidean distance and find the path that
has the minimum Euclidean distance.

The assignment report should be written neatly [though briefly] and should explain the simulated
system for each part separately.

Anda mungkin juga menyukai