VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Sampling
1. Lab Task 2 Syed Abuzar DSP
1
Lab Report:
Submitted By :
Syed Abuzar Hussain Shah
Reg #
SP15-BEE-096
Submitted To:
Sir Usman
Class:
BEE-5A
Dated: 30/03/2017
2. Lab Task 2 Syed Abuzar DSP
2
Introduction:
In today’s Lab we will take a continuous time signal and sample it out with a fixed
sampling time
period and analyze its frequency response at each point.
Commands to be used:
• plot
• real
• exp
• imag
• Abs
• phase
• diff
• sin/cos
• hold on/off
Task:
Take a continuous time sinusoidal with a cut off frequency of 50 Hz with a
simulated sampling
frequency of 1000. Analyse its frequency spectrum using “fft”.
clc
clear all
close all
fn=50;
fs=1000;
N=1200;
t=(-100:100)*1/fs;
x=sin(2*pi*fn*t);
subplot(241)
plot(t*1000,x)
title(['fn = ' num2str(fn) 'Hz fs = ' num2str(fs) 'Hz'])
ylabel('x(t)')
xlabel('ms')
axis([-30 30 -2 2])
grid on;
11. Lab Task 2 Syed Abuzar DSP
11
Output:
Questions:
Q1. Provide your analysis for the changed frequency of Impulse train.
Ans: When we change the frequency of the square wave, the frequency of impulse
train also changes. When frequency of impulse train increases, number of samples
taken also increases so more information is stored.
Q2: Explain if you observe under or over sampling .
Ans: When I took samples according to Niquous Criteria (fsq=2fn), I observed
over sampling (fsq=5fn) but when I taken fsq=1.5fn I observed under sampling.In
Over sampling no data is lost but in under sampling we lose information.
Conclusion:
In this lab I learnt the difference between the oversampling and undersampling.
The frequency of impulse train has main role in under and over sampling. If
frequency is increased, sampling time also increases so we have more information
about the signal.