Azzera filtri
Azzera filtri

Circular conv of two discrete time signals in time domain without FFT

13 visualizzazioni (ultimi 30 giorni)
Hi ,
I was performing some signal processing algorithms and in between, i need to find circular convolution kind of thing because the final array is not actually exact circular convolution(it includes some modification in between). I know the way to find it by taking IFFT of FFT of the two signals and ,'circulent' function as well but unfortunately, that time i am unable to look what,s happening in the inside the function as i need to do some amendments in middle and pass some extra data to the logic in between .Can anyone suggest some way to find circuluar conv in manually so that i can see the in between steps and can make some amendments in the logic .

Risposta accettata

Harsh Kumar
Harsh Kumar il 14 Lug 2023
Hi Rohan ,
I understand that you are trying to implement the circular convolution programmatically in MATLAB and should be able to do modify the logic as well
To do that , you can use the linear convolution and implement a circular convolution from there manually using the theoretical definition of circular convolution.
Refer to the below code snippet for better understanding of the logic .
x1=[1 3 2 -1]; %assumption of x1
x2=[2 1 0 -1]; %assumption of x2
x3=conv(x1,x2); %convolution
stem(x3,'r','filled');
title('Linear Convolution of x_1 and x_2')
xlabel('n')
ylabel('x_3')
x1=[x1 0] ;%padded 0 to make length of sequence 5
x2=[x2 0]; %padded 0 to make length of sequence 5
x3=conv(x1,x2); %convolution of x1(n) and x2(n)
x4=zeros(1,5); %x4(n) of length 5
for i=1:length(x4)-1
x4(i)=x3(i) + x3(i+length(x4)); %x4(n) using linear convolution x3(n)
end
x4(end)=x3(length(x4));
stem(x4,'filled','g');
title('Circular convolution manually using Linear convolution');
xlabel('n');
ylabel('x_4')
Also refer to the below documentation for details .

Più risposte (1)

Menika
Menika il 13 Lug 2023
Hi,
You can refer to the attached file exchange link for performing circular convolution without using inbuilts :
Hope it helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by