Electronic and Computer Engineering ELEC1200
Electronic and Computer Engineering
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Electronic and Computer Engineering
ELEC1200 Project
Objective
Design a transmitter-receiver pair that works over an unknown, but fixed channel.
Your objective is to minimize the number of samples subject to the constraint that
the bit error rate, BER < 0.02.
Instructions:
Download the Project.zip file from the canvas page. Open MATLAB and make sure
that you can find the files in the 'Current Folder'.
First, run the command
addpath functions
This will add the directory functions to your MATLAB path.
Then, you can test the project code by running run_pro(SID), where SID is your
student ID as a character array. If your student ID is 12345678, then run
run_pro(‘12345678’);
You will get the Sample Ratio (number of samples transmitted / number of
information bits) and the Bit Error Rate.
Default code:
When you run the given run_pro(‘sid’) file, the code generates a random bit
sequence tx_bs with nbits (50000) bits.
Transmitter:
The function transmit.m sets the samples per bit (prop_out.SPB) and prepares the
bit stream tx_bs before converting into a waveform
• Bits are transmitted with SPB samples.
prop_out.SPB = 100; % required <= adjust your SPB (Do not
remove this line of code)
• Bit ‘1’ is transmitted with a value 1.
• Bit ‘0’ is transmitted with a value -1.
• tx_bs is limited from 0 to 1.
The Sample Ratio is computed by taking the ratio of the number of bits (info)
generated and the length of the samples of the transmitted waveform (not
including the training sequence), i.e.,
SampleRatio = length(tx_wave) / nbits
A training sequence, which consists of 500 samples with value -1, followed by 500
samples of 1, followed by 500 samples of -1 will be added to the beginning of the
sampled waveform.
The resulting waveform is transmitted over the channel.
Note:
In transmit.m, the variable tx_bs is a required variable (do not change this line of
code) as shown in the code and this line should be right before the “end”:
prop_out.tx_bs = tx_bs; % required - transmitted bits (Do not
remove this line of code)
You can add your own code, for example, channel code before the line of code
above and assign your encoded bit sequence into tx_bs.
Important: your transmitted bit sequence should be assigned to:
prop_out.tx_bs = tx_bs;
Receiver:
The function receive.m takes the received waveform rx_wave containing the
training sequence and the data and decodes the bit sequence from the
rx_wave_out. Note that the start of the data always corresponds to sample 1 in
rx_wave_out.
Note:
In receive.m, the variable rx_bs is a required variable (do not change this line of
code) as shown in the code and this line should be right before the “end”:
prop_out.rx_bs = rx_bs; % required - decoded bits (Do not remove
this line of code)
Important: your decoded bit sequence should be assigned to:
prop_out.rx_bs = rx_bs;
You can add your own code, for example, channel code before the line of code
above and assign your decoded bit sequence into rx_bs.
The minimum and maximum values, rx_min and rx_max, are extracted from the
training sequence.
The sampled data in rx_wave_out are extracted from the received waveform
(rx_wave) => the training sequence is removed (no training sequence in
rx_wave_out)
Finally, the code computes the BER and reports the Sample Ratio and the Bit Error
Rate.
Your assignment
Your objective is to optimize the transmitter and receiver so that you can minimize
the Sample Ratio.
As a start, you might try changing the default values of SPB in transmit.m
Note that SPB can be any positive integer. For example, you might try increasing or
decreasing prop_out.SPB to see whether it is possible to reduce the Sample Ratio
while keeping the BER below 0.02.
Then, you should try to add a channel code to change the properties to further
reduce the sample ratio while keeping the BER below 0.02. You will need to change
the matlab code at the transmitter and the receiver to add a channel code.
However, modifying the matlab code to enable “side channel information” is not
allowed. In other words, you are NOT allowed to modify the matlab code so that
information about the transmitted bit (tx_bs) sequence is passed in any variables.
NOTE: All students need to add a channel code in order to be eligible for full
marks!!
You should also consider changing the structure/processing of the receiver to
enhance its performance as well of reducing BER. One improvement possible is to
think about how to devise receiver processing where the effect of noise is
reduced.
Submission (online)
1. A written report (≤ 1000 words). Only the first 1000 words will be
marked.
2. The following MATLAB files contained in a single zip file
Project_SID.zip.
a. transmit.m
b. receive.m
Note that SID indicates your student ID. For example, if your SID is 12345678,
then your zip file is Project_12345678.zip.
NOTE: DO NOT hand in MATLAB Live Scripts!!! (lose 20%)
Marking criteria:
1. [5%] Written report. This should address the following:
• Description of your transmitter.
• Description of your receiver.
• How did you find the value of SPB?
• Description of your channel code (if any).
• Description of your results.
2. [5%] MATLAB code
3. [20%] The Sample Ratio and the Bit Error Rate.
Note that because the channels for each student are different, the best
results will be different, and cannot be directly compared. Your solution will
be compared against the reference solution created by the instructors for
each channel.
If your Bit Error Rate (BER) is not below 0.02, your sample ratio will not be
counted. You will only get the minimum score.
Note: use run_pro(SID) to test your code. If your code gives errors or cannot be
run, you will lose 20%!
Note that the project accounts for 30% of your overall grade,
Important Notes:
Late submissions: NOT accepted!
Academic Integrity All codes and reports you submit for grading must represent
the results of your own independent efforts. You can discuss methodologies with
your classmates, but you must do the work independently. All code and reports will
be checked for similarity. Students who are involved (including the copier and the
helper) in an incident of plagiarism will receive a failing grade for the course. The
incident will be reported to the university for appropriate disciplinary actions.
TOOLBOX functions are NOT allowed (lose 20%) You can check if the function
that you are using requires any toolbox: Highlight the file in your “Current Folder”,
click the arrow and choose “Reports” and then click the “Dependency Report”.
From the “Dependency Report”, you can see if the function is using any toolbox.
Or, after running your code, you can type >> license inuse
you should only see “matlab”
For example, lowpass is NOT allowed as it requires several toolboxes as shown on
the right.