The Assignments

There will be two assignments. Both will involve the use of Simulink (an add-on for Matlab). Details follow.

Assignment #1

Submission deadline: Friday 16th November, 2018 at 5.00 pm.

This involves modelling the performance of an envelope detector for AM. Your starting point is the Simulink file here (right-click link to download).

Rather than modelling an actual envelope detector containing diodes, resistors and capacitors, this file features an ideal half-wave rectifier, followed by a low pass filter.

You will need to change the lowpass filter transfer function co-efficients to something more appropriate. See http://uk.mathworks.com/help/signal/ref/butter.html for how to generate more appropriate co-efficients using Matlab itself (transfer these co-efficients manually into the Simulink model).

The system requirements are a receiver half-power bandwidth (at the demodulator output) of 3000 Hz. (This means that the gain at this frequency is )

Find a filter transfer function that meets this requirement, and plot gain and SNR as a function of frequency in the above frequency range. (One way to do this is to use the Fast Fourier Transform. A simpler approach, which will allow you to find gain, if not SNR, is to inject sine waves as $m(t)$ and measure the peak-to-peak amplitude of the output.)

Write a report documenting what you did, how you tested your solution, the results obtained, an analysis of your results, and a conclusions section summarising what you have learned.

An upload link will be provided on loop.dcu.ie. Be sure to upload your report in PDF format, AND separately your code (Simulink files, etc.). You will also be required to submit a paper copy of your report - details to follow via the blog (remind me via the blog if these instructions are not available when you are ready to submit).

Any questions about how to complete the assignment shold be sent via the blog.

Assignment #2

The submission deadline is 5pm on Wednesday 12th December, 2018.

The second assignment concerns measuring the bit error rate in a BPSK moodulator/demodulator in the presence of additive white Gaussian noise. You are not asked to model the effects of inter-symbol interference.

You need to develop a Simulink model of BPSK (i.e., BASK – they are the same), including the modulator, the additive noise and the demodulator.

I’ve discussed this in the Week 9 lectures – pay particular attention to the start of the second recording for details of how to proceed.

There are three phases to this assignment:

  1. Developing the model. I expect you to engage in a dialogue via the EE450 blog (using the “The Assignments” category) about which blocks from the Simulink libraries you should use, and how you should configure and interconnect them.
  2. Getting the model to work, and getting results. You must do this part on your own! Do not share your results with colleagues, except to the extent of informing them (via the blog) that a model arrived at in phase 1) appears to give invalid results.
  3. Documenting your results, analysing them and so forth. Your report must be all your own work. I will be using TurnItIn to check this.

Write a report documenting what you did, how you tested your solution, the results obtained, an analysis of your results, and a conclusions section summarising what you have learned. Submit a paper copy in the dropbox on the third floor of the S building. This should include a signed cover sheet (http://www.dcu.ie/electronics/post/resources/assign_coversheet.doc). Part-time students may post this to me instead (to arrive within a week of the deadline). Everyone must submit an electronic copy of their report _and_ electronic copies of their Simulink and any other software files via the EE450 Loop pages.

What to Do

Your starting point is the modulator model described in http://appliedelectronicsengineering.blogspot.ie/2014/04/this-short-article-shows-how-to.html. This features a “binary bits” block taken from the DSP Toolbox (which we don’t have). I will replace this with a Uniform Random Number generator (with the default parameters min=0,max=+1) followed by a Matlab Function block (where you can put in your own Matlab code). Double click this and enter the following code

function y = fcn(u)
%#codegen

if ( u > 0.5)
        y = 1;
else
        y = 0;
end

The channel is modelled as a perfect wire, but we add gaussian noise (use the “Band-Limited White Noise” source for this). Then we apply the corrupted s(t) to a BPSK demodulator as per slide 308 (BASK Mod VII) of the notes. Instead of recovering the clock from s(t), just run a copy of the carrier across from the demodulator.

You will have to figure out how to reset the integrator at the start of each bit time, and how to sample it at the end of each bit time. Discuss how to do this via the blog. Also discuss how to implement the decision device with the correct timing.

You can count the bit errors using an XOR gate (implemented using the “Logical Operator” block) attached to a counter (“Counter Free-Running”).

In Phase 2) you will use this model to try to confirm that the BER is given by

\[\frac{1}{2} \textrm{erfc}\sqrt(\frac{E_s}{N_0})\]

Adjust the variance/power of your white noise generator and see whether your measured BER matches the theory. Note that the lower the BER, the harder it will be to simulate (as a rough rule of thumb, you’ll need to record ten bit errors before your BER estimate is reliable). It is up to you to decide what range of noise powers to simulate.

In Phase 3) you write your report. At a minimum, if you got nothing to work, describe the theory. If your simulation didn’t work, describe your debugging strategy and where you think the deficiencies in your approach are. If your simulation worked, but your results did not match theory, analyse your results and come up with an explanation for the differences observed.

Make sure to include a conclusions section summarising what you have learned in doing the assignment.

To get you started, I have provided an implementation of the modulator (right-click to download).

Resit Assignment

The deadline is the 9th of August, 2019, at 5 pm.

Your report should contain two sections. In Section A, repeat Assignment #1. In Section B, repeat Assignment #2. Also upload copies of all code files generated. A print copy of the report is also required, as per the submission instructions for the earlier assignments.

Upload here: Resit Assignment.