Signal and Systems

2.1 The Convolution Sum

Imron Rosyadi

Signals and Systems

DISCRETE-TIME LTI SYSTEMS: THE CONVOLUTION SUM

ECE Undergraduate Course

Imron Rosyadi

Moment of Silence

What is a System?

A system is a process by which input signals are transformed to produce output signals.

graph LR
    A[Input Signal] --> B(System);
    B --> C[Output Signal];

Signal Decomposition with Impulses

Any discrete-time signal \(x[n]\) can be represented as a sum of scaled and shifted unit impulses.

Think of it as breaking down a signal into its most basic building blocks.

The “Sifting Property”

This decomposition is also known as the sifting property of the unit impulse:

\[ x[n] = \sum_{k=-\infty}^{\infty} x[k] \delta[n-k] \]

For any given \(n\), the summation “sifts” through all values of \(x[k]\) and picks out only the one where \(k=n\).

Signal Decomposition with Impulses

graph TD
    subgraph Decomposing x[n]
        XN("x[n]") --> IMP1("x[-1]δ[n+1]")
        XN --> IMP0("x[0]δ[n]")
        XN --> IMP2("x[1]δ[n-1]")
        XN --> ETC(...)
    end
    subgraph Reconstructing x[n]
        IMP1 --> SUM("(Σ)")
        IMP0 --> SUM
        IMP2 --> SUM
        ETC --> SUM
        SUM --> XN_OUT("x[n]")
    end

Visualizing Decomposition

Let’s see this in action. The signal \(x[n]\) is built by summing its individual impulse components.

LTI Systems & The Convolution Sum

How does an LTI system respond to an input \(x[n]\)?

  1. Linearity: The response to a sum of inputs is the sum of the individual responses.
    • Input: \(x[n] = \sum_k x[k] \delta[n-k]\)
    • Output: \(y[n] = \sum_k x[k] \cdot \{\text{Response to } \delta[n-k]\}\)
  2. Time-Invariance: A shift in the input causes the same shift in the output.
    • Response to \(\delta[n]\) is the impulse response, \(h[n]\).
    • Response to \(\delta[n-k]\) is just a shifted impulse response, \(h[n-k]\).

Combining these gives the Convolution Sum:

\[ y[n] = \sum_{k=-\infty}^{\infty} x[k] h[n-k] \]

We denote this operation with an asterisk: \(y[n] = x[n] * h[n]\).

The “Flip-and-Slide” Method

The convolution sum \(y[n]=\sum_{k=-\infty}^{\infty} x[k] h[n-k]\) can be computed graphically for each output sample n.

Procedure for a fixed n:

  1. Plot signals vs. k: Plot the input \(x[k]\) and the impulse response \(h[k]\).
  2. Flip: Time-reverse \(h[k]\) to get \(h[-k]\).
  3. Slide: Shift \(h[-k]\) by \(n\) to get \(h[n-k]\).
    • Shift right for \(n > 0\); left for \(n < 0\).
  4. Multiply: Point-wise multiply the sequences \(x[k]\) and \(h[n-k]\).
  5. Sum: Sum all the values of the product sequence. The result is \(y[n]\).

Repeat for all values of n to find the entire output signal \(y[n]\).

Interactive Demo: Flip-and-Slide

  • \(x[n] = 0.5\delta[n] + 2\delta[n-1]\)
  • \(h[n] = u[n] - u[n-3]\)

Use the slider to change the value of n and observe the convolution process.

Example: Accumulator System

Let’s convolve an exponential signal with a unit step. This models a system called an accumulator.

Problem

  • Input: \(x[n] = \alpha^n u[n]\), for \(0 < \alpha < 1\).
  • Impulse Response: \(h[n] = u[n]\).

Analysis

  • For \(n < 0\), there’s no overlap between \(x[k]\) and \(h[n-k]\). So, \(y[n] = 0\).
  • For \(n \ge 0\), the overlap is for \(0 \le k \le n\). \[ y[n] = \sum_{k=0}^{n} \alpha^k = \frac{1 - \alpha^{n+1}}{1 - \alpha} \] Result: \(y[n] = \left(\frac{1 - \alpha^{n+1}}{1 - \alpha}\right) u[n]\).

Example: Accumulator System

Example: Convolving Two Pulses

Let’s convolve two finite-length pulses. The output shape and length depend on the inputs.

  • \(x[n] = 1\) for \(0 \le n \le 4\).
  • \(h[n] = \alpha^n\) for \(0 \le n \le 6\) (with \(\alpha > 1\)).

The convolution \(y[n]\) is non-zero for \(0 \le n \le 10\), with a trapezoidal shape due to changing overlap.

Application: Digital Audio Reverb

Convolution is used in audio engineering to create effects like reverberation (reverb).

  • Input Signal \(x[n]\): A “dry” audio signal (e.g., a single clap).
  • Impulse Response \(h[n]\): The “room response.” This is what you would record if you made a perfect impulse (like a starter pistol shot) in a concert hall. It captures all the echoes.
  • Output Signal \(y[n]\): The “wet” audio signal, with reverb. \[y[n] = x[n] * h[n]\]

By convolving any dry sound with the impulse response of a space, we can make it sound like it was recorded there!

Application: Digital Audio Reverb

graph TD
    A["Dry Audio<br>x[n]"] --> C{"Convolution<br>y[n] = x[n]*h[n]"};
    B["Room Impulse Response<br>h[n]"] --> C;
    C --> D["Audio with Reverb<br>y[n]"];

Summary

  • Signal Decomposition: Any discrete signal \(x[n]\) can be written as a sum of scaled, shifted impulses: \(x[n] = \sum_k x[k]\delta[n-k]\).

  • LTI System Response: The output \(y[n]\) of an LTI system is the input \(x[n]\) convolved with the system’s impulse response \(h[n]\).

  • The Convolution Sum: This fundamental operation is defined as: \[ y[n] = x[n] * h[n] = \sum_{k=-\infty}^{\infty} x[k]h[n-k] \]

  • Calculation: We can compute this using the graphical “flip-and-slide” method.

  • Key Insight: The impulse response \(h[n]\) is a complete characterization of an LTI system. If you know \(h[n]\), you know how the system will react to any input.