Professional Documents
Culture Documents
TECH I SEM
0.8 0.8
0.6 0.6
amplitude
amplitude
0.4 0.4
0.2 0.2
0 0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
time n
0.8 0.8
0.6 0.6
amplitude
amplitude
0.4 0.4
0.2 0.2
0 0
-2 0 2 4 6 8 10 -2 0 2 4 6 8 10
time n
1 1
amplitude
amplitude
0 0
-1 -1
-2 -2
0 0.05 0.1 0 0.05 0.1
time n
sawtooth wave signal 439 sawtooth wave sequence 439
2 2 square wave sequence 439
1 1
amplitude
amplitude
0 0
-1 -1
-2 -2
0 0.05 0.1 0 0.05 0.1
time n
1 1
amplitude
amplitude
0 0
-1 -1
-2 -2
0 0.05 0.1 0 0.05 0.1
time n
sinsoidal wave signal 439 sin wave sequence 439
2 2
1 1
amplitude
amplitude
0 0
-1 -1
-2 -2
0 0.05 0.1 0 0.05 0.1
time n
0.5 0.5
amplitude
0 0
-0.5 -0.5
-5 0 5 0 50 100
time n
exponential signal 439 exponential sequence 439
800 800
600 600
amplitude
400 400
200 200
0 0
-10 0 10 20 -10 0 10 20
time n
Sine W aves
2
30 Hz
60 Hz
Sum
1.5
0.5
Signal
-0.5
-1
-1.5
-2
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time
1.5
0.5
0
0 20 40 60 80 100 120
0
0 20 40 60 80 100 120
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
impulse response 439
10
h(n)
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
linear convoluted response 439
100
y(n)
50
0
0 1 2 3 4 5 6 7 8
n
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
second sequence after zero padding 439
10
y(n)
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
circular convoluted result 439
100
y(n)
50
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
k = 8 26 52 75 100
RESULT:- Thus the program for circular convolution is written using MATLAB and verified.
sequence 1 439
10
amplitude
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
sequence 2 439
6
amplitude
0
0 0.5 1 1.5 2 2.5 3 3.5 4
n
cross correlated result 439
150
amplitude
100
50
0
-4 -3 -2 -1 0 1 2 3 4
lag index
Cross correlation of x(n) and delayed x(n) 439
20
10
-10
-8 -6 -4 -2 0 2 4 6 8
DSP LAB III B.TECH I SEM
1.0000 + 0.4142i 0
1.0000 + 2.4142i
3.5
0.5
2.5
Magnitude of X(k)
Phase of X(k)
2 0
1.5
-0.5
-1
0.5
0 -1.5
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Length Length
n=[0:1:N-1];
k=[0:1:N-1];
nk=n'*k;
WNnk=WN.^nk;
Xk=x*WNnk;
disp(Xk);
figure(1);
subplot(2,1,1);
plot(k,MagX);
subplot(2,1,2);
plot(k,PhaseX)
OUTPUT
Enter the the value of N(Value of N in N-Point DFT)8
Enter the sequence for which DFT is to be calculated[1 1 1 1 0 0 0 0]
Columns 1 through 5
4.0000 1.0000 - 2.4142i -0.0000 - 0.0000i 1.0000 - 0.4142i 0 - 0.0000i
Columns 6 through 8
1.0000 + 0.4142i 0.0000 - 0.0000i 1.0000 + 2.4142i
3.5
2.5
1.5
0.5
0
0 1 2 3 4 5 6 7
50
-50
-100
-150
0 1 2 3 4 5 6 7
RESULT: The DFT of given sequence is obtained. Hence the theory and practical value
are proved
0.8
Amplitude
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7
Time Index n
3
magnitude
0
0 1 2 3 4 5 6 7
Frequency Index K
1
Convolution
-1
-2
0 1 2 3 4 5 6 7
Frequency Index K
Amplitude
2
0
0 1 2 3 4 5 6 7
Time Index n
2
magnitude
1.5
0.5
0
0 1 2 3 4 5 6 7
Frequency Index K
2
Phase
-2
-4
0 1 2 3 4 5 6 7
Frequency Index K
subplot(1,2,2);
plot(abs(h));
xlabel('frequency');
ylabel('amplitude');
title('high pass chebyshev filter response')
Output :
439 439
RESULT : Design and implementation of iir chebyshev (lp/hp) filter using matlab is verified.
VIVA QUESTION:
HPF 439
0
-5
-10
Gain in dB-->
-15
-20
-25
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
(b) Normalized frequency-->
subplot(2,2,4);
plot(o/pi,m,'r');
title('band stop filter');
OUTPUT :
439 439
439 439
439 439
439 439
ylabel('Gain in dB-->');
subplot(2,1,2);plot(om/pi,an);
ylabel('Phase in radians-->');
OUTPUT :--
enter the IIR filter design specifications
439
439
Enter Down Sampling Factor:3
Enter Number of Samples:100
1
Amplitude
-1
-2
0 10 20 30 40 50 60 70 80 90 100
Time Index n
Output Sequence 439
2
1
Amplitude
-1
-2
0 5 10 15 20 25 30 35
Time Index n
PROGRAM: Interpolation
clc;
clear all;
close all;
L=input('Up Sampling Factor:');
N=input('Enter Number of Samples:');
n=0:N-1;
x=sin(2*pi*0.043*n)+sin(2*pi*0.031*n);
y=interp(x,L);
subplot(2,1,1);
stem(n,x(1:N));
title('Input Sequence');
xlabel('Time Index n');
ylabel('Amplitude');
subplot(2,1,2);
m=0:(N*L)-1;
stem(m,y(1:N*L));
title('Output Sequence');
xlabel('Time Index n');
ylabel('Amplitude');
OUTPUT :
Up Sampling Factor:3
Enter Number of Samples:100
Input Sequence 439
2
Amplitude 1
-1
-2
0 10 20 30 40 50 60 70 80 90 100
Time Index n
Output Sequence 439
2
1
Amplitude
-1
-2
0 50 100 150 200 250 300
Time Index n