The first job is to make sure our discrete-time vocabulary is sharp. You met most of this in Chapter 3, but DSP demands a slightly more formal grip on it, so we will revisit each concept with the angle it gets used at later in the chapter.
1.1 Sequences and where they come from
A discrete-time signal is a function of an integer index . The brackets, instead of parentheses, are not decorative: they tell every reader of your code or paper that this is a sampled, integer-indexed sequence, not a continuous function.
Most of the discrete-time signals we will deal with come from sampling a continuous-time signal at uniform intervals (the sample period), with sample rate :
But there are sequences that are intrinsically discrete: stock prices at end of trading day, the count of packets on a network in each one-second window, the value of a register read every clock cycle. These do not come from sampling a continuous-time signal; they are discrete by birth.
A practical worry: every line of every audio file in your library, every captured power trace from a chip, every line of OFDM samples in a Wi-Fi packet, is a sequence stored as an array. The DSP we develop in this chapter is what manipulates that array.
1.2 The standard discrete-time sequences
You will see these constantly. Memorize their pictures.
Unit impulse : equals 1 at , zero everywhere else. The discrete-time sibling of the Dirac delta. Crucially, is well-behaved: it has finite value, finite energy, no distribution-theory subtleties. Every discrete-time signal can be written as a sum of weighted, shifted impulses:
This is the discrete sifting identity, and it is the seed from which discrete convolution will sprout in Section 1.5.
Unit step : 1 for , zero for .
Unit ramp : zero for , then for .
Real exponential : decays if , grows if . Models RC discharge sampled at uniform intervals (you would expect in continuous time; sample it and you get with ).
Complex exponential : the discrete-time analog of . The eigenfunction of every LTI discrete-time system, exactly the same way sinusoids were eigenfunctions in continuous time. This is what frequency means in the discrete world.
Sinusoid : the projection of a complex exponential onto the real axis.
δ[n]
│
1 │
│
───┼──────────── n →
-2 -1 0 1 2 3
╳ (only the n=0 sample is nonzero) u[n]
1 │
│ ● ● ● ● ● ● ●
│
0 ● ●
───┼──────────── n →
01.3 Periodicity in discrete time, an unobvious twist
In continuous time, every is periodic. Pick any and you get a periodic signal with period . Always.
In discrete time, this is not true. A discrete-time sinusoid is periodic only if is rational. To see why: periodicity means for some integer , which requires for some integer , which forces , a ratio of integers.
So is periodic with period 20 (since ). But (with rad/sample) is not periodic at all, because is irrational. It looks vaguely repetitive in a plot but never quite repeats.
A second twist, deeper: discrete-time frequencies are defined only modulo . The signal with and are the same sequence, because for any integer . So discrete frequencies live on the unit circle: every unique frequency is in or equivalently . This is why we keep talking about the unit circle in the z-plane. The maximum representable frequency in a sampled system is , corresponding to alternation . Any higher continuous-time frequency aliases down into this range, the very phenomenon we treated in Chapter 3.
1.4 Energy and power signals (discrete version)
A discrete-time signal has energy
If is finite, it is an energy signal. A finite-length burst, a single drum hit captured as a wav, a single power-trace acquisition: all energy signals.
If is infinite but the average power
is finite, it is a power signal. Every nontrivial periodic sequence is a power signal (infinite total energy because it goes on forever; finite average because it stays bounded).
Random sequences, like a captured stream of thermal noise, are also typically power signals. We will return to this when we discuss the power spectral density and matched filtering for signals corrupted by noise.
1.5 Discrete-time systems and their classifications
A discrete-time system is a transformation . We classify systems by which structural properties they obey, because each property gives us a different mathematical lever.
Linear: . Superposition holds.
Time-invariant: delay the input, you delay the output by the same amount; otherwise nothing changes. .
LTI: both linear and time-invariant. Most filters we will design fall here.
Memoryless / static: depends only on . A simple gain is memoryless. A delay is not memoryless because the system has to remember the previous input.
Causal: depends only on (present and past inputs), never on or beyond. Real-time systems must be causal because the future has not happened. Off-line processing (working on a recorded file) can use noncausal systems if convenient.
BIBO stable: every bounded input () produces a bounded output (). For an LTI system, this is equivalent to
i.e., the impulse response is absolutely summable. Equivalently, all poles of lie strictly inside the unit circle. Same fact, two viewpoints.
Why absolute summability and not just energy? If diverges, you can construct a bounded input (, all ) that drives the output to infinity. So the absolute-sum condition is exactly what you need to guarantee bounded outputs for every bounded input.
1.6 The convolution sum, derived (not memorized)
For an LTI system, the impulse response is what comes out when you poke it with a unit impulse. The claim, which is the most important fact in this chapter, is that completely characterizes the system. Knowing , you can compute the output for any input. Here is why.
Step 1. Use the sifting identity to write any input as a weighted sum of impulses:
Step 2. Push it through the system. By linearity:
Step 3. By time-invariance, .
Step 4. Putting it together:
This is the discrete convolution sum. We did not assume convolution; we derived it from linearity plus time-invariance plus the sifting identity. That is why convolution is the operation in LTI theory: it is forced by the structure.
Echo-and-music analogy, sharpened. Picture a music recording being played in a hall whose impulse response (recorded by clapping once) is . What you hear, , is the music with the hall's acoustics overlaid. Convolution combines them. Each instant of input music excites a copy of the hall response, scaled by the music's loudness at that instant; the copies overlap and sum into the heard sound. Convolution reverbs in audio plug-ins do exactly this with sampled impulse responses of famous halls.
A worked example to anchor it. Let (nonzero for ) and (a 3-tap moving sum). Then
For : only contributes (since is only nonzero for , but is zero outside ). .
For : gives , gives . So .
For : gives , gives , gives . .
For : contribute. .
For : contributes. .
So . Output length is samples. The output is longer than either input; convolution stretches the time axis.
1.7 Difference equations, FIR vs IIR
Most LTI discrete systems we will design are described by a linear constant-coefficient difference equation:
By convention , so we can solve for :
The first sum is the feed-forward part: a tapped-delay-line of past inputs. The second sum is the feedback part: a tapped-delay-line of past outputs, fed back into the equation. These two sums divide all our digital filters into two camps.
FIR (Finite Impulse Response). Set all for (no feedback). The output is a pure feed-forward sum of past inputs, with no recursion. The impulse response is exactly for and zero otherwise. Finite length (hence the name). The whole impulse response is the coefficient vector. Always stable, always finite-length.
IIR (Infinite Impulse Response). At least one for . The output recursively depends on past outputs. The impulse response, in general, runs forever (decaying if stable, exploding if not). Hence "infinite" impulse response. IIR filters are typically much shorter (lower-order) than FIRs of equivalent magnitude response, but they trade nonlinear phase and potential stability problems for that compactness.
The choice between FIR and IIR is one of the most important design decisions in DSP, and we will treat each at length in Sections 4 and 5.
1.8 Z-transform recap, ROC and stability
From Chapter 3 we have
with the region of convergence (ROC) being the set of complex for which the sum converges. The ROC is part of the Z-transform; the same algebraic expression with two different ROCs corresponds to two different sequences (one causal, one anti-causal).
A few facts to keep on hand for filter design:
- For a causal sequence, the ROC extends outward from the outermost pole. So if has poles at and , and the sequence is causal, the ROC is .
- For the system to be both causal and stable, the ROC must include the unit circle. Combining the two facts above: a causal LTI system is stable iff all its poles lie strictly inside the unit circle.
- A pole on the unit circle means marginal stability (the system rings forever without decaying). Strictly outside, instability.
The Z-transform of the basic sequences:
| Sequence | ROC | |
|---|---|---|
| all | ||
| $ | ||
| $ | ||
| $ | ||
| $ | ||
| $ |
Properties to remember by their narrative role:
- Linearity. Combining systems algebraically is just adding their Z-transforms.
- Time shift: . The factor is the algebraic alter ego of "delay by one sample." Every digital filter block diagram has blocks for delay registers.
- Convolution becomes multiplication: . This is why we like the Z-transform (and its sibling, the DFT) so much: the pesky time-domain convolution turns into a much simpler frequency-domain multiplication.
The DTFT (Discrete-Time Fourier Transform) is just the Z-transform evaluated on the unit circle:
It is what we plot when we say "frequency response." It is continuous in (defined for every real , periodic with period ). On a computer we cannot represent a continuous function, so we will need a sampled version of it, which is the DFT, the topic of the next section.
1.9 Inverse Z-transform via partial fractions
Given a rational , decompose into partial fractions. Each piece corresponds to a known time-domain sequence. Example:
Partial fractions:
Solving (multiply out, equate numerators), we get , . Inverse-transform each piece (assuming causal):
For repeated poles or complex pole pairs, the partial fractions are slightly more involved but the pattern is the same.