Unit 2 - Notes

ECE220 14 min read

Unit 2: Linear time-invariant systems

1. Introduction

Linear Time-Invariant (LTI) systems are a fundamental concept in signals and systems. They are a class of systems that are both linear and time-invariant. The significance of LTI systems lies in their analytical tractability. The output of an LTI system for any given input can be determined if we know its response to a single, simple input: the unit impulse. This response is called the impulse response.

The entire behavior of an LTI system is completely characterized by its impulse response. The mathematical operation that relates the input, the impulse response, and the output is convolution.

  • For Discrete-Time (DT) systems, this operation is the convolution sum.
  • For Continuous-Time (CT) systems, it is the convolution integral.

Understanding LTI systems allows us to design filters, analyze communication channels, and model a vast array of physical phenomena.

2. Basic System Properties

Before delving into LTI systems, we must define the properties that constitute them. Let a system be represented by an operator such that the output is for CT systems, or for DT systems.

2.1. Linearity

A system is linear if it satisfies the properties of homogeneity (scaling) and additivity. Combined, this is known as the superposition principle.

  • Additivity:
  • Homogeneity: , for any constant .

Combined Linearity Condition:
A system is linear if and only if for any two inputs and and any constants and :

The same principle applies to discrete-time systems with replaced by .

Example: is linear. is not linear.

2.2. Time-Invariance

A system is time-invariant if a time shift in the input signal causes an identical time shift in the output signal. The characteristics of the system do not change over time.

  • Continuous-Time: If , then the system is time-invariant if for any .
  • Discrete-Time: If , then the system is time-invariant if for any .

Example: is time-invariant. is time-variant because the system's behavior (the scaling factor ) depends on time.

2.3. Causality

A system is causal if its output at any given time depends only on the present and/or past values of the input. It does not depend on future values of the input.

  • CT Causal System: The output depends only on the input for .
  • DT Causal System: The output depends only on the input for .

All real-time physical systems are causal.

Example: is causal. is non-causal.

2.4. Stability (BIBO Stability)

A system is Bounded-Input, Bounded-Output (BIBO) stable if every bounded input produces a bounded output.

  • Bounded Input: There exists a finite constant such that for all (or for all ).
  • Bounded Output: There exists a finite constant such that for all (or for all ).

Example: is stable. An integrator, , is unstable (e.g., a constant input produces an unbounded ramp output ).

2.5. Memory

  • Memoryless (or Static) System: A system is memoryless if its output at any time depends only on the input at that same time.
    • Example:
  • System with Memory (or Dynamic): A system has memory if its output depends on past or future values of the input.
    • Example:

3. Discrete-Time LTI Systems: The Convolution Sum

For a DT LTI system, if we know the impulse response , which is the system's output to a unit impulse input , we can find the output for any input .

3.1. The Sifting Property of the Unit Impulse

Any discrete-time signal can be represented as a sum of scaled and shifted unit impulses:

This is called the sifting property. It breaks down the signal into a series of simple building blocks (impulses).

3.2. Derivation of the Convolution Sum

Let's find the output of an LTI system with input .

  1. Represent the input using the sifting property: .
  2. The output is .
  3. Using the linearity property (additivity and scaling), we can move the operator inside the summation:
    .
  4. The impulse response is defined as . Using the time-invariance property, we know that .
  5. Substituting this back, we get the Convolution Sum:

This operation is denoted by an asterisk: .

3.3. Mechanics of Convolution Sum

To compute for a specific value of :

  1. Index: Choose a value for .
  2. Flip: Take the impulse response and flip it about the vertical axis to get .
  3. Shift: Shift the flipped sequence by to get . If , shift right. If , shift left.
  4. Multiply: Multiply the input signal by the shifted, flipped impulse response for all values of .
  5. Sum: Sum the products from the previous step over all values of . The result is the single value .
  6. Repeat for all desired values of .

Example:
Let and .
The convolution is:


  • So, .

4. Continuous-Time LTI Systems: The Convolution Integral

The concept for CT LTI systems is analogous to the DT case, with sums replaced by integrals and the Kronecker delta replaced by the Dirac delta function .

4.1. The Sifting Property of the Dirac Delta

Any continuous-time signal can be represented as an integral of scaled and shifted Dirac delta functions:

4.2. Derivation of the Convolution Integral

The derivation follows the same logic as the discrete case:

  1. Represent the input: .
  2. Output is .
  3. Using linearity (the integral is a limit of a sum):
    .
  4. The impulse response is . By time-invariance, .
  5. Substituting this gives the Convolution Integral:

This is denoted as .

4.3. Mechanics of Convolution Integral (Graphical Method)

To compute :

  1. Index: Choose a value for .
  2. Flip: Flip the impulse response about the vertical axis to get .
  3. Shift: Shift by to obtain . If , shift right. If , shift left.
  4. Multiply: Multiply the two signals, and .
  5. Integrate: Calculate the area under the product curve from the previous step. This area is the value of for the chosen .
  6. Repeat for all to trace out the full output signal .

5. Properties of Linear Time-Invariant Systems

The convolution operation has several important algebraic properties that reflect the properties of LTI systems.

5.1. Commutative Property

The order of convolution does not matter.

  • DT:
  • CT:
    Implication: The roles of input and impulse response are interchangeable.

5.2. Associative Property

  • DT:
  • CT:
    Implication: For systems connected in cascade (series), the overall impulse response is the convolution of the individual impulse responses. The order in which they are cascaded does not matter.

5.3. Distributive Property

  • DT:
  • CT:
    Implication: For systems connected in parallel, the overall impulse response is the sum of the individual impulse responses.

5.4. LTI System Properties and the Impulse Response

The general properties of a system (causality, stability, etc.) can be determined directly from its impulse response .

Causality

An LTI system is causal if and only if its impulse response is zero for negative time.

  • DT: for .
  • CT: for .
    This makes intuitive sense: the system cannot respond to an impulse before the impulse occurs at or .

Stability (BIBO)

An LTI system is BIBO stable if and only if its impulse response is absolutely summable (DT) or absolutely integrable (CT).

  • DT: The system is stable if .
  • CT: The system is stable if .

Memory

An LTI system is memoryless if and only if its impulse response is a scaled impulse.

  • DT: for some constant . The output is .
  • CT: for some constant . The output is .
    If is non-zero for any other time, the system has memory.

6. Causal LTI Systems Described by Differential and Difference Equations

Many physical systems are described by linear constant-coefficient differential or difference equations. These are mathematical representations of LTI systems.

6.1. Continuous-Time: Differential Equations

A general Nth-order linear constant-coefficient differential equation is:

  • The coefficients and are constants.
  • The "linear constant-coefficient" nature ensures the system is LTI.
  • To ensure causality, we must impose a condition of initial rest. This means that if the input for , then the output for . The system is "at rest" before the input is applied.

The solution consists of two parts:

  1. Homogeneous Solution (): The solution to the equation with the input set to zero. It represents the natural response of the system.
  2. Particular Solution (): A solution that depends on the specific form of the input . It represents the forced response of the system.

The total solution is .

6.2. Discrete-Time: Difference Equations

A general Nth-order linear constant-coefficient difference equation is:

  • This equation can be rearranged to express in terms of past values of the output and present/past values of the input, making it suitable for computation. If :

  • Recursive Form: If any for , the output depends on its own past values, and the system is called recursive. This corresponds to an Infinite Impulse Response (IIR) system.
  • Non-Recursive Form: If all for , the output depends only on the input. This corresponds to a Finite Impulse Response (FIR) system. The equation is then simply the convolution sum.
  • Like the continuous case, the system is LTI and causal under the condition of initial rest.

7. Software Simulation of Convolution and Correlation

Python, with libraries like NumPy, SciPy, and Matplotlib, is excellent for simulating these operations.

7.1. Convolution

Convolution finds the output of an LTI system given an input and the system's impulse response.

PYTHON
import numpy as np
import matplotlib.pyplot as plt

# Define the input signal x[n] and impulse response h[n]
# Example: a square pulse input and a decaying exponential impulse response
x = np.repeat([0., 1., 0.], 10)  # A square pulse
h = np.exp(-np.arange(20) * 0.3) # Decaying exponential

# Compute the convolution
y = np.convolve(x, h, mode='full')

# Create time axes for plotting
n_x = np.arange(len(x))
n_h = np.arange(len(h))
n_y = np.arange(len(y))

# Plotting
plt.figure(figsize=(12, 8))

plt.subplot(3, 1, 1)
plt.stem(n_x, x)
plt.title('Input Signal x[n]')
plt.grid(True)

plt.subplot(3, 1, 2)
plt.stem(n_h, h)
plt.title('Impulse Response h[n]')
plt.grid(True)

plt.subplot(3, 1, 3)
plt.stem(n_y, y)
plt.title('Output Signal y[n] = x[n] * h[n]')
plt.xlabel('n')
plt.grid(True)

plt.tight_layout()
plt.show()

The mode argument in np.convolve can be:

  • 'full': Returns the full convolution product (length len(x) + len(h) - 1). This is the default.
  • 'same': Returns an output of the same length as the longer input.
  • 'valid': Returns only the parts of the convolution computed without zero-padding.

7.2. Correlation

Correlation is a very similar operation to convolution but is used to measure the similarity between two signals as a function of the time-lag applied to one of them.

  • Cross-correlation: Measures similarity between two different signals.
  • Autocorrelation: Measures similarity between a signal and a time-shifted version of itself.

The formula for cross-correlation is:

Key Difference: In convolution, the second signal is flipped (). In correlation, it is not (). This means correlation is equivalent to convolving with a time-reversed signal: .

PYTHON
import numpy as np
import matplotlib.pyplot as plt

# Define two signals
# A square pulse and a delayed, noisy version of it
s1 = np.repeat([0., 1., 0.], 15)
s2 = np.zeros(len(s1) + 20)
s2[10:10+len(s1)-30] = 1.0  # a delayed pulse
s2 += 0.1 * np.random.randn(len(s2)) # Add some noise

# Compute the cross-correlation
corr = np.correlate(s2, s1, mode='full')

# The peak of the correlation indicates the delay
# The lags array helps us find the actual delay value
lags = np.arange(-len(s1) + 1, len(s2))
peak_index = np.argmax(corr)
time_delay = lags[peak_index]

print(f"The time delay is estimated to be: {time_delay}")

# Plotting
plt.figure(figsize=(10, 6))

plt.subplot(3, 1, 1)
plt.plot(s1)
plt.title('Signal 1')
plt.grid(True)

plt.subplot(3, 1, 2)
plt.plot(s2)
plt.title('Signal 2 (Delayed and Noisy)')
plt.grid(True)

plt.subplot(3, 1, 3)
plt.plot(lags, corr)
plt.title('Cross-correlation of Signal 2 and Signal 1')
plt.xlabel('Lag (n)')
plt.axvline(time_delay, color='r', linestyle='--', label=f'Peak at lag={time_delay}')
plt.legend()
plt.grid(True)

plt.tight_layout()
plt.show()