DSPRelated.com
Forums

How to perform Convolution in excel?

Started by sulphox December 19, 2005
Hi all,

As the subject suggest, I would like to know if anyone know how to
perform convolution in excel?

In excel only have the Fourier analysis, but no convolution Function.

Thanks in advance.

Sulphox

sulphox wrote:
> Hi all, > > As the subject suggest, I would like to know if anyone know how to > perform convolution in excel? > > In excel only have the Fourier analysis, but no convolution Function.
You can use the convolution theorem: conv(x,y) = ifft(fft(zeropad(x,length(x)+length(y)-1)) * fft(zeropad(y,length(x)+length(y)-1))) where * denotes the point-wise multiplication of complex vectors.
<abariska@student.ethz.ch> wrote in message 
news:1134990975.314279.326830@f14g2000cwb.googlegroups.com...
> sulphox wrote: >> Hi all, >> >> As the subject suggest, I would like to know if anyone know how to >> perform convolution in excel? >> >> In excel only have the Fourier analysis, but no convolution Function. > > You can use the convolution theorem: > > conv(x,y) = ifft(fft(zeropad(x,length(x)+length(y)-1)) * > fft(zeropad(y,length(x)+length(y)-1))) > > where * denotes the point-wise multiplication of complex vectors.
I didn't know that Excel had "zeropad" or "length" ..... ?? In Excel: "Signal1" in column A "Filter" or reversed "Signal2" in column B Column C filled with SUMPRODUCT($nonzero range of cells in Column A ($ for unchanging), running range of cells in Column B of same length as range in Column A) Example: The fixed-length function is in Column D The longer function is in Column C. The convolution is in Column E. E51=SUMPRODUCT(D$4:D$54,C1:C51) where the shortest array "D" is of length 51 and "C" can be of any length. C starts with 51 zeros so the leading transient can be computed. Not fancy but it works. Fred
Hi,

Do you mean that convolution is the multiplication of 2 complex
number?
let's say if i have S(f) which is FFT of s(n), 
also i have Y(f) which is the FFT of y(t).

Do you mean the convolution of S(f) and Y(f) is the Product of the
Multiplication of S(f) and Y(f)?

Sulphox

sulphox wrote:
> Hi, > > Do you mean that convolution is the multiplication of 2 complex > number? > let's say if i have S(f) which is FFT of s(n), > also i have Y(f) which is the FFT of y(t). > > Do you mean the convolution of S(f) and Y(f) is the Product of the > Multiplication of S(f) and Y(f)?
Almost. The convolution of s(n) with y(t) is the inverse FT of the (point-wise) product of S(f) with Y(f)!
abariska@student.ethz.ch wrote:
> Almost. The convolution of s(n) with y(t) is the inverse FT of the > (point-wise) product of S(f) with Y(f)!
With appropriate zeropadding (otherise, this describes circular convolution).