# Linear Time-Invariant Systems

The premsie of a Linear Time-Invariant System is that any linear combination of input equations with any time shifts can be mapped to valid output equations in a given LTI System. This rule is called "Superposition". According to dspguide.com, superposition is the "basis of nearly all signal processing techniques".

Besides the utility of chopping up, scaling, and translating signal blocks, superposition is a powerful idea that asks us to break complex problems down into manageable pieces.

## Linearity

Call this the input/output mapping of a system:

$x(t) \Rightarrow y(t)$

We identify two specific input/output pairs:

$x_1(t) \Rightarrow y_1(t)$ $x_2(t) \Rightarrow y_2(t)$

If the system is Linear, we can add linear combinations of the input x(t) functions together to composite a valid output y(t):

$x_3(t) = ax_1(t) + bx_2(t) \Rightarrow y_3(t) = ay_1(t) + by_2(t)$

The output mapped by x3(t) exactly equals the addition of the outputs mapped by ax1(t) and bx2(t). That a linear system's premise. We can show the same result using matrix algebra. Here we add the mapped outputs of the two discrete functions together:

$\begin{bmatrix} a \\ 0 \end{bmatrix} [x(t)] + \begin{bmatrix} 0 \\ b \end{bmatrix} [x(t)] \Rightarrow \begin{bmatrix} ay(t) \\ 0 \end{bmatrix} + \begin{bmatrix} 0 \\ by(t) \end{bmatrix} = \begin{bmatrix} ay(t) \\ by(t) \end{bmatrix}$

While here, we create a composite input of two x(t) functions, with coefficients a and b, mapping the composite function input to the exact same output matrix:

$\begin{bmatrix} a \\ b \end{bmatrix} [x(t)] \Rightarrow \begin{bmatrix} ax(t) \\ bx(t) \end{bmatrix}$

Linear combination of inputs mapping to the exact same single output as the linear combination of outputs from discrete inputs is the condition of a linear system.

### Linearity Test

The five steps to prove that a system is linear follow from the condition above:

1. Map the first input-output pair:
x1(t) ⇒ y1(t)
2. Map the second input-output pair:
x2(t) ⇒ y2(t)
3. Create a linear-combination input and map its output:
x3(t) = ax1(t) + bx2(t) ⇒ y3(t)
4. Find the linear-combination output a linear system would have:
yL(t) = ay1(t) + by2(t)
5. The system is linear if the outputs match:
y3(t) ?= yL(t)

## Time Invariance

Taking the same fundamental input/output mapping:

$x(t) \Rightarrow y(t)$

We identify a specific input/output pair at another point in time:

$x_1(t-T) \Rightarrow y_1(t-T)$

If the system is Time Invariant, the time-shifted input x1(t) maps to the same specific y(t) function, y1(t), as you'd find by time-shifting the system's mapped output.

### Time Invariance Test

The four steps to prove a system's time invariance follow from the above condition:

1. Map the systems general input-output pairing:
x(t) = y(t)
2. Define a time-shifted input and its paired output:
x1(t) = x(t-T) ⇒ y1(t) = y(t-T)
3. Find the time-shifted output a TI system would have:
yTI(t) = y(t-T)
4. The system is time invariant if the outputs match:
y1(t) ?= yTI(t)

# Properties of LTI Systems

If the LTI conditions are met, the system is also:

1. Dynamic, meaning it has memory.
2. Invertible, meaning it can be flipped over the dependent axis.
3. Causal, meaning the output depends only on past and present inputs.
4. Real, meaning inputs and outputs are fully real numbers.
5. Stable, so they produce bounded outputs for bounded inputs.

Another very important property is that integrating and deriving the input of an LTI system propagates to the output:

$\because x(t) \Rightarrow y(t),$ $\therefore \frac{dx}{dt} \Rightarrow \frac{dy}{dt}$ $\therefore \int_{-\inf}^tx(\tau)d\tau \Rightarrow \int_{-\inf}^ty(\tau)d\tau$

This follow-through becomes very useful when we consider that fundamental properites of current and voltage are related by derivation in capacitors and inductors, and one elementary DSP function, the unit step, is the derivative of the unit impulse. In fact, the latter case is so useful that the LTI responses to unit-impulse and unit-step have their own names and notation:

$x(t) = \delta(t) \Rightarrow y(t) = h(t) \\ x(t) = u(t) \Rightarrow y(t) = g(t)$

The impulse response is called h(t), while the step response is called g(t). Because of the step-unit relationship, and the fact that derivatives and integrations carry through, the impulse response h(t) is the derivative of the step response g(t).

$h(t) = \frac{dg(t)}{dt} \\ g(t) = \int_{-\inf}^t h(\tau) d\tau$

The impulse response is fundamental in analyzing LTI systems! It is the keystone of Convolution Integration -- mapping outputs to inputs, knowing only the impulse response (and a whole lot of math...).