首页 > > 详细

辅导 Communications Systems: Lab Script 4辅导 R语言

Communications Systems: Lab Script. 4

General instructions

LI Communication Systems (13812) & LH Communication Systems for Aerospace A (33289) are practical modules. All of the assessments are via coursework, these assessments are based on the labs. In this lab you will apply what you have learnt in lectures, and you will demonstrate concepts from these lectures in MATLAB. When working on assessments within this session, 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’ .

Ahead of the lab

Before the lab, make sure that you have read through the lab script, watched the two introductory videos 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 and second 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.

The lab session

Please attempt the following questions for the final assignment for this module. Please remember that these are design tasks. To get the highest marks you should clearly explain the reasoning behind the choices that you have made. You should use sensible numbers, for example if you were to choose a temperature of 5500 K (roughly equivalent to the temperature of the surface of the Sun), then this would be a poor choice for a practical communications system.

Question 1

A binary signal is transmitted along a twisted pair of copper wires, with a potential difference of -1 V representing binary 0 and a potential difference of +1 V representing binary 1.

This signal is affected by thermal noise, which can be assumed to follow a Gaussian distribution. You can assume that the noise level is not a function of frequency.

Part a: Create a routine in MATLAB which models this system and where the user can vary the signal power, bandwidth and temperature.

Produce a plot which shows the maximum possible information rate as a function of temperature:

At a fixed bandwidth

•    If the bandwidth is increased to a higher value

If the bandwidth is decreased to a lower value

Produce a plot which shows the probability of a bit error as a function of temperature:

At a fixed bandwidth

•    If the bandwidth is increased to a higher value

If the bandwidth is decreased to a lower value

You should make a recommendation for the operating characteristics (signal power, bandwidth and temperature) of the system. Please note that there is no unique right answer for this part of the question – I am interested in your reasoning, not the precise numerical value.

Part b: Then, assuming that the attenuation of a signal is 2dB per km, write a Matlab code that produces a graph that shows how the signal to noise varies with distance for the operating characteristics that you have chosen.

Your submission should include:

•    A detailed description of your work, including any plots which are needed to clearly explain your work

•    A single .m file for part a which can be run in MATLAB which contains your routine. This .m file should contain any comments which the user needs to be able to easily run this file and reproduce your results

•    A single .m file for part b which can be run in MATLAB which contains your routine. This .m file should contain any comments which the user needs to be able to easily run this file and reproduce your results

If you find that you are unable to complete part a, then you can still attempt part b if you select a reasonable value for signal power and temperature. You can find such reasonable values in the lecture notes .

Question 2

Question 3 of lab 3 was about amplitude modulation in a digital sense. You were asked to write a MATLAB code which created a sine wave, a binary digital signal, modulated the carrier wave with the signal, adds white Gaussian noise to the modulated signal and then decoded the modulated signal.

You should use your work from question 3 of lab 3 as a starting point for question 2 of lab 4.

You should begin by investigating what happens as you vary the amplitude of the Gaussian noise.

When you decode the modulated signal, you should use a moving median filter (introduced in question 3 of lab 3) and you should vary the temporal length of the moving median filter (i.e. vary the number of points from the time series which are used by the moving median filter) and establish the optimum length for this filter.

You should then try at least two other filters and make a recommendation as to which filter gives the best solution (i.e. which filter results in the best reproduction of the original message signal).

Examples of filters which you could try are:

•    A filter which works in the frequency domain by using a Fourier transform (use a fast Fourier transform (the MATLAB command is fft)) to move from the temporal domain to the frequency domain, write code which removes unwanted frequencies and then transform the signal back into the temporal domain).

•    A filter in the temporal domain which works using the max or min functions (or a combination of both of these).

A Butterworth filter

•    A Chebyshev filter

It is intended that you begin this question during the lab and continue working on this outside of the taught sessions. Butterworth and Chebyshev filters will be covered in the lectures in the last week of term (after this lab). Therefore, this question has been written in such a way that you can either use filters which you have already encountered or use those which you will encounter in the final lectures. The mark scheme has been written so that it does not matter which filters you choose (as long as they are properly implemented and your investigation is rigorous).

Question 3 of lab 3 is a starting point for question 2 of lab 4, but you do not need to use the exact code from question 3 of lab 3. You can amend your work from lab 3 any way you like to get a good solution to question 2 of lab 4.

State a limitation of this method of correcting errors in codes and suggests how this limitation could be addressed.

Your submission should include:

•    A detailed description of your work

•    A .m file for part a containing your code, which can be run by another user. You should

make sure that this code contains comments in an appropriate level of detail and any instructions that another user needs to be able to run this code. If you are unsure what level of detail is required, then you are advised to refer back to lab 1.

•    A recommendation of which filter gives the best solution, with a clear justification for your choice.

Submission of work

For the final assignment, you will submit a single word document on Canvas which contains your work for this assessment, plus MATLAB (.m) files where these are needed. You may spend as much time as you like on this, provided that your work is submitted on Canvas by 11:00 on Friday 9th January 2026.

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'





联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!