Professional Documents
Culture Documents
Laboratory Manual
For
Title
3. Lab Exercises
1. Do not handle DSP Starter kit without reading the instructions/Instruction manuals.
2. Refer Matlab Help for debugging the program.
3. Go through Matlab Demos of Signal Processing tool box.
4. Strictly observe the instructions given by the teacher/Lab Instructor
.
1. Lab work completed during prior session ,should be corrected during the next lab session.
3. The promptness of submission should be encouraged by way of marking and evaluation patterns
that will benefit the sincere students.
Lab Exercises:
These are the basic discrete signals. Plot all the signals.
Lab Exercises:
% The input sequence is denoted by x(n) and impulse response h(n) are convoluted
%and the resultant signal is obtained .This technique illustrates how a filter can be
%implemented in time domain
%The convolution is given by
∞
%Y(k) = ∑ x(k) . h(n-k) for all k
n=-∞
∞
% Implement the equation on 4_ point (or variety) x(n) & h(n) and display y(n)
Algorithm:
Program:
%Illustration of convolution
x=input('type the input sequence');
h=input('type the impulse response');
y=conv(x,h);
m=length(y)-1;
n=0:1:m;
disp('output sequence');
disp(y);
stem(n,y)
xlabel('Time index');
ylabel('Amplitude');
%Another sample program for convolution where in time reference is also displayed.
%Illustration of convolution
nx=[-1:2];
x=input('type the input sequence');
nh=[1:4];
h=input('type the impulse response');
nyb=nx(1)+nh(1);
nye=nx(length(x))+nh(length(h));
ny=[nyb:nye];
y=conv(x,h);
disp(y);
stem(ny,y)
xlabel('Time index');
ylabel('Amplitude');
Result:
%The DTFT analysis equation. In this equation x[n] is time domain signal wit n running from0 to N-1.The
Algorithm:
To find frequency response of discrete time system using DTFT following steps has to be followed:
1.Compute the frequency sample of of the DTFT.
2.Define num and den co-efficient of DTFT
3. Find frequency response of DTFT.
4. Plot the DTFT.
Program:
Algorithm:
Program:
Algorithm:
To find the cross and Auto correlation following steps has to be followed:
1.Enter the length of sequence reference and second sequence
2.Define the length of sequence both
3. Plot the cross correlation for different inputs
4.follow the same steps foe auto correlation
Program:
Algorithm:
To find the solution of given transfer function following steps has to be followed
1. Enter the numerator and denominator of the sequence
2. Define the order of transfer function
3. Specify the method of calculating Z transform i.e. inverse z- transform method
4. Follow the same steps foe calculating z transform for other methods.
Program:
format long
n=input('type length of o/p vector =');
num=input('type num cooef=');
den=input('type den cooef=');
x=[1 zeros(1,n-1)]
y=filter(num,den,x);
disp('coeff of pse =');
disp(y);
Lab Exercises:
Algorithm:
To find probability density function following steps has to be followed:
Program:
Algorithm:
To find the sinusoidal amplitude modulation following steps has to be followed:
Program:
close all;
clc;
t=0:0.01:10;
f=0.01;
a=cos(2*pi*f*t);
subplot(3,1,1);
plot(t,a);
xlabel('time-->');
ylabel('amplitude-->');
title('modulating Waveform');
f=0.1;
b=sin(2*pi*f*t);
subplot(3,1,2);
plot(t,b);
xlabel('time-->');
ylabel('amplitude-->');
title('sine-wave carrier Waveform');
c=a.*b;
subplot(3,1,3);
plot(t,c);
xlabel('time-->');
ylabel('amplitude-->');
title('modulated Waveform')
4. Quiz on the subject:
a] Energy
b] Digital
c] Periodic
a] Dynamic
b] Recursive
c] Stable
a] Causual
b] Recursive
c] dynamic
4) If the signal is infinite duration and both sided then its ROC is
a] an annular ring
b] entire z plane except z=0
c] entire z plane except z=∞