Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

EGB342 Assignment 1 (20%)

Workspace Preparation

Download the‘Assignment1.zip’files and unzip its content into a single working directory. There are 4 files contained within Assignment1.zip:

•    channel .p

    A1Data .mat

•    spectrum analyser .m

•    spectrum sweep .p

Load A1Data .mat to obtain your data to complete the tasks in Part 1. The following data will be uploaded to your MATLAB workspace.

•    Sampling frequency of the audio sample: fs msg

•    Sampling frequency of the channel: Fs

•    Test audio sample: msg

Part 1: Analogue Modulation

In this section you will design and test your system. This test will require that you modulate a given audio signal using analogue modulation to be transmitted through the given channel (channel .p).

1.1    Use both of the following modulation schemes for your analysis:

(a)    Double Sideband Full Carrier (DSB-FC) (AM); and

(b)    Wide-band Frequency modulation (FM).

Listen to the test audio sample (msg) using the following command and comment on the quality of the sound:

sound(‘Test  audio  Sample’,  ‘Audio  Sampling  Frequency’) ;

Plot both the time domain signal and frequency spectrum of the audio signal and describe your observations of these two plots.

1.2    Design a low pass filter with a cut-off frequency of 5 kHz and filter the audio signal (msg) and plot the spectrum. Compare the spectrum with that of the original audio signal (msg) and comment on your observations and the need for filtering.

1.3    Oversample the normalised audio signal to match the channel sampling frequency, Fs, using the inbuilt resample function. Create a time vector for the oversampled message.

Find the impulse response of the channel and choose a suitable carrier frequency, Fc. Signals are transmitted as a row vector through the channel using the following command:

[out]  =  channel(‘Signal’,  ‘Noise  Level’,  StudentID);

The input signal’s sampling rate must match the channel sampling rate Fs.  Use Noise Level = 1 for this step. Insert only the integer part of your student ID. For example, for the student ID, n12345678 insert “12345678”.

From your selected carrier frequency, create a carrier vector with your chosen frequency of Fc. Plot an example 1000 samples of the message signal and the carrier signal, ensure the example range includes non-trivial audio information in the message.

1.4    Write a mathematical expressions for the modulation methods, describing the variables and parameters. Ensure you state the values of the all the modulation parameters (e.g. carrier frequency, modulation index, frequency deviation etc.)

1.5    Modulate the oversampled audio signal using the two modulation methods.   Plot the spectrum of the modulated signals. Also plot the time domain of the modulated signals across the previously chosen example 1000 samples and comment on the observations of both plots.  Measure the bandwidth of the modulated signals and compare with the theoretical bandwidths.

1.6    Transmit the modulated signals (from section 1.6) through the given channel at each of the 4 noise levels:

[out]  =  channel(‘Modulated  Signal’,  ‘Noise  Level’,  StudentID);

You can simulate the performance of the modulated signal under these different noise levels using “Noise Level = 1, 2, 3, or 4”.  Plot the same 1000 samples of the output of the channel and comment on the observations by comparing it to the modulated signal prior to transmission through the channel.

1.7    Design a suitable receiver and demodulate a noisy audio signal from each of the outputs of the channel:

•    For amplitude modulation a coherent receiver can be implemented by low pass filtering the received signal mixed with a carrier signal generated at the receiver; or an envelope detector can be implemented by low pass filtering the rectified signal.

•    For frequency modulated signal a suitable frequency demodulating function can be implemented using a differentiator and an envelope detector; or using the analytical signal (Hilbert Transform) as follows,

1      %  using  Analytical  signal

2      SigA  =  hilbert(FM Modulated Signal) . *exp(−1i *2 *pi *Fc *t);  %  ... Analytical  signal  translated  by  $F c$

3     DemodMsg=   (1/(2 *pi *FreqDev))*diff(unwrap(angle(SigA)))*Fs;  %  FM  ... Demodulated  message

You need to choose a suitable receiver for each modulation scheme.

1.8    Downsample the demodulated signal back to the original sampling frequency of fs msg. Plot and listen to the demodulated signal and comment on the observations.

1.9    Simulate the performance of the modulated signal under four different noise conditions given and observe the quality of the modulation signal by listening to the demodulated signal. Tabulate the quality of the modulation schemes under each different noise level. You can choose your own ranking method to rank the quality of the audio signal. Explain your results based on your knowledge of AM and FM techniques.

You should choose appropriate modulation parameters to compare the performance of the AM and FM system.

Part 2: Radio-frequency Spectrum Measurements

With your FM knowledge from section 1 of the assignment, examine and explore the radio- frequency spectrum around your area. A chart illustrating how the radio-frequency spectrum is allocated among services in Australia can be found from the Australian Communications and Media Authority web page (available via Blackboard).

Important: For this task you need to borrow a RTL-SDR USB dongle from the technical

support services counter at S-block level 9.

Setting up Hardware and Software

Set up your hardware and software using the following steps:

Step 1    Download and install the RTL SDR Radio’ support package into your MATLAB

installation. Support package hardware setup can be found at the following link [1].

https://www.mathworks.com/hardware-support/rtl-sdr.html

Step 2    Once the installation is complete, connect your RTL-SDR USB dongle and run the

following command in MATLAB to confirm the successful installation of hardware and software:

sdrinfo

2.1    Write a MATLAB function titled listen fm to listen to a selected FM radio station using the RTL-SDR. Format the inputs to this function as:

function  listen fm(radio frequency,  listen time)

where radio frequency is the carrier frequency of the selected radio station and listen time is the listening duration.

2.2    Use spectrum analyser .m to scan the spectrum. The syntax of the spectrum sweep .p function used in the spectrum analyser .m script is as follows.

spectrum sweep(start freq,stop freq,rtlsdr fs, number samples,  location)

Where:

•    start freq - Starting frequency (Lower frequency of the observation window)

•    stop frequency - Stop frequency (Higher frequency of the observation window)

•    rtlsdr fs - RLT-SDR sampling rate, allowed range is 225-300 kHz and 900-3200 kHz.

•    number samples - Number of samples per frame (L = 2n , where n < 18)

2.3    Several different spectral bands exist and are used for different purposes. These include:

•    FM analogue radio transmission [88 MHz - 108 Mhz]

•    Digital Audio Broadcasting (DAB) [9A-202.928 MHz, 9B-204.640 MHz, 9C-206.352 MHz]

•    Digital Video Broadcasting (DVB) [Mount Coot tha - 177.500 Mhz, 184.500 Mhz,

191.625 Mhz, 219.500 Mhz, 226.500 Mhz]

•    Mobile Frequencies [700 Mhz, 850 MHz, 900 Mhz]

For each of the listed ranges, scan and plot the frequency spectrum.  Comment on the observations.

2.4    Compare and contrast analogue and digital radio broadcasting technologies.

2.5    Extension:  How can you write your own spectrum sweeping function for RTL-SDR? (not graded)

Part 3: Recommendations

You have now completed the evaluation of the AM and FM systems and radio spectrum obser- vations. Based on your assessment of the two analogue modulation methods and your under- standing of the radio spectrum, write a recommendation for the Queensland Government. You need to provide appropriate justifications for your recommendations.

Reflection (Mandatory)

A reflection is to be written and appended to the end of your report. Include a short discussion (≈ 150 to 200 words) that addresses problems encountered, and things that you would have done differently.

Identify what concepts this assignment has reinforced, and areas where you can improve. This section is mandatory and the assignment is regarded as incomplete if absent.

Presentation Standards

This assignment includes elements of written and coding assessment.  You are expected to submit one assignment report and one set of MATLAB code. Marks are based on how easily and effectively ideas are articulated to the reader using a standard report format.

The Report Component

An outstanding report demonstrates knowledge and understanding of the subject area.   It communicates ideas clearly and logically with a combination of visual, mathematical and code assets.  It demonstrates insight about the underlying concepts and their implications within telecommunications and signal analysis. Verbose responses, or correct information not articu- lated clearly, will attract deductions.

Remember that you are writing to inform.

Mathematical working shows a logical procedure (or justification) for the final solutions i.e. All non-trivial steps are included.  It can be typed or handwritten but must be legible and easily followed.

Code snippets used in-text should only contain relevant lines of code and should rarely have more than five lines in a snippet.

Present the report so that it can be understood without reference to the assignment brief. Any figures or code referenced within the code should be no more than one page turn away. Avoid the use of see appendix” and “refer to .m file”. Document flow and coherency is to be prioritised. Reports that are difficult to navigate are marked poorly in this criteria.

Write the report assuming that the reader only knows concepts from 1st year

engineering (up to and including EGB242) and does not have access to your  .m

file/s.

Include a title page that states the unit name, unit code, assignment number, your name(s) and student number(s). Do not include a table of contents, list of figures, nor a list of tables. Convert the report to the PDF file format before submission. This ensures document typesetting is preserved across different computers running different operating systems.

The Code Component

The submitted code needs to be executable (in MATLAB R2018a or later) and without a run- time error. If an error is encountered at execution, your assignment will only be marked until the error. No error correction will be made to make your code‘run’. Coding for this assignment should remain within one (provided) file (unless otherwise explicitly instructed). Only include a separate .m file if absolutely necessary.

Code should be fully commented to describe intent.   Comments should contain enough information to understand the process without referring to the report.   Quality comments encapsulate your understanding of the topic.

*  You may use the code provided in the weekly tutorials to check your solutions, however you are expected to generate your own code for your assignment.  Submitting supplied  .p code as your own work constitutes academic misconduct and will be considered a run-time error.  *

Acknowledgment

spectrum sweep .p was generated using a spectrum sweep code of Desktop SDR (http://www . desktopsdr.com/).

Submission Checklist

Submission deadline is on the 4th September, 2022, 11:59 pm. If you are unable to submit your solutions by this deadline, you can request an automatic 48 hour extension or a longer extension based on your circumstances. As per QUT policy, late assignments submitted without an approved extension receive 0 marks.

□    The report, in PDF format, submitted to Turnitin via the Blackboard link.

□    A .zip file, submitted directly to QUT Blackboard via the provided link, that contains -

•   Solutions to Part 1 to 2.

•   Functions that are written as a result of explicit assignment instruction

•   Any other MATLAB scripts you have developed

□    Submissions have been re-downloaded from submission portals and run as-is to confirm successful upload.

□    Online Academic Integrity declaration (Individual).

Submission FAQ

⇒   You do not need to assign your submission with a special name. Blackboard assigns unique

IDs to all submissions. The submission links are accessible through:

EGB342 22e2 → Assessment → Assessment Item No.  1: Problem Solving Task → Assignment 1 Submission Links.

⇒   You may submit as many times as you like before the deadline. New submissions overwrite

old submissions.  Only the latest submission is recorded and marked.  Upload in-progress versions so there is something to mark if your final submission is late.

⇒   All documents can be reviewed after submission and thus it is your responsibility to verify

that the uploaded documents are not corrupt.   Corrupt files are treated as incomplete assignments.

⇒   Be aware that the electronic time stamp is placed only after all files have uploaded. Black-

board may experience high traffic or your connection may fail unexpectedly.  Begin your final upload at least an hour before the deadline.


Hardship

If you experience a hardship which affects your ability to complete, or contribute to, this assignment, please contact the teaching team as soon as it occurs ([email protected].au). QUT also offers counselling services if required.