LINEAR CONVOLUTION OF TWO FINITE LENGTH SEQUENCES USING DFT AND IDFT
#1

Procedure:-
1) Find the length of the first sequence x[n]=x_length
2) Find the length of the second sequence h[n]=h_length
3) Estimate the number of samples in the result of linear convolution of x[n] &h[n]=Y_length
4) If X_length <Y_length , pad enough number of zeros to x[n], so that the number of samples in the modified x[n]=Y_length
5) If h_length <Y_length ,pad enough number of zeros to h[n], so that the number of samples in the modified h[n]=Y_length
6) Take DFT for modified x[n]=x(k)
7) Take DFT for modified h[n]=H(k)
8) Compute Y(K)=X(K)*H(K)
9) Compute y(n)=IDFT(Y(k))
10) Verify if y[n]=conv(x,h)

MATLAB program for linear convolution using DFT and IDFT

Code:
clear
clc
close all
% FIRST SEQUENCE X1
x1 = [1 1 1 1];
nx1 = 0:length(x1)-1;
n1 = length(x1);
subplot(3,1,1);
stem(nx1,x1);
xlabel('n-->');
ylabel('x1-->');
title('First Sequence');
grid on;
% SECOND SEQUENCE X2
x2 = [1 1 1 1];
nx2 = 0:length(x2)-1;
n2 = length(x2);
subplot(3,1,2);
stem(nx2,x2);
xlabel('n-->');
ylabel('x2-->');
title('Second Sequence');
grid on;

N = n1+n2-1;
% IF N > length(x1) or length(x2) ZERO PAD
newx1 = [x1,zeros(1,N-n1)];
newx2 = [x2,zeros(1,N-n2)];

% TAKE DFT OF FIRST SEQUENCE
x1dft = fft(newx1);
% TAKE DFT OF SECOND SEQUENCE
x2dft = fft(newx2);

% MULTIPLY THE TWO DFTS
ydft = x1dft .* x2dft

% TAKE IDFT OF THE PRODUCT OF TWO DFTS
disp('Response obtained by DFTs')
y = ifft(ydft)
n = 0:length(y)-1;
subplot(3,1,3);
stem(n,y);
xlabel('n-->');
ylabel('x2-->');
title('Linearly convoluted Sequence');
grid on;

% VERIFICATION WITH DIRECT CONVOLUTION
disp('Response obtained by DFTs')
Ydirect = conv(x1,x2)

RESULT:- LINEAR CONVOLUTION USING DFT AND IDFT
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: plotting circular convolution, circular convolution dft matlab, linear convolution using dft and idft theory, two sequences to be convolved, matlab program for circular convolution using dft and idft, convolution calculator online, signals convolution mini projects,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  CIRCULAR CONVOLUTION OF TWO SEQUENCES seminar class 1 4,770 21-11-2012, 12:18 PM
Last Post: seminar details
  CIRCULAR CONVOLUTION OF TWO FINITE LENGTH SEQUENCES USING DFT AND IDFT seminar class 1 9,458 21-11-2012, 12:18 PM
Last Post: seminar details
  To perform multiple sequence alignment between the given sequences using Clustalw2 to smart paper boy 0 1,393 10-08-2011, 02:44 PM
Last Post: smart paper boy
  To perform global alignment between the given sequences using EMBOSS tool. smart paper boy 0 1,352 10-08-2011, 02:43 PM
Last Post: smart paper boy
  To perform local alignment between the given sequences using EMBOSS tool. smart paper boy 0 1,286 10-08-2011, 02:41 PM
Last Post: smart paper boy
  Program to Encrypt and decrypt a text data using RSA algorithm smart paper boy 0 2,534 10-08-2011, 11:43 AM
Last Post: smart paper boy
  To create a Java Bean to draw various graphical shapes and display it using smart paper boy 0 1,968 21-07-2011, 09:40 AM
Last Post: smart paper boy
  Study the working of half adder for two binary digits addition seminar class 0 2,130 13-05-2011, 04:45 PM
Last Post: seminar class
  Study the working of RS flip-flop using NAND gates and NOR gates and compare them seminar class 0 5,126 13-05-2011, 04:36 PM
Last Post: seminar class
  Study working of Ex-OR gate using basic gates and testing of IC 7486 seminar class 0 2,179 13-05-2011, 04:13 PM
Last Post: seminar class

Forum Jump: