Sunteți pe pagina 1din 5

Version 1.

Department of Electrical Engineering

EE 322 – Analog and Digital Communication

Lab – 4

Energy Spectral Density and Power Spectral Density using


MATLAB

Student Name Student ID Marks

Date:

Instructors: Zulaikha Kiran, Awais Yaqoob

1
Version 1.0 – Zulaikha Kiran – 18/02/2019
Spring 2020 ADC Lab 4 Version 1.0

Introduction
The purpose of this lab is to enable the students to calculate and plot Energy Spectral Density
and Power Spectral Density of signals.

Course Learning Outcomes


CLO2: Develop software simulations to observe the performance of communications
systems.
CLO3: Report desired results proofs and calculations.

Equipment
• Software
o MATLAB

Instructions
• This is an individual lab. You will perform the tasks individually and submit a .m file
as well as the filled hand-out.
• There will be no concept of make-up labs. The lab if missed may be performed later
for practice and knowledge required for the coming labs, but it will not be graded.
• Please see the rubric at the end of the lab for marks distribution.
• Plagiarism or any hint thereof will be dealt with strictly. Any incident where
plagiarism is caught, all students involved will be given zero marks, regardless of who
copied whom. Multiple such incidents will result in disciplinary action being taken.

2
Spring 2020 ADC Lab 4 Version 1.0

Task 1 – Energy Spectral Density


Exercise 1

• Using sampling frequency to be 20, and time increment as 1/fs, generate a sinusoidal
input signal with amplitude 5 and frequency 2 Hz, between -1 and 1
• Add uniform noise with value between -5/2 and 5/2 to this signal.
• Plot the result.

Exercise 2

• Find the total energy of the signal by taking the sum of the square of its value at each
time instant and multiplying the final result with the time increment.

Exercise 3

• Write a MATLAB code to compute and plot the energy spectral density of the signal.
Follow the following steps:
o Enter N = 256
o Use fft(signal, N)/fs to compute N-point fft of the signal.
o The above function gives the Fourier transform of the signal, which is not
centered at the zero frequency. In order to move the zero frequency
component to the center, use fftshift( ).
o The Fourier transform is in complex form. We only need to plot the
magnitude. Search for a MATLAB function that gives the magnitude of a
complex number, and use it to get the amplitude spectrum of the signal.
o Plot the result.
o The energy spectrum is simply the squared amplitude spectrum. Find and plot
it as well.

Exercise 4

• Find the total energy of the signal by taking the sum of the energy spectrum and
multiplying the final result with the sampling frequency and dividing it by N.

3
Spring 2020 ADC Lab 4 Version 1.0

Task 2 – Power Spectral Density


Exercise 5

• Using sampling frequency to be 10^3, and time increment as 1/fs, generate a


sinusoidal input signal with amplitude 5 and frequency 50 Hz, between -1 and 1
• Add uniform noise with value between -5/2 and 5/2 to this signal.
• Using this as the input signal, find the power spectral density using MATLAB
function periodogram( ).

Exercise 6

• Using the same input signal, find and plot the power spectral density using fft. Follow
the following steps.
o Define N equal to the length of input signal.
o Compute the squared magnitude of the centered fft, and multiply it with
(1/fs*N) to get the power spectral density.
o Define the frequency variable from –fs/2 to (fs/2)-(fs/N) with step size equal
to fs/N
o Convert the power spectral density to dB/Hz and plot it against the frequency
variable.

4
Version 1.0

• ADC Lab 4 Rubric


• Method of Evaluation: Executable code, Filled lab document, In-lab marking by instructors
• Measured Learning Outcomes: CLO2: Develop software simulations to observe the performance of communications systems.
CLO3: Report desired results proofs and calculations.
Excellent Good Satisfactory Unsatisfactory 3-1 Poor Marks
10 9-7 6-4 0 Obtained
Task All tasks completed Most tasks completed Some tasks completed correctly Most tasks incomplete or All tasks incomplete
Completion correctly in given time correctly in given time in given time incorrect by the end of or incorrect by the
(CLO2) lab session end of lab session
Code Correct code, easily Correct code but Slightly incorrect code with Incorrect code with Code not submitted
(CLO2) understandable with without proper proper comments improper format and no
comments where indentation or comments
necessary comments
Output Output correctly shown Most Some Output/Figures/Plots Most of the required Output/Figures/Plots
(CLO2) with all Figures/Plots Output/Figures/Plots displayed with proper labels OR Output/Figures/Plots not not displayed
displayed as required and displayed with proper Most Output/Figures/Plots displayed
properly labelled labels displayed but without proper
labels
Lab Report Required document Required document Some correct/ meaningful Answers not Report/Hand-out not
(CLO3) filled-in neatly with filled-in neatly with answers and conclusions with understandable/ not submitted
meaningful answers to meaningful answers to some irrelevant ones. Some relevant to questions.
all questions, proper most questions, and parts of the document not neat Conclusions not based on
grammar and proper conclusions or some grammar mistakes results. Illegible writing
punctuation with proper drawn with some with no proper
conclusions drawn grammar mistakes grammar/punctuation
Total

5
Version 1.0 – Zulaikha Kiran – 28/01/2019

S-ar putea să vă placă și