DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING & TECHNOLOGY,
PESHAWAR
MtE-407/424 Digital Signal processing LAB, 8th Semester
Student Name: Ihtisham ul haq Reg No : 16PWMCT0478
Lab Tittle: some appointed tasks on lti.
Lab No: 5
LAB REPORT RUBRICS:
Below Student’s
Criteria Excellent (4) Proficient (3) Basic (2)
Basic (1) Score
Introduction provides Introduction is
Introduction is
a clear background. adequate, but the
confusing and the
Problem, objectives, Problem,
Introduction Problem, objectives Introductio
and apparatus/software objectives and
and n is missing
is defined clearly with apparatus/softwar
apparatus/software is
orienting material for e is defined
not defined clearly
audience. clearly
Choice of
Choice of words
Wording is concise, Choice of words words is
is appropriate
Language/ clear, and easy to is sometimes not poor.
most of the time.
Code follow. - Consistently appropriate. Grammar,
Minor problems
Structure proper grammar, Grammar, spelling spelling
with grammar,
spelling and and punctuation are and
spelling,
punctuation. not satisfactory. punctuation
punctuation.
are poor.
Result/
Major
Simulation
Most but not all component
Discussion Clear, insightful Conclusions are
points contained s of lab
and conclusions. inadequate.
in the conclusion. were
Conclusions
missing
Graphs/tables/figures/ Graphs/tabl
Graphs/tables/fig Graphs/tables/figure
Visuals pictures are adequate, es/figures/p
ures/pictures are s/pictures are
well labelled and ictures are
adequate. inadequate.
presented missing.
Points are clearly Major
Most points are Report is
Academic presented in a logical component
ordered well. No disorganized and
writing order. Easily followed. s of lab
major problems layout is somewhat
Page layout is were
with layout. weak.
effective. missing
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING & TECHNOLOGY,
PESHAWAR
MtE-407/424 Digital Signal processing LAB, 8th Semester
Student Name: ihtisham ul haq___ Reg No: 16PWMCT0478__
Lab Tittle : Some appointed task on lti system.
Lab No__5__
Lab Work Rubrics (IN LAB ASSESSMENT):
Excellent (4) Proficient (3) Basic (2) Below Basic (1) Student’s
Criteria
Score
Few errors in
To use
Excellent No errors in technique were Several serious
proper
technique was technique were observed during errors in technique
technique
used throughout observed during the lab were observed
throughout
the lab the lab procedure, but during the lab
the lab
procedure. procedure. they may have procedure.
procedure
been significant.
To practice
the
Practice the
simulation Practice tasks
complete Task Practice Tasks Practice asks
task as per with some
as per the partially inaccurately
requirement hiccups
guidelines
s
Data and Data and
Most data and
observations observations
To collect observations
were recorded were recorded Data was
data and were recorded
accurately, accurately, incomplete or
observations adequately, but
for the descriptively, descriptively, recorded
with several
required task and completely, and completely, inaccurately
significant errors
with no serious with only minor
or omissions.
errors. errors.
Digital Signal Processing Lab
Lab Report No# 05
Ihtisham ul haq
7th Semester
Morning Section
16PWMCT0478
Instructor: Dr. Shehzad Anwar
Department of Mechatronics Engineering
University of Engineering and Technology
Peshawar
Dated: 19 May, 2020.
Objectives:
1. Display discrete time signal with stem command.
Forx[n] = 2δ[n] + 5δ[n-1] + 8δ[n-2] + 4δ[n-3] + 3δ[n-4], plot x[n-2], x[n+3], 2x[n], 1/2x[n],
x[-n], x[-n-2].
2. Plot ramp and reversed ramp function.
3. Used function Heaviside and dirac to plot unit stepand impulse respectively.
4. Generate and plot a 2hz square wave using the command square to generate the signal.
Task No#1:
Plot the following
Code:
n=[-10:10]
x=2*impseq(0,-10,10)+5*impseq(1,-10,10)+8*impseq(2,-10,10)+4*impseq(3,-
10,10)+3*impseq(4,-10,10);
subplot(2,3,1)
stem(n+2,x)
title('shift signal x(n-2)')
xlabel('n');ylabel('X');
subplot(2,3,2)
stem(n-3,x)
title('shift signal x(n+3)')
xlabel('n');ylabel('X');
subplot(2,3,3)
stem(n,2*x)
title('shift signal 2x(n)')
xlabel('n');ylabel('X');
subplot(2,3,4)
stem(n,(1/2*x))
title('shift signal 1/2*x(n)')
xlabel('n');ylabel('X');
flip_n=-fliplr(n)
subplot(2,3,5)
stem(flip_n,x)
title('shift signal x(-n)')
xlabel('n');ylabel('X');
subplot(2,3,6)
stem(flip_n+2,x)
title('shift signal x(-n-2)')
xlabel('n');ylabel('X');
function [x,n] = impseq(n0,n1,n2)
% Generates x(n) = delta(n-n0); n1 <= n <= n2
% ----------------------------------------------
% [x,n] = impseq(n0,n1,n2)
%
n = [n1:n2]; x = [(n-n0) == 0];
end
Result:
Task NO #2:
Code is the following
Code:
n=0:10;
x=n;
stem(n,x)
Result:
Code:
n=0:10;
flip_n=-fliplr(n)
x=n;
flip_x=fliplr(x)
stem(flip_n,flip_x)
Result:
Task No#3:
2 HZ Square Wave Using Square Command:
Script Code:
A=1;
fo=4*pi;
w=2*pi;
t=0:0.001:2;
sq=A*square(fo*t + w);
plot (t, sq)
axis ([0 1 -2 2])
Result:
Task No#4:
Using Function Heaviside and Dirac to plot unit step and impulse
respectively
Script code:
For Heaviside step function for x and x - 1.
syms x
fplot(heaviside(x), [-2, 2])
RESULT:
fplot(heaviside(x - 1), [-2, 2])
RESULT: