You are on page 1of 6

EXPERIMENT 2 Date Perform: 16/9/22

To Demonstrate the Analysis of Ideal Filters and Power Spectral


Density of Signals
Roll no: 20F-0463
20F-0464
20F-0506
2.1 OBJECTIVE:
 To analyze power and frequency spectrum
 To find frequency response of different filters

2.2 EQUIPMENT:
 MATLAB

2.3 BACKGROUND:
2.3.1 Frequency Spectrum:
The frequency spectrum of an electrical signal is the distribution of the amplitudes and phases of
each frequency component against frequency.
2.3.2 Power Spectrum:
The power spectrum gives a plot of the portion of a signal’s power (Energy per unit time) falling
within given frequency bins.
2.3.3 Power Spectrum Density:
The power spectrum density is the power response of a random or a periodic signal. It tells us where
the average power is distributed as a function of frequency.

Let XT (f ) be Fourier transform of truncated signal xT having finite energy. The frequency-dependent
function Sx (f ) is called the power spectral density or power spectrum of the power signal x ( t ) and
is defined as:

Power spectral density is a nonnegative real-valued quantity for all frequencies. Power spectral
density function (PSD) shows the strength of the variations (energy) as a function of frequency. In
other words, it shows at which frequencies variations are strong and at which frequencies variations
are weak. The unit of PSD is energy per frequency (width) and you can obtain energy within a
specific frequency range by integrating PSD within that frequency range.
Example 1:
Following code generates a sine waveform of frequency 30 Hz and computes the power spectral
density of the signal.
2.3.4 Ideal Filters:
A filter is a frequency-selective system that is used to limit the spectrum of a signal to some
specified band of frequencies. Its frequency response is characterized by a passband and a stopband.
The frequencies inside the passband are transmitted with little or no distortion, whereas those in the
stopband are rejected. Filters, in one form or another, represent an important functional block in
building communication systems.
2.3.5 Ideal Low-Pass Filter:
Ideal low-pass filter is a filter which transmits, without any distortion, all frequencies inside the
passband, which is below the cutoff frequency and completely rejects all frequencies inside the
stopband.

The frequency response of an ideal low-pass filter satisfies two necessary conditions:
 The amplitude response of the filter is a constant inside the passband
 The phase response varies linearly with frequency inside the passband of the filter. (Outside
the passband, the phase response may assume arbitrary values.)

Amplitude response of Ideal LPF Phase response of Ideal LPF

Figure2.1
2.3.6 Ideal High-Pass Filter:
Ideal high-pass filter is a filter which transmits, without any distortion, all frequencies inside the
passband, which is above the cutoff frequency and completely rejects all frequencies inside the
stopband.
Example 2:
Following example gives the magnitude and phase response of first order low pass filter.
One thing you should notice that amplitude graph is plotted on logarithmic scale. The reason is that
if we don’t use logarithmic scale; then the horizontal axis should be very long in order for your plot
to show a complete view of the plot.

2.4 Procedure:
2.4.1 A-Find power spectral density:
The signal y(t) is defined as below. This signal is sampled at 1000 samples per second.

cos (2 × 47t) + cos (2 × 219t) ; 0 ≤ t ≤ 10


y(t) =
0 ; otherwise

1. Plot the time domain signal y(t).


2. Find the power spectral density of this signal.
3. Change the frequencies of cosines as 100 Hz and 250 Hz and explain the difference.
t=0:(1/1000):10
y =@(t) (cos(2*(47*t)) + cos (2*(219*t))).*((t>=1)&(t<=10));
figure(1)
plot(t, y(t))
grid
 
 
t= 0:(1/1000):5;
x=sin(2*pi*30*t)
l=length(x)
p=(norm(x)^2)/1
ps=spectrum(x,1024)
specplot(ps,1000)

2.4.2 B-Response of first order filter:


1. For a first order high pass filter; write a program to find the

 magnitude response
 phase response

2. Plot the responses in logarithmic scale.

w=0:1/1000:35000;
r=1000;
c=0.0000001;
j=sqrt(-1);
w1=1/(c*r);
H=(j*(w/w1))./(1+j*(w/w1));
A=abs(H);
p=angle(H);
Ad=20*log10(A);
subplot 211
plot(w,Ad)
ylim ([-150 100])
xlabel('frequency')
ylabel('Amplitude')
title('Amplitude response')
subplot 212
plot (w,p)
xlabel('frequency')
ylabel('Angle')
title('Phase response')
Explanation:

In this task we draw and analyses the magnitude response and phase response of high pass filter.
And plot these responses in longitudinal scale.
EL323 ANALOG & DIGITAL COMMUNICATION – LAB
To enable the students to experimentally verify and analyze different modulation and
demodulation schemes used in communication systems. Plot and analyze different signals in
time and frequency domain.
CLO Statement ↓ Exemplary Proficient Developing Beginning Novice
Score → (5) (4) (3) (2) (1)
Behave
Needs Needs major Needs help
responsibly Completes
minor help help from from other
within team, the assigned
1 from instructor to groups to Does not
and perform task without
instructor to complete complete work
the instructor’s
complete assigned assigned
experiment help
assigned task task
safely
task
To
demonstrate
the working Correctly Correctly
of ideal filters, Correctly
performs the performs the
signals in performs the
lab but lab but Poorly
3 frequency lab and Does not
addresses addresses performs
domain and completely Work
the manual the manual the lab
their power addresses
with minor with major
spectral the manual
mistakes mistakes
density
(PSD)

CLO MARKS OBTAINED


1
3

Instructor’s Signatures:

You might also like