Lab Rubrics Generalized FINAL

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

EE-325Digital Signal Processing

Department of Electrical Engineering | The University of Faisalabad

Digital Signal
Processing
EE-325
Lab Manual

Department of Electrical Engineering


The University of Faisalabad
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

I. Laboratory Safety Policies


1. General laboratory safety
 Never eat or drink while working in the laboratory.
 Read the labels carefully.
 Do not use any equipment unless you are trained and approved as a user by the
supervisor.
 Wear safety glass or a face shield when using any hazardous materials and /or
equipment.
 Wear gloves when using any hazardous or toxic agent.
 Never do unauthorized experiments.
 Never work alone in the laboratory.
 Keep your lab space clean and organized.
 Do not leave an on-going experiment unattended.
 Never taste anything.Never pipette by mouth; use a bulb.
 Never use open flames in the laboratory unless instructed by LA.
 Check your glassware for cracks and chips each time you use it. Cracks could cause
the glassware to fail during use and cause serious injury to you or lab mates.

2. Clothing
 When handling dangerous substances, wear gloves, laboratory coats, and safety shield
or glasses. Shorts and sandals should not be worn in the lab at any time. Shoes are
required when working on the machine shops
 If you have long hair and loose clothes, then make sure that it is tied back or
confined.
 Keep the work area clear of all materials except those needed for your work.

3. Disposal
 Students are responsible for the proper disposal of used material if any inappropriate
containers.
4. Equipment Failure
 If a piece of equipment faces while being used, report it immediately to the lab
engineer/assistant. Never try to fix the problem yourself because you could harm
yourself and others.
 If leaving a lab unattended, turn off all ignition sources and lock the doors.
 Clean up your work area before leaving.
 Wash hands before leaving the lab and before eating.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

5. Electricity
 Obtain permission by the safety coordinator before operating any high voltage
equipment.
 Maintain an unobstructed access to all electrical panels.
 Avoid using extension cords whenever possible.
 Never, ever modify or otherwise change any high voltage equipment.
 Before attracting the power supply to your setup make sure there no ‘’live’’ wires
which can be touched.
 When attaching a high voltage power supply ALWAYS switch off the supply.

6. Fire
 If a person’s clothing catches on fire, he/she needs help.
 Prevent him/her from running.
 Make him/her lie down and smother the flame by rolling, wrapping with lab coats,
blankets, towels, etc.
 Never turn a carbon dioxide extinguisher on a person.
 If a fire breaks out, (if time allows) turn off all burners and remove solvents, place the
chemical and equipment safely to the nearest possible table/bench, exit the building
calmly.
 If you do not use the fire extinguisher, leave the room immediately to a safer place
possible outside. There is a carbon dioxide extinguisher in the building and the
position and operation of these should be known.
 Point the extinguisher at the base of the flames.
 Very small fires can be put out with a damp towel by smothering.
 Only after the safety of all is assured the matter of the extinguisher the fire is
considered.

Because a few seconds delay can result in very serious injury, Laboratory staff will guide
you on what to do and how to exit during the case of such an emergency.
8. In Case of emergency

 Report the location of the emergency; give your name, telephone number, and
building and floor number.
 Report the nature of the emergency whether an explosion has occurred and whether
there has been a chemical or electrical fire.

RESCUE: 1122
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Police Emergency Control Room: 041-9200264


Army Control Room: 1135
Administrator: 041-8750971 (Ext. 327)
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

II. Grading Policy


Lab Performance 20%
Lab Report 10%
Lab Viva 50%
Lab Written Test 20%
Lab Rubrics
Lab Performance (Continuous Assessment) / Performance Test
Performa Exemplary Satisfactory Developing Unsatisfactory
nce (3) (2) (1) (0)
indicator
Fully understands Has a very good Has some Has a poor understanding of
the power understanding of the understanding of the the lab equipment and cannot
Ability to distribution available available experiment without the help
conduct equipment including equipment/tools/soft equipment/tools/softw ofa lab instructor
Experime its purpose and ware’s including its are’s including its
nt knows the safety purpose and quite performance purpose
precautions to able to experiment and require a lot of
(CLO 1) conduct the entire with some help from help from the lab
(P3) experiment with a lab instructor engineer to conduct
negligible help from the experiment
the lab instructor.
Has an excellent Has good skills to Has the weak skill to Has the poor skill to draw
skill to perform the perform the lab perform the lab and implement a problem and
Impleme
lab experiment experiment experiment and quite cannot solve a problem and
ntations
successfully and also successfully and can able to solve the cannot differentiate between
and
knowing the solve most of the experimental problem different types of lab
Results
importance of lab implementation of the and cannot get the equipment.
experimental results given problem and output results properly
(CLO 2)
of power distribution produce output
(P3)
and utilization results for that given
problem
Fulfill Performs all duties Performs nearly all Does not perform Never performed any duties
team of assigned team duties. Usually does duties of assigned of assigned team role.
Role’s roles. Always does the assigned work- team role. Always
Duties the assigned work rarely needs reminding relies on others to do
(CLO 3) without having to be the work
(A3) reminded.
Lab Report
Sr. Performance Exemplary Satisfactory Developing Unsatisfactory
No. Indicator (3) (2) (1) (0)
Organization/ Information is Information is Information is Unable to submit the
Structure presented in a logical presented in a presented in quite lab report.
1 (CLO 4) interesting way, which somewhat logical less continuity and
(C3) is easy to follow. All manner. All less logical
sections are in the sections are in manners. Sections
correct order and the correct order are not in proper
submitted on time. as directed and order as directed
submitted on a and unable to
time. follow the
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

submission
deadline.
The result and The result and The result and Unable to submit the
conclusion are stated conclusion are conclusion are lab report.
Data and reflect the complete stated and reflect stated but reflect
2 Presentation knowledge of the acceptable little of experiment
(CLO 4) experiment. Eachstep is knowledge ofthe detail and not
(C3) fully explained. experiment. Each properly explained.
step is somehow
explained.
(Lab Viva)
Sr. Performance Exemplary Satisfactory Unsatisfactory
No. Indicator (2) (1) (0)

Responsiveness Responds well, quick, and very Generally responsive Non-responsive


to accurate all the time. and accurate most of
Questions/Accu the time.
1 racy

(CLO 4)
(C3)
Level of Demonstration of full knowledge At least with content No grasp of the information.
understanding of the subject with explanations and able to elaborate No knowledge of the subject
of the learned and elaboration and explain to some matter. No questions are
2 skill degree. answered. No interpretation
made
(CLO 1)
(P3)
Understanding Has an excellent ability to Has a good ability to Has a poor ability to identify
different types identify and differentiate identify and and differentiate between
of lab between different types of lab differentiate between different types of lab
equipment/tool equipment/tools/software different types of lab equipment/tools/software
3
s/software’s equipment/tools/
Software
(CLO 2)
(P3)
Is very confident and explains Is confident to some Doesn’t have the confidence
Confidence the details properly. Proper eye extent with quite less to explain and deliver the
4 contact is maintained all the time eye contact and topic properly. No eye contact
(CLO 3) with proper presentational presentational and presentational gestures
(A3) gestures. gestures. were used.

Lab Written Test


Sr. Performance Exemplary Satisfactory Developing Unsatisfactory
No Indicator (3) (2) (1) (0)
.
1. Level of Demonstration of At ease with content The only basic No grasp of the
Understanding full knowledge of and able to elaborate concept is information. No
the subject with and explain to some demonstrated and knowledge of the
(CLO 4) explanations and degree. interpreted. subject matter. No
(C3) elaborate. question is answered.
No interpretation was
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

made.
Students answer Student shows some The student tries to The student does not
the question prior knowledge and answer the question know how to answer
correctly and may use but does not show the question.
completely. terminology to evidence of any
Solution
Student answer the question. previous knowledge
2. incorporates The student does not to assist in answering.
(CLO 4)
information from use appropriate A student may reveal
(C3)
the text or lab information from misconceptions about
notes into the the text or lab notes concepts.
answer. to answer the
question.

III. Level of Inquiry


Level Problem/Question Procedure/Method Solution
0 Provided to student Provided to student Provided to student
1 Provided to student Provided to student Constructed by student
2 Provided to student Constructed by student Constructed by student
3 Constructed by student Constructed by student Constructed by student

Level of Inquiry Description


The problem, procedure, and solution methods are provided to the student. The student
0 experiments and verifies the result with this manual.
The problem and procedure are provided to the student. The student interprets the data to
1 propose viable solutions.
The problem is provided to the student. The student develops a procedure for investigating
2 the problem decides what together and interprets the data to propose viable solutions.

A raw phenomenon is provided to the student. The student chooses the problem to explore
3 develop a procedure for investigating the problem decides what together and interprets the
data to propose viable solutions.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

IV. Lab Course Learning Outcomes


Course Title: (EE-)
Laboratory:
Instructor:
Designation:
Email:
Phone:

CLO1: (P3)
Realize the experiment by following instructions by the teacher.

CLO2: (P3)

Collect data from the experiment and analyze it in the view of theoretical understanding
developed during the class.

CLO3: (A3)

Exhibit the capability to work in a team during the lab activities.

CLO4: (C3)

Demonstrate and present learned knowledge effectively.

Mapping of Course Learning Outcomes (CLOs) to Program Learning Outcomes (PLOs) /


Graduate attributes.
PLOs
Course PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO
Code 1 2 3 4 5 6 7 8 9 10 11 12
CLOs
CLO1  
EE-235 CLO2   
CLO3   
CLO4  
PLO1: Engineering Knowledge PLO7: Environment and Sustainability
PLO2: Problem Analysis PLO8: Ethics
PLO3: Design / Development of Solutions PLO9: Individual and Team Work
PLO4: Investigation PLO10: Communication
PLO5: Modern Tool Usage PLO11: Project Management
PLO6: The Engineer and Society PLO12: Lifelong Learning
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Program: Semester: ………


Subject:Date………………..
Rubrics Evaluation

Performance Lab Report


Experiment Ability to Conduct Implementation Team Organization/ Data Signature
Experiment and Result Work Structure Presentation
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Total Marks Total Marks
Obtained Obtained

Remarks (if any):-


______________________________________________________________________________

Name & Signature of faculty: -__________


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

LAB #1
Task-1: Generate a Continuous time cosine signal and plot it.

Figure 1.cosinewave form.

Task-2:Generate a Discrete time exponential signal and plot it.

Figure 2.Time Exponential Signal


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-3: Generate the following sequences using step and impulse sequence.
a) x[n] = u[n] – u[n-10]
b) b. x[n] = anu[n]
c) c. ∑an δ[n-k] , k = -10 to 10

Figure 3.Step and Impulse Signal

Task-4:Generate a step sequence u [n] as described in In-Lab section, use it to


generate animpulse as δ [n] = u[n] – u[n-1].

Figure 4.Step Seq& Impulse


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-5: Can you explain what the following program does:


L = length(x);

for I = 1: L

if x (i) < 0

x (i) = -1;

end

end.
Ans:This program make array or index of I. this array show the length of the I
which is less than zero or equal to -1. In this function we also use the for loop to
write the program or fulfill our requirement.

Task-6: Write a program to compute the variance and mean of a signal x. The
variance σ isdefined to be:
σ=1

N∑(xi − x̅ )N

1=1

where ‘ m ’ is the mean value of the signal x. For signal x, use all the integers from 1
to 1000.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 5.Variance & Mean Func


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab#2
Task-1: Take an exponential signal and perform scaling operation with a
negative integer as given in In-Lab Work section and plot the result.

Figure 6.Exponential signal

Task-2:Write a Matlab function “sigshift” for producing a delay of ‘k’ in a


given sequence ‘x[n]’ defined by arrays “x” and “n” by using the pseudo code
given in In-Lab Work section. Your function should yield y[n] = x[n-k].
Function [y,n]=sigshift(x,n,k)
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 7.Delayed O/P using Matlab

Task-3: Write a Matlab function “sigfold” for folding a given sequence ‘x[n]’
defined by arrays “x” and “n” by using the pseudo code given in In-Lab Work
section. Function [y,n]=sigfold(x,n)

Figure 8.Folding a Sequence


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-4: Write a Matlab function “sigadd” for adding two sequences x1[n] and
x2[n] by using the pseudo code given in In-Lab Work section.Function
[y,n]=sigadd(x1,n1,x2,n2)

Figure 9.Add two Sequences


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab #3
Task-1:Using MATLAB we determine the partial-fraction expansion of the z-
transform X(z)given by
18 z 3+3 z 2
X(z) = −4 z−1

Figure 10. Partial fraction Exp using Z-transfrom


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-2:Determine the inverse z-transform of the 11 terms of following


equation
1. 2z-1

2. X(z) =(1-0.2z-1)(1+0.6z-1)

Figure 11.Inverse Z-transform


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-3: Determine the Inverse z-transform of the following sequences, using


partial fraction expansion method.
x(z) = __1 – z-1– 4z-2 + 4z-3

1 – 2.75z-1 + 1.625z-2– 0.25z-3

Figure 12.Inverse Stem function


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-4:A digital filter is described by the difference equation,Y(n) = x(n) +


x(n-1) + 0.9y(n-1) – 0.81y(n-2)Using the freqz function, plot the magnitude
and phase of the frequency response of the filter.

Figure 13.Mag & Phase Graph


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab#4
Task-1: Write Matlab function for circular shift by first writing its pseudo-
code of the procedure explained in the In-Lab section and then writing its
code.

Figure 14.Circular Shift Signal

Task-2: Verify the time shifting property of DFT by first writing a pseudo
code of the RHS andLHS followed by the MATLAB code. Use the circular
shift function designed above for shifting in time domain. Compare the result
by sub-plotting LHS and RHS of the following equation.
DFT{x (n-l )} =X(k)e -j(2pi/N)kl
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 15.Shifting in Time domain


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-3: Verify the duality property of DFT by first writing a pseudo code of
the RHS and LHSfollowed by the MATLAB code. Compare the result by sub-
plotting LHS and RHS of the following equation.
DFT[Nx(−n)] = X (k)

Figure 16. DFT Function

Task-4: Write Matlab function for circular convolution by first writing


pseudo-code of the procedure explained in the In-Lab section and then writing
its code.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 17.Circular Convolution Stem


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-5: Verify the convolution property of DFT by first writing a pseudo code
of the RHS and LHS followed by the MATLAB code. Use the circular
convolution function developed in task-4 to compute convolution in time
domain. Compare the result by sub-plotting LHS and RHS of the following
equation.

Figure 18.Sub-Plotting LHS & RHS


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-6: Verify the duality property of DFT by first writing a pseudo code of
the RHS and LHS followed by the MATLAB code. Compare the result by
sub-plotting LHS and RHS of the following equation.

Figure 19.Original & DFT signal

Lab#5
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task 1:Write a Matlabcode to decompose a sequence into its even and odd
components. Take help from Pre-Lab work.

Figure 20.Even & Odd part of signal


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task 2: You should have noticed that ‘conv’ command calculates convolution
assuming both input sequences are starting from origin (i-e no values on –ve t-
axis). This is not always the case, we do have sequences which have values for
t<0. Write a code conv_m that would remove this limitation in the code conv.

Figure 21.Code for remove limitation


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task 3: Convolve following sequences using MATLAB Function “conv” and


“conv_m” and plot the input, impulse response and output in one figure using
“subplot”:
• x[n] = [1 2 1], n=[0 1 2] h[n] = [1 1 1], n= [0 1 2]

• x[n] = [-1 4 -3 -2 1 0 2], n=[-2:4], h[n] = [1 1 1], n= [-1 0 1]


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task 4: Write a function named convolves in MATLAB that performs 1D


linear convolution. You can code any of the above methods by following the
steps mentioned above.

Figure 22.Linear Convolution


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab#6
Task-1: Design a “minimum order” low pass filter to suppress all frequencies
above 4kHz. Mention the application of such a filter. Send this model to DSP
kit and show the results in CCS.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 23.Mag Response

Task-2: Use your ‘sin’ or ‘cos’ function to generate a sinusoid wave having
two components as f1 = 3kHz and f2 = 5kHz and then sample it with fs =
8kHz. Calculate its fft with zero frequency component in the middle. Plot it on
a properly scaled w-axis. Specify if there is aliasing or not? If there is aliasing
specify which component is casing the aliasing.
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 24.Freq Waveform


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-3: Use your ‘sin’ or ‘cos’ function to generate a sinusoid wave having
two components as f1 = 1.5kHz and f2 = 4kHz and f3 = 7kHz and then (a)
sample it with an fs such that there is no aliasing (b) sample it with an fs
which produces aliasing. Show the result in both cases by plotting fft of the
discretized signal.

Figure 25.FFT Discreted signal


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-4:Take a speech signal


i. Plot fft of the signal

ii. Downsample (decimate) the signal in part-(ii) by 2 and plot its fft. Comment if
there is aliasing or not?

iii. Now upsample (interpolate) the signal in part-(ii) by 2 and plot its fft. Comment
on the outcome?

iv. Compare the fft of in part-(i) and in part-(iii) and comment on whether or not
the interpolation operation recovers the information lost during decimation
operation?
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad
EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Figure 26.Plotting of speech Signal


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab#7
Task-1: Generate a sinusoid containing 5 frequency components and display
these components in the.

18 z 3+3 z 2
−4 z−1

Figure 27.Freq Component


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-2: You should have noticed that conv command calculates convolution
assuming both input sequences are starting from origin (i-e no values on –ve t-
axis). This is not always the case, we do have sequences which have values for
t<0. Write a code conv_m that would remove this limitation in the code conv.

Figure 28. Limitation code for conv_m


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-3: Convolve following sequences using MATLAB Function “conv” and


“conv_m” and plot the input, impulse response and output in one figure using
“subplot”:
• x[n] = [1 2 1], n=[0 1 2] h[n] = [1 1 1], n= [0 1 2]

• x[n] = [-1 4 -3 -2 1 0 2], n=[-2:4], h[n] = [1 1 1], n= [-1 0 1]

Figure 29.Conv_m subplot signals


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-4: Write a function named convolve in MATLAB that performs 1D


linear convolution.You can code any of the above methods by following the
steps mentioned above.

Figure 30.Linear Convolution


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Lab#8
Task-1: Design a “minimum order” low pass filter to suppress all frequencies
above 4kHz. Mention the application of such a filter. Send this model to DSP
kit and show the results in CCS.

Figure 31.Lowpass filter

Figure 32.Mag Respone


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

Task-2: Design a “minimum order” high pass filter to pass all frequencies
above 8kHz. Mention the application of such a filter. Send this model to DSP
kit and show the results in CCS.

Figure 33.High Pass Filter

Figure 34.Mag Response


EE-325Digital Signal Processing
Department of Electrical Engineering | The University of Faisalabad

You might also like