---
title: Sequences, LTI systems and the DTFT
heading: Discrete-time systems and their properties, stability as absolute summability, complex exponentials as eigenfunctions, and the DTFT's symmetry, convergence and energy theorems
eyebrow: S7 · Lesson 1 · Sequences, LTI systems and the DTFT
xp: 50
---

::: hook
C9 introduced discrete-time signals and the DTFT as tools. This course treats them as the foundation of a discipline, at the depth of Oppenheim and Schafer: every filter design method, every spectrum analyzer and every sample-rate converter later in the course rests on a handful of exact statements about sequences and linear time-invariant systems. Which systems are stable, why complex exponentials pass through them unchanged in shape, what the DTFT of a sequence really converges to, and how energy is shared between time and frequency. This lesson states them carefully and shows where the edge cases bite.
:::

::: play
- The DTFT magnitude of a rectangular pulse of length L, $|X(e^{j\omega})| = \left|\frac{\sin(L\omega/2)}{\sin(\omega/2)}\right|$, against frequency from −π to π.
- The peak at ω = 0 is L (the sum of the samples); nulls fall at multiples of 2π/L, so a longer pulse has a narrower spectrum.
- The sidelobes don't shrink as L grows: the first stays about 13 dB below the peak. That fixed ratio returns when windows are chosen for filter design and spectrum analysis.
:::
:::

```sim plot
view: graph
x: w = -3.1416..3.1416
y: X = 0..33
slider: L = 2..32 = 8 step 1
plot: abs(sin(L*w/2 + 1e-9)/sin(w/2 + 1e-9/L)) | samples: 1200 | label: |X(e^{jω})|
readout: first null, rad = 2*pi/L
```

::: predict
## A system has impulse response h[n] = 1/n for n ≥ 1 and zero otherwise. Is it BIBO stable?

- [ ] Yes, because h[n] goes to zero
- [x] No: its impulse response isn't absolutely summable
- [ ] Yes, because it's causal
- [ ] Only for bounded inputs that decay

::: reveal
No. A discrete-time LTI system is BIBO stable exactly when $\sum|h[n]| < \infty$, and the harmonic series diverges, so some bounded input (a constant 1, for instance) makes the output grow without limit, like ln n. Decaying to zero isn't enough; the decay has to be fast enough to sum, as $a^n$ with |a| < 1 is.
:::
:::

::: nameit
## LTI systems

A system is **linear** if it obeys superposition and **time-invariant** if shifting the input shifts the output. Then $y[n] = \sum_k x[k]h[n - k] = x[n] * h[n]$, and

- **causal** ⇔ h[n] = 0 for n < 0;
- **BIBO stable** ⇔ $\sum_{n=-\infty}^{\infty}|h[n]| < \infty$.

## Eigenfunctions and frequency response

For $x[n] = e^{j\omega n}$, $y[n] = H(e^{j\omega})e^{j\omega n}$ with $H(e^{j\omega}) = \sum_n h[n]e^{-j\omega n}$. A real sinusoid $A\cos(\omega_0n + \phi)$ through a real system becomes $A|H(e^{j\omega_0})|\cos(\omega_0n + \phi + \angle H(e^{j\omega_0}))$.

## The DTFT

$$X(e^{j\omega}) = \sum_{n=-\infty}^{\infty}x[n]e^{-j\omega n}, \qquad x[n] = \frac{1}{2\pi}\int_{-\pi}^{\pi}X(e^{j\omega})e^{j\omega n}\,d\omega$$

- Periodic in ω with period 2π.
- **Convergence**: absolutely summable sequences have continuous DTFTs (uniform convergence). Square-summable ones, like the ideal lowpass filter's $\frac{\sin\omega_cn}{\pi n}$, converge only in mean square, and their truncated sums overshoot at discontinuities (the **Gibbs phenomenon**, about 9% of the jump).
- **Symmetry**: for real x[n], $X(e^{-j\omega}) = X^*(e^{j\omega})$: even magnitude, odd phase.
- **Parseval**: $\sum|x[n]|^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi}|X(e^{j\omega})|^2\,d\omega$.

Useful pairs: $a^nu[n] \leftrightarrow \frac{1}{1 - ae^{-j\omega}}$ (|a| < 1); a length-L rectangle ↔ $e^{-j\omega(L - 1)/2}\frac{\sin(L\omega/2)}{\sin(\omega/2)}$.
:::

::: example
## h[n] = 0.8ⁿu[n]. Is it stable, and what's its frequency response at 0, π/2 and π?

::: solution
1. **Stability.** Sum the impulse response:
   $$\begin{aligned} \sum_n 0.8^n &= \frac{1}{1 - 0.8} \\ &= 5 \end{aligned}$$
   That's finite, so the system is stable.
2. **Frequency response.**
   $$H(e^{j\omega}) = \frac{1}{1 - 0.8e^{-j\omega}}$$
3. **At ω = 0 and π.**
   $$\begin{aligned} H(e^{j0}) &= \frac{1}{1 - 0.8} \\ &= 5 \end{aligned}$$
   $$\begin{aligned} H(e^{j\pi}) &= \frac{1}{1.8} \\ &= 0.556 \end{aligned}$$
4. **At ω = π/2.**
   $$\begin{aligned} H(e^{j\pi/2}) &= \frac{1}{1 + 0.8j} \\ &= 0.781\angle{-38.7°} \end{aligned}$$
   That makes it a lowpass filter.
5. **Energy.**
   $$\begin{aligned} \sum_n h^2[n] &= \sum_n 0.64^n \\ &= 2.78 \end{aligned}$$
   Parseval says this must equal the average of $|H|^2$ over a period.

**Answer:** it's stable, and its response is 5 at ω = 0, 0.781 at −38.7° at π/2 and 0.556 at π: a lowpass filter, with energy 2.78.
:::
:::

::: example
## A rectangular pulse has 8 samples of value 1. What's its DTFT magnitude at 0, at π/8 and at π/4?

::: solution
1. **At ω = 0.** The DTFT at zero is the sum of the samples, 8.
2. **At π/8.**
   $$\begin{aligned} |X| &= \frac{\sin(\pi/2)}{\sin(\pi/16)} \\ &= \frac{1}{0.195} \\ &= 5.13 \end{aligned}$$
3. **At π/4.** π/4 = 2π/8 is the first null, so the magnitude is 0.
4. **Main lobe width.** The spectrum's main lobe spans ±π/4, so doubling the pulse to 16 samples would halve that width.

**Answer:** the magnitude is 8 at ω = 0, 5.13 at π/8 and 0 at π/4.
:::
:::

::: example
## A four-point moving average has h[n] = ¼ for n = 0 to 3. What is its response at ω = π/4 and π/2, its group delay and the energy of h?

::: solution
1. **Magnitude response.**
   $$|H(e^{j\omega})| = \left|\frac{\sin 2\omega}{4\sin(\omega/2)}\right|$$
2. **At π/4.**
   $$\begin{aligned} |H| &= \frac{1}{4\sin(\pi/8)} \\ &= 0.653 \end{aligned}$$
3. **At π/2.** The numerator is sin π = 0, an exact null.
4. **Group delay.** The phase is $-1.5\omega$, a constant group delay of 1.5 samples.
5. **Energy.**
   $$\begin{aligned} \sum h^2 &= 4 \times \frac{1}{16} \\ &= 0.25 \end{aligned}$$
   Averaging four samples cuts white noise's power to a quarter.

**Answer:** the response is 0.653 at π/4 and an exact null at π/2; the group delay is 1.5 samples and the energy of h is 0.25.
:::
:::

::: check
given: a = -0.5 | -0.8 | -0.9 | -0.95
answer: 1/(1 - abs(a))
tolerance: 0.5%

## A system has h[n] = ({a})ⁿu[n]. What's $\sum|h[n]|$?

::: right
Right. A geometric series: $1/(1 - |a|)$ = {answer}, finite, so it's stable.
:::

::: misses
- [1/(1 - a)] Sum the absolute values: use |a|.
- [any] Not yet. $\sum|a|^n = 1/(1 - |a|)$.
:::
:::

::: check
given: a = 0.5 | 0.8 | -0.6; w = 0.5 | 1.2 | 2.5
answer: 1/sqrt(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## What's $|H(e^{j\omega})|$ for h[n] = ({a})ⁿu[n] at ω = {w} rad?

::: right
Right. $1/|1 - ae^{-j\omega}| = 1/\sqrt{1 - 2a\cos\omega + a^2}$ = {answer}.
:::

::: misses
- [1/(1 - a*cos(w))] Include the imaginary part of $1 - ae^{-j\omega}$.
- [any] Not yet. $|1 - ae^{-j\omega}|^2 = 1 - 2a\cos\omega + a^2$.
:::
:::

::: check
given: a = 0.3 | 0.7 | -0.85
answer: 1/(1 - a^2)
tolerance: 0.5%

## What's the energy $\sum|h[n]|^2$ of h[n] = ({a})ⁿu[n]?

::: right
Right. $\sum a^{2n} = 1/(1 - a^2)$ = {answer}.
:::

::: misses
- [1/(1 - abs(a))] That's $\sum|h|$; energy sums the squares.
- [any] Not yet. Square each sample and sum the series.
:::
:::

::: check
given: L = 6 | 10 | 16; k = 0.3 | 0.6
answer: abs(sin(k*pi/2)/sin(k*pi/(2*L)))
tolerance: 0.5%

## A length-{L} rectangular pulse of ones: what's $|X(e^{j\omega})|$ at ω = {k}π/{L}?

::: right
Right. $|\sin(L\omega/2)/\sin(\omega/2)|$ = {answer}.
:::

::: misses
- [L] That's the value at ω = 0.
- [any] Not yet. The Dirichlet kernel $\sin(L\omega/2)/\sin(\omega/2)$.
:::
:::

::: check
given: A = 1 | 2.5; a = 0.5 | 0.9; w = 0.4 | 1.5
answer: A/sqrt(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## The input $\given{A}\cos(\given{w}n)$ drives h[n] = ({a})ⁿu[n]. What's the amplitude of the steady-state output?

::: right
Right. $A|H(e^{j\omega_0})|$ = {answer}.
:::

::: misses
- [A] The system scales a sinusoid by its frequency response.
- [any] Not yet. Evaluate $|H|$ at the input frequency.
:::
:::

::: check
given: a = 0.5 | 0.8 | 0.9; w = 0.2 | 0.6
answer: (a*cos(w) - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## What's the group delay of h[n] = ({a})ⁿu[n] at ω = {w} rad, in samples?

::: right
Right. $\tau(\omega) = \frac{a\cos\omega - a^2}{1 - 2a\cos\omega + a^2}$ = {answer} samples.
:::

::: misses
- [a/(1 - a)] That's the value at ω = 0 only.
- [any] Not yet. Differentiate the phase $-\arctan\frac{a\sin\omega}{1 - a\cos\omega}$ and negate.
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8 | -0.6; w = 0.3 | 1 | 2

## A system has h[n] = ({a})ⁿu[n]; consider ω = {w} rad.

::: part
answer: 1/sqrt(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

### What is $|H(e^{j\omega})|$?

::: misses
- [any] $1/|1 - ae^{-j\omega}|$.
:::
:::

::: part
answer: -asin(a*sin(w)/sqrt(1 - 2*a*cos(w) + a^2))*180/pi
unit: °
tolerance: 0.5%

### What is its phase?

::: misses
- [any] $-\arctan\frac{a\sin\omega}{1 - a\cos\omega}$.
:::
:::
:::

::: check
kind: derivation
vars: a = -0.95..0.95, w = 0..3.14

## A system has h[n] = aⁿu[n].

::: step
answer: 1/(1 - a)

### What is its DC gain H(1)?
:::

::: step
answer: 1/(1 + a)

### What is its gain at ω = π?
:::

::: step
answer: 1/sqrt(1 - 2*a*cos(w) + a^2)

### What is $|H(e^{j\omega})|$ at frequency w?
:::

::: right
Right. Positive a makes a lowpass, negative a a highpass, with the ratio of the two extremes $(1 + a)/(1 - a)$.
:::
:::

::: explain
## Why does the ideal lowpass filter's DTFT sum converge only in a mean-square sense?

::: model
The ideal lowpass impulse response is $\sin(\omega_cn)/(\pi n)$, which falls off only as 1/n. Its squares sum to a finite energy, so the sequence has a well-defined DTFT in the mean-square sense, but its absolute values form a series like the harmonic one, which diverges. Without absolute summability the partial sums can't converge uniformly, and they don't: at the band edge, where the target response jumps from 1 to 0, every truncated sum overshoots by about 9% of the jump, and adding more terms only squeezes the ripple closer to the edge without shrinking it. The error's energy goes to zero, which is mean-square convergence, while its peak stays put, the Gibbs phenomenon that later makes windowed filter design necessary.
:::
:::

::: practice

::: check
given: a = 0.5 | 0.6 | 0.8 | 0.9 | -0.5 | -0.75 | -0.9
answer: 1/(1 - abs(a))
tolerance: 0.5%

## $\sum|h[n]|$ for ({a})ⁿu[n]?

::: misses
- [any] $1/(1 - |a|)$.
:::
:::

::: check
given: a = 0.4 | 0.9; w = 0.8 | 2
answer: 1/sqrt(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## $|H|$ at ω = {w} for ({a})ⁿu[n]?

::: misses
- [any] $1/\sqrt{1 - 2a\cos\omega + a^2}$.
:::
:::

::: check
given: a = 0.5 | 0.7 | 0.8 | -0.5 | -0.8 | -0.9
answer: 1/(1 - a^2)
tolerance: 0.5%

## Energy of ({a})ⁿu[n]?

::: misses
- [any] $1/(1 - a^2)$.
:::
:::
:::
