Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Communications Systems: Second Assessment

General instructions

LI Communication Systems (13812) & LH Communication Systems for Aerospace A (33289) are
practical modules. All of the assessments are via coursework, and the second assessment is based on
the second lab. In this lab you will apply what you have learnt in the lectures and you will
demonstrate concepts from these lectures in MATLAB. When working on this assessment, make sure
that you refer back to the lectures. You will also need to have done the MATLAB on ramp in advance
of the lab. This can be found at: https://uk.mathworks.com/learn/tutorials/matlab-
onramp.html?s_tid=tah_po_mlonramp

When a question says ‘write a routine in MATLAB’ it means that you should create a .m file, which
can be run by any user who opens the file in MATLAB and clicks ‘run’. An example of such a file is
fib.m, which has been loaded onto Canvas as an example. fib.m includes clear, concise comments.
Anything that can be changed by the user is clearly marked. You should work to the same standards.

This lab is worth 30 % of the module.

Ahead of the lab

Before the lab, make sure that you have read through the lab script, watched the three introductory
videos (available on the Canvas page, under the Modules -> Lab 1 tab. These are called lab-intro-
part-1, lab-intro-part-2 and lab-intro-part-3) and completed the MATLAB on ramp
(https://uk.mathworks.com/learn/tutorials/matlab-onramp.html?s_tid=tah_po_mlonramp). This will
ensure that you get off to a flying start during the lab session.

The videos mentioned here are the same as for the first lab so, if you remember these clearly, then
you do not need to watch these again.

Getting the best out of the lab

Prioritise tasks which need to be done in MATLAB – these are the ones where you are most likely to
need some help. Leave writing up the various exercises until after the lab session.

Submission of work

You will submit a single word document on Canvas which contains your work for this assessment,
plus MATLAB (.m) files where these are requested. You are welcome to continue working on this
after the lab. You may spend as much time as you like on this, provided that your work is submitted
on Canvas by 11:00 on Tuesday 28th November 2023.

Format of files

Your word document must be in one of the following formats: .doc, .docx or .pdf. Other file formats
may not open or display correctly on university devices.

Your Matlab file must be a single .m file for each question. You can write this in any version of
Matlab that you like, but it will be tested in the online version of Matlab (matlab.mathworks.com),
so you should ensure that your code runs on this platform. When you submit code on Canvas, it
renames your files. Therefore you should not use one Matlab file to call another. You should not
declare functions – i.e. the following code calculates the average value of x. However this will not
work after the file has been uploaded to Canvas.
function ave = calculateAverage(x)
ave = sum(x(:))/numel(x);
end

Instead, you should write a code which can be executed if the user opens the script and presses
‘run’. An example of such a code is in on the Canvas page for this module under ‘Modules’ -> ‘Lab 1’ -
> ‘fib.m’

Asking for help

Please do ask for help. All questions are welcome. As a number of staff are involved in this lab, I have
produced a guide for staff, which details how much help should be provided. You are welcome to ask
any question, any time. There might be some questions which we cannot answer, as they are an
integral part of the assessment, but you are welcome to ask. The best ways to request help are:

• During the lab: Please ask any of the staff who are in the room.
• After the lab: By email: Email Alan Wood at a.wood.1@bham.ac.uk at any time. Any
questions sent in by the end of the day on Friday 24th November are guaranteed a reply
before the submission deadline. Due to the volume of enquiries, I cannot guarantee a
response to questions asked after this date, but I will do my best. I do not check emails
during the weekends.
• After the lab: In person: Please drop round to see Alan Wood in room 224 of the School of
Engineering building. The best days to find me are Monday, Wednesday and Thursday. You
do not need an appointment, but you can email me at a.wood.1@bham.ac.uk to arrange an
appointment if you prefer.

Question 1

Write a routine in MATLAB that calculates the FFT of a triangular pulse or a Gaussian pulse. Your
routine only needs to do one of these (not both). The FFT should be plotted over the negative to
positive range.

Engineers rarely write code from scratch. It is often more efficient to take and modify a code which
already exists. You may, if you wish, take the MATLAB code FT_flat_topped_pulse.m which was used
in the lectures and modify this. In this case marks will be awarded for how you modify the code. If
you prefer, you may write a MATLAB code from scratch. This question is not assessed, but you need
to complete it as question 2 builds from this. As question 1 is not assessed, you may ask for as
much help as you need with this question (during the lab). If you wish, you may also work with
other students on this question. Questions 2 and 3 need to be done independently.

Questions 2

A useful property of Fourier transforms is linearity, where the addition of two signals in the time
domain is equivalent to the addition of two signals in the frequency domain. In other words:

If 𝑤(𝑡) = 𝑢(𝑡) + 𝑣(𝑡)

then 𝑊(𝑓) = 𝑈(𝑓) + 𝑉(𝑓)

Write a routine in MATLAB which demonstrates this principle. The two functions chosen should be
chosen from the following list:

• Sine wave
• Cosine wave
• Flat-topped pulse
• Half-cosine pulse
• Gaussian pulse

You may use two functions of the same type (as long as they have different periods), or they may be
of different types. It may be that you find that you cannot demonstrate linearity. If this is genuinely
not possible, then the full range of marks are available if you can explain, clearly and in detail, why
this was not possible (i.e. explanations of ‘I didn’t know how to implement function X’ do not get the
full range of marks, explanations of ‘at point X, MATLAB fails to evaluate function Y because …’ could
get the full range of marks.

Question 3

This question is about amplitude modulation in an analogue sense.

Write your own MATLAB code which:

• Creates a sine wave to represent the carrier wave


• Creates a sine wave to represent the signal
• Modulates the carrier wave with the signal
• Adds white Gaussian noise to the modulated signal (this is often done when designing a
communications system, to see whether the signal can be decoded at its destination. You
will explore this further when doing some design tasks in the final assessment)
• Decodes the modulated signal by multiplying the modulated signal by a copy of the carrier
signal and applying a filter or by using another suitable method.

Filters are covered in detail later in the course, and you will use these in the final assignment. In this
assignment, please use a moving median filter, for which the MATLAB command is movmedian.

Hints and tips:

It can be difficult to know where to start with a question such as question 3, so I have provided a
suitable starting point (shown below). This is not the only possible starting point, nor it is necessarily
the best starting point, but you are welcome to use this if you wish. As you can see, the structure is
similar to that used in the lectures for the FFT example. A key difference is that an array is set up,
and the first column of the array is used for the time vector. You could use subsequent columns of
the array for subsequent steps in your solution.

You may find the awgn function in MATLAB useful.


If you are not certain how to use a function in MATLAB, then the MATLAB help files are genuinely
useful. These can be found online, for example the help file for the movmedian function is at:
https://uk.mathworks.com/help/matlab/ref/movmedian.html

Submission of work

You should submit a single word document containing a short summary of what you did for each
question, together with any plots needed for your explanation. Don’t forget to include this
explanation – you cannot get the highest marks if you just submit code and plots.

For each question, you should also submit a single .m file containing your code, which can be run by
another user. This code should be something that the user can open, press run and it will
automatically run without any other input from the user. Your MATLAB code should produce all of
the plots which are included in the short summary, and should leave them up on the screen. When
marking your work, I will open your .m file, press run and see if this creates a result which is correct
and which matches the plots in your short summary. I will assume that your code has been written
to run in MATLAB version 2021b, unless you state otherwise.

Mark scheme

The questions are weighted as follows:

• Question 1: 0%
• Question 2: 50%
• Question 3: 50%

Each question has a number of strands, which indicate how well you have performed in each of a
number of categories (please see the following pages). Your overall mark for each question reflects
the overall standard that you have achieved and is not the weighted average of the strands. This
comment refers to questions 2 and 3 only, you do not need to submit anything for question 1.

This assessment is worth 30% of the module


Module Code: LI Communication Systems (13812) & LH Communication Systems for Aerospace A (33289)
Coursework: Assessment 2
Strand 1: Accuracy and completeness: Applies to all questions
Grade A Grade B Grade C Grade D Grade E Grade F
A detailed/comprehensive Reasonable understanding of the Adequate understanding of the Some understanding of the problem Limited understanding of the problem Inadequate knowledge of key
understanding of the problem is problem demonstrated, evidence of problem. Work demonstrated demonstrated. Work incomplete and demonstrated. Work incomplete and principles with no evidence of
demonstrated, detailed this understanding and appropriate degrees of accuracy in parts but structure missing some key elements. structure missing key elements. understanding. Submission contains
understanding and application of application of key principles contain errors/omissions and/or may factual errors and significant
appropriate methods. some factually incorrect statements. mistakes.
Work contains a few minor errors OR
No more than one or two minor has some minor omissions.
errors.

Strand 2: Clarity: Applies to all questions


Grade A Grade B Grade C Grade D Grade E Grade F
Work is clearly presented and easy to Work is mostly clearly presented, Work is mostly clearly presented, but Work is complete, but difficult to Work contains omissions of key steps. Inadequate level of detail and/or
follow. with a few, minor omissions in is difficult to follow in places. follow. clarity.
places.

Strand 3: Codes and commenting: Applies to all questions


Grade A Grade B Grade C Grade D Grade E Grade F
Code runs without errors and Code runs without errors and Code runs without errors and Code runs without errors and Substantial errors in code, but shows a Substantial errors in code. Shows an
produces the correct solution. produces the correct solution. produces a solution which is only produces a solution which is only limited understanding of the problem. inadequate understanding of the
subtlety wrong. subtlety wrong. problem.
Useful comments provided in the Too many, or too few, comments. Comments are not useful.
right level of detail. Useful comments provided in the Too many, or too few, comments. Comments missing.
right level of detail.

The above strands are provided for information only. The mark awarded for each question is based on the overall standard of your work, and is NOT the weighted average
of these strands.

You might also like