0% found this document useful (0 votes)
29 views5 pages

Lab Report 1

This lab report summarizes an experiment on sampling a continuous time signal and analyzing its frequency. The experiment involved sampling sinusoids at different frequencies, adding them, and taking the FFT to analyze the signals' frequencies and magnitudes. Key results included sharper peaks in the magnitude spectrum when the signal frequency increased. The report also addressed questions about how changing frequency affects the signal, definitions of frequency and time resolution, and whether Fourier transforms provide sufficient information for stationary and non-stationary signals.

Uploaded by

usama rehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

Lab Report 1

This lab report summarizes an experiment on sampling a continuous time signal and analyzing its frequency. The experiment involved sampling sinusoids at different frequencies, adding them, and taking the FFT to analyze the signals' frequencies and magnitudes. Key results included sharper peaks in the magnitude spectrum when the signal frequency increased. The report also addressed questions about how changing frequency affects the signal, definitions of frequency and time resolution, and whether Fourier transforms provide sufficient information for stationary and non-stationary signals.

Uploaded by

usama rehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

LAB REPORT # 01

Department: Electrical Power Engineering.


Course: Digital Signal & Processing
Submitted To: Ma’am Rabya Bahadur
Submitted By: Usama Rehman.
Registration #: FA16-EPE-116.
Section: EPE 5B.
DATE OF SUBMISSIOn: 02 \10 \2018

COMSATS UNIVERSITY ISLAMABAD


ABBOTTABAD CAMPUS
Task:
Sampling of a Continuous Time Signal & its Frequency Analysis

Code:
f=50;

fs=1000;

t=-0.1:1/fs:0.1;

x=sin(2*pi*f*t);

subplot(2,3,1)

plot(t,x)

title('x=sin(w*t)')

f2=100;

y=sin(2*pi*f2*t);
subplot(2,3,2)
plot(t,y)
title('y=sin(2*pi*f2*t);')
z=x+y;
subplot(2,3,3)
plot(t,z)
title('z=x+y;')
Y=fft(z)
freq=linspace (-fs/2, fs/2, length(Y));
subplot(2,3,4)
plot(freq,abs(fftshift(Y)))
title('magnitude')
subplot(2,3,5)
plot(freq,angle(fftshift(Y)))
title('angle')
figure
f=50;
fs=1000;
t=-0.1:1/fs:0.1;
x=sin(2*pi*f*t).*heaviside(t);
subplot(2,3,1)
plot(t,x)
title('x=sin(w*t).*heaviside(t);')
f2=100;
y=sin(2*pi*f2*t).*heaviside(t-0.03);
subplot(2,3,2)
plot(t,y)
title('y=sin(w*t).*heaviside(t-0.03)')
z=x+y;
subplot(2,3,3)
plot(t,y)
title('z=x+y')
Y=fft(z)
freq=linspace (-fs/2, fs/2, length(Y));
subplot(2,3,4)
plot(freq,abs(fftshift(Y)))
title('magnitue')
subplot(2,3,5)
plot(freq,angle(fftshift(Y)))
title('angle')

OUTPUT:

Fig # 01
Fig # 02

QUESTIONS:

1. Provide your analysis for the for the change in frequency fn?

Answer: By increased in frequency fn positive cycle of the signal increases and negative
decreases. Number of cycles per second also increases and we get the sharp peaks in magnitude.
While by decreasing fn it will be vice versa.
2. What is meant by frequency resolution and time resolution?

Answer: Frequency resolution is the distance in Hz between two adjacent data points In
Frequency Domain. In frequency resolution we plot our signal with respect to frequency while

In Time resolution we can plot our signal with respect to time because its means frequency
domain.

3. Do you think Fourier Transform provides all required information for stationary and
non-stationary signals?

Answer: According to my observation Yes, Fourier Transform provides all required information
for stationary and non-stationary signals as we analyze in this code.

The end

You might also like