Uploaded by Baber Khan

pocs lab 1

advertisement
Experiment 1
Spectrum and bandwidth of periodic signa
Spectrum and bandwidth of non-periodic signals
Sanaullah
FA19-EPE-136
Shahab Ahmad
FA19-EPE-105
Syed Arbaz khan
FA19-EPE-110
Zarak khan
FA19-EPE-127
Section:
Lab Engr:
Teacher:
EPE-5C
Madam Aniqa Zaman
Dr.Alam zaib
DATE=28/09/2021
1.1 Statement of the problem
Take the Fourier series of regular alternating pulses having pulse width τ and time period T .
Find out whether the bandwidth depends on pulse width or time period. Also find whether the
number of spectral lines depends on pulse width or time period. (In both cases, consider the
first central lobe of the sinc function.)
(Students are required to make a complete report under the topics given below.)
1.2 Literature background
(Students are required to write the concise details of literature necessary to solve the problem.)
1.3 Procedure
(Students will write the details of all the steps including mathematical derivation, code, diagram, hardware setup etc required in performing the experiment or lab task.)
• Use MATLAB to compute the Fourier coefficients (exponential series) for a regular alternation pulses.
• Compute the Fourier coefficients based on your mathematical derivation i.e.sinc function
• Plot the signal and its line spectrum for some values of the time period and pulse width.
Note that pulse width < time period. Compare both simulation and theoretical spectra
by plotting them together.
• Generate two spectrum graphs with constant time period but different pulse width (at
least two values). Similarly generate another two graphs but this time keep the pulse
width constant and select two values of time period.
• Compute total power or power in certain bandwidth based on Parseval’s Theorem.
• Plot the graph showing percentage power Vs coefficients. From the graph estimate 95%
bandwidth of the pulse. Note that X% bandwidth is the bandwidth that contains X% of
signal’s power.
1.4 Analysis
(In this section, the student must show all the graphs, tables, and mathematical analysis.)
• Plot the four graphs (figure no. must be given).
• Note down the bandwidth in each case (considering the first central lobe of sinc function).
1
• Note down the number of spectral lines in each case (considering the first central lope of
sinc function).
• Estimate percentage power contained in the first central lobe by formula:
%age Power =
Power in the first central lobe
× 100
Total signal power
• Fill up the given below table (table no. must be given).
S.
No.
1
2
3
4
Time
period, T
(sec)
1.5
1.5
0.5
1
Pulse
width, τ
(sec)
0.2
0.8
0.2
0.2
Bandwidth
(Hz)
4.667Hz
0.6667Hz
4Hz
5Hz
No. of spectral lines in 1st
lobe
8 lines
2 lines
3 lines
6lines
%age power 95% bandin 1st lobe
width (Hz)
118.6886watt
114.4832watt
188.2299watt
162.6628watt
2.9556Hz
0.4222Hz
7.6000Hz
4.700Hz
• Analyze the different values of bandwidth and number of spectral lines in the table carefully.
clear all;
close all;
clc;
Tau=0.2;
%pulse width
T=1;
%time peroid
w0=2*pi/2; %fundamental freq in rad/sec
dt=0.001;
t=-T/2:dt:T/2-dt;
%time peroid of g(t), -T/2<t>tt/2
g=zeros(size(t));
ind=find(t>=-Tau/2 & t<=Tau/2);
g(ind)=1;
%three cycle
tp=-3*T/2:dt:3*T/2-dt;
gp=[g g g];
%%FS Cofficients
k=20; %no of FS cofficient -k<=k<=k
k=-k:k;
for i=1:length(k)
ak(i)=dt/T*sum(g.*exp(-1j*k(i)*w0*t));
end
%theory
ak_th=Tau/T*sinc(k*Tau/T);
%%plotting command
figure,
subplot(211),
plot(tp,gp,'Linewidth',2),xlabel('time(sec)'),title('g(t)');
axis([-3*T/2,3*T/2, -0.5,1.5])
subplot(212),
stem(k,real(ak), 'Marker','.','Linewidth',2),
xlabel('k'),
title('FS cofficients.,a_k'),
grid on,
hold on,
plot(k,ak_th,'ro'),
legend('Stimulation','Analytical');
%power calculation
k0=floor(T/Tau), %central lobe width in term of k
wB=k0*w0,
%bandwidth in rad/sec
fB=k0*1/T,
%bandwidth in Hz
pb=sum(abs(ak(k>=-k0 &k<=k0)).^2),
%pg=sum(abs(akk).^2), %total power in frequency domain
pg=dt/T*sum(abs(g).^2),%total power in Time domain
pb_perc=pb/pg*100
%percantage power in central lobe
for i=length(k)
fB_95perc=fB*1/T*95/100 %95 percantage bandwidth in Hz
end
time period T=1.5 &pulse width=0.2
Time t=1.5 & pulse width=0.8
Time t=0.5 & pulse width=0.2
Time period=1&pulse width=0.2
1.5 Questions & Answers
(Some questions related to the experiment of lab task may be given in this section.)
1. It is required to keep the pulse in the center of time domain graph, when we take the
Fourier series of regular interval alternating pulses why?
2. Ans : It is required to keep the pulse in the center of time domain graph, when we take the
Fourier series of regular interval alternating pulses we get sinc function to give us maximum
value at 0.
3. What happens to the number of spectral lines in first central lobe of sinc function, when
pulse width is constant and time period is increased?
Ans: When the pulse width is constant and time period is increased the number of
spectral lines is increased in the first central lobe of sinc function.
4. What happens to the bandwidth of first central lobe of sinc function, when time period is
constant and pulse width is increased?
Ans : When the pulse width is increased and time period is constant the number of
spectral lines is decreased in the first central lobe.
1.6 Conclusion
We conclude from this lab when we take the Fourier series of a regular interval alternating pulses
we get sinc function to give us maximum value at 0.
We also conclude from this lab is that the time period is directly related to the spectral line in the first lobe
of sinc function .when time period is increased the number of spectral lines is increased in the
first central lobe of sinc function.
We also conclude from this lab is that the pulse width is inversly related to the spectral line in the first lobe
of sinc function .when pulse width is increased the number of spectral lines is decreased in the
first central lobe of sinc function
2
Download