代做Coursework for CAN202 2024/25 S1代写Matlab语言

Coursework for CAN202 2024/25 S1

Summary of the coursework:

i.       The coursework contributes to 20% of the final mark of CAN202.

ii.       The maximum possible mark for this coursework is 100.

iii.       There are three questions, where each question contains a number of sub-questions.

iv.       Assessed learning outcome: B.

v.       Release date of the coursework: 7th April 2025.

vi.       Submission deadline: 23:59, 28th April 2025.

vii.       The usual late-submission policy may apply (i.e., 5 marks deduction per working day).

viii.       No generative AI may be used when completing the coursework.

ix.       Please submit ONE PDF file that contains your report and FOUR .m files. See below for more information.

Please also read the following instructions for detailed guidance and requirements:

i.       The coursework requires you to perform programming in MATLAB.

ii.       Some MATLAB functions require additional toolboxes. You may need to install the following MATLAB Toolbox: Signal Processing Toolbox.

iii.       In the .m files, you must arrange the codes according to the sequence of the sub-questions. Add comments such that one can clearly identify the code designed for any sub-question; see appendix for an example.

iv.       You must ensure that the .m files can be executed without any error message. If an error occurs during execution, then the corresponding sub-question and all following programming sub-questions cannot earn more than 50% of their allocated marks (unless otherwise specified).

v.       Unless otherwise specified, programming sub-questions without any executable code cannot earn more than 50% of their allocated marks.

vi.       Any question that is not about programming can be answered by writing. Such writings

should be clearly scanned and attached to the single PDF file that you are asked to submit.

vii.       When asked to provide plots (both in MATLAB-programming questions and analytical

questions), please ensure that all axes are well defined and all labels and curves on the plots are readable to an old person.

viii.       Clearly label questions’ indices. Label page numbers and the total page number in the PDF.

ix.       Control the length of your answers as much as possible.

1. Double-sideband Suppressed-Carrier Amplitude Modulation (DSB-SC AM):

In this question, you will use MATLAB and realize the modulation and demodulation of DSB- SC AM. The modulating signal for this question can be found by running the command “load handel” in MATLAB. After running the command, you will see two variables “Fs” and “y” in    the workspace. The variable “y” is the digital data of a piece of song “hallelujah, hallelujah, …”, and the variable “Fs” gives the sampling frequency in Hz that is used to generate the data in “y” . You can listen to the song by running the following command in MATLAB (make sure you adjust the volume of your loudspeaker to a safe and audible level):

“player = audioplayer(y, Fs); play(player);”

The value of “Fs” is 8192. This sampling frequency should practically satisfy the Nyquist sampling theorem, i.e., one may consider that the samples in “y” are taken by a sampling frequency that is at least twice as much as the “effective” bandwidth of the soundtrack.

The carrier frequency that you must use for the DSB-SC AM signal is x × 105 Hz, where x is the last non-zero digit of your student ID. For example, if your student ID is 1234560, then you should use 6 × 105 Hz as the carrier frequency. The demodulation is done using coherent detection, i.e., the correct carrier signal is multiplied to the modulated signal, followed by a suitable lowpass filter. After the demodulation process, you should get the same piece of song as the modulating signal from “handel”.

We will implement the above in MATLAB. When doing so, we are in fact simulating a digital DSB-SC AM system. The carrier frequency is significantly larger than the bandwidth of the modulating signal, and the highest frequency component of the modulated signal will be much larger than the bandwidth of the modulating signal. Sampling the modulated signal with insufficient sampling frequency would cause frequency aliasing (as suggested by the Nyquist sampling theorem). As a result, we must sample the modulated signal with a much higher frequency than “Fs” from “handel” .

Based on the above information, create a .m script named as “Q1_partA_abcdefg.m” for the sub-questions from a to i below, where abcdefg is your student ID:

a.    In MATLAB, load handel and play the soundtrack. Report what you hear. (1 mark)

b.    What is the maximum bandwidth of the soundtrack in “handel” such that the

Nyquist sampling theorem is still satisfied? (1 mark)

c.    Plot a block diagram that shows how a DSB-SC AM signal is generated and how

coherent detection is performed. Note that the bandwidth in Q1-a should be used to guide your design. (3 marks)

d.    Use the MATLAB function “fft” to plot the magnitude spectrum of the signal “y”

from “handel” . You must supply both the code and the resulting plot in the report. Also, your plot must satisfy the following:

(1) Clearly label the frequency axis in Hz.

(2) Plot the spectrum such that the 0 Hz is at the middle of the frequency plot. In other words, show both the “negative” and positive frequencies in the plot.

Consider the use of the MATLAB function “fftshift” .

(3) Justify why the range of the frequency axis in your plot is correct (in relation to the sampling frequency that you use to perform. the discrete Fourier transform). (4 marks)

e.    It is sufficient to use the following sampling frequency to sample the DSB-SC modulated signal without frequency aliasing, i.e.,

“Fs_new = ceil( (Fs/2+fc) / Fs * 2 ) * Fs;”

where fc is the carrier frequency you should use. Provide sufficient reasonings in the report on why Fs_new is sufficient to avoid frequency aliasing. (2 marks)

f.     Insert more samples to “y” from “handel” such that the sampling frequency is     changed from “Fs” to “Fs_new” . You may use the MATLAB function “resample” . (2 marks)

g.    Plot the frequency spectrum of the signal in Q1-f using the MATLAB function “fft”, where the requirements listed in Q1-d must be satisfied. Compare the spectrum plot in this question to the spectrum in Q1-d and comment on your observation. (4 marks)

h.    Perform DSC-SC AM using the signal generated in Q1-f and a cosine carrier signal of   the correct frequency (see rubric in the previous page). (2 marks)

i.     Plot the frequency spectrum of the signal generated in Q1-h. Your answer to this question must satisfy the requirements as specified in Q1-d. (2 marks)

j.     Multiply the signal in Q1-h by the same carrier signal used for DSB-SC AM and plot the frequency spectrum of the resultant signal. Your answer to this question must satisfy the requirements as specified in Q1-d. You may need to revise the sampling frequency. (4 marks)

k.    Apply lowpass filtering to the signal generated in Q1-j such that the frequency

spectrum of the filtered signal resembles the spectrum of “y” . You may consider the use of the MATLAB function “lowpass” . (2 marks)

l.     Down-convert the sampling frequency of the signal generated in Q1-k to 8192 Hz.

Then, play the down-converted signal in MATLAB. Discuss whether you have heard    the same soundtrack as the one originated from “handel”. Note that your code must run and play in order to get marks for this sub-question. (3 marks)

It is possible to use a non-sinusoidal periodic signal as a carrier signal. In this case, the to-be- modulated periodic signal is a periodic sawtooth wave that can be decomposed into an infinite number of sine waves (by means of the Fourier series). The sawtooth waveform S(t) is illustrated in Figure 1, where the Fourier series representation is given as

After applying a suitable bandpass filter to S(t), one may obtain a desired carrier signal.

Figure 1 A periodic sawtooth wave

Use another .m script named as “Q1_partB_abcdefg.m” to answer the sub-questions from

m to p below, where abcdefg is your student ID.

m.  In MATLAB, generate a periodic sawtooth wave using the MATLAB function

“sawtooth” using a sufficiently high sampling frequency. Then, apply a suitable filter  such that a sinusoidal wave of the desired carrier frequency (see rubric) appears at    the output of the filter. Plot the output signal of the filter and verify that the output   signal is indeed a desired carrier signal. You may use MATLAB functions “lowpass” or “bandpass” for designing the filter. (4 marks)

n.    Use the signal generated in Q1-m as the carrier and generate the DSB-SC AM signal, where the signal generated in Q1-f should be used as the modulating signal. (2 marks)

o.    In MATLAB, mix the signal in Q1-n with a suitable sinusoidal wave and apply a

suitable lowpass filter to obtain a baseband signal. Plot the frequency spectrum of  the filtered signal, where the spectrum plot must satisfy the requirements in Q1-d. (4 marks)

p.    Down-sample the signal generated in Q1-o and play the signal. Comment on

whether you hear the same piece of song as that in Q1-a. Your code must be able to play the down-sampled version of the signal from Q1-o. (3 marks)

(Question 1 carries 43 marks)

2. Superheterodyne Receiver:

In this question, you will implement a superheterodyne receiver in MATLAB to demodulate one piece of music from the signal that is stored in the file “soundtrack.mat” . The file “soundtrack.mat” should be downloaded from LMO.

Specifically, there are 10 pieces of music that are modulated by DSB-SC AM. Each piece of music lasts for 23 seconds, where the music signal has a bandwidth of 5000 Hz and a sampling frequency of Fs=10000 Hz. According to the last digit of your student ID, you should demodulate the bandpass music signal that has a carrier frequency as specified in the table below:

Carrier Frequency

Last Digit of Student ID

1.0 × 105 Hz

0

1.2 × 105 Hz

1

1.4 × 105 Hz

2

1.6 × 105 Hz

3

1.8 × 105 Hz

4

2.0 × 105 Hz

5

2.2 × 105 Hz

6

2.4 × 105 Hz

7

2.6 × 105 Hz

8

2.8 × 105 Hz

9

The signal “soundtrack” in “soundtrack.mat” are constructed by adding all 10 pieces of the

DSB-SC AM signals, where the sampling frequency of “soundtrack” is 1140000 Hz and is stored as “Fs_new”.

The baseband version of the 10 pieces of the music can be found in “music.zip” . You should download this file from LMO. Your task is to answer the sub-questions below which will enable you to demodulate the signal located at the carrier frequency as suggested by the table above. You must construct a superheterodyne receiver in MATLAB to perform the demodulation, where you must use the intermediate frequency of fi   = 5 × 104  Hz.

Create a .m script named as “Q2_abcdefg.m” for answering the following sub-questions, where abcdefg is your student ID:

a.    Plot the frequency spectrum of the signal in “soundtrack”, where you must fulfill the requirements in Q1-d. (4 marks)

b.    Observe the frequency spectrum in Q2-a and identify the 10 modulated signals by    specifying the carrier frequencies and the bandwidths. (2 marks)

c.    What is the minimum required bandwidth of a communication channel such that the signal in “soundtrack” can be transmitted? Support your answer with evidence. (2 marks)

d.    For demodulation, using a superheterodyne receiver, you should first convert the

target DSB-SC AM signal from the carrier frequency in the above table to fi, then use coherent detector to obtain the baseband music signal. Draw a block diagram that contains three filters and two mixers to achieve the demodulation, where you must specify the functionality of each component in the block diagram. (5 marks)

e.    Write a piece of MATLAB code that realizes the demodulation process in Q2-d. Specifically, you must fulfill the following requirements:

(1) Provide a frequency spectrum plot at the output of each mixer and also each filter (5 spectra in total). The spectra figures must satisfy the requirements in Q1-d.

(2) Make sure that the sampling frequency of the signal at the coherent detector output is 10000 Hz.

(3) Play the signal at the output of the coherent detector and state if you hear a piece of guzheng music. (14 marks)

f.     Compare the sound you get from Q2-e to the 10 pieces of music in “music.zip” . You   should un-zip “music.zip” and listen to each of the 10 music. Do you find one piece  that is the same as the one from Q2-e? Are there any differences? State your answer and provide justifications. (2 marks)

g.    State both the last digit of your student ID and the name of the music file that best matches the sound you obtain from Q2-e. Note that there is a single correct answer. (1 mark)

(Question 2 carries 30 marks)

3. Frequency Modulation (FM):

In this question, you are asked to study the following FM signal, i.e.,

where fc = 5 × 105  Hz and fm  = 104 Hz. The value of β that you should use depends on the last digit of your student ID; see the table below.

Last

digit

0

1

2

3

4

5

6

7

8

9

β

2

2.2

2.4

2.6

2.8

3

3.2

3.4

3.6

3.8

You need to generate a digital version of XFM (t) with a sampling frequency of 107 Hz.

Create a .m script. named as“Q3_abcdefg.m”for answering the following sub-questions, where abcdefg is your student ID:

a.    Select the β value according to the above table. Then, based on the β value, obtain the theoretical frequency spectrum expression for XFM (t), assuming that XFM (t) lasts forever. You should use the MATLAB function “besselj” to evaluate the numerical value of the relevant Bessel functions of the first kind. (3 marks)

b.    In MATLAB, create and plot the signal XFM (t) for 3 × 104 second, where you must use the settings as mentioned previously. (2 marks)

c.    In MATLAB, plot the frequency spectrum of the signal in Q3-b using the MATLAB

function “fft”, where the frequency spectrum plot must satisfy the requirements in  Q1-d. (4 marks)

d.    Verify that the results in Q3-a and Q3-c agree with each other. (2 marks)

e.    In MATLAB, apply differentiation to the signal in Q3-b and plot the resultant signal

XFM I(t). You may use the MATLAB function “gradient” for differentiation. Verify that the envelope of the signal XFM I(t) is oscillating at a frequency of fm  Hz. (3 marks)

f.     In MATLAB, apply a hard limiter to the signal in Q3-b, where the amplitude of the

hard limiter output is limited to the range of [—0.1, 0.1]. Then, plot the output signal of the hard limiter. (3 marks)

g.    Obtain the frequency spectrum of the output signal of the above hard limiter using the MATLAB function “fft”, where the spectrum must satisfy the requirements as specified in Q1-d. Then, compare this spectrum with the spectrum obtained from Q3-c and discuss any differences. (6 marks)

h.    Based on the result in Q3-g, apply a suitable bandpass filter to the output signal of

the hard limiter such that the bandpass-filtered signal resembles XFM (t). Verify your result by examining the frequency spectrum of the bandpass-filtered signal. (4 marks)

(Question 3 carries 27 marks)




热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图