LTI System LTI System
- ss
What is an LTI System?
A discrete-time system takes an input signal $x[n]$ and produces an output signal $y[n]$:
\[y[n] = T\{x[n]\}\]Here are a few examples:
- Delay: $y[n]=x[n-1]$. The input is delayed by one sample.
- Moving average: $y[n]=(x[n]+x[n-1])/2$. Each output is the average of the current and previous samples.
- Squarer: $y[n]=x[n]^2$
A system that is both linear and time-invariant is called an LTI system. Most systems in signal processing are LTI systems.
Linearity
The system is linear if adding inputs adds their outputs, and scaling an input scales its output by the same amount.
That is, if $x_1[n]\to y_1[n]$ and $x_2[n]\to y_2[n]$, then for any constants $a$ and $b$,
\[a\,x_1[n]+b\,x_2[n] \;\longrightarrow\; a\,y_1[n]+b\,y_2[n]\]This is called the principle of superposition. We can split a complicated input into simple pieces, find the output for each piece, and add the outputs back together.
Time Invariance
A system is time-invariant if delaying the input simply delays the output by the same amount, without changing its shape:
\[x[n]\to y[n] \quad\Longrightarrow\quad x[n-n_0]\to y[n-n_0]\]In other words, the system itself does not change over time. The same input always gives the same outputs, no matter when it arrives.
Impulse Response
The unit impulse $\delta[n]$ is a signal that is $1$ at $n=0$ and $0$ everywhere else:
\[\delta[n] = \begin{cases} 1, & n=0 \\ 0, & n\neq0 \end{cases}\]The impulse response $h[n]$ of a system is its output when the input is $\delta[n]$.
Writing a Signal as a Sum of Impulses
We can represent any signal as a sum of scaled and shifted impulses:
\[x[n] = \sum_{m=-\infty}^{\infty} x[m]\,\delta[n-m] \tag{1}\]Since $\delta[n-m]$ is $1$ only at $n=m$, the only term left at each $n$ is $x[n]$. In other words, a signal is just its samples, each one a single impulse, added together.
The signal $x[n]=\lbrace2,1,3\rbrace$ split into its three samples. Each one is an impulse, scaled by its value and shifted to its position.
Convolution
Why the Impulse Response Is Enough
For an LTI system, knowing $h[n]$, we can find the output for any input.
By time invariance, the output for $\delta[n-m]$ is $h[n-m]$. By linearity, the output for $x[m]\,\delta[n-m]$ is $x[m]\,h[n-m]$, and the output for a sum of such terms is the sum of their outputs.
Since the input $x[n]$ is exactly such a sum, as in equation $\small(1)$, the output is
\[y[n] = \sum_{m=-\infty}^{\infty} x[m]\,h[n-m]\]This operation is called convolution, and we write it as $y[n]=x[n]*h[n]$.
An LTI system is completely determined by its impulse response $h[n]$. This means that although we don’t know how the system operates, we can evaluate the output of all inputs.
Even if we do not know how the system works inside, all we need is its response to a single impulse to find its output for every input.
Computing a Convolution
We can look at convolution in two ways.
From the Input Side
Each input sample $x[m]$ produces a response scaled by $x[m]$ and delayed by $m$: $x[m],h[n-m]$. The output is the sum of these responses.
For example, let $x[n]=\lbrace2,1,3\rbrace$ and $h[n]=\lbrace1,1\rbrace$, both starting at $n=0$. Each row is the response to one input sample, and adding each column gives the output $y[n]$:
| $n=0$ | $n=1$ | $n=2$ | $n=3$ | |
|---|---|---|---|---|
| $x[0]h[n]$ | 2 | 2 | 0 | 0 |
| $x[1]h[n-1]$ | 0 | 1 | 1 | 0 |
| $x[2]h[n-2]$ | 0 | 0 | 3 | 3 |
| $y[n]$ | 2 | 3 | 4 | 3 |
From the Output Side
To find a single output sample $y[n]$, we look at $h[n-m]$ as a function of $m$. This is $h[m]$ filpped around $m=0$ and shifted to the right by $n$. So to get $y[n]$, we multiply $x[m]$ and the flipped, shifted $h$ sample by sample. Then we add up the products. Each time the flipped $h$ slides one step to the right, we get the next output sample.
The flipped $h$ slides one step for each $n$. Multiply the samples that overlap and add them to get $y[n]$.
We can also find the length of the output. In the example above, the last input sample arrives at $n=2$, but its response lasts until $n=3$. In general, if two signals have lengths $L_x$ and $L_h$, their convolution has length $L_x+L_h-1$.
Causality and Stability
Since an LTI system is completely determined by $h[n]$, we can also tell its properties just by looking at $h[n]$.
Causality
A system is causal if its output at time $n$ depends only on the current and past inputs. In other words, it cannot look ahead at future inputs.
To see what this means for $h[n]$, look at a single output sample:
\(y[2] = \sum_{m=-\infty}^\infty x[m]h[2-m] = \cdots + x[1]h[1] + x[2]h[0] + x[3]h[-1] + x[4]h[-2] + \cdots\) The future inputs $x[3], x[4], \dots$ are multiplied by $h[-1], h[-2], \dots$. In general, a future input $x[m]$ with $m>n$ is multiplied by $h[n-m]$, where $n-m<0$. For the output to ignore future inputs, all of these values must be zero. Therefore, an LTI system is causal if and only if $h[n]=0$ for $n<0$.
This also makes sense from the definition of $h[n]$. It is the output when an impulse arrives at $n=0$, so if $h[n]$ were nonzero for some $n<0$, the system would respond before the impulse arrives.
Stability
A system is BIBO stable (bounded-input, bounded-output) if every bounded input produces a bounded output. An LTI system is stable if and only if $h[n]$ is absolutely summable:
\[\sum_{n=-\infty}^{\infty} \lvert h[n]\rvert < \infty\]For example, $h[n]=a^n u[n]$ is stable when $\lvert a\rvert<1$, since the sum is $1/(1-\lvert a\rvert)$. When $\lvert a\rvert\ge1$, the sum diverges and the system is unstable.
Why is absolute summability the condition?
Suppose the input is bounded, that is, $\lvert x[n]\rvert\le B$ for every $n$. Writing the convolution with $k=n-m$, we get
\[\lvert y[n]\rvert = \Big\lvert \sum_{k} h[k]\,x[n-k] \Big\rvert \le \sum_{k} \lvert h[k]\rvert\,\lvert x[n-k]\rvert \le B \sum_{k} \lvert h[k]\rvert\]The right-hand side is finite and does not depend on $n$, so the output is bounded.
Conversely, suppose $\sum\lvert h[k]\rvert$ is infinite. The output at $n=0$ is $y[0]=\sum_k h[k]\,x[-k]$. Choose each input sample to be $+1$ where $h[k]>0$ and $-1$ where $h[k]<0$. Then every term $h[k]\,x[-k]$ equals $\lvert h[k]\rvert$, so $y[0]=\sum_k\lvert h[k]\rvert=\infty$. The input never exceeds $1$ in magnitude, but the output is unbounded.
We will see this condition again in the DTFT post. For a stable system, the DTFT of $h[n]$ always exists.