# Convolution of two rectangular pulses intuition

From what I understand the convolution of the impulse response of a system with the input to that system gives the output.

Now if the impulse response is a rectangular function and the input is also a rectangular function we get a triangular function as the output.

What I dont understand is: How could this ever be the case? As the rectangular function of the impulse response has only two levels as does the input. How can the system ever produce a value that is between these levels let alone a ramp of values between these levels.

It's obvious I am missing something but I cant quite put my finger on what that is.

• just because the output due to an impulse applied to the input takes only two levels, that does not mean that the output due to a rectangular pulse applied to the input takes on only two levels. – robert bristow-johnson Apr 5 '20 at 17:54
• Above is exactly where you're getting confused. The impulse response is the output given the input is a single impulse, but a rectangular function input is "like an infinite number of impulses" separated by dt time so if you think about it in this way (probably too loosely but hoping it gets a point across), then of course the output grows like ramp until the response due to the first impulses starts to die off (overlap becomes zero) like shown in @EdV's answer – Engineer Apr 5 '20 at 19:13
• You may find this trick amusing. – Rodrigo de Azevedo Apr 5 '20 at 19:25

A convolution integral is an overlap integral, i.e., for any given shift of the two aperiodic functions being convolved, the convolution integral is simply the overlap area. McGillem and Cooper [1, p. 58] defined the convolution integral of $$x_1$$ and $$x_2$$ as

$$\mathrm {x_3 =x_1*x_2 =\int_{-\infty}^{\infty}x_1(\lambda)x_2(t-\lambda)\,\mathrm d\lambda \tag{1}}$$

As a simple graphical illustration of the defining integral, they considered the following two rectangular pulses:

With $$x_1$$ and $$x_2$$ as shown in the above figure, their convolution is shown in the figure below:

This figure is redrawn from [1, p. 59]. The shaded areas are the overlap areas as a function of the shift, $$t$$, and the resulting convolution has a trapezoidal shape. If the rectangular pulses had had equal width, then the convolution would havec simplified to an isosceles triangular shape.

1 C.D. McGillem, G.R. Cooper, "Continuous and Discrete Signal and System Analysis", 2nd Ed., Holt, Rinehart and Winston, NY, ©1984, pp. 58-59.

If you understand that the input and output of an LTI (linear time-invariant) system are related by convolution, then you should also be able to understand that a rectangular input and a rectangular impulse response result in a triangular signal, if you know what convolution means, namely:

$$y(t)=\int_{-\infty}^{\infty}x(\tau)h(t-\tau)d\tau\tag{1}$$

where $$y(t)$$ is the output signal, $$x(t)$$ is the input signal, and $$h(t)$$ is the impulse response.

Assuming that $$x(t)$$ has a constant value $$A$$ in the interval $$t\in[0,T]$$ (and is zero otherwise), and $$h(t)$$ has a constant value $$B$$ in the same interval (and is zero otherwise), then $$(1)$$ becomes

$$y(t)=AB\int_{\max\{0,t-T\}}^{\min\{t,T\}}d\tau=\begin{cases}AB\int_0^td\tau=ABt,&0

• (+1) Elegant and concise, as usual! – Ed V Apr 5 '20 at 19:40
• Thx @EdV :) ${ }$ – Matt L. Apr 5 '20 at 19:42

A discrete time signal can have any finite amplitude. It doesn't have to be either 0 or 1. Ex: you could have a signal of value 2 or 3 or 100 at different points of discrete time