The Impulse Response and Convolution

Scope and Background Reading

This session is an introduction to the impulse response of a system and time convolution. Together, these can be used to determine a Linear Time Invariant (LTI) system's time response to any signal.

As we shall see, in the determination of a system's response to a signal input, time convolution involves integration by parts and is a tricky operation. But time convolution becomes multiplication in the Laplace Transform domain, and is much easier to apply.

Agenda

The material to be presented is:

First Hour

  • Even and Odd Functions of Time
  • Time Convolution

Second Hour

  • Graphical Evaluation of the Convolution Integral
  • System Response by Laplace

Even and Odd Functions of Time

(This should be revision!)

We need to be reminded of even and odd functions so that we can develop the idea of time convolution which is a means of determining the time response of any system for which we know its impulse response to any signal.

The development requires us to find out if the Dirac delta function ($\delta(t)$) is an even or an odd function of time.

Even Functions of Time

A function $f(t)$ is said to be an even function of time if the following relation holds

$$f(-t) = f(t)$$

that is, if we relace $t$ with $-t$ the function $f(t)$ does not change.

Polynomials with even exponents only, and with or without constants, are even functions. For example:

$$\cos t = 1 - \frac{t^2}{2!} + \frac{t^4}{4!} - \frac{t^6}{6!} + \ldots$$

is even.

Other Examples of Even Functions

Odd Functions of Time

A function $f(t)$ is said to be an odd function of time if the following relation holds

$$-f(-t) = f(t)$$

that is, if we relace $t$ with $-t$, we obtain the negative of the function $f(t)$.

Polynomials with odd exponents only, and no constants, are odd functions. For example:

$$\sin t = t - \frac{t^3}{3!} + \frac{t^5}{5!} - \frac{t^7}{7!} + \ldots$$

is odd.

Other Examples of Odd Functions

Observations

  • For odd functions $f(0) = 0$.
  • If $f(0) = 0$ we should not conclude that $f(t)$ is an odd function. c.f. $f(t) = t^2$ is even, not odd.
  • The product of two even or two odd functions is an even function.
  • The product of an even and an odd function, is an odd function.

In the following $f_e(t)$ will donate an even function and $f_o(t)$ an odd function.

Time integrals of even and odd functions

For an even function $f_e(t)$

$$\int_{-T}^{T}f_e(t) dt = 2 \int_{0}^{T}f_e(t) dt$$

For an odd function $f_o(t)$

$$\int_{-T}^{T}f_o(t) dt = 0$$

Even/Odd Representation of an Arbitrary Function

A function $f(t)$ that is neither even nor odd can be represented as an even function by use of:

$$f_e(t) = \frac{1}{2}\left[f(t)+f(-t)\right]$$

or as an odd function by use of:

$$f_o(t) = \frac{1}{2}\left[f(t)-f(-t)\right]$$

Adding these together, an abitrary signal can be represented as

$$f(t) = f_e(t) + f_o(t)$$

That is, any function of time can be expressed as the sum of an even and an odd function.

Example 1

Is the Dirac delta $\delta(t)$ an even or an odd function of time?

Time Convolution

Consider a system whose input is the Dirac delta ($\delta(t)$), and its output is the impulse response $h(t)$. We can represent the inpt-output relationship as a block diagram

In general

Add an arbitrary input

Let $u(t)$ be any input whose value at $t=\tau$ is $u(\tau)$, Then because of the sampling property of the delta function

(output is $u(\tau)h(t-\tau)$)

Integrate both sides

Integrating both sides over all values of $\tau$ ($-\infty < \tau < \infty$) and making use of the fact that the delta function is even, i.e.

$$\delta(t-\tau)=\delta(\tau-t)$$

we have:

Use the sifting property of delta

The second integral on the left side reduces to $u(t)$

The Convolution Integral

The integral

$${\int_{-\infty}^{\infty} u(\tau)h(t-\tau)d\tau}$$

or

$${\int_{-\infty}^{\infty} u(t-\tau)h(\tau)d\tau}$$

is known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input by using either of the integrals.

The convolution integral is usually written $u(t)*h(t)$ or $h(t)*u(t)$ where the asterisk ($*$) denotes convolution.

Graphical Evaluation of the Convolution Integral

The convolution integral is most conveniently evaluated by a graphical evaluation. The text book gives three examples (6.4-6.6) which we will demonstrate using a graphical visualization tool developed by Teja Muppirala of the Mathworks.

The tool: convolutiondemo.m (see license.txt).

In [2]:
convolutiondemo
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 398)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 449)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 500)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 551)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 621)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 672)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 723)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)
Warning: The EraseMode property is no longer supported and will error in a future release.
> In convolutiondemo>convolutiondemo_LayoutFcn (line 774)
  In convolutiondemo>gui_mainfcn (line 1188)
  In convolutiondemo (line 44)

Convolution by Graphical Method - Summary of Steps

For simplicity, we give the rules for $u(t)$, but the procedure is the same if we reflect and slide $h(t)$

  1. Substitute $u(t)$ with $u(\tau)$ – this is a simple change of variable. It doesn't change the definition of $u(t)$.
  2. Reflect $u(\tau)$ about the vertical axis to form $u(-\tau)$
  3. Slide $u(-\tau)$ to the right a distance $t$ to obtain $u(t-\tau)$
  4. Multiply the two signals to obtain the product $u(t-\tau)h(\tau)$
  5. Integrate the product over all $\tau$ from $-\infty$ to $\infty$.

Example 2

(This is example 6.4 in the textbook)

The signals $h(t)$ and $u(t)$ are shown below. Compute $h(t)*u(t)$ using the graphical technique.

Prepare for convolutiondemo

To prepare this problem for evaluation in the convolutiondemo tool, we need to determine the Laplace Transforms of $h(t)$ and $u(t)$.

convolutiondemo settings

  • Let g = (1 - exp(-s))/s
  • Let h = (s + exp(-s) - 1)/s^2
  • Set range $-2 < \tau < -2$

Summary of result

  1. For $t < 0$: $u(t-\tau)h(\tau) = 0$
  2. For $t = 0$: $u(t-\tau) = u(-\tau)$ and $u(-\tau)h(\tau) = 0$
  3. For $0 < t \le 1$: $h*u = \int_0^t (1)(-\tau + 1)d\tau = \left.\tau - \tau^2/2\right|_0^t = t-t^2/2$
  4. For $1 < t \le 2$: $h*u = \int_{t-1}^1(-\tau + 1)d\tau = \left.\tau - \tau^2/2\right|_{t-1}^{1} = t^2/2-2t+2$
  5. For $2 \le t$: $u(t-\tau)h(\tau) = 0$

Example 3

This is example 6.5 from the text book.

$$h(t) = e^{-t}$$

$$u(t) = u_0(t)-u_0(t-1)$$

Check with MATLAB

In [3]:
syms t tau
x1=int(exp(-tau),tau,0,t)
 
x1 =
 
1 - exp(-t)
 
In [4]:
x2=int(exp(-tau),tau,t-1,t)
 
x2 =
 
exp(-t)*(exp(1) - 1)
 

Example 4

This is example 6.6 from the text book.

$$h(t) = 2(u_0(t)-u_0(t-1))$$

$$u(t) = u_0(t)-u_0(t-2)$$

System Response by Laplace

In the discussion of Laplace, we stated that

$$\mathcal{L} \left\{ f(t)*g(t)\right\} = F(s)G(s)$$

We can use this property to make the solution of convolution problems even simpler.

Example 5

This is example 6.7 from the textbook.

For the circuit shown above, show that the transfer function of the circuit is:

$$ H(s) = \frac{V_c(s)}{V_s(s)} = \frac{1/RC}{s + 1/RC} $$

Hence determine the impulse respone $h(t)$ of the circuit and the response of the capacitor voltage when the input is the unit step function $u_0(t)$ and $v_c(0^-)=0$.

Assume $C=1\; \mathrm{F}$ and $R=1\;\Omega$.

Homework

Verify this result using the convolution integral

$$h(t)*u(t) = {\int_{-\infty}^{\infty} u(\tau)h(t-\tau)d\tau}$$