0% found this document useful (0 votes)
35 views

Lab 1

This document contains a MATLAB code for analyzing digital signals and processing. It generates continuous and discrete time signals of different frequencies, plots them, and investigates aliasing. It also contains tasks to analyze sampled signals, listen to tones at different frequencies, and assess the quality of a recorded voice signal at various sampling rates. The tasks aim to demonstrate concepts like aliasing, sampling rate vs quality, and the relation between theoretical concepts and code implementation.

Uploaded by

asmasaleem450
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Lab 1

This document contains a MATLAB code for analyzing digital signals and processing. It generates continuous and discrete time signals of different frequencies, plots them, and investigates aliasing. It also contains tasks to analyze sampled signals, listen to tones at different frequencies, and assess the quality of a recorded voice signal at various sampling rates. The tasks aim to demonstrate concepts like aliasing, sampling rate vs quality, and the relation between theoretical concepts and code implementation.

Uploaded by

asmasaleem450
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 88

LAB 1

Digital Signal & Processing


In-Lab Activity:
clear all; close all; clc;
F1=10;
F2=110;
Fs=100;

Ts=1/Fs;
t=[0:0.00000005:0.2];
x1t=cos(2*pi*F1*t);
x2t=cos(2*pi*F2*t);

figure;
plot(t,x1t,t,x2t, 'LineWidth',2);
xlabel('continuous time (sec)');
ylabel('Amplitude');
xlim([0 0.1]);
grid on;
legend('10Hz','110Hz');
title('Two CTCV (analog) sinusoids');

%Sampling the two CTCV sinosoids


nTs=[0:Ts:0.2];
x1n=cos(2*pi*F1*nTs);
x2n=cos(2*pi*F2*nTs);
figure;

% Plot the first sinusoidal signal


subplot(2,1,1);
stem(nTs,x1n,'k','filled','LineWidth',2);
grid on;
title('10Hz DTCV (sampled) signal');
xlabel('discrete time (sec)');
ylabel('Amplitude');
xlim([0 0.1]);
% Plot the second sinusoidal signal
subplot(2,1,2);
stem(nTs,x2n,'k','filled','LineWidth',2);
grid on;
title('110Hz DTCV (sampled) signal');
xlabel('discrete time (sec)');
ylabel('Amplitude');
xlim([0 0.1]);
%plotting the sampled versions with the original sinosoids
figure;
plot(t,x1t,t,x2t,'LineWidth',2);
hold;
stem(nTs,x1n,'k','filled','LineWidth',2);
grid on;
title('Analog sinusoids with sampled signal');
xlabel('time (sec)');
ylabel('Amplitude');
xlim([0 0.1]);
legend('10Hz sinusoid','110Hz sinusoid', 'sampled sinusoid')
RESULT:
This MATLAB code generates two continuous time signals of 10 Hz and 110 Hz. In the first plot, we can easily
spot that 110Hz frequency signal is being aliased. As we look at second plot, it can be observed that the discrete
time graph of the both the signals shows no difference despite one signal being aliased. The last plot help
visualize how sampling affects the representation of continuous and discrete time graph.

LAB TASKS:
Task 1:
Consider the following CT signal: x(t) = sin (2 pi F0 t). The sampled version will be: x(n) = sin (2 pi F0/Fs n), where n is a
set of integers and sampling interval Ts=1/Fs. Plot the signal x(n) for n = 0 to 99 for Fs = 5 kHz and F1 = 0.5, 2, 3 and 4.5
kHz. Explain the similarities and differences among various plots.
% Clear workspace, command window, and close all figures
clear all;
close all;

% Sampling frequency
Fs = 5000;

% Define four different frequencies


F0_1 = 500;
F0_2 = 2000;
F0_3 = 3000;
F0_4 = 4500;

% Time vector from 0 to 99 samples


n = 0:99;

% Generate sinusoidal signals for each frequency


x1_n = sin(2 * pi * (F0_1 / Fs) * n);
x2_n = sin(2 * pi * (F0_2 / Fs) * n);
x3_n = sin(2 * pi * (F0_3 / Fs) * n);
x4_n = sin(2 * pi * (F0_4 / Fs) * n);

% Create a figure with subplots for each sinusoidal signal


figure;

% Plot the first sinusoidal signal


subplot(4, 1, 1);
stem(n, x1_n);
title('F0_1 = 0.5 kHz');
xlabel('n');
ylabel('x(n)');

% Plot the second sinusoidal signal


subplot(4, 1, 2);
stem(n, x2_n);
title('F0_2 = 2 kHz');
xlabel('n');
ylabel('x(n)');
% Plot the third sinusoidal signal
subplot(4, 1, 3);
stem(n, x3_n);
title('F0_3 = 3 kHz');
xlabel('n');
ylabel('x(n)');

% Plot the fourth sinusoidal signal


subplot(4, 1, 4);
stem(n, x4_n);
title('F0_4 = 4.5 kHz');
xlabel('n');
ylabel('x(n)');
RESULT:
The F1 and F4 discrete time graph looks the same. Similarly, F2 and F3 look same however their frequencies
are different this shows that F3 and F4 are showing aliasing because double their frequencies are greater than
the sampling frequency (i.e. 5 KHz).

Task 2:
Generate a tone in MATLAB with varying frequency f = 1000,2000,3000,4000, 5000, 6000, 8000, 9000, 25000,-1000,-
2000,-3000 Hz with Fs = 8000 samples/sec. Listen to the tones, and observe at Sounds like what frequency? Also Specify
whether Aliasing is happening or not.

RESULT:
We can conclude from the sounds that frequencies from 1 KHz to 4 KHz possess unique properties following
Nyquist criteria and the sound becomes shriller. Aliasing starts happening from 5 KHz to 25 KHz as they take
the identity of other frequencies. The negative frequencies are mirror images of the positive ones and sound the
same as they follow “–Fs/2”.

Task 3:
Record a sentence in your voice.(you may use Simulink /audacity to record).Change Fs =44100, 22050, 11025, 8192,
4096 , 2048 , 1024 and observe

a) Voice quality during playback [Excellent/Good/OK/Bad]

b) File size in kilobytes

c) Aliasing happening or not?

FREQUENCIES FILE SIZE(KB) QUALITY ALIASING


44100 187 Excellent No
22050 114 Good No
11025 50.0 Good No
8192 38.0 Good No
4096 36.0 Ok Yes
2048 12.0 Bad Yes
1024 7.04 Bad Yes

THOUGHTS:
Higher sampling rates generally result in larger file sizes because more samples are taken per second. As
I proceeded to lower frequencies I heard some unexpected sounds, which indicated aliasing. Aliasing is
more likely when the original recording contains frequencies close to or exceeding the Nyquist frequency
of the new sampling rate.
NED University of Engineering &
Technology Department of Electrical
Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to
Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given
programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise utilise
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date
LAB 2
In lab Work:
% Clear existing variables, close all figures, and clear command window
clear all;
close all;
clc;

% Set parameters
N = 500; % Number of samples
fd = 1/50; % Frequency of the cosine signal
n = 0:499; % Time indices

% Prompt user for the number of digits after the decimal point to be retained
q = input('No. of Digits after decimal points to be retained (0-9): ');

% Generate a cosine signal


x = cos(2*pi*fd*n);

% Calculate the signal power Px


Px = sum(abs(x).^2)/N;

% Prompt user to select the quantization method (round-off, floor, or ceil)


a = input('Select the method of quantization, press 1 for round-off, 2 for floor, and 3
for ceil: ');
% Quantization based on the selected method
if a == 1
xq = round(x*10^q)/10^q;
elseif a == 2
xq = floor(x*10^q)/10^q;
elseif a == 3
xq = ceil(x*10^q)/10^q;
end
% Calculate quantization error (xe) and its power Pe
xe = x - xq;
Pe = sum(abs(xe).^2)/N;
% Calculate Signal-to-Quantization-Noise Ratio (SQNR)
SQNR = 10*log10(Px/Pe);
% Display the SQNR
disp(['The Signal to Quantization Noise Ratio is: ' num2str(SQNR) ' dB.']);
% Plot the original signal and quantized signal
figure;
subplot(2,1,1);
stem(n, x, 'filled');
hold on;
stem(n, xq, 'r', 'filled');
grid;
xlabel('indices');
ylabel('Amp');
xlim([0 499]);
ylim([-2.1 2.1]);
legend('Original Signal', 'Quantized Signal');
% Plot the quantization error
subplot(2,1,2);
plot(n, xe, 'k', 'Linewidth', 2);
xlabel('indices');
ylabel('Error');
xlim([0 499]);
Conclusion:
1. Number of Digits After Decimal (q):
 Increasing the value of q (number of digits after the decimal point) during quantization means that you
are retaining more precision in the quantized values.
 As a result, the quantized signal xq will have more fine-grained values compared to a lower q.
 This may lead to a closer match between the original signal and the quantized signal, potentially
reducing quantization error.

2. Quantization Method :
 The choice of quantization method (floor, ceil, round-off) affects how values are rounded during
the quantization process.
 Round-off tends to produce values that are closest to the original values.
 Floor and ceil introduce biases, rounding down or up, respectively, which may lead to a different
distribution of quantization errors.

Lab Tasks:
1. Effects of Quantization with variable precision levels Simulate a DTCV sampled composite signal of
𝑓𝑑1=125 samples/sec and 𝑓𝑑2=150 samples/sec with length of the signal be 250 samples. Take the
desired number of significant digits from user as an input. Then choose the method of Quantization
(round-off, floor & ceil) and apply to the signal generated above. Compute the quantization error
signals and SQNR.
2. Simple sinusoid quantized to various bits per sample Generate a 100 Hz sinusoid sampled at 10000
samples/sec and quantized at 1_bit/sample. Now increase the bit depth for various numbers of bits
per sample (2, 3, 4, 5, 6, 7, 8) and attach plots. You can use a column format for plotting (but the
diagrams should be visible)
clear all;
close all;
clc;

F = 100; % given data


Fs = 10000;
Ts = 1 / F;
N = 500;
n = 0:N-1;
t = (0:499)*Ts;
x = sin(2*pi*F*t);
bits_array = 1:8;
% Select the method of quantization outside the loop
qs = input('Select the method of quantization, Press 1 for Round-off, 2 for Floor, and 3
for Ceil: ');
for q = bits_array % starting a for loop because of bits_array
fd = F / Fs;
xn = sin(2*pi*fd*n);

xmax = 2^(q - 1) - 1;
xn = xmax * xn;

if qs == 1
xq = round(xn);
elseif qs == 2
xq = floor(xn);
elseif qs == 3
xq = ceil(xn);
end
% Create a new figure for each bit depth
figure;
stem(n, xn, 'r'); % Red for DTCV
xlim([0 99]);
grid on;
hold on;
stem(n, xq, 'k'); % Black for DTDV
xlim([0 99]);
title(['Quantized Signal - ' num2str(q) ' bits']);
legend('DTCV', 'DTDV');
xlabel('Time index');
ylabel('Amplitude');
end
Conclusion:
 The straight line in the case of 1-bit quantization represents the limited resolution of the quantized
signal, which can only take two distinct values
 As the number of bits per sample increases, the quantization levels become finer. Finer quantization
levels result in a quantized signal closely resembling the original sinusoidal signal.
 Higher bit depths generally result in a more accurate representation of the original signal but come at
the cost of increased data storage or transmission requirements.
 Lower bit depths introduce quantization errors and may lead to a loss of signal fidelity.

3. Audio signal quantization to various bits per sample Use your recorded voice in last session and
quantize it at 1 bit /sample. Change bit depth to 2,3,4 and then listen and take notes of your
observations. Decide no. of bits for audio until quality stops improving.
% Load the audio file
file_path = 'E:\voice records lab task matlab dsp\asma 0.wav';
[y, fs] = audioread(file_path);

% Original audio
sound(y, fs);

% Quantize the audio signal with different bit depths


bit_depths = [1, 2, 3, 4,5,6,7,8,9]; % Add more bit depths if needed

for i = 1:length(bit_depths)
bit_depth = bit_depths(i);

% Quantize the audio signal


y_quantized = round(y * (2^(bit_depth - 1))) / (2^(bit_depth - 1));

% Play the quantized audio


sound(y_quantized, fs);

pause(length(y)/fs + 1); % Pause to allow time for listening


close all;
end

S.No SAMPLING FREQUENCY BIT SIZE REMARKS


1 44KHz 1 No sound
2 44KHz 2 No sound
3 44KHz 3 Very Distorted
4 44KHz 4 Distorted but audible
5 44KHz 5 Distorted but audible
6 44KHz 6 Ok
7 44KHz 7 Ok
8 44KHz 8 Good
9 44KHz 9 Excellent

Thoughts:
At 1- and 2-bit depth there was no sound after that distorted sound is observed. At bit depth 6, 7 and 8 the sound
quality started to increase and at 9 excellent sound quality is observed. So, it is concluded that as we increase the bit
depth the sound quantization interval decreases due to inverse relation.

NED University of Engineering &


Technology Department of Electrical
Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to
Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given
programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise utilise
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date
LAB 3
Inlab Code:
clear all;
close all;
clc;
h=[3 2 1 -2 1 0 -4 0 3]
org_h=1;
nh=[1:length(h)]-org_h;
x=[1 -2 3 -4 3 2 1];
org_x=1;
nx=(1:length(x))-org_x;
y=conv(h,x);
ny=[nh(1)+nx(1): nh(end)+nx(end)];
figure;
subplot(3,1,1);
stem(nh,h,'filled','k');
xlabel('Time index(n)');
ylabel('amplitude');
xlim([nh(1)-1 nh(end)+1]);
title('impulse response h(n) of system');
grid;
subplot(3,1,2);
stem(nx,x,'filled','k');
xlabel('Time index(n)');
ylabel('amplitude');
xlim([nx(1)-1 nx(end)+1]);
title('input siganl x(n)');
grid;
subplot(3,1,3);
stem(ny,y,'r','filled');
xlabel('Time index(n)');
ylabel('amplitude');
xlim([ny(1)-1 ny(end)+1]);
title('output obtained by convolution y(n)');
grid

LAB TASK:
1. What will happen if we input x(n)={0,0,1,0,0} into the above system
The code will be same as above, there is only change in the value of x(n).

Thoughts:
The input signal x(n)= [0 0 1 0 0] is convolved with the impulse response, resulting in the output signal y(n).
The three subplots visualize the impulse response, input signal, and output signal obtained through
convolution, offering insights into the system's behavior. This representation clearly explains how the
system processes the given input signal and produces the corresponding output over time.
2. Can you prove the commutative property of the convolution?
Thoughts:
This code includes three subplots: one for each signal (f and g) and one for the convolutions (f * g and g * f).
The legend in the third subplot indicates which convolution is represented by each color. The code also checks
that convolution do hold the property of commutative.

3. Modify the code to prove Associative and Distributed properties of the convolution.
Thoughts:
The code is modified to check on the associative and distributive properties held by convolution.
4. Convolve your recorded sound with drumloop.wav. Note your observation. a) Plot the output. b) Listen to
the output.
clear all; close all; clc;
[x1, Fs1] = audioread('E:\matlab\noise.mp3');
[x2, Fs2] = audioread('E:\voice records lab task matlab dsp\asma 0.wav');
x1 = x1(:, 1);
x2 = x2(:, 1);
org_x1 = 1;
nx1 = [1:length(x1)] - org_x1;
org_x2 = 1;
nx2 = [1:length(x2)] - org_x2;
% Perform convolution
z = conv(x1, x2);
nxz = [nx1(1) + nx2(1): nx1(end) + nx2(end)];
% Plotting
figure;
subplot(3, 1, 1)
plot(nx1, x1, 'r')
xlabel('Time index (n)');
ylabel('Amplitude');
xlim([nx1(1) - 1, nx1(end) + 1]);
title('asma 0.wav');
grid on;
subplot(3, 1, 2)
plot(nx2, x2, 'g')
xlabel('Time index (n)');
ylabel('Amplitude');
xlim([nx1(1) - 1, nx1(end) + 1]);
title('noise.wav');
grid on;
subplot(3, 1, 3)
plot(nxz, z, 'b');
xlabel('Time index (n)');
ylabel('Amplitude');
xlim([nx1(1) - 1, nx1(end) + 1]);
title('Convolved Output');
grid on;
% Listening to the output
sound(z, Fs2);
% Saving the convolved audio
z1 = rescale(z);
audiowrite('E:\voice records lab task matlab dsp\asmaConvolved.wav', z1, Fs2);

Conclusion:
It performs convolution on two audio signals, 'noise.wav' and 'asma 0.wav,' by loading, adjusting channels, and creating
time vectors. It then plots the original signals and the convolved output in a 3-subplot figure, enabling a visual
comparison of their amplitudes over time. The code also plays the convolved output and saves it as
'asmaConvolved.wav.' It is crucial to ensure the existence and correct paths of the specified audio files for the code to be
executed successfully.
NED University of Engineering &
Technology Department of Electrical
Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to
Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given
programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise utilise
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date
LAB 4
In lab Task:
% Clear workspace, close figures, and clear command window
clear all;
close all;
clc;

% Generate signals x(n) and y(n)


n = [0:49]; % Time index
ph1 = 0; % Phase for signal x
ph2 = pi/4; % Phase for signal y

x = sin(2*pi*0.1*n + ph1); % Signal x


origin_x = 1;
nx = [1:length(x)] - origin_x; % Time indices for x

y = sin(2*pi*0.1*n + ph2); % Signal y


origin_y = 1;
ny = [1:length(y)] - origin_y; % Time indices for y

% Cross-correlation
[rxy, l] = xcorr(x, y); % Cross-correlation of x and y
[maxR, indR] = max(rxy); % Find the maximum correlation and its index

% Display correlation information


disp(['The correlation at lag zero is: ' num2str(rxy(l == 0)) '.'])
disp(['The max correlation is at lag: ' num2str(l(indR)) '.'])

% Normalize correlation
norm_corr = rxy / max(abs(rxy));
perct_corr = norm_corr * 100;

% Plotting
figure
% Plot signal x
subplot(4, 1, 1)
stem(nx, x, 'filled', 'b')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([nx(1)-1 nx(end)+1])
title('Signal x(n)')
grid

% Plot signal y
subplot(4, 1, 2)
stem(ny, y, 'filled', 'r')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([ny(1)-1 ny(end)+1])
title('Signal y(n)')
grid
% Plot cross-correlation
subplot(4, 1, 3)
stem(l, rxy, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Correlated Output')
title('Cross-Correlation')
grid

% Plot normalized cross-correlation


subplot(4, 1, 4)
stem(l, norm_corr, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Normalized Correlated Output')
title('Normalized Cross-Correlation')
grid

Conclusion:
 The correlation at lag zero indicates how well the signals align without any time shift.
 The cross-correlation operation is essential for determining how much one signal resembles another at
different points in time. The correlation peak indicates the point where the two signals are most
similar. The lag at the correlation peak represents the time shift required to align the signals for
maximum similarity.

Lab Tasks:
1. Now modify the phase of the second signal to pi/2 (it will make it cosine)and observe the correlation at
lag zero.
 Changing ph2=pi/2
Result:
Conclusion:
 The maximum correlation at lag = 2 indicates that the signals are most similar when y(n) is shifted two
units to the right.
 This alignment maximizes the overlap between the sinusoidal and cosine waves, resulting in a peak in
the cross-correlation function.

2. Modify the phase again to ‘pi’ and observe.


 Changing ph2=pi

Result:
Conclusion:
 The maximum correlation at lag = 5 indicates that the signals are most similar when y(n) is shifted five
units to the right.
 a lag of 5 units implies that signal y(n) is shifted five units to the right for optimal alignment with signal
x(n).
3. Check for auto-correlation (ph1 = ph2) that the lag zero value gives the m energy of the signal.
 Changing ph2=0 so that ph1=ph2.

Result:

Conclusion:
 Here we can observe that signal x(n) and y(n) are at perfect alignment to each other at n=25 so the
peak in the plot, corresponding to the maximum correlation occurs at lag=0.
4. Observe that the commutative property does not hold.
% Clear workspace, close figures, and clear command window
clear all;
close all;
clc;
% Generate signals x(n) and y(n)
n = [0:49]; % Time index
ph1 = 0; % Phase for signal x
ph2 = pi/2; % Phase for signal y
x = sin(2*pi*0.1*n + ph1); % Signal x
origin_x = 1;
nx = [1:length(x)] - origin_x; % Time indices for x
y = sin(2*pi*0.1*n + ph2); % Signal y
origin_y = 1;
ny = [1:length(y)] - origin_y; % Time indices for y
% Cross-correlation with order x, y
[rxy_xy, l_xy] = xcorr(x, y); % Cross-correlation of x and y
% Cross-correlation with order y, x
[rxy_yx, l_yx] = xcorr(y, x); % Cross-correlation of y and x
% Display correlation information
disp(['Correlation at lag zero for x, y: ' num2str(rxy_xy(l_xy == 0)) '.'])
disp(['Max correlation at lag for x, y: ' num2str(l_xy(rxy_xy == max(rxy_xy))) '.'])
disp(['Correlation at lag zero for y, x: ' num2str(rxy_yx(l_yx == 0)) '.'])
disp(['Max correlation at lag for y, x: ' num2str(l_yx(rxy_yx == max(rxy_yx))) '.'])
% Normalize correlation
norm_corr_xy = rxy_xy / max(abs(rxy_xy));
perct_corr_xy = norm_corr_xy * 100;
norm_corr_yx = rxy_yx / max(abs(rxy_yx));
perct_corr_yx = norm_corr_yx * 100;
% Plotting
figure
% Plot signal x
subplot(4, 1, 1)
stem(nx, x, 'filled', 'b')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([nx(1)-1 nx(end)+1])
title('Signal x(n)')
grid
% Plot signal y
subplot(4, 1, 2)
stem(ny, y, 'filled', 'r')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([ny(1)-1 ny(end)+1])
title('Signal y(n)')
grid
% Plot cross-correlation x, y
subplot(4, 1, 3)
stem(l_xy, rxy_xy, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Correlated Output')
title('Cross-Correlation (x, y)')
grid
% Plot normalized cross-correlation x, y
subplot(4, 1, 4)
stem(l_xy, norm_corr_xy, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Normalized Correlated Output')
title('Normalized Cross-Correlation (x, y)')
grid
% Plotting for y, x
figure
% Plot signal x
subplot(4, 1, 1)
stem(nx, x, 'filled', 'b')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([nx(1)-1 nx(end)+1])
title('Signal x(n)')
grid
% Plot signal y
subplot(4, 1, 2)
stem(ny, y, 'filled', 'r')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([ny(1)-1 ny(end)+1])
title('Signal y(n)')
grid
% Plot cross-correlation y, x
subplot(4, 1, 3)
stem(l_yx, rxy_yx, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Correlated Output')
title('Cross-Correlation (y, x)')
grid

% Plot normalized cross-correlation y, x


subplot(4, 1, 4)
stem(l_yx, norm_corr_yx, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Normalized Correlated Output')
title('Normalized Cross-Correlation (y, x)')
grid

Result:

Conclusion:
 The lag at which the maximum correlation occurs may differ between x⋆y and y⋆x, providing an
example where the commutative property does not hold.

5. Modify the code, such that the correlation is obtained using convolution command.
% Clear workspace, close figures, and clear command window
clear all;
close all;
clc;

% Generate signals x(n) and y(n)


n = [0:49]; % Time index
ph1 = 0; % Phase for signal x
ph2 = pi/2; % Phase for signal y

x = sin(2*pi*0.1*n + ph1); % Signal x


origin_x = 1;
nx = [1:length(x)] - origin_x; % Time indices for x

y = sin(2*pi*0.1*n + ph2); % Signal y


origin_y = 1;
ny = [1:length(y)] - origin_y; % Time indices for y

% Cross-correlation using convolution


rxy_conv = conv(x, flip(y));

% Display correlation information


disp(['Correlation at lag zero: ' num2str(rxy_conv(length(x))) '.'])
[maxR_conv, indR_conv] = max(rxy_conv);
disp(['Max correlation at lag: ' num2str(indR_conv - length(x)) '.'])

% Normalize correlation
norm_corr_conv = rxy_conv / max(abs(rxy_conv));
perct_corr_conv = norm_corr_conv * 100;

% Plotting
figure

% Plot signal x
subplot(4, 1, 1)
stem(nx, x, 'filled', 'b')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([nx(1)-1 nx(end)+1])
title('Signal x(n)')
grid

% Plot signal y
subplot(4, 1, 2)
stem(ny, y, 'filled', 'r')
xlabel('Time Index (n)'), ylabel('Amplitude')
xlim([ny(1)-1 ny(end)+1])
title('Signal y(n)')
grid

% Plot cross-correlation using convolution


subplot(4, 1, 3)
lag_indices = -length(x)+1:length(x)-1;
stem(lag_indices, rxy_conv, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Correlated Output')
title('Cross-Correlation using Convolution')
grid
% Plot normalized cross-correlation using convolution
subplot(4, 1, 4)
stem(lag_indices, norm_corr_conv, 'filled', 'k')
xlabel('Lag Index (l)'), ylabel('Normalized Correlated Output')
title('Normalized Cross-Correlation using Convolution')
grid

Result:

Conclusion:
This code uses conv to perform convolution, and the resulting cross-correlation is displayed. The convolution
is equivalent to cross-correlation with one of the signals flipped.

6. Calculate correlation between voltages of any two phases of a 10HP motor Using the data
given below. First use Ms. Excel to copy data and then calculate correlation.
Excel:
Result:

Matlab:
Thoughts:
 The correlation between the A and B voltages indicates a strong negative correlation.
 The correlation between the B and C voltages indicates a moderate positive correlation.
 The correlation between the A and C voltages indicates a moderate negative correlation.
LAB 5
DIGTAL SIGNAL PROCESSING
In lab task:

Conclusion:
The code calculates and plots the magnitude and phase spectra of the 4-point Discrete Fourier Transform
(DFT) for the input signal [1, 2, 3, 0]. The magnitude spectrum (top subplot) reveals the amplitudes of different
frequency components, while the phase spectrum (bottom subplot) provides information about their
temporal alignment. The purpose of the code is to analyze the frequency domain characteristics of the signal,
gaining insights into its composition and phase relationships. This kind of analysis is essential in understanding
the frequency content of a signal.

Lab Task:
Task-1: Forward DFT using matrices
Develop a MATLAB code to find the Forward DFT output of the following time domain sequence by using DFT equation
in matrix form. Also plot the magnitude and phase spectrum. Take Fs=1000 samples/sec
x(n)= {0.3535, 0.3535, 0.6464, 1.0607 , 0.3535, -1.0607, -1.3535 , -0.3535}
Conclusion:
This code finds the forward DFT of the given time domain sequence and also show its magnitude and phase
waveform.
Task-2: Inverse DFT using Matrix inversion
Develop a MATLAB code to find the inverse DFT output of the following frequency domain sequence by using the iDFT
equation in matrix form (use matrix inversion).
X(k)= {0, 4∠-90 , 2∠45 , 0, 0, 0, 2∠-45 , 4∠90 }

Conclusion:
This code finds the inverse DFT output of the given frequency domain sequence and also show its magnitude
and phase waveform by matrix inversion method.
Task-3: Inverse DFT using Conjugate method
Develop a MATLAB code to find the inverse DFT output of the following frequency domain sequence by using iDFT
equation in matrix form (use conjugate method).
X(k)= {0, 4∠-90 , 2∠45 , 0, 0, 0, 2∠-45 , 4∠90 }

Conclusion:
This MATLAB code successfully computes and visualizes the inverse Discrete Fourier Transform (iDFT) of a
given frequency-domain sequence using the conjugate method. The resulting frequency-domain sequence is
displayed in both real and imaginary parts, providing a comprehensive understanding of the signal
transformation.
LAB 6
In lab Task:

Conclusion:
In this audio signal noise is included which is making the audio sound distorted. This noise can be removed by
first identifying its frequency. For this purpose, DFT is performed on this audio signal. In the first plot, we have
included the frequency range from 0 to Fs/2 (to get a general idea of what is frequency of noisy signal). Then
we have jotted down the xlim from 0 to 1000 as we get the noisy signal frequency in this range.
LAB TASK:
Use recorded data, 1. Plot different frequencies present in it with a) x-axis as time b )x-axis as frequency.
(Take FFT and plot).
2. Calculate the amount of energy present in fundamental frequency.
3. Calculate the amount of energy present in different harmonics.
Result:

Conclusion:
In conclusion, the analysis of the recorded audio data involved both time and frequency domain
representations. The time domain plot provided insights into the amplitude variations over time, while the
frequency domain representation, obtained through the Fourier Transform, revealed the distribution of
frequencies present in the signal. By identifying the fundamental frequency and calculating its energy, we
gained an understanding of the dominant component in the signal. Additionally, the assessment of energy in
different harmonics further characterized the spectral content of the audio. This comprehensive analysis
facilitates a thorough understanding of the recorded data in both the time and frequency domains.
Task-1: Removal of tone from the noisy signal through FFT result.
To remove the noisy tone, we can zero in on the noisy tone by looking at the DFT of the noisy signal. Take
Inverse DFT [idft] of the modified spectra. Listen to the new time-domain signal and see how effectively the
tone noise is removed. Comment on the sound you have just heard. Is the noise completely removed?
Repeat the task with different threshold DFT magnitude values.
Conclusion:
This MATLAB code applies thresholding to modify an audio signal ('noisy.wav'). It uses the Discrete Fourier
Transform (DFT) to analyze frequency components. The script sets magnitudes below a specified threshold to
zero, obtaining a modified spectrum. The inverse DFT reconstructs the modified time-domain signal. Both
original and modified signals are played for auditory comparison. Plots depict the original and modified
signals, illustrating the impact of thresholding on the audio signal. Adjusting the threshold parameter
influences the extent of signal modification.
Task-2: Removal of tone from the noisy signal expression
Write the expression of the tone by zooming in the time domain signal and observing its time period. Next
subtract the samples of the tone from the noisy signal, attach plot and comment on the output.
Result:

Conclusion:
This MATLAB code aims to remove a tonal component from a given audio signal through a downsampling and
de-noising approach. The noisy audio signal is initially loaded and down-sampled to reduce its size, with the
down-sampled signal plotted in the first subplot. A zoomed-in view of a specific region containing the tonal
component is presented in the second subplot, allowing for the identification of its period. A sinusoidal tone
signal with the identified frequency is generated and up-sampled to match the original signal's size. The third
subplot displays the de-noised signal, obtained by subtracting the up-sampled tone signal from the original
noisy signal. This process effectively achieves the removal of the tonal component, and the user can assess the
results by comparing the original, zoomed-in, and de-noised signals both visually.
NED University of Engineering & Technology Department of
Electrical Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to
Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given
programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise utilise
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date
LAB SESSION 07
Task 01:
Analysis of 1st order Analog system [one pole at origin]
(a)Generate pole-zero constellation of an analog system in s-plane having only one pole at s = 0. (b) Write the
transfer function of a system. (c) Plot the corresponding frequency response and impulse response of a system.
Also comment on the stability of system.
COMMENTS:
The system is a first-order system, the frequency response exhibits a -20 dB/decade slope, and the system is
slightly stable due to the pole at the origin.

Task 02:
Analysis of 1st order Analog system [one pole at LHS]
a) Generate pole zero constellation of an analog system in s-plane having only one pole at: s = -0.5
b) Write the transfer function of a system. (c) Plot the corresponding frequency response and impulse response
of a system. Also comment on the stability of system.

COMMENTS:
The system with a pole at s=−0.5 is a low-pass filter, has a first-order, and is stable due to the pole being in the
left-half plane.

Task 03: Analysis of 1st order Analog system [one pole at RHP]
(a) Generate pole zero constellation of an analog system in s-plane having only one pole at: s = 0.5. (b) Write
the transfer function of a system. (c) Plot the corresponding frequency response and impulse response of a
system. Also comment on the stability of system.

COMMENTS: The given first-order system with a pole at s=0.5 is a high-pass filter, and is unstable due to
the pole being in the right-half plane.

Task 04: Analysis of 2nd order Analog system [poles at j]


(a) Generate pole zero constellation of an analog system in s-plane having pure imaginary poles at: s=-j*pi/2,
j*pi/2. (b) Write the transfer function of a system. (c) Plot the corresponding frequency response and impulse
response of a system. Also comment on the stability of system.
COMMENTS:
The given system is a second-order band-pass filter with purely imaginary poles. The system is marginally
stable due to the poles lying on the imaginary axis.

Task 05: Analysis of 2nd order Analog system [complex poles at LHP]
a) Generate pole zero constellation of an analog system in s-plane having complex conjugate poles at s: (-0.5-
j*pi/2), (-0.5+j*pi/2).
(b) Write the transfer function of a system. (c) Plot the corresponding frequency response and impulse response
of a system. Also comment on the stability of system.
COMMENTS: The given system is a second-order band-stop (notch) filter. The system is stable, and its
frequency response exhibits characteristics of a band-stop filter.

Task 06: Analysis of 2nd order Analog system [complex poles at RHP]
(a)Generate pole-zero constellation of an analog system in s-plane having complex conjugate poles at:
s=+0.5+j*pi/2, +0.5-j*pi/2
(b) Write the transfer function of a system. (c) Plot the corresponding frequency response and impulse response
of a system. Also, comment on the stability of the system.
COMMENTS:
The given system is a second-order band-pass filter. The system is not stable, and its frequency response
exhibits characteristics of a band-pass filter.

Task-7: Analysis of 2nd order Analog system [complex zeros and poles at LHS]
(a) Generate pole-zero constellation of an analog system in s-plane for given roots [zeros: s=±j(π/2) & poles:
s=-0.2+j(π/4), -0.2-j(π/4)]

(b) Write the transfer function of a system.


(c) Plot a system's corresponding frequency response and impulse response. Also, comment on the stability of
the system.
COMMENTS:
The given system is a second-order band-pass filter with complex poles. The system is stable, and its frequency
response exhibits characteristics of a band-pass filter.

Task-8: Effect of systems poles on system stability


Change the location of poles of a system defined in Task-7 from L.H.S of the s-plane to axis first, and then to
R.H.S of s-plane and observe the effects on impulse response and frequency response of a system.
COMMENTS: In this system, by moving the poles, the system transitions from being a band-pass filter with
stable poles (LHP) to a low-pass filter with marginally stable poles (Axis) and then to a high-pass filter with
unstable poles (RHP). The order remains the same in all cases (second-order).

Task 09: Effect of systems zeros on system stability


Modify the location of zeros of a system defined in Task-7 from s=±j(π/2) to s=-0.1±j(π/2), and then
to s=0.1±j(π/2). Do not change the location of the poles. Does the impulse response change? Can we place
analog systems zeros on the right-hand plane [RHP]?
COMMENTS:
This code includes three sets of plots: one for the original system, one for the system with zeros at
s=-0.1±j(π/2), the code confirms that the zeros are now in the left-half plane (LHP) and the system remains
stable because the poles are at LHP so the impulse response is dying out. The system with zeros at s=0.1±j(π/2)
shows the system is still stable because poles are still at LHP showing divergence towards zero in the impulse
response.

LAB SESSION 08
Task-1: Analysis of 1st order Digital system [one pole inside the Unit circle at DC]
a) Generate pole zero constellation in z-plane for the following roots of a digital system [ zero: z=0 & pole:
z=0.9∠0]

b) Write the transfer function of a system [see command window]


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system

EXPLANATION:
The system is determined to be IIR through the ‘isfir’ function, as A is assigned the result of isfir(H), and it is
not true. Therefore, the digital system is Infinite Impulse Response (IIR) due to the presence of at least one pole.
The system is also referred to as stable because the pole lies inside the z plane.

Task-2: Analysis of 1st order Digital system [pole inside the Unit circle at Fs/2]
a) Generate pole zero constellation in z-plane for the following roots of a digital system: [zero: z=0 & pole:
z=(0.9<pi),(0.9<-pi)]
b) Write the transfer function of a system
c) Determine whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
The digital system is a first-order IIR filter
with stable behavior, as indicated by its pole
location inside the unit circle. The frequency response shows its characteristics as a low-pass filter.

Task 3: Analysis of 1st order Digital system [one pole at the DC location of Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zero: z=0 & pole:
z=1∠0 ]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency
response and impulse response
of a digital system

EXPLANATION:
This digital system is a first-
order Infinite Impulse Response
(IIR) filter with a pole at the DC
location of the unit circle. The
system is marginally stable,
confirmed by the presence of poles at the unit circle. The frequency response depicts a gradual decrease in gain
with increasing frequency, typical of a first-order IIR low-pass filter.

Task-4: Analysis of 1st order Digital system [pole at the Fs/2 location of Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zero: z=0 & pole:
z=1<pi,1<-pi]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of digital system.

EXPLANATION:
The analyzed 1st order digital
system has a pole at the Nyquist
frequency (Fs/2) of the unit circle.
The pole-zero plot illustrate a
Infinite Impulse Response (IIR)
system. The system is marginally
stable, confirmed by the pole being
located at the unit circle. The
frequency response plot
demonstrates a characteristic
response for a first-order IIR filter,
with gain decreasing as frequency
increases. Therefore, this digital
system is a stable, first-order IIR
filter with a pole at the Nyquist
frequency.

Task-5: Analysis of 1st order Digital system [one pole outside the Unit circle at DC]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zero: z=0 & pole:
z=1.1∠0]

b) Write the transfer function of a system


c) Determine whether the digital system is FIR or IIR
d) Plot the corresponding frequency response and impulse response of a digital system.
EXPLANATION:
This analyzed is a first-order
Infinite Impulse Response
(IIR) filter with a pole
outside the unit circle. The
system is unstable because
the radius r lies outside of the
unit circle. The impulse
response also show
convergence referring to
instability.

Task-6: Analysis of 1st order Digital system [pole outside the Unit circle at Fs/2]
a) Generate pole-zero constellation in z-plane for the following roots of a digital system:[ zero: z=0 & pole:
z=1.1<pi, 1.1<-pi]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
This digital system is a first-order
Infinite Impulse Response (IIR) filter
with a pole outside the unit circle at
Fs/2. The pole-zero plot, transfer
function, and frequency response
illustrate its first-order nature, and the
pole at Fs/2 contributes to a high-
frequency roll-off. Being an IIR filter,
the system is unstable, confirmed by
the pole location outside the unit
circle. The frequency response plot
exhibits a gradual increase in gain with frequency.

Task-7: Analysis of 2nd order Digital system [poles at origin]


a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zeros:
z=0.8944<±2π/3) & poles: z=0]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
This digital system is a 2nd
order Finite Impulse Response
(FIR) filter with poles at the
origin. The pole-zero plot and
the frequency response
confirm its 2nd-order nature.
Being an FIR filter, the system
exhibits stability, as indicated
by poles at the origin. The
frequency response plot
illustrates the characteristic
response of a 2nd order FIR
filter, with oscillatory behavior
and peaking at its resonant
frequency.

Task-8: Analysis of 2nd


order Digital system [complex poles inside the Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zeros: z=1<±π/2) &
poles: z=0.8<±π/4]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
EXPLANATION: This digital
system is a 2nd order Infinite Impulse
Response (IIR) filter with complex
poles inside the unit circle. The pole-
zero plot and frequency response
affirm its 2nd-order nature, with
complex conjugate poles contributing
to a resonant behavior. Being an IIR
filter, the system is stable, evident from
the poles inside the unit circle. The
frequency response plot illustrates a
characteristic resonance and oscillation
associated with a 2nd order IIR filter.

Task-9: Analysis of 2nd order Digital system [complex poles at the Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zeros: z=1<±π/2) &
poles: z=1<±π/4 ]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
This digital system is a 2nd order
Infinite Impulse Response (IIR)
filter with complex conjugate poles
at the unit circle. The pole-zero
plot, and frequency response
confirm its 2nd order nature, with
the complex poles contributing to
oscillatory behavior. Being an IIR
filter, the system is stable, evident
from the poles lying on the unit
circle. The frequency response plot
exhibits resonant peaks associated
with a 2nd order IIR filter.
Task-10: Analysis of 2nd order Digital system [complex poles outside the Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zeros: z=1<±π/2) &
poles: z=1.2<±π/4]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
This digital system is a 2nd
order Infinite Impulse Response
(IIR) filter with complex
conjugate poles outside the unit
circle. The pole-zero plot and
frequency response confirm its
2nd-order nature, with the
complex poles contributing to
an oscillatory response. Being
an IIR filter, the system is
unstable, evident from the poles
located outside the unit circle.
The frequency response plot
exhibits resonant peaks and oscillations, characteristic of a 2nd order IIR filter.

Task-11: Analysis of 2nd order Digital system [complex zeros inside the Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system:[ zeros: z=0.8<±π/2)
& poles: z=0.8<±π/4]

b) Write the transfer function of a system


c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding
frequency response and
impulse response of a
digital system.

EXPLANATION:
This digital system is a
2nd order Infinite
Impulse Response (IIR)
filter with complex
conjugate zeros inside the
unit circle. The pole-zero plot and frequency response confirm its 2nd-order nature, with the complex zeros
contributing to a resonant behavior. Being an IIR filter, the system is stable, evident from the zeros located
inside the unit circle. The frequency response plot exhibits peaks associated with a 2nd order IIR filter.

Task-12: Analysis of 2nd order Digital system [complex zeros outside the Unit circle]
a) Generate pole zero constellation in z-plane for the following roots of a digital system [zeros: z=1.2<±π/2) &
poles: z=0.8<±π/4]
b) Write the transfer function of a system
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.

EXPLANATION:
This digital system is a 2nd order Infinite Impulse Response (IIR) filter with complex conjugate zeros outside
the unit circle. The pole-zero plot and frequency response indicate its 2nd order nature with complex zeros
contributing to resonant behavior. Being an IIR filter, the system is stable, evident from the poles located inside
the unit circle.
LAB 9
Inlab Task 1:
Conclusion:
In conclusion, this MATLAB code effectively illustrates the generation, analysis, and visualization of two
sinusoidal signals with frequencies of 500 Hz and 600 Hz. Through the use of discrete Fourier transform (DFT),
the code provides insights into the frequency content of these signals, offering both time-domain and
frequency-domain representations. The clear subplots showcase the amplitude variations over time, while the
corresponding spectra reveal prominent peaks at the specified frequencies. Overall, this code serves as a
fundamental example of signal processing and spectral analysis in MATLAB, providing a valuable foundation
for understanding and extending similar concepts in more complex scenarios.

Inlab Task 2:
Conclusion:
The MATLAB code showcases the application of a Hanning window to a sinusoidal signal with a frequency of
1050 Hz. It includes the generation of the signal and window, the visualization of their time-domain
representations, and the presentation of their respective frequency spectra. The resulting windowed signal is
displayed, highlighting the impact of windowing on mitigating spectral leakage. This concise script serves as a
practical demonstration of windowing techniques and their effects on signal processing .

Task-1: Condition of DFT/FFT Leakage


Fill the following table specifying whether DFT leakage would happen or not?

S.No Fs N Input contains these DFT Leakage


[samples/sec] [samples frequencies in Hz Yes or No?
]
1 8000 8 1000 NO
2 8000 9 1000, 2000 YES
3 16000 32 250, 500, 1000, 2250 NO
4 22050 128 11025 NO
5 44100 4096 1000, 2000, 2500, 11025 YES
6 44100 44100 1101, 2202, 3303 NO
7 96000 48000 1200, 1202, 2002, 2003 YES

Conclusion:
DFT Leakage occurs when input frequency does not align with the DFT frequency resolution.

Task-2: Calculation of cycles in N sample interval (length of DFT/FFT)


Calculate exactly how many cycles of the 440 Hz wave sampled at 1000 Hz are contained in
the 1024-sample window. Explain why this number indicates leads to spectral leakage.

Result:
Conclusion:
The number of cycles is not an integer, indicating potential spectral leakage. To reduce spectral leakage,
consider adjusting the parameters or using window functions.

Task-3: DFT or FFT Leakage


a) Generate two sinusoids of frequencies 500 Hz and 600 Hz. Both signals should be sampled
at 8000 samples/sec.
b) Take 64-point DFT of both signals and observe their spectrums.
c) Comment on the DFT Leakage for both cases.
Comments:
The DFT Leakage can be observed in both spectrums due to the finite duration of the signals. While the peaks
represent the actual frequencies (500 Hz and 600 Hz), there is a spread of energy to nearby frequencies. This
spreading is characteristic of DFT Leakage and is more pronounced when the signal frequencies do not align
perfectly with DFT bins.
Task-4: Evaluation of Various Window functions using wintool of MATLAB or Window Analysis & Designing
Type wintool (Window Design & Analysis Tool) in the command window of MATLAB. Observe different
window functions like Rectangular (no window), Triangular, Hamming, Hann, Blackman, Flat Top, Gaussian,
etc. Attach the time domain and frequency domain representations of various window functions and make
a comparison between their performances based on the following attributes:
a) Leakage Factor in %
b) Width of the main lobe in a fraction of π (rad/sample) or Fs/2
c) The first (highest)side lobe magnitude in dB
d) The rate of side lobes falloff in dB/octave
1. Rectangular

2. Triangular
3. Hamming

4. Hann

5. Gaussian
Task-5: Spectrum of Windowed signal
a) Generate a sinusoid of frequency 1050 Hz sampled at 8000 samples/sec. Initial phase is pi/4.

b) Take 64-point DFT of the generated signal and observe the spectrum.

c) Comment on the DFT Leakage phenomenon for the above case.

The provided code generates a sinusoidal signal with a frequency of 1050 Hz sampled at 8000
samples/second. It computes the 64-point Discrete Fourier Transform (DFT) of the signal and plots the
magnitude spectrum. The observed spectrum indicates characteristics of the DFT leakage phenomenon. Due
to a potential frequency mismatch between the signal and the DFT bins, spectral leakage occurs, leading to the
spread of energy to adjacent frequency bins. This effect is manifested as side lobes around the main peak,
resulting in a wider main lobe in the spectrum.
d) Generate a triangular window function of 64 points.
e) Now apply a triangular window to the signal and then observe the spectrum of windowed signal.
f) Change the window function from Triangular to Hamming, Hanning, Blackman, Flat Top and Gaussian.
Compare the results of these window functions on a signal's spectrum.

Conclusion:
This code introduces a loop over different window functions and plots the windowed spectrum for each. You
can run this code in MATLAB and observe the impact of each window function on the signal's spectrum.
NED University of Engineering & Technology Department of
Electrical Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise Utilize
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following Following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional Mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required Required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date
LAB SESSION 10
Task 1: Designing of an IIR Butterworth filter
Design a 16 th order IIR Butterworth bandpass filter with the following specifications: a) Normalized pass band
edges at 0.40 and 0.65. b) Normalized stop band edges at 0.3 and 0.75
c) Pass band ripple 1 Db. d) Minimum stop band attenuation 40 dB
Attach (i) Magnitude response (ii) Phase response (iii) Impulse Response (iv) Pole Zero plot

Explanation:
The task involves designing a 16th-order IIR Butterworth bandpass filter with specified pass band and stop band
edges, adhering to stringent ripple and attenuation criteria. The resulting filter characteristics, visualized through
magnitude, phase, impulse response, and pole-zero plots, showcase its efficacy in selectively passing signals
within the defined frequency range while efficiently attenuating others.

Task 2: Designing of an IIR Chebyshev Type II filter


Design a Type II Chebyshev IIR low pass filter with the following specifications:
Passband frequency 1,200 Hz, Stopband frequency 1,700 Hz, Sampling frequency 6,000 Hz
Passband ripple 0.50 dB
Attach (i) Magnitude response (ii) Phase response (iii) Impulse Response (iv) Pole Zero plot
Explanation:
Employing Chebyshev Type II methodology, the designed IIR low pass filter exhibits a unique frequency
response, with ripples in the stopband to meet the specified passband and stopband frequencies. The provided
plots (magnitude, phase, pole-zero, and impulse response) visually represent the filter's characteristics,
illustrating its efficacy in attenuating higher frequencies beyond the stopband while maintaining a prescribed
passband ripple.

Task-3: Designing of an IIR Elliptic Filter


Pass band ripple 0.5 Db, Stop band attenuation 40 dB, Pass band frequency 800 Hz, Stop band frequency 1,000
Hz, Sampling frequency 4,000 Hz
a) Show magnitude and phase response in the same window. b) Attach impulse response
c) Attach pole zero plot d) Obtain filter information.
Task-4: IIR filter designing by Pole-Zero placement method
Design a filter with pass bands at 5000, 8000 and 15000 Hz and stop bands at 0 Hz and 11025.
The sampling rate is 44,100 Hz. a) Attach pole zero plot. b) Attach magnitude response
c) Attach phase response. d) Attach impulse response. e) Attach filter coefficients
f) Write the difference equation. g) Listen to the filtered output and explain what you heard?
DIFFERENCE EQUATION:
yn= b0 xn+b1 xn-1+------+b5 xn-5 / y0+a1 yn-1+a2 yn-2+-----+a6 yn-6
EXPLANATION:
I experienced an excellent vocal output with accurate frequencies following the application of the IIR filter
design. The filter successfully retained the intended frequencies within the passbands while diminishing
undesirable frequencies in the stopbands. Consequently, the filtered voice exhibited clarity and retained its
initial quality, demonstrating the effectiveness of the Pole-Zero placement method in realizing the targeted
frequency response.

Task-5: IIR filter designing by Pole-Zero placement method. Design an IIR filter with the following
specifications: Pass band at pi/2 and stop bands at 0 and pi. Take:
a) Attach pole zero plot. b) Attach magnitude response. c) Attach phase response
d) Attach impulse response. e) Attach filter coefficients. f) Write the difference equation
g) Listen to the filtered output and explain what you heard?
TAKING Fs= 8000Hz
DIFFERENCE EQUATION:
yn= b0 xn+b1 xn-1+b3 xn-3 / y0+a1 yn-1+a2 yn-2+a3 yn-3

EXPLANATION:
The filtered voice had a smoother and clearer quality. It seemed as though the higher-pitched elements had been
removed, resulting in a more enjoyable listening experience. No distortion was present, and overall, the filter
effectively enhanced the voice, providing a nice and smooth sound.

NED University of Engineering &


Technology Department of Electrical
Engineering

Course Code: EE-395 Course Title: Digital Signal Processing

Laboratory Session No.: Date:

Psychomotor Domain Assessment Rubric for Laboratory (Level P3)


Skill(s) to be Extent of Achievement
assessed 0 1 2 3 4
Software Menu Unable to Little ability and Moderate Reasonable Demonstrates
Identification and understand understanding ability and understanding of command over
Usage: and use of software understanding software menu software menu
Ability to initialise, software menu of software operation, makes usage with
configure and menu operation, menu no major mistakes frequent use of
operate software makes many operation, advance menu
environment under mistake makes lesser options
supervision, using mistakes
menus, shortcuts,
instructions etc.
Procedural Little to no Slight ability to
Mostly correct Correctly Correctly
Programming of understanding use procedural recognition and recognises and recognises and
given Signal of procedural programming application of uses procedural uses procedural
Processing Scheme: programming techniques for procedural programming programming
Practice procedural techniques coding given
programming techniques with techniques with
programming algorithm techniques but no errors but no errors and runs
techniques, in order makes crucial unable to run processing
to code specific errors for the processing successfully
signal processing given processing scheme
schemes scheme successfully
Relating Completely Able to Able to Able to recognise Able to recognise
Theoretical unable to recognise some recognise relation between relation between
Concepts, relate relation relation signal processing signal processing
Equations and between between signal between signal concepts and concepts and
Transforms to signal processing processing written code, able written code, able
Code: processing concepts and concepts and to do some to completely
Recognise relation concepts and written code, written code, manipulations manipulate code
between signal written code, unable to do unable to do in line with
processing concepts unable to do manipulations manipulations theoretical
and written code manipulations concepts
and manipulate the
code in accordance
of requirements
Detecting and Unable to Able to find Able to find Able to find error Able to find error
Removing Errors: check and error messages error messages messages in messages in
Detect detect error and indications and indications software as well software along
Errors/Exceptions messages and in software but in software as as understanding with the
and in simulation indications in no well as of detecting all of understanding to
and software understanding understanding those errors and detect and rectify
of detecting of detecting their types them
manipulate code to those errors some of those
rectify the and their types
simulation
ASMA SALEEM EE 143
errors and their
types
Graphical Unable to Ability to Ability to Ability to Ability to
Visualisation and understand understand and understand and understand and understand and
Comparison of and utilise utilise utilise utilise Utilize
Signal Processing visualisation or visualisation visualisation visualisation and visualisation and
Scheme plotting and plotting and plotting plotting features plotting features
Parameters: features features with features successfully, successfully, also
Manipulate given frequent errors successfully but partially able to able to compare
simulation under unable to compare and and analyse them
supervision, in order compare and analyse them
to produce analyse them
graphs/plots for
measuring and
comparing signal
processing
parameters
Following step-by- Inability to Able to Able to Able to recognise Able to recognise
step procedure to recognise and recognise given recognise given given lab given lab
complete lab work: perform given lab procedures lab procedures procedures and procedures and
Observe, imitate lab procedures and perform and perform perform them by perform them by
and operate them but could them by following Following
software to not follow the following prescribed order prescribed order
complete the prescribed prescribed of steps, with of steps, with no
provided sequence order of steps order of steps, occasional Mistakes
of steps with frequent mistakes
mistakes
Recording Inability to Able to Able to recognise Able to recognise
Simulation recognise recognise prescribed or prescribed or
Observations: prescribed or prescribed or required Required
Observe and copy required required simulation simulation
prescribed or simulation simulation measurements measurements
required simulation measurements measurements but records them and records them
results in but does not incompletely completely, in
accordance with lab record tabular form
manual instructions according to
given
instructions
Discussion and Complete Slight ability to Moderate Reasonable ability Full ability to
Conclusion: inability to discuss ability to discuss to discuss discuss recorded
Demonstrate discuss recorded recorded recorded observations and
discussion capacity recorded observations observations observations and draw conclusions
on the recorded observations and draw and draw draw conclusions
observations and and draw conclusions conclusions
draw conclusions conclusions
from it, relating
them to theoretical
principles/concepts
Weighted CLO (Psychomotor Score)
Remarks
Instructor’s Signature with Date

You might also like