Infinite Impulse Response [[Signal Filter|Filters]] (or Feedback Filters) are filters who take account of previous *outputs* of the signal.
An example is the following:
$\huge \begin{align}
y_{t} &= x_{t} + y_{t-1}
\end{align} $
>[!example] Signal Diagram
>![[Infinite Impulse Response Filters .excalidraw.svg]]
%%[[Infinite Impulse Response Filters .excalidraw.md|🖋 Edit in Excalidraw]]%%
Intepretation of these types signals benefit from viewing the [[Transfer Function]] when following the convention of assuming $x_{t}$ is of the form of a [[Complex Exponential]] $e^{i\omega t}$ and that our system is [[Linear Transformation|Linear]].
Where $X$ is the whole signal $\vec x$ and $Y$ is the whole output signal $\vec y$, then
$\huge \begin{align}
Y &= X + z^{-1}Y \\
Y-z^{-1}Y &= X\\
(1-z^{-1})Y &= X \\
Y &= \frac{1}{1-z^{-1}}X
\end{align} $
Therefore the [[Transfer Function]] would of this system would be:
$\huge \begin{align}
\mathcal{H}(z) &= \frac{1}{1-z^{-1}} = \frac{z}{z-1}
\end{align}
$
Thus our [[Frequency Response Function]] would be:
$\huge \begin{align}
H(\omega) &= \frac{1}{1-e^{-i \omega}} = \frac{e^{i\omega}}{e^{i\omega}-1}
\end{align} $
Giving us the derivation for our [[Frequency Response Function|Magnitude Response]]:
$\huge \begin{align}
|H(\omega)| &= \left| \frac{1}{e^{i\omega}-1} \right| \\
&= \frac{1}{\left| e^{i\omega} - 1\right| }
\end{align} $
This shows that this feedback filter's transfer function has a [[Pole]] over $\omega=0$ / $\mathcal{H}(1)$.
>[!example] Geometric Visual
> Visualized geometrically as $|H(\omega)|$ being one over the distance between $e^{i\omega}$ and $1$.
> ![[Infinite Impulse Response Filters _0.excalidraw.svg]]
%%[[Infinite Impulse Response Filters _0.excalidraw.md|🖋 Edit in Excalidraw]]%%
### Impulse Response
The [[Impulse Response]] of the previous example (using the [[Kronecker Delta]]):
$\huge \begin{align}
\vec x = \vec \delta &= \mat{1,0,0,\cdots} \\
y_{t} &= x_{t}+y_{t-1} \\
\vec y = \vec h &= \mat{1,1,1, \cdots}
\end{align} $
>[!example] A Less Trivial Example
> $\huge \begin{align}
> y_{t} &= x_{t} + \frac{1}{2}y_{t-1} \\
> \vec h&= \mat{1, \frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \cdots, \frac{1}{2^{k}}, \cdots}
> \end{align} $
>[!example] Another Example
> $\huge \begin{align}
> y_{t} &= x_{t} + 2 y_{t-1} \\
> \vec h &= \mat{ 1,2,2^{2},2^{3}, \cdots}
> \end{align}
> $
## Stability
Because these types of signals operate as a feedback loop, it is possible for these signals to become unstable / blow up to in infinity (shown by the presence of [[Pole|Poles]] in ${H}(\omega)$).
$\huge \begin{align}
\mathcal{H}(z)= \frac{z}{z-1} &\to z=1 \\
\mathcal{H}(z)= \frac{1}{1- \frac{1}{2}z^{-1}}= \frac{z}{z- \frac{1}{2}} &\to z = \frac{1}{2}\\
\mathcal{H}(z)= \frac{z}{z-2} &\to z = 2
\end{align} $
A rule of thumb is that a [[Infinite Impulse Response Filters|Feedback Filter]] is *stable* if all poles of $\mathcal{H}(z)$ are contained within the [[Open Subset]] $S_{1} \subset \mathbb{C}$, *ie.* $|z| < 1$.
## Transfer Functions with more than one pole
$\huge \begin{align}
\mathcal{H}(z) &= \frac{z^{3}}{(z-p_{1})(z-p_{2})(z-p_{3})}
\end{align} $
This type of [[Transfer Function]] could come from a filter equation:
$\huge \begin{align}
y_{t} &= x_{t}-b_{1}y_{t-1}-b_{2}y_{t-2}-b_{3}y_{t-3} \\
Y &=X - b_{1}z^{-1}Y - b_{2}z^{-2}Y -b_{3}z^{-3}Y \\
X &=Y\left( 1+ b_{1}z^{-1}+b_{2}z^{-2}+b_{3}z^{-3} \right) \\
\end{align} $
$ \huge \begin{align}
\mathcal{H}(z) &= \frac{1}{1+b_{1}z^{-1}+b_{2}z^{-2}+b_{3}z_{3}}\\
&= \frac{z^{3}}{z^{3}+b_{1}z^{2}+b_{2}z+b_{3}}
\end{align} $
Because the denominator is a [[Polynomial]], it will always have 3 roots $p_{1},p_{2},p_{3}$, meaning $\mathcal{H}(z)$ has poles at $p_{1},p_{2},p_{3}$.
>[!example] Generalization
> This generalizes to any [[Infinite Impulse Response Filters|Feedback Filter]] that is a [[Linear Combination]] of $y_{t},y_{t-1}, \cdots,y_{t-d+1}$.
>
> $\huge \begin{align}
> y_{t} &= b_{0}x_{t} + \sum^{d-1}_{j=1} -b_{j} y_{t-j} \\
>
> X &= Y\sum_{j=0}^{d-1} b_{j}z^{-j} \\
> \mathcal{H}(z) &= \frac{z^{d}}{\sum_{j=0}^{d} z^{d-j} b_{j}}
> \end{align}
> $
>
>
To check the stability of $\mathcal{H}(z)$, we can use [[Partial Fraction Decomposition]].
$
\huge \begin{align}
\mathcal{H}(z) &= \underbrace{\frac{A_{1}z}{z-p_{1}}}_{\mathcal{H}_{1}(z)} + \underbrace{\frac{A_{2}z}{z-p_{2}}}_{\mathcal{H}_{2}(z)} +
\underbrace{\frac{A_{3}z}{z-p_{3}}}_{\mathcal{H}_{3}(z)}
\end{align}
$
Which lets us rewrite our output signal as simply the sum of three filters:
$\huge \begin{align}
Y = \mathcal{H}_{1}(z)X + \mathcal{H}_{2}(z)X + \mathcal{H}_{3}(z)X
\end{align} $
Each of these $\mathcal{H}_{k}(z)$ have a single delay $z^{-1}$ and one pole.
Another approach to stability is [[Bounded Input Bounded Output]] (BIBO) Stability. A filter is BIBO stable if whenever $\vec x$ satisfies $x_{t} \leq M_{x} \forall t$, then $\vec y$ must satisfy $y_{t} \leq M_{y} \forall t$ for some $M_{x},M_{y}$.