EE-21026 Muhammad Uzair
EE-21026 Muhammad Uzair
LAB MANUAL
For the course
Instructor name:_________________________________
Mr. Muhammad Omar
Student name:____________________________________
Muhammad Uzair Rashid
Approved By
____________________ ____________________
____________________ ___________________
____________________ ____________________
To be filled by lab technician
Roll No. Rubric Rubric Rubric Rubric Rubric Rubric OEL/PBL Final LAB Attendance Final weighted Score for
based based based based based based Rubric Rubric Percentage MIS System
Lab I Lab II Lab III Lab IV Lab V Lab VI Score Score [10(A)+10(B)+5(C)]/25
A B C Round to next higher
multiple of 5
Note: All Rubric Scores must be in the next higher multiple of 5 for correct entry in MIS system.
CONTENTS
03-01-24
7 Relationship between Laplace and CTFT.
To study the relationship between discrete-time and continuous time signals by examining
sampling and aliasing.
THEORY:
Signals are physical quantities that carry information in their patterns of variation. Continuous-
time signals are continuous functions of time, while discrete-time signals are sequences of
numbers. If the values of a sequence are chosen from a finite set of numbers, the sequence is known
as a digital signal. Continuous-time, continuous-amplitude signals are also known as analog
signals.
Mathematically,
Aliasing: A common problem that arises when sampling a continuous signal is aliasing, where a
sampled signal has replications of its sinusoidal components which can interfere with other
components. It is an effect that causes two discrete time signals to become indistinct due to
improper sampling (fd>1/2 cycles/sample).
PROCEDURE:
1. Simulate and plot two CT signals of 10 Hz and 110 Hz for 0 < t < 0.2 secs.
2. Sample at Fs = 100 Hz and plot them in discrete form.
3. Observe and note the aliasing effects.
4. Explore and learn.
STEPS:
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and type the following code:
F1 = 10;
F2 = 110;
Fs = 100;
Ts = 1/Fs;
t = [0 : 0.0005 : 0.2];
x1t = cos(2*pi*F1*t);
x2t = cos(2*pi*F2*t);
figure,
plot(t,x1t,t,x2t, 'LineWidth',2);
xlabel('cont time (sec)');
ylabel('Amp');
xlim([0 0.1]);
grid on;
legend('10Hz','110Hz');
title('Two CTCV sinusoids plotted');
3. Save the file as P011.m in your current directory and ‘run’ it, either using F5 key or writing
the file name at the command window.
(Check for the correctness of the time periods of both sinusoids.)
Now add the following bit of code at the bottom of your P011.m file and save.
x1n = cos(2*pi*F1*nTs);
x2n = cos(2*pi*F2*nTs);
figure,
subplot(2,1,1),
stem(nTs,x1n,'LineWidth',2);
grid on;
xlabel('discrete time (sec)');
ylabel('Amp');
xlim([0 0.1]);
subplot(2,1,2)
stem(nTs,x2n,'LineWidth',2);
grid on;
title('110Hz sampled')
xlabel('discrete time(sec)');
ylabel('Amp');
xlim([0 0.1]);
1. Before hitting the ‘run’, just try to understand what the code is doing and try to link it with
what we have studied in classes regarding concepts of frequency for DT signals.
2. Now ‘run’ the file and observe both plots.
To see what is really happening, type the following code at the bottom of your existing P011.m
file and run again.
figure,
plot(t,x1t,t,x2t);
hold;
stem(nTs,x1n,'r','LineWidth',2);
xlabel('time (sec)');
ylabel('Amp');
xlim([0 0.05]);
legend('10Hz','110Hz');
RESULT:
Explain (write) in your own words the cause and effects of what you just saw.
LAB TASKS:
Matlab Code:
close all, clear all, clc;
Fs = 5000, Ts = 1/Fs;
f = [500,2000,3000,4500] %initializing an array to observe output at
different frequencies
figure,
for i = 1:length(f) %initializing for loop for multiple CTCV plots
F = f(i);
t = [0:0.000005:0.2];
xt = sin(2*pi*F*t);
hold on
subplot(2,2,i);
plot(t,xt,'LineWidth',2)
xlabel('Time(sec)'), ylabel('Amp'), xlim([0 0.005]), grid on;
title('CTCV Sinusoid');
end
hold off
figure,
for i = 1:length(f) %initializng another for loop for DTDV plots
F = f(i);
nTs = [0:Ts:0.02]; %sampling of CTCV signal
n = [1:length(nTs-1)]; %array for DTDV
xn = sin(2*pi*F*nTs);
hold on
subplot (2,2,i);
stem (nTs, xn, 'LineWidth',2); %function for DT plot
title ('DTDV'), xlim([0 0.005]);
grid on, xlabel('Discrete time (samples/cycle)'), ylabel('Amp');
end
hold off
Similarities:
Plot 1 looks exactly similar to the plot 4 while plot 2 looks similar to the plot 3 in the discrete time.
Dissimilarities:
If we observe the plots in continuous time, Plot 1 and plot 4 are distinct while plot 2 and plot 3 are also
distinct which is contrary to what observed in discrete time.
Comments: It can be said that the frequencies of 3000Hz and 4500Hz are under-sampled since Fs =
5000Hz and does not match the Nyquist’s criteria i.e. Fs>=2F. Therefore, Plot 4 and plot 3 looks like an
aliased version of plot 1 and plot 2 respectively.
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.
Matlab Code:
clear all, close all, clc;
F = -3000; %Differrent frequencies are placed here to observe different
sampled sounds
Fs = 8000, Ts = 1/Fs;
nTs = [0:Ts:1];
x = cos(2*pi*F*nTs);
sound(x);
Comments:
Unique sounds were observed at frequencies ranging from 1kHz - 4kHz. The negative
frequencies also produced the same sound as positive frequencies verifying the Nyquist’s
criteria of –Fs/2. 7kHz, 9kHz and 25kHz were an aliased version of 1kHz while 6kHz of 2kHz and
5kHz of 3kHz. 8kHz did not produce a sound at all because it is an alias of 0Hz which represents
a DC value.
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?
Using DSP system tool box in Simulink observing my voice at different sampling rates
OBJECTIVE:
To observe the quantization effects on sampled signals and to understand how quantization leads
to quantization error. In this lab, we will investigate the influence of the number of quantization
levels on the quality of digitized signal. Method of selection of ADC is also a part of this lab session.
THEORY:
Everything stored on a computer is discrete time discrete valued signal. Because computer has finite
number of registers and each register is a finite length register. We take too many samples to give
the ‘effect’ of continuous time signals. But actually they are discrete time. We also take very fine
resolution of amplitude axis to give the effect of continuous valued signal but due to finite word
length of the computer register, the stored variables are already quantized. This lab aims to explain
the quantization effects in a computer.
Regardless of the medium (audio or image), the digitization of real world analog signal usually
involves two stages: sampling, i.e. the measurement of signal at discretely spaced time
intervals, and quantization, i.e. the transformation of the measurements (amplitudes) into
finite-precision numbers (allowed discrete levels), such that they can be represented in
computer memory. Quantization is a matter of representing the amplitude of individual
samples as integers expressed in binary. The fact that integers are used forces the samples to
be measured in a finite number of bits (discrete levels). The range of the integers possible is
determined by the bit depth, the number of bits used per sample. The bit depth limits the
precision with which each sample can be represented.
Bit Depth:
Within digital hardware, numbers are represented by binary digits known as bits—in fact, the
term bit originated from the words Binary digit. A single bit can be in only one of two possible
states: either a one or a zero. When samples are taken, the amplitude at that moment in time must
be converted to integers in binary representation. The number of bits used to represent each
sample, called the bit depth (bits/sample) or sample size, determines the precision with which
the sample amplitudes can be represented. Each bit in a binary number holds either a 1 or a 0. In
digital sound, bit depth affects how much you have to round off the amplitude of the wave when
it is sampled at various points in time
The number of different values that can be represented with b-bit is 2b .The largest decimal
number that can be represented with an b-bit binary number is 2b - 1. For example, the decimal
values that can be represented with an 8-bit binary number range from 0 to 255, so there are
256 different values (levels of ADC). A bit depth of 8 allows 2 8=256 different discrete levels
at which samples can be approximated or recorded. Eight bits together constitute one byte. A
bit depth of 16 allows 2 16 = 65,536 discrete levels, which in turn provides much higher
precision than a bit depth of 8.
The number of bits in a data word is a key consideration. The more bits used in the word, the better
the resolution of the number, and the larger the maximum value that can be represented. Some
computers use 64-bit words. Now, 264 is approximately equal to 1.8 x 1019—that's a pretty large
number. So large, in fact, that if we started incrementing a 64-bit counter once per second at the
beginning of the universe (≈20 billion years ago), the most significant four bits of this counter
would still be all zeros today.
To simplify the explanation, take an example of ADC with a bit depth of 3, 2 3 = 8
quantization levels ranging from -4 to 3 are possible in signed magnitude representation. For
bipolar ADCs (or signed magnitude representation), by convention, half of the quantization
levels are below the horizontal axis (that is 21, of the quantization levels). One level is the
horizontal axis itself (level 0), and 2b-1 − 1levels are above the horizontal axis.Note that since
one bit is used for the signed bit (in 2-complementformat), the largest magnitude corresponds
to 2^(b -1 ). (not 2b). When a sound is sampled, each sample must be scaled to one of the 8
discrete levels. However, the samples in reality might not fall neatly onto these levels. They
have to be rounded up or down by some consistent convention.
QUANTIZATION ERROR:
The samples, which are taken at evenly-spaced points in time, can take on the values only
at the discrete quantization levels to store on our computer. Therefore quantization leads
to a loss in the signal quality, because it introduces a “Quantization error”. Quantization
error is sometimes referred to as '"Quantization noise". Noise can be broadly defined as
part of an audio signal that isn’t supposed to be there. However, some sources would argue
that a better term for quantization error is "distortion", defining distortion as an unwanted
part of an audio signal that is related to the true signal.
The difference between the quantized samples and the original samples constitutes
quantization error or rounding error (if round-off method is used). Xe(n) = Xq(n) − x(n).
The lower the bit depth, the more values potentially must be approximated (rounded),
resulting in greater quantization error
To calculate the required bit depth of ADC i.e. bits/sample, there are two important
points which we must have to consider:
a) How much noise is already present in the analog signal?
b) How much more noise can be tolerated in the digital
signal? Signal-to -noise-ratio- SNR (of analog signal)
Before looking at SNR specifically in the context of digital imaging and sound, let's
consider the general definition. Signal-to-noise ratio can generally be defined as the ratio
of the meaningful content of a signal versus the associated background noise.
PROCEDURE:
1. Simulate a DTCV sinusoid of 1/50 cycles/sample with length of the signal be 500.
2. Choose the no. of significant digits for round-off and apply to the signal generated above.
3. Compute the error signals and SQNR
4. Explore and observe.
STEPS:
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and write the following code:
clear all;
close all;
clc;
fd1 = 1/50;
n = [0 : 499 ];
SQNR = 10*log10(Px1/Pe1);
disp(['The Signal to Quantization Noise Ratio is: ' num2str(SQNR) '
dB.' ]);
figure,
subplot(2,1,1);
plot(n,x1,n,x1q);
xlabel('indices');
ylabel('Amp');
xlim([0 49]);
ylim([-1.1 1.1]);
legend('DTCV','DTDV');
subplot(2,1,2);
plot(n,x1e);
xlabel('indices');
ylabel('Error');
xlim([0 49]);
3. Save the file as P021.m in your current directory and run it.
clear all;
close all;
clc;
fd1 = 1/50;
n = [0 : 499 ];
q = [0 : 10];
figure,
plot(q,SQNR);
xlabel('Significant Digits');
ylabel('SQNR (dB)');
xlim([q(1) q(end)]);
1. Before hitting the ‘run’, just try to understand what the code is doing and try to link it with
the previous code.
2. Now ‘run’ the file and observe the results.
RESULT:
Explain (write) in your own words the cause and effects of what you just saw.
LAB TASKS:
Lab Session 2
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.
Matlab Code:
clear all; close all; clc;
N = 250;
fd = 1/125;
n = 0:249;
q = input('No. of Digits after decimal points to be retained (0-9): ');
x = cos(2*pi*fd*n);
Px = sum(abs(x).^2)/N;
a = input('Select the method of quantization, press 1 for round-off, 2 for
floor, and 3 for ceil: ');
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
xe = xq - x;
Pe = sum(abs(xe).^2)/N;
SQNR = 10*log10(Px/Pe);
disp(['The Signal to Quantization Noise Ratio is: ' num2str(SQNR) ' dB.']);
figure;
subplot(2,1,1);
stem(n, x, 'filled');
hold on;
stem(n, xq, 'r', 'filled');
grid;
xlabel('indices');
ylabel('Amp');
xlim([0 49]);
ylim([-2.1 2.1]);
legend('DTCV', 'DTDV');
subplot(2,1,2);
plot(n, xe, 'k', 'Linewidth', 2);
xlabel('indices');
ylabel('Error');
xlim([0 49]);
DSP LAB TASKS
Roll No. 26
Select the method of quantization, press 1 for round-off, 2 for floor, and 3 for ceil: 3
Select the method of quantization, press 1 for round-off, 2 for floor, and 3 for ceil: 2
Comments: When a signal is quantized, three methods of floor, round-off and ceil are employed
for approximation. Due to which, some errors are generated. Here in this code we have asked the user
for the number of decimal places to approximate the values and the method for approximation.
It is observed that the SQNR is higher for round-off as it generates the least error. SQNR varies inversely
with the power of error signal.
Comments: It can be observed as the bit depth is increased, the approximation of the values got
quite a lot better. A very minimal amount of error occurs at higher bit depths such as 7 or 8.
Comments: The voice recorded at 44.1k Hz sampling rate is quantized at different number of
bits.
The voice quality stopped improving at higher number of bit depths such as 8 and so on.
NED University of Engineering & Technology
Department of _____________________ Engineering
To study impulse response, observe convolution technique in signal processing, and verify
different properties like causality, commutative, distributive and associative properties.
THEORY:
i.e.one can compute the output y(n) to a certain input x(n) when impulse response h(n) of
that system is known. Convolution holds commutative property.
2. The length of the resulting convolution sequence is N+M-1,where N and M are the
lengths of two convolved signals respectively.
3. In causal system, the outputs only depend on the past and/or present values of inputs and
NOT on future values. This means that the impulse response h(n) of a causal system will
always exist only for n≥ 0.
PROCEDURE:
clear all;
close all;
clc;
h = [3 2 1 -2 1 0 -4 0 3]; % impulse response
org_h = 1; % Sample number where origin exists
nh = [0 : length(h)-1]- org_h + 1;
x = [1 -2 3 -4 3 2 1]; % input sequence
org_x = 1; % Sample number where origin exists
nx = [0 : length(x)-1]- org_x + 1;
y = conv(h,x);
subplot(3,1,1),
stem(nh,h);
xlabel('Time index n');
ylabel('Amplitude');
xlim([nh(1)-1 nh(end)+1]);
title('Impulse Response h(n)');
grid;
subplot(3,1,2),
stem(nx,x);
xlabel('Time index n');
ylabel('Amplitude');
xlim([nx(1)-1 nx(end)+1]);
title('Input Signal x(n)');
grid;
subplot(3,1,3)
stem(ny,y);
xlabel('Time index n');
ylabel('Amplitude');
xlim([ny(1)-1 ny(end)+1]);
title('Output Obtained by Convolution');
grid;
1. Save the file as P031.m in your current directory and ‘run’ it.
2. Calculate the length of input signal (N) and impulse response (M) used in above task?
3. Calculate the length of the output sequence and verify the result with N+M-1
4. Try to learn, explore the code and make notes.
5. Now modify the above code such that h(n)= {3,2, 1, -2,1,0,-4,0,3}(origin is shifted) and
check for causality.
↑
RESULT:
EXERCISE:
3. Modify the code to prove Associative and Distributed properties of the convolution.
Lab Session 3
1. What will happen if we input x(n)={0,0,1,0,0} into the above system.
↑
clear all, clc, close all;
h = [3 2 1 -2 1 0 -4 0 3];
org_h = 1;
nh = (1:length(h)) - org_h;
x = [0 0 1 0 0];
org_x = 1;
nx = (1:length(x)) - org_x;
y = conv(h, x);
ny = nh(1) + nx(1):nh(end) + nx(end);
figure;
%plotting impulse response
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)'), grid;
%plotting input signal
subplot(3, 1, 2);
stem(nx, x, 'filled', 'g');
xlabel('Time index(n)'), ylabel('Amplitude');
xlim([nx(1)-1 nx(end)+1]);
title('Input signal x(n)'), grid;
%ploting output signal
subplot(3, 1, 3);
stem(ny, y, 'r', 'filled');
xlabel('Time index(n)'), ylabel('Amplitude');
xlim([ny(1)-1 ny(end)+1]);
title('Output y(n)'), grid;
DSP LAB TASKS
Roll No. 26
The system analyzed in the lab generates the following output to the input signal
x(n)={0,0,1,0,0} :
↑
y(n) = [0, 0, 3, 2, 1, −2, 1, 0, −4, 0, 3, 0, 0]
↑
2. Can you prove the commutative property of the convolution?
Matlab Code:
clear all, close all, clc;
% Impulse response
h = [2, 0, -3, 4];
% Input signal
x = [1, 2, 3, 4];
% Convolving h(n) with x(n)
y1 = conv(h, x);
subplot(2, 1, 1);
stem(y1, 'filled', 'k');
xlabel('Time index(n)'), ylabel('Amplitude');
title('y1(n) = h(n)*x(n)'), grid on;
subplot(2, 1, 2);
stem(y2, 'filled', 'k');
xlabel('Time index(n)'), ylabel('Amplitude');
title('y2(n) = x(n)*h(n) '), grid on;
DSP LAB TASKS
Roll No. 26
Comments: It can be observed that both the outputs are same whether you convolve
x(n) with h(n) or h(n) with x(n) proving the commutative property of convolution.
subplot(3, 1, 2),
plot(nx2, x2, 'g');
xlabel('Time index (n)'),
ylabel('Amplitude');
xlim([nx1(1) - 1, nx1(end) +
1]);
title('audio'), 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 voice
sound(z, Fs2);
% Saving the convolved audio
% Normalize the signal z to the range [-1, 1]
z_normalized = z / max(abs(z));
audiowrite('D:\quick access\5th semester\DSP\conv.wav', z_normalized, Fs2);
Comments: My normal voice which was captured in my room was convolved with the
impulse response i.e. a shotgun sound. The convolved output felt like the voice was recorded in
an auditorium. Following are the plots obtained from matlab.
NED University of Engineering & Technology
Department of _____________________ Engineering
OBJECTIVE:
To study discrete time correlation and apply it to real data to observe the correlation
between two signals.
THEORY:
1. Correlation is given as where ‘l’ is the lag. This is called cross-correlation and it
gives the magniyude and location of similarity between two signals. The correlation
between x(n) and y(n) . It is given as:
2. Generally rxy(l) = ryx(l). These two are the same when x(n) and y(n) are the same signals
or when x(n) and y(n) are even symmetric signals .
3. The length of the resulting correlation sequence is N+M-1, where N and M are the
lengths of the two signals.
4. Correlation may also be computed using convolution algorithm with a modification that
we need to fold one of the signals before applying convolution.
Mathematically, rxy(n)= x(n) * y(-n)
STEPS:
PROCEDURE:
1.Make a folder at desktop and name it as your current directory within MATLAB. -
2.Open M-file editor and write the following code: )
clear all;
close all;
clc;
n = [0:9];
ph1 = 0;
ph2 = 0;
x = sin(2*pi*0.1*n + ph1);
org_x = 1;
nx = [0 : length(x)-1]- org_x + 1;
y = sin(2*pi*0.1*n + ph2);
org_y = 1;
ny = [0 : length(y)-1]- org_y + 1;
rxy = xcorr(x,y);
nr = [nx(1)-ny(end) : nx(end)-ny(1)];
subplot(3,1,2),
stem(ny,y);
xlabel('Time index n');
ylabel('Amplitude');
xlim([ny(1)-1 ny(end)+1]);
title('Signal y(n)');
grid;
subplot(3,1,3)
stem(nr,rxy);
xlabel('Time index n');
ylabel('Amplitude');
xlim([nr(1)-1 nr(end)+1]);
title('Cross Correlation');
grid;
Save the file as P041.m in your current directory and ‘run’ it.
Learn the specific logical bits of the code and make notes
Now modify the phase of the second signal to pi/2 (it will make it cosine) and observe the
correlation at lag zero. Modify the phase again to ‘pi’ and observe.
1. Check for auto-correlation (ph1 = ph2) that the lag zero value gives the energy of the
Signal.
2. Observe that the commutative property does not hold.
RESULT:
EXERCISE:
1. Now modify the phase of the second signal to pi/2 (it will make it cosine)and observe the
correlation at lag zero.
2. Modify the phase again to ‘pi’ and observe.
3. Check for auto-correlation (ph1 = ph2) that the lag zero value gives the m energy of the
signal.
4. Observe that the commutative property does not hold.
5. Modify the code, such that the correlation is obtained using convolution command.
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.
Voltage A Min Voltage B Min Voltage C Min
189.358 153.917 195.735
189.175 159.719 201.877
188.783 161.575 186.718
188.757 172.186 187.659
176.995 173.206 205.876
180.472 176.865 204.831
180.524 176.917 192.494
180.262 189.28 199.839
181.778 189.828 211.887
179.975 189.462 211.94
178.642 189.253 212.462
180.315 188.94 193.749
180.707 190.377 200.492
180.262 190.194 201.433
180.628 190.064 202.635
180.315 189.907 200.701
179.635 189.541 203.289
179.243 189.567 202.635
179.4 189.619 200.989
180.576 189.044 197.591
180.837 189.123 199.865
180.184 189.332 201.093
180.08 189.097 201.041
177.675 189.044 199.656
175.297 189.018 198.558
173.99 189.123 204.595
Lab 4 Tasks
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
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
subplot(4,1,3),stem(l,rxy,'filled','k')
xlabel('Lag index (l)'),ylabel('Correlated Output')
title('Correlation'),grid
subplot(4,1,4),stem(l,norm_corr,'filled','k')
xlabel('Lag index (l)'), ylabel('Normalized Correlated Output')
title('Normalized Correlation'),grid;
1. Now modify the phase of the second signal to pi/2 (it will make it cosine) and observe the
correlation at lag zero.
3. Check for auto-correlation (ph1 = ph2) that the lag zero value gives the m energy of the signal.
At phase 2 = pi/2:
The correlation at lag zero is: 4.9127e-15.
At phase 2 = pi:
At Phase 1 = Phase 2:
5. Modify the code, such that the correlation is obtained using convolution command.
% rxy(n)=x(n)*y(-n)
clc;clear all;close all;
n = [0:49];
ph1 = 0;
ph2 = 0;
x = sin(2*pi*0.1*n + ph1);
origin_x = 1;
nx = [1:length(x)]-origin_x;
y = sin(2*pi*0.1*n + ph2);
origin_y = 1;
ny = [1:length(y)]-origin_y;
z=fliplr(y);
rxy_1=conv(x,z);
[rxy_2 l]=xcorr(x,y);
subplot(2,1,1)
stem(l,rxy_1,'filled','k')
xlabel('Lag index');
ylabel('Correlated Output')
title('Using Convolution')
grid on;
subplot(2,1,2)
stem(l,rxy_2,'filled','m')
xlabel('Lag index');
ylabel('Correlated Output')
title('Using Correlation') Comments: The correlation code is modified using a flip
sgtitle('Correlation using Convolution') command in the code. So the correlation becomes
grid on;
exactly like convolution as can be veified from the output
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.
clc;clear all;close all;
[numbers, strings, raw] =
xlsread('D:\Quickaccess\5th sem\DSP\Lab4Task6');
numbers_1 = numbers(:,1);
numbers_3 = numbers(:,3);
org_num1 = 1;
num1_x = [ 1:length(numbers_1) ] - org_num1 ;
orgin_num3 = 1;
num3_x = [ 1:length(numbers_3) ] - orgin_num3 ;
[values,indices] = xcorr(numbers_1,numbers_3);
[maxVal,position] = max(values);
disp(['The correlation at lag zero is: '
num2str(values(indices==0)) '.']);
disp(['The maximum correlation is at lag '
num2str(indices(position)) '.']);
normalized_correlation=values/max(abs(values));
percent_correlation=normalized_correlation*100;
Tasks Lab Session 4
Comments: Correlation between the phase A and phase C was observed. The correlation is
maximum at starting indices but decreases as we move higher up the order.
LAB SESSION 05
OBJECTIVE:
To study the computer implementation of Discrete FourierT transform and Inverse Fourier
Transform using Twiddle factor.
THEORY:
1 −𝑘𝑛
X(n) = ∑𝑁−1
𝑛=0 𝑋(𝑘) 𝑊𝑁 ; k=0,1,……N-1
𝑁
−𝑗2𝛱
Where by definition WN = 𝑒 𝑁
𝑘𝑛
W = 𝑒 −𝑗2𝛱𝑘𝑛/𝑁
𝑁
𝑘𝑛
XN=[ W ]xN
𝑁
𝑘𝑛 -1
xN= [W ] XN
𝑁
PROCEDURE:
TASK
Compute 4 point DFT of x(n)= ( 1,2,3,0).
STEPS
1.Generate given sequence in Matlab .
2.Take N-=4 to calculate 4-point DFT.
3.Define 0: N-1 point vector for time and frequency samples.
4.Define W matrix and then use DFT analysis equation to compute DFT.
close all,
clear all;
clc;
x=[1 ,2 ,3 ,0];
N=4;
n=[0:1:N-1];
k=[0:1:N-1];
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
Xk=x*WNnk
LAB TASK
Prove DFT synthesis equation using DFT output generated from lab task.
Lab 5 tasks
1) Prove DFT synthesis equation using DFT output generated from lab task.
x = [1, 2, 3, 0];
N = 4;
Fs = 100;
n = [0:1:N-1];
k = [0:1:N-1];
WN = exp(-j*2*pi/N);
kn = n' * k;
WNkn = WN.^kn;
Xk = x * WNkn;
% DFT synthesis equation
x_synthesized = zeros(1, N);
for nn = 0:N-1
x_synthesized(nn+1) = (1/N)
* sum(Xk .* exp(j*2*pi/N * k *
nn));
end
% Plot the original and
synthesized signals
figure;
subplot(211)
stem(n, x, 'r',
'MarkerFaceColor', 'r')
% Original signal in red
title('Original Signal')
xlabel('n')
ylabel('x[n]')
subplot(212)
stem(n, real(x_synthesized), 'b', 'MarkerFaceColor', 'b')
% Synthesized signal in blue Comments: Proving DFT synthesis equation means to reconstruct
title('Synthesized Signal') the given discrete signal from its frequency components. It can be
xlabel('n') seen here that a discrete signal was taken and DFT was applied to
ylabel('x_synth[n]'); break it into its frequency components and then for loop was
applied for summation of that DT sinusoids frequency components
to obtain the original signal.
2) 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 𝐹𝑠 = 1000 𝑠𝑎𝑚𝑝𝑙𝑒𝑠⁄𝑠𝑒𝑐 𝑥(𝑛) = {0.3535, 0.3535, 0.6464,
1.0607 , 0.3535, − 1.0607, − 1.3535 , − 0.3535}
close all,clear all;clc;
x=[0.3535, 0.3535, 0.6464, 1.0607, 0.3535, -1.0607, -1.3535 , -0.3535];
N=8; n=[0:1:N-1]; k=[0:1:N-1]; WN=exp(-j*2*pi/N); nk=n'*k; WNnk=WN.^nk;
Xk=x*WNnk, mag_Xk=abs(Xk);, phase_Xk=angle(Xk);
phase_degrees=rad2deg(phase_Xk);
figure;
subplot(2,1,1), stem(n,mag_Xk,'filled','g','LineWidth',1.5)
xlabel('Index(K)'), ylabel('|X(k)|'),title('Magnitude Plot'),grid;
subplot(2,1,2), stem(n,phase_degrees,'filled','k','LineWidth',1.5)
xlabel('Index(K)'),ylabel('?X(k)'),title('Phase Plot'),grid;
Lab 5 tasks
Output: { -0.0001 + 0.0000i, 0.0000 - 3.9999i, 1.4141 + 1.4144i -0.0000 - 0.0001i, -0.0001 - 0.0000i,
2. Inverse DFT using Matrix inversion Develop a MATLAB code to find the inverse DFT output of the
following frequency domain sequence by
using IDFT equation in matrix form (use
matrix inversion). 𝑋(𝑘) = {0, 4∠ − 90 ∘ ,
2∠45 ∘ , 0 , 0, 0, 2∠ − 45 ∘ , 4∠90 ∘ }
close all,clear all;clc;
%values converted from polar
co-ordinates to rectangular co-
ordinates
Xk=[0,-4i ,1.414+1.414i, 0 , 0,
0, 1.414-1.414i ,4i];
N=8;
n=[0:1:N-1];
k=[0:1:N-1];
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
B=inv(WNnk);
Xk_inv=Xk.';
Xn=(1/N)*(Xk)*B
figure;
Lab 5 tasks
Comments: The same frequency components were
stem(n,Xn,'filled','g','LineWidth',1.5) given as obtained in the previous tasks. Inverse DFT
xlabel('Index(n)'), was applied to reconstruct the signal using matrix
ylabel('x(n)'),
title('Signal in time domain x(n)'), inversion which takes a great deal of time if the
grid; matrix if of higher order.
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).
𝑋(𝑘) = {0, 4∠ − 90 ∘ , 2∠45 ∘ , 0 , 0, 0, 2∠ − 45 ∘ , 4∠90 ∘ }
close all,clear all;clc;
Xk=[0, -4i, 1.414+1.414i, 0, 0, 0, 1.414-1.414i, 4i];
N=8;
n=[0:1:N-1];
k=[0:1:N-1];
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
B=conj(WNnk);
Xk_inv=Xk.';
Xn=(1/N)*(Xk)*B
figure;
stem(n,Xn,'filled','g','LineWidth',1.5)
xlabel('Index(n)'),
ylabel('x(n)'),
title('Signal in time domain x(n)'),
grid;
OBJECTIVE:
To observe/find different frequency components in an audio signal and plot it with different x_
axes .
THEORY:
PROCEDURE:
STEPS
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Copy the audio file ‘noisy.wav’ into your current directory.
3. Open M file editor and write the following code:
subplot(2,1,1);
plot(F,magY);
grid on;
xlim([0 Fs/2]);
xlabel('Frequency (Hz)');
ylabel('DFT Magnitude');
title('Discrete Fourier Transform');
subplot(2,1,2);
plot(F,magY);
grid on;
xlim([0 2000]);
xlabel('Frequency (Hz)');
ylabel('DFT Magnitude');
title('Discrete Fourier
Transform');
4. Save the file as P081.m in your current directory and run it.
RESULT:
EXERCISE:
1) 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.
clc; clear; close all;
[data, fs] = audioread('D:\quick access\5th semester\DSP\noisy.wav');
Ts = 1 / fs;
n = (0:length(data) - 1);
t = n * Ts;
Df = fs / length(data);
F = n * Df;
Y = fft(data);
magY = abs(Y);
ang = angle(Y);
sound(data, fs);
subplot(5, 1, 1);
plot(t, data','r');
xlim([0 2]);
xlabel('Time (s)');
ylabel('Amplitude');
title('Original
Signal');
subplot(5, 1, 2);
plot(F, magY, 'r');
grid on;
xlim([0 fs/2]);
xlabel('Frequency
(Hz)');
ylabel('DFT Magnitude');
title('Discrete Fourier
Transform');
subplot(5, 1, 3); Comments: Multiple tasks are achieved in the code. First of all we take
plot(F, magY, 'r'); a recoding also having a little noise. The recording in the time domain
grid on;
was disintegrated into its frequency components by applying. The most
xlim([0 2000]);
xlabel('Frequency (Hz)'); dominant component of frequency is of course the voice of the
ylabel('DFT Magnitude'); speaker. A little noise in the recording also had a considerable effect as
title('DFT - Zoomed In'); can be seen in the DFT waveform. The voice recording was then
cutoff_frequency = 600;
order_of_filter = 11; modified to avoid the noise by setting a cut off frequency to attenuate
normalized_frequency = the noise. The filtered signal and its DFT is then plotted to observe the
cutoff_frequency / (fs / 2); energy of the noise affecting our recording.
[y, x] =
butter(order_of_filter,
normalized_frequency);
filtered_signal = filtfilt(y, x, data);
subplot(5, 1, 4);
plot(t, filtered_signal,'r');
xlim([0 2]);
xlabel('Time (s)');
ylabel('Amplitude');
title('Filtered Signal');
Lab 6 Tasks
subplot(5, 1, 5);
normalized_fft_of_filtered_signal = abs(fft(filtered_signal)) /
length(filtered_signal);
plot(F, normalized_fft_of_filtered_signal,'r');
grid on;
xlim([0 2000]);
xlabel('Frequency (Hz)');
ylabel('DFT Magnitude');
title('DFT of Filtered Signal');
Task-1: Removal of tone from the noisy signal through FFT results
To remove the noisy tone, we can zero-in on noisy tone by looking at the DFT of the noisy signal. Take
Inverse DFT [ifft] 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.
clc; clear; close all;
[data, fs] = audioread('D:\quick access\5th semester\DSP\noisy.wav');
Ts = 1 / fs; n = (0:length(data) - 1); t = n * Ts;
Df = fs / length(data); F = n * Df;
Y = fft(data); magY = abs(Y); ang = angle(Y);
% Threshold value for
magnitude spectrum
threshold = 0.5; % You can
adjust this threshold
% Apply thresholding to the
magnitude spectrum
Y_thresh = Y .* (magY >
threshold * max(magY));
% Take the inverse DFT to
obtain the modified signal
modified_signal =
ifft(Y_thresh);
% Play the original and
modified signals
sound(data, fs);
pause(2);
sound(modified_signal, fs);
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.
clc; clear; close all;
[data, fs] = audioread('D:\quick access\5th semester\DSP\noisy.wav');
downsampling_factor = 10;
data_downsampled = data(1:downsampling_factor:end);
t_downsampled = (0:length(data_downsampled)-1) / (fs / downsampling_factor);
% Plot the original signal
t = (0:length(data)-1) /
fs;
figure,
subplot(3, 1, 1);
plot(t, data);
xlabel('Time (s)');
ylabel('Amplitude');
title('Noisy Signal');
zoom_start = 2;
zoom_end = 2.2;
subplot(3, 1, 2);
plot(t, data);
xlim([zoom_start
zoom_end]);
xlabel('Time (s)');
ylabel('Amplitude');
title('Zoomed-in on
Tone');
tone_start = 2.1;
tone_end = 2.2;
tone_period = tone_end -
tone_start;
tone_frequency = 1 /
tone_period;
tone_signal = sin(2 * pi * tone_frequency * t_downsampled);
tone_signal_upsampled = interp1(t_downsampled, tone_signal, t, 'linear');
denoised_signal = data' - tone_signal_upsampled;
sound(denoised_signal,fs)
sound(denoised_signal,fs)
subplot(3, 1, 3);
plot(t, denoised_signal);
xlabel('Time (s)');
ylabel('Amplitude');
title('Denoised Signal');
disp('Tone removal not achieved. Check the plots for the original, zoomed-
in,and non denoised signals.');
Comments: Tone removal was not able to be achieved after applying this technique of down
sampling. Maybe modifying the down-sampling values could help us remove the noise totally from
the signal. The tone gave a sinusoidal response.
NED University of Engineering & Technology
Department of _____________________ Engineering
OBJECTIVE:
To study s-plane and plot impulse and frequency response for different pole zero location in s-
plane. Also to determine weather system is FIR or IIR.
THEORY:
The Laplace Transform of a general continuous time signal x (t) is defined as;
-st
X(S) = ∫ x(t) e dt.
Where the complex variable s=δ+ j w, with δ and w the real and imaginary parts. CTFT is a
subset of Laplace when δ =0. Since ‘δ’ information is not present in CTFT, therefore information
about stability can only be obtained from Laplace. If pole lies on L.H.S of s-plane, system is
stable. If pole lies on R.H.S of s-plane, system is unstable. If pole lies on y(jw)-axis, system is
marginally stable or oscillatory. If system has FIR, it is stable. If system is IIR, it can be stable or
unstable.
PROCEDURE:
Generate pole zero constellation in s plane.
1. Plot corresponding Frequency (Bode magnitude) response.
2. Plot impulse response and determine that the system is FIR or IIR.
3. Modify location of poles in s plane to observe the corresponding change in frequency and
impulse response.
STEPS.
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and write the following code:
clear all;
close all;
clc;
Num = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
Zeros=roots(Num)
Den = poly([-1,-1]);
poles=roots(Den) sys=tf(Num,Den)
figure;
subplot(3,1,1);
pzmap(sys);
xlim([-2 2]);
ylim([-4 4]);
subplot(3,1,2);
[mag phase w]=bode(sys);
mag=squeeze(mag);
plot(w,mag);
subplot(3,1,3);
impulse(sys);
H=dfilt.df1(Num,Den);A=isfir(H)
3. Save the file as P091.m in your current directory and ‘run’ it.
RESULT:
1. Learn the specific logical bits of the code and make notes.
2. Observe the plots.
3. Now, explain (write) in your own words the cause and effects of what you just saw.
EXERCISE:
Change the location of poles from L.H.S of s-plane to y axis first, and then to R.H.S of s-
plane and observe the effects.
Tasks Lab Session 7
This lab session allows us discover the importance of s-plane to study the frequency response of a
system at a given input signals. In mathematics and engineering, the s-plane is the complex plane on
which Laplace transforms are graphed. It is a mathematical domain where, instead of viewing processes
in the time domain modeled with time-based functions, they are viewed as equations in the frequency
domain. It is used as a graphical analysis tool in engineering and physics.
Poles and Zeros of a transfer function are the frequencies for which the value of the denominator and
numerator of transfer function becomes infinite and zero respectively. The values of the poles and the
zeros of a system determine whether the system is stable, and how well the system performs.
The Objective of this lab session to study s-plane and plot impulse and frequency response for different
pole zero location in s-plane. Also to determine weather system is FIR (finite impulse response) or IIR
(infinite impulse response).
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
H (s) =
𝒔
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
H (s) =
𝒔+𝟎.𝟓
Stability: Stable.
The Impulse response of the
system dies out so it is a totally
stable system.
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
H (s) =
𝒔+𝟎.𝟓
Stability: Unstable
Changing the pole location to the
RHP caused an infinite impulse
response while the frequency
response is the same. The system’s
stability is defined from its
impulse response. We can also
observe that the pole location is
playing an important role here.
Task-4: Analysis of 2nd order Analog system [poles at jω axis]
a) Generate pole zero constellation of an analog system in s-plane having pure imaginary poles at:
s= jω =±j*pi/2
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
𝑯(𝒔) =
𝒔𝟐 + 𝟐. 𝟒𝟔𝟕
Stability: Marginally stable.
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
𝑯(𝒔) =
𝒔𝟐 + 𝒔 + 𝟐. 𝟕𝟐
Stability: Stable.
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝟏
𝑯(𝒔) =
𝒔𝟐 − 𝒔 + 𝟐. 𝟕𝟐
Stability: Unstable.
Task-7: Analysis of 2nd order Analog system [complex zeros and poles at LHP]
a) Generate pole zero constellation of an analog system in s-plane for given roots. S=j*pi/2,-j*pi/2
S=[-0.2+j*pi/4,-
b) Write the transfer function of a system 0.2-j*pi/4]
c) Plot the corresponding frequency response and impulse response of a system. Also comment on the
stability of system.
𝒔𝟐 + 𝟐. 𝟒𝟔𝟕
𝑯(𝑺) =
𝒔𝟐 + 𝟎. 𝟒𝒔 + 𝟎. 𝟔𝟓𝟕
Stability: Stable.
𝒔𝟐 + 𝟐. 𝟒𝟔𝟕
𝑯(𝑺) =
𝒔𝟐 − 𝟎. 𝟒𝒔 + 𝟎. 𝟔𝟓𝟕
Stability: Unstable.
𝒔𝟐 ± 𝟎. 𝟐𝒔 + 𝟐. 𝟒𝟕𝟕
𝑯(𝒔) =
𝒔𝟐 − 𝟎. 𝟒𝒔 + 𝟎. 𝟔𝟓𝟕
Stability (for zeros at RHP):
unstable.
To study z-plane and plot impulse and frequency response for different pole zero location in z-
plane.Also to determine weather system is FIR or IIR.
THEORY:
X (z) = ∑∞
𝑛=𝑜 𝑥 (𝑛) z
-n
Where the complex variable z=r ∠w , with r the radius and w the angle. DTFT is a subset of z
transform when r =1. Since ‘r’ information is not present in DTFT, therefore information about
stability in discrete time can only be obtained from z transform. If pole lies inside the unit circle,
system is stable. If pole lies outside the unit circle, system is unstable. If pole lies at the unit circle,
system is marginally stable or oscillatory. If system has FIR, it is stable. If system is IIR, it can be
stable or unstable.
PROCEDURE:
STEPS:
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and write the following code:
clear all;
close all;
clc;
Num = poly([(0-(i*(pi/2))),(0+(i*(pi/2)))]);
Den = poly([-1,-1]);
Num1 = poly([j,-j]);
Den1 = poly([exp(-1),exp(-1)]);
sys1=tf(Num1,Den1,1)
figure;
subplot(3,1,1);
pzmap(sys1);
xlim([-2 2]);
ylim([-4 4]);
subplot(3,1,2);
[mag phase w]=bode(sys1);
mag=squeeze(mag);
plot(w,mag);
xlim([0 100])
subplot(3,1,3);
impulse(sys1);
H=dfilt.df1(Num,Den);
A=isfir(H)
figure;
pzmap(sys1)
grid on;
3. Save the file as P010.m in your current directory and ‘run’ it.
RESULT:
1 Learn the specific logical bits of the code and make notes.
2 Observe the plots.
3 Now, explain (write) in your own words the cause and effects of what you just saw.
EXERCISE:
Change the location of poles from inside the unit circle to outside and at the unit circle and
observe and note the changes.
Tasks Lab Session 8
z-plane: A z-plane is a mathematical domain used in the analysis and design of discrete-time systems,
particularly in the field of digital signal processing. In the z-plane, complex numbers are represented by
z = σ + jω, where σ and ω are real numbers, and j is the imaginary unit.
The main difference between the s-plane and the z-plane lies in their application domains. The s-plane is
used for continuous-time systems in analog signal processing, while the z-plane is utilized for discrete-
time systems in digital signal processing.
The z-plane is crucial in digital signal processing as it allows for the representation and analysis of
discrete-time signals and systems. It plays a vital role in designing digital filters, control systems, and
various other applications.
clear all;close xlim([0 180]) mag=abs(H); subplot(3,1,3)
all;clc; grid plot((w*180)/pi, impulse(sys,'r')
Num = poly([0]); xlim([-3 3]), mag) grid
Den = ylim([-1.5 xlabel('\omega H=dfilt.df1(Num,
poly([0.9*exp(j*pi),0.9 1.5]) (in degrees)') Den);
*exp(-j*pi)]); subplot(3,1,2) ylabel('Gain A=isfir(H)
sys=tf(Num,Den,1) [H |H(\omega)|')
figure w]=freqz(Num,D title('Frequency
subplot(3,1,1) en); Response')
pzmap(sys)
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:
( )=
− .
The system is IIR.
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: = 0 & pole: = 0.9∠ ± ]
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.
Imaginary Axis
( )=
+ . + .
The system is IIR
Gain |H( )|
Amplitude
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: = 0 & pole: = 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.
Pole-Zero Map
Imaginary Axis
0
( )=
−
-1
-3 -2 -1 0 1 2 3
The system is IIR.
Real Axis
Frequency Response
200
Gain |H( )|
100
0
0 20 40 60 80 100 120 140 160 180
(in degrees)
Impulse Response
2
Amplitude
0
0 2 4 6 8 10 12 14 16 18 20
Time (seconds)
Task4. 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:
b) Write the transfer function of a system. [zero: = 0 & pole: = 1∠ ± ]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of digital system.
Imaginary Axis
( )=
+ +
The system is IIR.
Gain |H( )|
Amplitude
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:
b) Write the transfer function of a system [zero: = 0 & pole: = 1.1∠0]
c) Determine that whether the digital system is FIR or IIR.
d) Plot corresponding frequency response and impulse response of a digital system.
Imaginary Axis
( )=
− .
The system is IIR
Gain |H( )|
Amplitude
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:
b) Write the transfer function of a system. [zero: = 0 & pole: = 1.1∠ ± ]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
( )=
+ . + .
The system is IIR.
a) Generate pole zero constellation in z-plane for the following roots of a digital system:
b) Write the transfer function of a system [zeros: = 0.8944∠ ± 2 /3) & poles: = 0]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
Pole-Zero Map
Imaginary Axis
0
+ . + .
-1 ( )=
-3 -2 -1 0 1 2 3
Real Axis The system is FIR.
Frequency Response
3
Gain |H( )|
0
0 20 40 60 80 100 120 140 160 180
(in degrees)
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
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:
b) Write the transfer function of a system. [zeros: = 1∠ ± /2) & poles: = 0.8∠ ± /4]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
+
( )=
− . + .
The system is IIR.
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:
b) Write the transfer function of a system. [zeros: = 1∠ ± /2) & poles: = 1∠ ± /4]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
Pole-Zero Map
Imaginary Axis
-1
²+
-3 -2 -1 0 1 2 3 ( )=
Real Axis ²+ . +
10 15 Frequency Response
15
The system is IIR
Gain |H( )|
10
0
0 20 40 60 80 100 120 140 160 180
(in degrees)
Impulse Response
5
Amplitude
-5
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
Time (seconds)
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:
b) Write the transfer function of a system. [zeros: = 1∠ ± /2) & poles: = 1.2∠ ± /4]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
²+
( )=
²− . + .
The system is IIR.
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:
b) Write the transfer function of a system. [zeros: = 0.8∠ ± /2) & poles: = 0.8∠ ± /4]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system.
+ .
( )=
− . + .
The system is IIR
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:
b) Write the transfer function of a system. [zeros: = 1.2∠ ± /2) & poles: = 0.8∠ ± /4]
c) Determine that whether the digital system is FIR or IIR
d) Plot corresponding frequency response and impulse response of a digital system
+ .
( )=
− . + .
The system is IIR.
THEORY:
The process of deriving a realizable transfer function of a digital filter by considering given
frequency response specifications is known as digital filter design. The digital filter can be
classified as:
• Butterworth filter
• Chebyshev Type I filter
• Chebyshev Type II filter
• Elliptic filter
FIR digital filter operates on digital sample values. It uses current and past input samples to
produce a current output sample. It does not use previous output samples. There are various
types of FIR filter based on need viz. low pass, high pass, band pass and band stop, Low pass
filter.
Following points are usually considered to design FIR filter other the window type.
INPUT:
• Window Type
• Passband and stopband ripples
• passband and stopband edge frequencies
• sampling frequency
• order of the filter
• window coefficients
OUTPUT:
• magnitude and phase responses
PROCEDURE:
TASK-1
F1 = 100; F2 = 150;
yh = filtfilt(bh,1,x);
yl = filtfilt(bl,1,x);
% Plotting
figure, subplot(5,1,1),
plot(F,abs(fft(x)));
xlim([0 Fs/2]);
title('FFT of original signal');
subplot(5,1,2),
plot(F,abs(hh));
xlim([0 Fs/2]);
title('Frequency response of Filter One');
subplot(5,1,3),
plot(F,abs(fft(yh)));
xlim([0 Fs/2]);
title('FFT of filtered signal from filter one');
subplot(5,1,4),
plot(F,abs(hl));
xlim([0 Fs/2]);
title('Frequency response of Filter Two');
subplot(5,1,5),
plot(F,abs(fft(yl)));
xlim([0 Fs/2]);
title('FFT of filtered signal from filter two');
xlabel('Hz.')
% Pole Zero Constellations
[bh,ah] = eqtflength(bh,1);
[zh,ph,kh] = tf2zp(bh,ah);
[bl,al] = eqtflength(bl,1);
[zl,pl,kl] = tf2zp(bl,al);
figure,
subplot(1,2,1),
pzplane(bh,ah);
xlim([-1.5 1.5]);
ylim([-1.5 1.5]);
title('Filter_One');
subplot(1,2,2),
pzplane(bl,al);
xlim([-1.5 1.5]);
ylim([-1.5 1.5]);
title('Filter Two');
TASK -2
Write a program to design a FIR filter using Hanning windows,take inputs from user for design
values of filter.
close all;
clear all;
clc;
num=-20*log10(sqrt(rp*rs))-13;
dem=14.6*(fs-fp)/f;
n=ceil(num/dem);
n=abs(n);
wp=2*fp/f;
ws=2*fs/f;
wn=(ws+wp)/2;
%Adjusting the filter order. The order of window must be an odd
number
%and the order of filter must be one less than that of the
window
if (rem(n,2)==0)
m=n+1;
else
m=n;
n=n-1;
end
w=hann(m);
b=fir1(n,wn,'low',w);
freqz(b,1,500,3000);
TITLE('Magnitude and Phase response');
TASK-3
Write a program for FIR(Finite Impulse Response) filter like Low pass FIR filter, High pass FIR
filter, Band pass FIR filter and Band stop FIR filter using Rectangular window using MATLAB .
ALGORITHM:
LOW PASS FILTER:
Step 1: Read the input sequence
Step 2: Perform low pass filter calculations
Step 3: Plot the output sequences
PROGRAM:
clc;
clear all;
close all;
rp=input('Enter the passband ripple(rp):');
rs=input('Enter the stopband ripple(rs):');
fp=input('Enter the passband frequency(fp):');
fs=input('Enter the stopband frequency(fs):');
f=input('Enter the sampling frequency(f):');
wp=2*fp/f;
ws=2*fs/f;
num=-20*log10(sqrt(rp*rs))-13;
dem=14.6*(fs-fp)/f;
n=ceil(num/dem);
n1=n+1;
if(rem(n,2)~=0)
n1=n;
n=n-1;
end
y=boxcar(n1);
%Low pass filter
b=fir1(n,wp,y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,1);
plot(m);
ylabel('Gain(db)->');
xlabel('(a)Normalised frequency->');
%High pass filter
b=fir1(n,wp,'high',y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,2);
plot(m);
ylabel('Gain(db)');
xlabel('(b)Normalised frequency');
%Band pass filter
wn=[wp*ws];
b=fir1(n,wn,y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,3);
plot(m);
ylabel('Gain(db)');
xlabel('(c)Normalised frequency');
%Band stop filter==============
wn=[wp*ws];
b=fir1(n,wn,'stop',y);
[h,o]=freqz(b,1,256);
m=20*log10(abs(h));
subplot(2,2,4);
plot(m);
ylabel('Gain(db)');
xlabel('(d)Normalised frequency-');
EXERCISE:
Q1. Perform Q3.using Hamming and Kaiser Window.
Compare results of designed filters using three different windows on a single plot.
Tasks Lab Session 9
Discussion:
Digital filters are algorithms used to modify or extract information from digital signals. Types include
Finite Impulse Response (FIR) with fixed-length response, and Infinite Impulse Response (IIR) with
feedback. FIR provides linear phase response, while IIR offers efficiency in terms of computation. Filters
are crucial in signal processing for tasks like noise reduction and signal enhancement. In MATLAB, you
can implement digital filters using functions like 'fir1' for FIR and 'butter' for IIR, specifying filter
parameters and applying them to signals using 'filter' function.
In MATLAB, windowing involves multiplying a signal by a window function to minimize spectral leakage
and artifacts during signal analysis. Common window functions include 'hamming,' 'hann,' 'blackman,'
and 'rectangular.' Use the 'window' function to generate a window of specified length, and apply it to
the signal using element-wise multiplication for improved accuracy in signal processing applications.
Lab Work:
clear all; close all; subplot(411); subplot(413)
clc; plot(n*Ts,x1,'r') plot(n*Ts,x2,'r')
F1 = 500; F2 = 600; hold hold
Fs = 8000; stem(n*Ts,x1,'filled') stem(n*Ts,x2,'filled')
Ts = 1/Fs; xlabel('Time (sec)'); xlabel('Time (sec)')
N = 64; n =[0:N-1]; ylabel('Amplitude') ylabel('Amplitude')
k = n; Df = Fs/N; Fk = title('Signal'); grid; title('Signal')
k.*Df; axis tight grid
axis tight
x1 = sin(2*pi*F1*n*Ts); subplot(412)
X1 = abs(fft(x1,N)); stem(Fk,X1,'r','filled') subplot(414)
x2 = sin(2*pi*F2*n*Ts); xlabel('Frequency (Hz)') stem(Fk,X2,'r','filled')
X2 = abs(fft(x2,N)); ylabel('DFT Magnitude') xlabel('Frequency (Hz)')
title('Spectrum') ylabel('DFT Magnitude')
xlim([0 Fs]) title('Spectrum')
grid xlim([0 Fs])
grid
CONCLUSION: A signal of
1050Hz was discretized and
its spectrum was plotted. A
leakage was observed in
the spectrum. A window
function was applied
known as “hanning” to
minimize the spectral
Leakage as discussed
earlier. The leakage is
successfully minimized as
can be seen in the
windowed spectrum.
LAB TASKS
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 the input signal frequency is not an exact integer
multiple of the sampling frequency, resulting in spectral spreading and distortion in the
frequency domain representation. To determine the likelihood of DFT leakage:
1. Sampling Frequency (Fs): Ensure that the sampling frequency is sufficiently high
to accurately capture the input signal frequencies.
2. Input Signal Frequencies: If the input signal frequencies are integer multiples of
the fundamental frequency (Fs/N), where N is the number of samples, leakage is
less likely. Non-integer relationships may cause leakage.
3. Number of Samples (N): Choose an appropriate number of samples to capture the
signal adequately. More samples generally improve frequency resolution and reduce
leakage.
If the input frequencies do not align well with the sampling frequency and number of
samples, leakage is more probable. Applying window functions before the DFT can mitigate
leakage but at the cost of frequency resolution.
3. Hamming
4. Hann
5. Gaussian
First Side
Window Leakage Main Lobe Rate of side
S.no. Lobe
name Factor Width lobes falloff
Magnitude
1 Rectangular 9.14% 0.027344 -22.86713 -13.3
2 Triangular 0.28% 0.039063 -3.546566 -26.6
3 Hamming 0.03% 0.039063 -16.34576 -42.5
4 Hann 0.05% 0.042969 -1.529982 -31.5
5 Gaussian 0.01% 0.042969 -1.56708 -44
Hamming window:
Hanning window:
Blackman window:
Flat Top window:
Gaussian Window:
Conclusion: Various window functions were applied to the spectrum of given spectrum to
minimize leakages. Gaussian window has the minimum leakage factor for the given signal.
Remember the leakage factor of windows can vary with respect to the shape of given signal.
NED University of Engineering & Technology
Department of _____________________ Engineering
THEORY:
Filter Design and Analysis Tool (FDA Tool) is Graphic User Interface for designing and analyzing
filters. It is used to design FIR and IIR filters by entering the desired filter specifications, or by
importing filter from MATLAB workspace or by adding, moving or deleting poles and zeros. After
designing a filter, the response can be viewed and analyses in other Graphic User Interface tool
named Filter Visualization Tool (FV Tool) linked with FDA Tool. The different types of responses
that can be viewed are listed below:
• Magnitude response
• Phase response
• Group delay
• Phase delay
• Impulse response
• Step response
• Pole-zero plot
• Zero-phase plot
OPENING FDA TOOL WINDOW:
FDA Tool can be opened using command:
fdatool
Figure A
The different steps involved in designing a filter using FDA Tool can be listed as:
After providing the information listed above, filter can be designed and its response can be
viewed and analysed.
The complete description of the FDA Tool window and different steps required to design a filter
are elaborated below:
1. Selecting response type: The desired response type is selected from the list of available
options, i.e., lowpass, highpass, bandpass, bandstop, differentiation, multiband, peaking etc.
2. Type of design method: The design can be of FIR or IIR filter. Depending upon whether
FIR Or IIR filter design is selected, further options are available in the dropdown menu.
In IIR filter design, the different options available in dropdown menu are as given below:
• Butterworth
• Chebyshev type I
• Chebyshev type II
• Elliptic
• Maximally flat
• Least Pth-norm
• Const least Pth-norm
In FIR filter design the options available are listed as follows:
• Equirriple
• Least square
• Window
• Const least squares
• Complex equiripple
• Least Pth norm
• Constrained equiripple
• Generalized equiripple
• Constrained band equirriple
• Interpolated FIR
4. Filter specifications: Depending upon the response type and design method selected,
the graphical representation of generalized filter specifications appear in the display
region of FDA Tool. These specifications are ‘Frequency Specifications’ and
‘Magnitude Specification’.
These specifications are provided by the user, as per filter design requirement, in the
appropriate blocks.
5. Designing filter: After all the requisite information is entered, a filter can be designed by
clicking the ‘Design Filter’ button available at the bottom of the window. Filter |
coefficients are calculated and magnitude response appears in the display region.
(Note: ‘Design Filter’ button will be disabled once the filter coefficients are computed. This
button will be enabled again in case any changes are made in the filter specifications.)
lated as per the specifications provided by the user, the display region will show
magnitude response of the designed filter. The other filter response characteristics
can be viewed in the display region or FV Tool. The response to be viewed can be
selected from the different icons displayed on the toolbar shown in Figure below.
(NOTE: The different responses for display can also be selected from the
‘Analysis’ menu on menu bar.)
7. Current filter information: The information about the designed filter is given in
the ‘Current Filter Information’ region of FDA Tool window as shown
in Figure A The information provided is about the ‘structure’, ‘order’, ‘stability’ and
‘source’
• Storing a filter
The designed filter is stored by clicking ‘Store Filter’ button in the
‘Current Filter Information’ region.
• Filter manager
The ‘Filter Manager’ button opens up a new Filter Manager window
(Figure B) showing the list of filters stored. This window also has
options as: Edit current filter, Cascade, Rename, Remove and FV Tool.
The response characteristics can be viewed in a separate window by selecting the ‘Filter
Visualization Tool’ (FV Tool) from ‘view’ menu or clicking the ‘Full View Analysis’ button
on the toolbar. The FV Tool window is shown in Figure C
FV Tool has most of the menus on the menu bar and icons on the toolbar similar to that FDA
Tool with some additional icons which are mainly used to work with representation of the
responses.
Figure. FDA Tool Window Showing Specification Entered and Magnitude Response for Task-1.
The filter is designed for minimum order so as to reduce the complexity of the design.
In case, it has to be designed for user defined order, then the order of the filter has to be
calculated first by user using appropriate formulas or MATLAB function.
The other responses can be viewed by clicking on the appropriate icon on the toolbar and
responses obtained are shown in Figures below
Figure Magnitude Response in dB
Design a Type II Chebyshev IIR lowpass filter with the following specifications:
Passband frequency 1,200 Hz
Solution: FDA Tool Window showing given specifications duly entered and magnitude
response in response display region is shown in Figure.
2. To obtain the information about the filter ‘Filter Information’ icon on Toolbar of FDA
Tool Window is clicked or ‘Filter Information’ option is selected from ‘Analysis’ menu. The
detailed filter information appears in the display region as shown in Figure a, b and c.
Figure ‘Filter information’ for Task-2
The filter information is obtained by scrolling down the text in the window shown
in Figure 15.41b.
EXERCISE:
Record Your Voice at home while turn any motor of your house ON.
Design a filter using FDA Tool.
% Filter order
n = 16;
% Frequency response
[H, Freq] = freqz(b, a, 1024);
% Normalized frequencies
Wp = Fp / (Fsampling / 2);
Ws = Fs / (Fsampling / 2);
% Frequency response
[H, Freq] = freqz(b, a, 1024);
% Normalized frequencies
Wp = Fp / (Fsampling / 2);
Ws = Fs / (Fsampling / 2);
% Frequency response
[H, Freq] = freqz(b, a, 1024);
% Pole-Zero plot
subplot(2,2,4);
zplane(b, a);
title('Pole-Zero Plot');
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?
% Given specifications
passbands = [5000, 8000, 15000];
stopbands = [0, 11025];
sampling_rate = 44100;
Discussion:
The code generates a white noise input signal and filters it using the designed IIR filter. Listening to
the output signal, you may observe that the filter passes the frequencies in the specified passbands
(5000 Hz, 8000 Hz, and 15000 Hz) while attenuating frequencies in the stopbands (0 Hz and 11025
Hz). The sound should exhibit a tonal quality due to the filtered frequencies within the passbands.
Adjust filter parameters as needed for different characteristics.
Task-5: IIR filter designing by Pole-Zero placement method
Difference Equation:
y[n] = 0x[n] + 0x[n-1] - 1.2246e-16y[n-1] - -1y[n-2]
Discussion:
The task involves designing an IIR filter using the Pole-Zero placement method with specific
passband at pi/2 and stopbands at 0 and pi. The provided MATLAB code generates a 2nd order
Butterworth filter and includes plots for pole-zero diagram, frequency response (magnitude and
phase), impulse response, and filter coefficients. The difference equation is also displayed, offering
insights into the filter's temporal behavior.
NED University of Engineering & Technology
Department of _____________________ Engineering
Objective:
To convert an analog (voltage & current) signal into digital signal using ADC
(audio card) and display it on MATLAB Simulink environment.
Required Components:
1. Audio Card
2. Transformer (220V/12V)
3. Resistors (for VDR)
4. Veroboard
5. Audio jack
6. PC with MATLAB environment
Procedure:
Calculations:
Attachments:
• Project Block Diagram
• Real Project Image
• Image of current and voltage plot (with proper labelling)
Digital Signal Processing (EE-394)
Electrical Engineering Department
Deliverables:
1) A Prototype hardware that can read Analog signals (voltage & Current ) and can display it on any
digital environment.
Methodology:
1) Using Transformer convert 220VAC from mains into 12VAC.
2) Using VDR convert 12VAC to a voltage compatible to ADC (show all the calculations of resistances
with their power ratings).
3) Set the sampling frequency of the ADC.
4) Plot the acquired voltage waveform to Simulink or any digital environment.
5) Mention the safe operating range of your equipment.
Guidelines:
Figures, Tables, Block Diagrams etc. should be clear with necessary details.
1
NED University of Engineering & Technology
Department of Electrical Engineering
Procedural Skills Not able to either Able to slightly Able to Able to Able to fully
Displays skills to act upon learn or perform lab understand lab work somewhat moderately understand lab work
sequence of steps in lab work procedure. procedure and perform understand lab understand lab procedure and
work. lab work. work procedure work procedure perform lab work.
and perform lab and perform lab
work. work.
15% 0 15 30 45 60
Response Not able to imitate the Able to slightly imitate Able to Able to Able to fully imitate
Ability to imitate the lab lab work. the lab work. somewhat moderately the lab work.
work on his/her own. imitate the lab imitate the lab
work. work.
15% 0 15 30 45 60
Observation’s Use Not able to use lab Able to slightly use lab Able to Able to Able to fully use lab
Displays skills to perform work observations work observations into somewhat use moderately use work observations
related mathematical into mathematical mathematical lab work lab work into mathematical
calculations using the calculations. calculations. observations observations calculations.
observations from lab into into
work. mathematical mathematical
calculations. calculations.
15% 0 15 30 45 60
Safety Adherence Doesn’t adhere to Slightly adheres to Somewhat Moderately Fully adheres to
Adherence to safety safety procedures. safety procedures. adheres to safety adheres to safety safety procedures.
procedures. procedures. procedures.
10% 0 10 20 30 40
Equipment Handling Doesn’t handle Rarely handles Occasionally Often handles Handles equipment
Equipment care during the equipment with equipment with handles equipment with with required care.
use. required care. required care. equipment with required care.
required care
10% 0 10 20 30 40
Remarks
Objective:
To convert analog (Voltage and current) signal into digital signal using ADC
(audio card). Display it on MATLAB Simulink environment and perform
Spectral Analysis of the resulting current signal.
Required Components:
1. Audio Card
2. Current Sensor (current sensing resistor / hall effect sensor / CT)
3. Vero board
4. Audio jack
5. Harmonic producing Load (Electronic devices)
6. PC with MATLAB environment
Procedure:
➢ Using current sensor, convert the current flowing through load into an equivalent voltage.
➢ If required, using VDR to convert the voltage as obtained from current sensor to a voltage
compatible to audio card (show all the calculations of resistances with their power
ratings).
➢ Set the sampling frequency of the audio card ADC in MATLAB Simulink environment
with proper justification
➢ Plot the acquired current waveform to Simulink scope.
➢ Mention the safe operating range of your equipment.
➢ Plot the frequency spectrum of the obtained current and Voltage waveform. Use
windowing function to reduce DFT leakage if required.
➢ Also, plot the frequency spectrum of the line voltage as obtained in open ended lab 01.
Project Summary:
Project Specification:
Attachments:
• Project Block Diagram
• Real Project Image
• Image of current and voltage plot and Spectrum(with proper labelling)
Results:
Digital Signal Processing (EE-394)
Electrical Engineering Department
Deliverables:
1) A Prototype hardware that can read Analog signals (voltage & Current) and can perform spectral
analysis of the acquired signals
Methodology:
1) Plot the frequency spectrum of the obtained current and Voltage waveform.
Guidelines:
Figures, Tables, Block Diagrams etc. should be clear with necessary details.
1
NED University of Engineering & Technology
Department of Electrical Engineering
Procedural Skills Not able to either Able to slightly Able to Able to Able to fully
Displays skills to act upon learn or perform lab understand lab work somewhat moderately understand lab work
sequence of steps in lab work procedure. procedure and perform understand lab understand lab procedure and
work. lab work. work procedure work procedure perform lab work.
and perform lab and perform lab
work. work.
15% 0 15 30 45 60
Response Not able to imitate the Able to slightly imitate Able to Able to Able to fully imitate
Ability to imitate the lab lab work. the lab work. somewhat moderately the lab work.
work on his/her own. imitate the lab imitate the lab
work. work.
15% 0 15 30 45 60
Observation’s Use Not able to use lab Able to slightly use lab Able to Able to Able to fully use lab
Displays skills to perform work observations work observations into somewhat use moderately use work observations
related mathematical into mathematical mathematical lab work lab work into mathematical
calculations using the calculations. calculations. observations observations calculations.
observations from lab into into
work. mathematical mathematical
calculations. calculations.
15% 0 15 30 45 60
Safety Adherence Doesn’t adhere to Slightly adheres to Somewhat Moderately Fully adheres to
Adherence to safety safety procedures. safety procedures. adheres to safety adheres to safety safety procedures.
procedures. procedures. procedures.
10% 0 10 20 30 40
Equipment Handling Doesn’t handle Rarely handles Occasionally Often handles Handles equipment
Equipment care during the equipment with equipment with handles equipment with with required care.
use. required care. required care. equipment with required care.
required care
10% 0 10 20 30 40
Remarks