Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 39 ยท Laplace Transforms

Step Functions, Impulses and Convolution

Handle discontinuous and impulsive forcing with the Heaviside step, Dirac delta and convolution theorem; derive the impulse response and Green's function with Python checks.

Real inputs are rarely smooth sine waves. A switch flips, a hammer strikes, a valve opens for exactly two seconds. These inputs are piecewise or impulsive, and they are where the Laplace transform clearly beats the methods of earlier lessons. This lesson introduces the unit step function, the Dirac delta (impulse) and the convolution theorem, which together give you the response of a linear system to any input.

The unit step function

The Heaviside step u(t - c) is 0 for t < c and 1 for t >= c. It acts as a switch. A pulse that is on from t = a to t = b is u(t - a) - u(t - b), and a piecewise function can be written as a combination, for example

f(t) = 2 for 0 <= t < 3 and f(t) = 5 for t >= 3 equals 2 + 3*u(t - 3).

The second shift theorem says that delaying a function by c multiplies its transform by e**(-c*s):

L{u(t - c)*g(t - c)} = e**(-c*s)*G(s), and in particular L{u(t - c)} = e**(-c*s)/s.

To transform u(t - c)*h(t), rewrite h(t) as a function of t - c. Example: L{u(t - 2)*t}: write t = (t - 2) + 2, so the transform is e**(-2*s)*(1/s**2 + 2/s).

An ODE with switched forcing

y' + y = u(t - 1), y(0) = 0. Transform: (s + 1)*Y = e**(-s)/s, so Y = e**(-s)*[1/s - 1/(s + 1)]. Inverting with the second shift theorem: y = u(t - 1)*(1 - e**(-(t - 1))). Nothing happens until t = 1, then y rises toward 1.

Python Switch-on forcing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The Dirac delta (impulse)

A hammer blow transfers momentum in a time too short to resolve. Model it as the Dirac delta delta(t - c): zero except at t = c, with total area 1. It is not an ordinary function but a generalized function, defined by the sifting property integral of f(t)*delta(t - c) dt = f(c). Its transform is

L{delta(t - c)} = e**(-c*s).

It is the derivative of the step: u'(t - c) = delta(t - c). Physically, m*y'' + c*y' + k*y = I*delta(t - t0) with a system at rest means: at t0 the velocity instantly jumps by I/m (the momentum I divided by the mass), while the position is continuous.

The impulse response

For zero initial conditions, hit the system at t = 0 with a unit impulse: a*y'' + b*y' + c*y = delta(t). Then Y = 1/(a*s**2 + b*s + c) = H(s), the transfer function. Its inverse h(t) = L^(-1){H} is the impulse response (also called the Green's function or fundamental solution). For the undamped oscillator y'' + 4*y = delta(t): Y = 1/(s**2 + 4), h(t) = sin(2*t)/2, a motion starting with velocity 1.

Python Impulse response by approximating the delta

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The convolution theorem

The convolution of two functions is

(f * g)(t) = integral from 0 to t of f(tau)*g(t - tau) d(tau).

Theorem: L{f * g} = F(s)*G(s). Equivalently, L^(-1){F*G} = f * g.

This gives the output for any forcing. With zero initial conditions, Y = H(s)*G(s), so

y(t) = integral from 0 to t of h(t - tau)*g(tau) d(tau).

Reading this: split the input g into tiny impulses g(tau) d(tau); each causes the response h(t - tau) scaled by its size; add everything up. This is Duhamel's principle and ties together the last two chapters, since it is the transform-world form of variation of parameters.

Example: y'' + 4*y = g(t), zero initial data, with g(t) = t: y = integral from 0 to t of (sin(2*(t - tau))/2)*tau d(tau) = t/4 - sin(2*t)/8.

Python Convolution solution versus ODE solver

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Periodic forcing and square waves

A square wave that is on for one unit and off for one unit can be written sum over k of (-1)**k * u(t - k). Transforming each term gives (1/s)*(1 - e**(-s) + e**(-2*s) - ...) = 1/(s*(1 + e**(-s))), a geometric series. Such a forcing, applied to a lightly damped oscillator, builds up large oscillations when the switching period matches the natural period: resonance with a non-sinusoidal input.

Python Square-wave forcing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Summary of Laplace pairs for switching and impulses

Switching and impulses

Step u(t - c) transform e^(-cs) / s
Delay multiply F(s) by e^(-cs)
Impulse delta(t - c) transform e^(-cs)
Convolution F times G becomes f * g

Any input: y = h * g

1 / 2

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is L{u(t - 3)}?

    The step switched on at c = 3 has transform e**(-c s)/s.
  2. 2. L{delta(t - 2)} equals

    By the sifting property the integral of e**(-st) delta(t - 2) dt is e**(-2s).
  3. 3. The convolution theorem says L{f * g} equals

    Convolution in time becomes multiplication in the s domain.
  4. 4. The impulse response of a system is

    With zero initial conditions and input delta(t), Y(s) = H(s), so h(t) = L^(-1){H}.

Summary

  • The unit step u(t - c) switches terms on; its transform is e**(-c s)/s, and delays multiply F(s) by e**(-c s).
  • The Dirac delta models impulses; L{delta(t - c)} = e**(-c s).
  • The impulse response h(t) is the inverse transform of the transfer function.
  • Convolution y = h * g gives the response to any input at rest (Duhamel's principle).
  • Periodic switching forcing can excite resonance just like sinusoidal forcing.

Next: Systems of First-order ODEs