PAF – Karachi Institute of Economics and Technology Main Campus
(Electrical/Avionic Engineering Department)
Course: Digital Signal Processing
Faculty Name: Dr. M. Arif
Class ID: 104810, 104811 27-11-2020
Final Lab Max Marks: 30
Fall-2020
Note:
i. Do mention your name, ID and page number on top of each page of the answer sheet.
ii. The solution should be neat, clean, and understandable.
iii. No need to write the questions, just mention answers with the proper numbers and follow
the order of questions strictly.
iv. Rename your file in a format “your ID_your name_ Final_Lab_DSP_ your class ID”
for example “6398_Wajid_Final_Lab_DSP_104886”.
v. The solution must be submitted through the LMS in a single pdf format.
Page 1 of 2
Question # 1: [5 Marks]
Write a MATLAB code (write comments for each step) for the following signals:
𝑥(𝑛) = 2𝑛 [𝑢(𝑛 + 3) − 𝑢(𝑛 − 7)]
ℎ(𝑛) = 3𝑛 [𝑢(−𝑛 + 3) − 𝑢(−𝑛 − 3)]
Using MATLAB, i) convolve 𝑥(𝑛) and ℎ(𝑛) and ii) cross-correlate 𝑥(𝑛) and ℎ(𝑛)
Question # 2: [15 Marks]
Consider a system described by following difference equation:
𝑦[𝑛] = 0.2𝑥[𝑛] − 0.4𝑦[𝑛 − 3] − 0.1𝑦[𝑛 − 4] + 0.1𝑥[𝑛 − 4] − 0.9𝑥[𝑛 − 2]
a. Using MATLAB find out the “Linearity” of the system.
b. Using MATLAB find out the “Time-Invariance” of the system.
c. Using MATLAB display the Frequency Response of the Filter.
Question # 3: [6 Marks]
Apply Bit plane slicing on the following image and then recover the original image.
Question # 4: [4 Marks]
Perform sampling and quantization on the given signal. Your code should generate three figures.
First should display the Continuous Signal only. Second should have the plots of sampled signal
(for Fs=2Fmax) and the third should display the quantized signal.
𝑥𝑎 (𝑡) = 3 cos(25𝜋𝑡) + 10 sin(30𝜋𝑡) − cos(100𝜋𝑡)
Page 2 of 2