|
6 | 6 | "source": [ |
7 | 7 | "# Realization of Recursive Filters\n", |
8 | 8 | "\n", |
9 | | - "*This jupyter/Python notebook is part of a [collection of notebooks](../index.ipynb) in the masters module [Digital Signal Processing](http://www.int.uni-rostock.de/Digitale-Signalverarbeitung.48.0.html), Comunications Engineering, Universität Rostock. Please direct questions and suggestions to <mailto:[email protected]>.*" |
| 9 | + "*This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing. Please direct questions and suggestions to [[email protected]](mailto:[email protected]).*" |
10 | 10 | ] |
11 | 11 | }, |
12 | 12 | { |
|
26 | 26 | "\n", |
27 | 27 | "Linear difference equations with constant coefficients represent linear-time invariant (LTI) systems\n", |
28 | 28 | "\n", |
29 | | - "$$ \\sum_{n=0}^{N} a_n \\; y[k-n] = \\sum_{m=0}^{M} b_m \\; x[k-m] $$\n", |
| 29 | + "\\begin{equation}\n", |
| 30 | + "\\sum_{n=0}^{N} a_n \\; y[k-n] = \\sum_{m=0}^{M} b_m \\; x[k-m]\n", |
| 31 | + "\\end{equation}\n", |
30 | 32 | "\n", |
31 | 33 | "where $y[k] = \\mathcal{H} \\{ x[k] \\}$ denotes the response of the system to the input signal $x[k]$, $N$ the order, $a_n$ and $b_m$ constant coefficients, respectively. Above equation can be rearranged with respect to the output signal $y[k]$ by extracting the first element ($n=0$) of the left hand sum\n", |
32 | 34 | "\n", |
33 | | - "$$ y[k] = \\frac{1}{a_0} \\left( \\sum_{m=0}^{M} b_m \\; x[k-m] - \\sum_{n=1}^{N} a_n \\; y[k-n] \\right) $$\n", |
| 35 | + "\\begin{equation}\n", |
| 36 | + "y[k] = \\frac{1}{a_0} \\left( \\sum_{m=0}^{M} b_m \\; x[k-m] - \\sum_{n=1}^{N} a_n \\; y[k-n] \\right)\n", |
| 37 | + "\\end{equation}\n", |
34 | 38 | "\n", |
35 | 39 | "It is evident that the output signal $y[k]$ at time instant $k$ is given as a linear combination of past output samples $y[k-n]$ superimposed by a linear combination of the actual $x[k]$ and past $x[k-m]$ input samples. Hence, the actual output $y[k]$ is composed from the two contributions\n", |
36 | 40 | "\n", |
|
39 | 43 | "\n", |
40 | 44 | "The impulse response of the system is given as the response of the system to a Dirac impulse at the input $h[k] = \\mathcal{H} \\{ \\delta[k] \\}$. Using above result and the properties of the discrete Dirac impulse we get\n", |
41 | 45 | "\n", |
42 | | - "$$ h[k] = \\frac{1}{a_0} \\left( b_k - \\sum_{n=1}^{N} a_n \\; h[k-n] \\right) $$\n", |
| 46 | + "\\begin{equation}\n", |
| 47 | + "h[k] = \\frac{1}{a_0} \\left( b_k - \\sum_{n=1}^{N} a_n \\; h[k-n] \\right)\n", |
| 48 | + "\\end{equation}\n", |
43 | 49 | "\n", |
44 | 50 | "Due to the feedback, the impulse response will in general be of infinite length. The impulse response is termed as [infinite impulse response](https://en.wikipedia.org/wiki/Infinite_impulse_response) (IIR) and the system as recursive system/filter." |
45 | 51 | ] |
|
52 | 58 | "\n", |
53 | 59 | "Applying a $z$-transform to the left and right hand side of the difference equation and rearranging terms yields the transfer function $H(z)$ of the system\n", |
54 | 60 | "\n", |
55 | | - "$$ H(z) = \\frac{Y(z)}{X(z)} = \\frac{\\sum_{m=0}^{M} b_m \\; z^{-m}}{\\sum_{n=0}^{N} a_n \\; z^{-n}} $$\n", |
| 61 | + "\\begin{equation}\n", |
| 62 | + "H(z) = \\frac{Y(z)}{X(z)} = \\frac{\\sum_{m=0}^{M} b_m \\; z^{-m}}{\\sum_{n=0}^{N} a_n \\; z^{-n}}\n", |
| 63 | + "\\end{equation}\n", |
56 | 64 | "\n", |
57 | 65 | "The transfer function is given as a [rational function](https://en.wikipedia.org/wiki/Rational_function) in $z$. The polynominals of the numerator and denominator can expressed alternatively by their roots as\n", |
58 | 66 | "\n", |
59 | | - "$$ H(z) = \\frac{b_M}{a_N} \\cdot \\frac{\\prod_{\\mu=1}^{P} (z - z_{0\\mu})^{m_\\mu}}{\\prod_{\\nu=1}^{Q} (z - z_{\\infty\\nu})^{n_\\nu}} $$\n", |
| 67 | + "\\begin{equation}\n", |
| 68 | + "H(z) = \\frac{b_M}{a_N} \\cdot \\frac{\\prod_{\\mu=1}^{P} (z - z_{0\\mu})^{m_\\mu}}{\\prod_{\\nu=1}^{Q} (z - z_{\\infty\\nu})^{n_\\nu}}\n", |
| 69 | + "\\end{equation}\n", |
60 | 70 | "\n", |
61 | 71 | "where $z_{0\\mu}$ and $z_{\\infty\\nu}$ denote the $\\mu$-th zero and $\\nu$-th pole of degree $m_\\mu$ and $n_\\nu$ of $H(z)$, respectively. The total number of zeros and poles is denoted by $P$ and $Q$. Due to the symmetries of the $z$-transform, the transfer function of a real-valued system $h[k] \\in \\mathbb{R}$ exhibits complex conjugate symmetry\n", |
62 | 72 | "\n", |
63 | | - "$$ H(z) = H^*(z^*) $$\n", |
| 73 | + "\\begin{equation}\n", |
| 74 | + "H(z) = H^*(z^*)\n", |
| 75 | + "\\end{equation}\n", |
64 | 76 | "\n", |
65 | 77 | "Poles and zeros are either real valued or conjugate complex pairs for real-valued systems ($b_m\\in\\mathbb{R}$, $a_n\\in\\mathbb{R}$). For the poles of a causal and stable system $H(z)$ the following condition has to hold\n", |
66 | 78 | "\n", |
67 | | - "$$ \\max_{\\nu} | z_{\\infty\\nu} | < 1 $$\n", |
| 79 | + "\\begin{equation}\n", |
| 80 | + "\\max_{\\nu} | z_{\\infty\\nu} | < 1\n", |
| 81 | + "\\end{equation}\n", |
68 | 82 | "\n", |
69 | 83 | "Hence all poles have to be located inside the unit circle $|z| = 1$. Amongst others, this implies that $M \\leq N$." |
70 | 84 | ] |
|
212 | 226 | "source": [ |
213 | 227 | "**Copyright**\n", |
214 | 228 | "\n", |
215 | | - "<p xmlns:dct=\"http://purl.org/dc/terms/\">\n", |
216 | | - " <a rel=\"license\"\n", |
217 | | - " href=\"http://creativecommons.org/publicdomain/zero/1.0/\">\n", |
218 | | - " <img src=\"http://i.creativecommons.org/p/zero/1.0/88x31.png\" style=\"border-style: none;\" alt=\"CC0\" />\n", |
219 | | - " </a>\n", |
220 | | - " <br />\n", |
221 | | - " To the extent possible under law,\n", |
222 | | - " <span rel=\"dct:publisher\" resource=\"[_:publisher]\">the person who associated CC0</span>\n", |
223 | | - " with this work has waived all copyright and related or neighboring\n", |
224 | | - " rights to this work.\n", |
225 | | - "</p>" |
| 229 | + "This notebook is provided as [Open Educational Resource](https://en.wikipedia.org/wiki/Open_educational_resources). Feel free to use the notebook for your own purposes. The text is licensed under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/), the code of the IPython examples under the [MIT license](https://opensource.org/licenses/MIT). Please attribute the work as follows: *Sascha Spors, Digital Signal Processing - Lecture notes featuring computational examples, 2016*." |
226 | 230 | ] |
227 | 231 | } |
228 | 232 | ], |
|
0 commit comments