Created by: Dr. Yacob Astatke (Fall 2011) ECE Dept. Morgan State Univ
EEGR 453-LAB#1
Power Spectrum Density of Signals
We learned in Chapter 1 about the difference between energy and power signals and how to
computer either the energy or power of a signal using different equations.
The purpose of this lab is to evaluate the power spectrum density of signals consisting of two
different sinusoidal frequencies.
Basic concepts:
Power Signal x(t) has a non-zero but finite Power : 0 < Px < ∞
-Periodic signals are an important sub-group of power signals.
-Power signals have a finite power but infinite energy.
Power Spectral Density
The spectral density of a signal indicates the distribution of the signal’s power or energy in
the frequency domain.
Related topics: Go to blackboard EEGR 453 Communications Theory under course documents
refer to Module 1-chapter 1: signals and Spectra
Question 1
The signal x(t) has a duration of 10 seconds and is the sum of two sinusoidal signals of unit
amplitude, one with frequency 100 MHz and the other with frequency 300MHz.
x(t) = cos(2π100t) + cos(2π300t), 0≤t≤10
= 0 otherwise
The signal is sampled at a sampling rate of 1000 samples per second. Use MATLAB to find
the power content and the power spectral density for this signal.
Created by: Dr. Yacob Astatke (Fall 2011) ECE Dept. Morgan State Univ
Lab Steps
- Open Malab editor
- Generate a power signal consisting of two sinusoids at frequencies f1=100 Hz and f2=300 Hz.
- Sample the power signal you generated in step 2 at a sampling rate of 1000 samples per
second - Find the power content and the power spectral density of the generated power signal. (use
“spectrum” built in matlab command to check your answer) - Save the matlab file into your machine and run the code
Expected Results
You will see twin peaks in the power spectrum density correspond to the two frequencies
present in the signal.
Please submit a short write-up (1 to 3 pages) indicating your theoretical work done by
hand, and your simulation results from Matlab together. Please don’t forget to attach a
copy of your Matlab code with your write-up.
Here is a sample code :
Note: you need to modify and complete it before attempting to run it replace ALL “??”
with your answer.
%%%% Power spectral Density computation (title of the code)
ts=???; % define here your sampling rate (ex: ts= 0.1 10 samples per second)
fs=???; %define frequency based on ts shown above
t=[0:ts:10]; % “t” shows the duration of the signal
x=cos(2pif1t)+ cos(2pif2t); % x is the signal given in the lab
power=(???)/length(x); % use this equation to find the power of the signal x
psd=spectrum(?,?); % use this equation to find the psd
pause % press a key to see the power in the signal
p
pause %press a key to see the power spectrum
specplot(psd,fs) % sample command to see the psd plot feel free to use another command
ylabel('power spectral density')
xlabel('frequency')