2

I want to convolve two triangles. The equation satisfied by one triangle is

$$f(y) = \begin{cases} y + 1 & −1 < y < 0\\ \\ 1 − y & 0 \leq y < 1 \end{cases}.$$

So, the overall duration of a triangle is $\;-1\;$ to $\;1$.

What I have found is that the convolution of a triangle with itself is a $\operatorname{sinc}$ function but does one obtain this $\operatorname{sinc}$ from the above equation?

Secondly, what should be the limits of integral for calculating convolution?

amWhy
  • 209,954
Xara
  • 313
  • 1
    It might be worthwhile asking the moderators to migrate this question to dsp.SE. With regard to your question about the limits on the integral for calculating convolutions, there is not a single integral that you have to compute, but different integrals depending on your choice for the argument of the function that is the result of the convolution. For a detailed exposition of how to go about convolving two signals, see my answer to a similar question on dsp.SE – Dilip Sarwate Dec 22 '12 at 15:28

2 Answers2

7

We have to compute $$g(x):=\int_{-\infty}^\infty f(x-t)\ f(t)\ dt=\int_{-1}^0 f(x-t)\ (1+t)\ dt + \int_0^1 f(x-t)\ (1-t)\ dt$$ for given $x\in{\mathbb R}$. Because of the nonanalytic way the function $f$ is defined this is a tedious matter. It's pretty obvious that $g(-x)=g(x)$, and that $g(x)=0$ when $x>2$.

Let an $x\in{\mathbb R}$ be fixed. Then $$f(x-t)=\cases{ 0&$(t<x-1)$\cr 1-x+t\quad &$(x-1\leq t\leq x)$\cr 1+x-t&$(x\leq t\leq x+1)$\cr 0&$(t>x+1)$\cr}\quad.$$

We distinguish the cases (i): $\ 0< x< 1$, and (ii): $\ 1< x<2$. (The cases $x\in\{0,1,2\}$ will follow by continuity of $g$.)

In case (i) we have $-1<x-1<0<x<1$ and therefore $$g(x)=\int_{x-1}^0 (1-x+t)(1+t)\ dt +\int_0^x (1-x+t)(1-t)\ dt +\int_x^1 (1+x-t)(1-t)\ dt\ ,$$ which Mathematica computes to $$g(x)={2\over3}-x^2+{x^3\over2}\ .$$ In case (ii) we have $0<x-1<1<x$. Therefore the integral $\int_{-1}^0\ldots$ vanishes, and we are left with $$g(x)=\int_{x-1}^1 (1-x+t)(1-t)\ dt={4\over3}-2x+x^2-{x^3\over6}\ .$$

3

Use the formula of convolution from here http://en.wikipedia.org/wiki/Convolution the limits of your integral will be from $-2$ to $2$. For bounded signals in some interval $[a,b]$, the result of the convolution will double the range from $b-a$ to $2(b-a)$.

Your range is $1-(-1)=2$, and you can expect to double it to $2*2=4$ and how is it related to defining the limits of the integral?

The resul of the convolution is not a $sinc$ function. $sinc$ function is not positive everywhere but the result of a convolution of two non-negative functions is always non-negative everywhere.

  • Okay thanks between I am also not getting it how to convolve this specific function because it has different ranges for y. – Xara Dec 22 '12 at 14:08
  • This is just a single function. You will convolve it with itself. This means the range will be between $-1$ and $1$ in both cases. – Seyhmus Güngören Dec 22 '12 at 14:32
  • But when I will be integrating then what will i write y+1 or y-1 inside the integral? – Xara Dec 22 '12 at 14:42
  • 1
    you will not write a single function in the integral. Your function says that the function is $y+1$, if $-1<y<0$ and $1-y$ if $0<y<1$. Depending on the limits you must use either of them. Suggestion: try to plot the function on a paper. – Seyhmus Güngören Dec 22 '12 at 15:19