Energy and Power Spectral Densities
Energy and Power Spectral Densities
Energy and Power Spectral Densities
4.1 Introduction
The energy spectral density and autocorrelation function of energy signals are important tools
for the characterization of energy signals. The other important class of signals we will study
is the power signals. Power signals are infinite in time, they remain finite as time t
approaches infinity and so, their energy is infinite.
Power signals are very important in communications, since they include:
• Periodic signals
• Channel white noise
• Most transmitted digital or analog signals (they are approximated as power signals, and they
can be considered infinite, since their duration is in general much longer than the inverse of
the bandwidth).
Therefore, it is desirable to have a counter-part of the energy spectral density and
autocorrelation function of energy signals for power signals. They are called power spectral
density (PSD) and autocorrelation function of power signals.
Objective
The purpose of this lab experiment is to:
Analyze the Energy Spectral Density (ESD) of an Energy signal using Matlab.
Analyze the Power Spectral Density (PSD) of a Power signal using Matlab.
4.2 Background
4.2.1 Energy Spectral Density (ESD)
The energy of a signal x(t) is
∞
2
E x =∫ |x ( t )| d t (5.1)
−∞
∞
2
E x =∫ |X ( f )| df (5.2)
−∞
The equation (5.1) and equation (5.2) shows the same result and this is Parseval’s theorem,
which allows us to determine the signal energy from either the time domain specification x ( t )
or the frequency domain specification X ( f ) of the same signal.
The correlation of a signal with itself is called the Autocorrelation. The Autocorrelation R x ( τ )
of a real signal x(t) is defined as
∞
R x ( τ )=∫ ( x (t) x( t+ τ))d t (5.3)
−∞
It is a measure of the similarity of a signal with a delayed copy of itself. The Energy Spectral
Density (ESD) is defined as the energy contributed by the spectral component of frequency f
of the signal x(t) and is written as:
ψ x ( f )=¿ X ( f )∨¿2 ¿ (5.4)
The energy, energy spectral density and autocorrelation function of energy signals are related
and have the following property:
∞
E x =∫ ψ x ( f ) df (5.5)
−∞
The correlation of a signal with itself is called the Autocorrelation. The Autocorrelation R x ( τ )
of a real signal x(t) is defined as
+T
1
0
4.3 Description
Consider the following Figure 5.1 of signal x(n) which shows a discrete time rectangular
signal with length N=5. The magnitude of the Fourier Transform of this signal is given
below:
ωN
sin
2
X ( ω )= (5.10)
ω
sin
2
Plot the discrete time domain signal x(n) in Matlab using the following piece of code.
n=[-2:2] ;
x=[1 1 1 1 1 ] ;
stem(n , x ) ;
axis([-5 5 0 2])
title ('Discrete Signal in Time Domain')
xlabel Time
ylabel Amplitude
The output graph produced should be similar to one in Figure 5.1. Using the signal x[n], Find
out the Autocorrelation y[n] of the signal by using the Matlab function xcorr(x,x). An
important point to observe here is that the first sampling instant of Autocorrelation function
y[n] should be twice the first sampling instant of the signal x[n] itself. It is true for the all the
points of the Autocorrelation function y[n]. Therefore, for writing the code for
Autocorrelation function y[n] we need to generate a timing vector twice that of the signal
x[n] itself.
The Autocorrelation function y[n] should be similar to the Figure 5.2. In order to plot the
Fourier Transform F[n] of the Autocorrelation function y[n] the following piece of code is
used.
Figure 4-2: Autocorrelation of Signal x[n]
M=20;
k=-M/2:M/2;
ny=[-4:1:4];
n=[-2:1:2];
x=[1,1,1,1,1];
y=xcorr(x,x);
w=(2*pi/M)*k ;
Y=y*(exp(-2*i*pi/M)).^(ny'*k) ;
stem(w,abs(Y))
axis([-4 4 0 30])
title ('Fourier Transform F[f]')
n=[-2:1:2];
x=[1,1,1,1,1];
subplot (3,1,1);
stem(n,x)
axis([-3 3 0 1.5]);
title('Gate Function');
y=xcorr(x,x);
ny=[-4:1:4];
subplot (3,1,2);
stem(ny,y)
axis([-5 5 0 6]);
title('Auto Correlation') ;
M=20;
k=-M/2:M/2;
w=(2*pi/M)*k;
Y=y*(exp(-2*j*pi/M)).^(ny'*k);
subplot (3,1,3);
stem(w,Y)
title ('Energy Spectral Density');
Task-3: [4 Marks]
Below Figure shows a random binary pulse train g(t). The pulse width is Tb/2, and one binary
digit is transmitted every Tb seconds. A binary 1 is transmitted by the positive pulse, and a
binary 0 is transmitted by the negative pulse. The two symbols are equally likely and occur
randomly. Determine the autocorrelation and PSD of the g(t).
Use: [pulstran(t,pulseperiods,@rectpuls,pulsewidth)]
Figure 4-6
Assessment Rubrics
EE365: Communication Systems – Lab __
Method: Lab reports and instructor observation during lab sessions
Outcome Assessed:
Total
Lab Engineer:
Tawahaa Ahmed
Name:
Signature:
Date: