DSP LAB [BEC502]
VISION
To become a distinguished department by imparting quality technical education, innovation
and research to cater technological resources for industry and societal growth.
MISSION
Nurture excellence in the field of Electronics and Communication Engineering to meet the
needs of the industry.
Facilitate students by promoting multidisciplinary skill development, type certification
courses suitable for industry, innovation and research.
Foster overall personality of the students and faculties by providing behavioural, professional
attitude and ethical values through state of art in Science and Technology.
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 1
DSP LAB [BEC502]
Program Outcomes (POs)
At the end of the B.E program, students are expected to have developed the following
outcomes.
PO1 Engineering Apply the knowledge of mathematics, science, engineering
Knowledge fundamentals, and an engineering specialization to the solution of
complex engineering problems.
PO2 Problem analysis Identify, formulate, research literature, and analyze complex
engineering problems reaching substantiated conclusions using first
principles of mathematics, natural sciences, and engineering
sciences.
PO3 Design/ Design solutions for complex engineering problems and design
development of system components or processes that meet the specified needs with
solutions appropriate consideration for the public health and safety, and the
cultural, societal, and environmental considerations.
PO4 Conduct Use research-based knowledge and research methods including
investigations of design of experiments, analysis and interpretation of data, and
complex synthesis of the information to provide valid conclusions.
problems
PO5 Modern Tool Create, select, and apply appropriate techniques, resources, and
Usage modern engineering and IT tools including prediction and modelling
to complex engineering activities with an understanding of the
limitations.
PO6 The Engineer Apply reasoning informed by the contextual knowledge to assess
and Society societal, health, safety, legal, and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
PO7 Environment Understand the impact of the professional engineering solutions in
and societal and environmental contexts, and demonstrate the
Sustainability knowledge of need for sustainable development.
PO8 Ethics Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
PO9 Individual and Function effectively as an individual, and as a member or leader in
Team Work diverse teams, and in multidisciplinary settings.
PO10 Communication Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being
able to comprehend and write effective reports and design
documentation, make effective presentations, and give and receive
clear instructions.
PO11 Project Demonstrate knowledge and understanding of the engineering and
Management management principles and apply these to one‘s own work, as a
and Finance member and leader in a team, to manage projects and in
multidisciplinary environments
PO12 Life-long Recognize the need for, and have the preparation and ability to
learning engage in independent and life-long learning in the broadest context
of technological change
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 2
DSP LAB [BEC502]
Do’s:
1. Students must bring observation/Manual book along with pen, pencil and eraser etc.
2. Students must handle the hardware kit and other components carefully as they are expensive
3. Before entering to lab, must prepare for viva for which they are going to conduct experiment.
4. Before switching on the hardware kit, the connections must be shown to one of the lab’s in-
charge faculty members or instructors.
5. After the completion of the experiment should return the components to the lab instructors.
6. Strictly follow the procedures for conduction of experiments.
7. Any breakdown/failure of equipment must be reported to the technical staff immediately.
8. Uniform and ID card are must.
9. Maintain silence inside the laboratory
10.Keep your belongings in designated area.
11.Wear shock–proof footwear while entering into the circuit lab
12.Chairs and stools should be kept under the workbenches when not in use.
13.Sit upright on chairs or stools, keeping feet on the floor.
14.Every student should know the location and operating procedures of all Safety equipment
including First Aid Kit and Fire extinguisher.
DONT’S:
1. Don’t eat food, drink beverages or chew gum in the laboratory.
2. Don’t touch any live terminals.
3. Don’t spread unwanted connecting wires on the table.
4. Don’t play with the instruments laid on work bench.
5. Don’t transfer equipment to other workbench or other labs without permission.
6. Don’t change connection when supply is on.
7. Don’t leave the experiment table unattended when the experimental setup supply is on.
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 3
DSP LAB [BEC502]
LAB RUBRICS FOR 25 MARKS
Sl. DESCRIPTION MARKS SCALED
No. MARKS
1. CONTINUOUS EVALUATION 35
Observation write-up & punctuality 5
Conduction of experiment and output 15 15
Viva voce 5
Record write-up 10
2. INTERNAL TEST 50 10
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 4
DSP LAB [BEC502]
Table of Contents
Bloom’s
SL PAGE Taxonomy
EXPERIMENTS
NO. NO. (RBT)
Levels
Program to generate the following discrete time signals. a) Unit sample L2, L3, L4
1 sequence, b) Unit step sequence, c) Exponential sequence, d) Sinusoidal
sequence, e) Random sequence
Program to perform the following operations on signals. a) Signal L2, L3, L4
2
addition, b) Signal multiplication, c) Scaling, d) Shifting, e) Folding
Program to perform convolution of two given sequences (without using L2, L3, L4
3
built-in function) and display the signals.
and sketch its pole zero plot. b) Plot |H(ejω)| and ∠ H(ejω) c)
Consider a causal system y(n) = 0.9y(n-1)+x(n). a) Determine H(z) L2, L3, L4
4
Determine the impulse response h(n).
Computation of N point DFT of a given sequence (without using built-in L2, L3, L4
5
function) and to plot the magnitude and phase spectrum.
Using the DFT and IDFT, compute the following for any two given L2, L3, L4
6
sequences a) Circular convolution b) Linear convolution
Verification of Linearity property, circular time shift property & circular L2, L3, L4
7
frequency shift property of DFT.
Develop decimation in time radix-2 FFT algorithm without using L2, L3, L4
8
built-in functions
Design and implementation of digital low pass FIR filter using a window L2, L3, L4
9
to meet the given specifications
Design and implementation of digital high pass FIR filter using a L2, L3, L4
10
window to meet the given specifications
Design and implementation of digital IIR Butterworth low pass filter to L2, L3, L4
11
meet the given specifications.
Design and implementation of digital IIR Butterworth high pass filter to L2, L3, L4
12
meet the given specifications
Additional Programs
13
14
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 5
DSP LAB [BEC502]
EXPERIMENT 1
Aim: Program to generate the following discrete time signals. a) Unit sample sequence, b)
Unit step sequence, c) Exponential sequence, d) Sinusoidal sequence, e) Random
sequence.
Theory:
Signal is a time varying physical phenomenon which is intended to convey
information. Signal is a function of one or more independent variables, which contain
some information.
Example: voice signal, video signal, signals on telephone wires etc.
System is a device or combination of devices, which can operate on signals and
produces corresponding response. Input to a system is called as excitation and output
from it is called as response. For one or more inputs, the system can have one or more
outputs.
a) Unit sample sequence
% Parameters
n = -10:10; % Range of n
x = zeros(size(n)); % Initialize sequence
% Unit Sample Sequence
x(n == 0) = 1;
% Plot
stem(n, x);
title('Unit Sample Sequence');
xlabel('n');
ylabel('x[n]');
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 6
DSP LAB [BEC502]
b) Unit step sequence
% Parameters
n = -10:10; % Range of n
x = double(n >= 0); % Unit Step Sequence
% Plot
stem(n, x);
title('Unit Step Sequence');
xlabel('n');
ylabel('x[n]');
c) Exponential sequence
% Parameters
n = -10:10; % Range of n
a = 0.9; % Base of the exponential
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 7
DSP LAB [BEC502]
x = a.^n; % Exponential Sequence
% Plot
stem(n, x);
title('Exponential Sequence');
xlabel('n');
ylabel('x[n]');
d) Sinusoidal sequence
% Parameters
n = -10:10; % Range of n
omega = pi/4; % Angular Frequency
x = sin(omega * n); % Sinusoidal Sequence
% Plot
stem(n, x);
title('Sinusoidal Sequence');
xlabel('n');
ylabel('x[n]');
e) Random sequence
% Parameters
n = -10:10; % Range of n
x = rand(size(n)); % Random Sequence
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 8
DSP LAB [BEC502]
% Plot
stem(n, x);
title('Random Sequence');
xlabel('n');
ylabel('x[n]');
EXPERIMENT 2
Aim: Program to perform the following operations on signals. a) Signal addition, b) Signal
multiplication, c) Scaling, d) Shifting, e) Folding
Theory:
Addition:
Let x1[n] and x2[n] denote a pair of discrete time signals. The signal y[n] obtained by the addition
of x1[n] + x2[n] is defined as
y(n) = x1[n] + x2[n]
Example: audio mixer
Multiplication:
Let x1[n] and x2[n] denote a pair of discrete-time signals. The signal y[n] resulting from the
multiplication of the x1(n) and x2[n] is defined by
y[n] =x 1 [n].x 2 [n]
Time Scaling:
Let y(t) is a compressed version of x(t) The signal y(t) obtained by scaling the independent
variable, time t, by a factor k is defined by
y(t) = x(kt)
if k > 1 the signal y(t) is a compressed version of x(t)
if, on the other hand, 0 < k < 1 the signal y(t) is an expanded (stretched) version of x(t)
Time Shift:
A signal may be shifted in time by replacing the independent variable n by n-k, where k is
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 9
DSP LAB [BEC502]
an integer. If k is a positive integer, the time shift results in a delay of the signal by k units of time.
If k is a negative integer, the time shift results in an advance of the signal by |k| units in time.
a) Signal addition
// Addition of Signals
clc ;
clear ;
n1=[2 3 5 6 7];
n2=[3 4 -5 -6 4];
n3=n1+n2;
disp('Addition output:');
disp(n3);
% MATLAB program for signal addition
% Define time axis
t = -5:0.01:5;
% Define two example signals (you can modify these signals as needed)
signal1 = sin(t); % Sine wave signal
signal2 = cos(t); % Step signal
% Perform signal addition
added_signal = signal1 + signal2;
% Plot the signals
figure;
% Plot Signal 1
subplot(3, 1, 1);
plot(t, signal1);
title('Signal 1 (Sine Wave)');
xlabel('Time');
ylabel('Amplitude');
grid on;
% Plot Signal 2
subplot(3, 1, 2);
plot(t, signal2);
title('Signal 2 (Cosine Wave)');
xlabel('Time');
ylabel('Amplitude');
grid on;
% Plot Added Signal
subplot(3, 1, 3);
plot(t, added_signal, 'r');
title('Added Signal (Signal 1 + Signal 2)');
xlabel('Time');
ylabel('Amplitude');
grid on;
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 10
DSP LAB [BEC502]
b) Signal multiplication
// Multiplication of Signals
clc;
clear;
n1=[2 3 5 6 7];
n2=[3 4 -5 -6 4];
n3=n1.*n2;
disp('Multiplication output');
disp(n3);
% MATLAB program for signal multiplication
% Define the time axis
t = -5:0.01:5; % Time from -5 to 5 with a step of 0.01
% Define two signals (modify as needed)
signal1 = sin(t); % Signal 1: Sine wave
signal2 = cos(t); % Signal 2: Cosine wave
% Perform signal multiplication
multiplied_signal = signal1 .* signal2; % Element-wise multiplication
% Plot the signals and their multiplication
figure;
% Plot Signal 1
subplot(3, 1, 1);
plot(t, signal1);
title('Signal 1: Sine Wave');
xlabel('Time');
ylabel('Amplitude');
grid on;
% Plot Signal 2
subplot(3, 1, 2);
plot(t, signal2);
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 11
DSP LAB [BEC502]
title('Signal 2: Cosine Wave');
xlabel('Time');
ylabel('Amplitude');
grid on;
% Plot the Multiplied Signal
subplot(3, 1, 3);
plot(t, multiplied_signal, 'r');
title('Multiplied Signal: Signal 1 * Signal 2');
xlabel('Time');
ylabel('Amplitude');
grid on;
c) Scaling
% Define signal
n = 0:10;
x = sin(n);
% Scaling factor
k = 2;
% Scale the signal
x_scaled = k * x;
% Plot results
figure;
subplot(2,1,1);
stem(n, x);
title('Original Signal x[n]');
xlabel('n');
ylabel('x[n]');
subplot(2,1,2);
stem(n, x_scaled);
title('Scaled Signal k * x[n]');
xlabel('n');
ylabel('k * x[n]');
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 12
DSP LAB [BEC502]
d) Shifting
% Define signal
n = 0:10;
x = sin(n);
% Shifting
shift_amount = 3; % Number of samples to shift
n_shifted = n + shift_amount;
% Plot results
figure;
subplot(2,1,1);
stem(n, x);
title('Original Signal x[n]');
xlabel('n');
ylabel('x[n]');
subplot(2,1,2);
stem(n_shifted, x);
title('Shifted Signal x[n-shift_amount]');
xlabel('n');
ylabel('x[n - shift_amount]');
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 13
DSP LAB [BEC502]
e) Folding
% Define signal
n = 0:10;
x = sin(n);
% Folding (time-reversal)
n_folded = -n; % Reverse the time axis
x_folded = fliplr(x); % Reverse the signal values
% Plot results
figure;
subplot(2,1,1);
stem(n, x);
title('Original Signal x[n]');
xlabel('n');
ylabel('x[n]');
subplot(2,1,2);
stem(n_folded, x_folded);
title('Folded Signal x[-n]');
xlabel('n');
ylabel('x[-n]');
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 14
DSP LAB [BEC502]
EXPERIMENT 3
Aim: Program to perform convolution of two given sequences (without using built-in function) and
display the signals
Theory:s
The convolution sum is a fundamental concept in signal processing and systems analysis,
particularly for discrete-time signals. It is used to determine the output of a Linear Time-Invariant
(LTI) system when the input and the system's impulse response are known.
1. Convolution Sum Definition
For two discrete-time signals, x[n] (input signal) and h[n] (impulse response of the system), the
convolution sum is given by:
Where:
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 15
DSP LAB [BEC502]
y[n] is the output signal.
x[k] the input signal.
h[n−k] is the shifted and flipped impulse response.
a) Using Conv function
clc;
x=input ('enter the input sequence');
h=input ('enter the impulse response');
y=conv(x,h);
disp ('the value of y are=')
disp(y)
n=0: length(y)-1;
stem (n,y)
xlabel('time');
ylabel('amplitude');
title ('linear convolution');
b) Without using conv function
clc;
clear; x=[1 2 3 4];
h=[1 2 3 4];
m=length(x);
n=length(h);
X=[x,zeros(1,n)];
H=[h,zeros(1,m)];
for i=1:n+m-1
Y(i)=0;
for j=1:m
if(i-j+1>0)
Y(i)=Y(i)+X(j)*H(i-j+1);
else
end
end
end
disp(Y)
OUTPUT:
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 16
DSP LAB [BEC502]
Faculty In-charge: Mamatha Mallesh, Dept. of ECE, VKIT 17