Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notation Update #15

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions filter_design/fir_filter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,18 +391,18 @@
"An FIR filter $h[k]$ is used for convolution (i.e. filtering process)\n",
"\n",
"\\begin{align}\n",
"x[k] \\ast h[k] \\circ-\\bullet X(\\mathrm{e}^{\\mathrm{j}\\Omega}) \\cdot H(\\mathrm{e}^{\\mathrm{j}\\Omega}),\n",
"x[k] \\ast h[k] \\circ-\\bullet X(\\Omega) \\cdot H(\\Omega),\n",
"\\end{align}\n",
"\n",
"whereas the DFT windowing process involves a multiplication with a window $w[k]$\n",
"\n",
"\\begin{align}\n",
"x[k] \\cdot w[k] \\circ-\\bullet \\frac{1}{2\\pi} X(\\mathrm{e}^{\\mathrm{j}\\Omega}) \\circledast_{2\\pi} W(\\mathrm{e}^{\\mathrm{j}\\Omega}).\n",
"x[k] \\cdot w[k] \\circ-\\bullet \\frac{1}{2\\pi} X(\\Omega) \\circledast_{2\\pi} W(\\Omega).\n",
"\\end{align}\n",
"\n",
"In the DTFT domain this results in multiplication and circular convolution, respectively.\n",
"\n",
"So, for the finite-length sequences $h[k]$ and $w[k]$ the same design fundamentals hold: we must put zeros at suitable locations in the z-plane to realize a certain desired DTFT spectrum, either $H(\\mathrm{e}^{\\mathrm{j}\\Omega})$ or $W(\\mathrm{e}^{\\mathrm{j}\\Omega})$. Depending on the application, filtering or windowing, the DTFT design criteria might be very different, since the DTFT spectrum acts as multiplication or convolution onto the input signal's DTFT spectrum. However, the design concepts and algorithms itself are basically the same, this is sometimes not so obvious in textbooks. "
"So, for the finite-length sequences $h[k]$ and $w[k]$ the same design fundamentals hold: we must put zeros at suitable locations in the z-plane to realize a certain desired DTFT spectrum, either $H(\\Omega)$ or $W(\\Omega)$. Depending on the application, filtering or windowing, the DTFT design criteria might be very different, since the DTFT spectrum acts as multiplication or convolution onto the input signal's DTFT spectrum. However, the design concepts and algorithms itself are basically the same, this is sometimes not so obvious in textbooks. "
]
},
{
Expand Down Expand Up @@ -435,13 +435,13 @@
"The squared magnitude response can be given analytically as (try yourself, make use of $\\mathrm{e}^{-\\mathrm{j}\\Omega}=\\cos(\\Omega)-\\mathrm{j}\\sin(\\Omega)$ ) \n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = |1 + \\mathrm{e}^{-\\mathrm{j}\\Omega}|^2 = 2 \\cos(\\Omega) + 2 = 4 \\cos^2(\\frac{\\Omega}{2}).\n",
"|H(\\Omega)|^2 = |1 + \\mathrm{e}^{-\\mathrm{j}\\Omega}|^2 = 2 \\cos(\\Omega) + 2 = 4 \\cos^2(\\frac{\\Omega}{2}).\n",
"\\end{equation}\n",
"\n",
"Thus the magnitude response is \n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 2 |\\cos(\\frac{\\Omega}{2})|,\n",
"|H(\\Omega)| = 2 |\\cos(\\frac{\\Omega}{2})|,\n",
"\\end{equation}\n",
"\n",
"which is confirmed by the below plot (left, top). The magnitude response exhibits lowpass characteristics.\n",
Expand Down Expand Up @@ -484,11 +484,11 @@
"## Example FIR M=1, b0=1, b1=-1\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = 4 \\sin^2(\\frac{\\Omega}{2}).\n",
"|H(\\Omega)|^2 = 4 \\sin^2(\\frac{\\Omega}{2}).\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 2 |\\sin(\\frac{\\Omega}{2})|.\n",
"|H(\\Omega)| = 2 |\\sin(\\frac{\\Omega}{2})|.\n",
"\\end{equation}\n",
"\n",
"$z_{\\infty,1}=0$,\n",
Expand Down Expand Up @@ -521,11 +521,11 @@
"Filter order $M=2$, number of coefficients $M+1=3$, although one coefficient is zero, namely $b_1=0$.\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = 4 \\cos^2(\\Omega).\n",
"|H(\\Omega)|^2 = 4 \\cos^2(\\Omega).\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 2 |\\cos(\\Omega)|.\n",
"|H(\\Omega)| = 2 |\\cos(\\Omega)|.\n",
"\\end{equation}\n",
"\n",
"double pole in origin $z_{\\infty,1,2}=0$\n",
Expand Down Expand Up @@ -559,11 +559,11 @@
"Filter order $M=2$, number of coefficients $M+1=3$, although one coefficient is zero, namely $b_1=0$.\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = 4 \\sin^2(\\Omega).\n",
"|H(\\Omega)|^2 = 4 \\sin^2(\\Omega).\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 2 |\\sin(\\Omega)|.\n",
"|H(\\Omega)| = 2 |\\sin(\\Omega)|.\n",
"\\end{equation}\n",
"\n",
"double pole in origin $z_{\\infty,1,2}=0$\n",
Expand Down Expand Up @@ -599,11 +599,11 @@
"The manual derivation of analytic magnitude response starts to get tedious, however:\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = 16 \\cos^4(\\Omega).\n",
"|H(\\Omega)|^2 = 16 \\cos^4(\\Omega).\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 4 \\cos^2(\\Omega).\n",
"|H(\\Omega)| = 4 \\cos^2(\\Omega).\n",
"\\end{equation}\n",
"\n",
"double pole in origin $z_{\\infty,1,2}=0$\n",
Expand Down Expand Up @@ -639,11 +639,11 @@
"Filter order $M=2$, number of coefficients $M+1=3$.\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})|^2 = 16 \\sin^4(\\Omega).\n",
"|H(\\Omega)|^2 = 16 \\sin^4(\\Omega).\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"|H(\\mathrm{e}^{\\mathrm{j}\\Omega})| = 4 \\sin^2(\\Omega).\n",
"|H(\\Omega)| = 4 \\sin^2(\\Omega).\n",
"\\end{equation}\n",
"\n",
"double pole in origin $z_{\\infty,1,2}=0$\n",
Expand Down Expand Up @@ -798,10 +798,10 @@
"A linear-phase FIR filter exhibits the DTFT spectrum\n",
"\n",
"\\begin{equation}\n",
"H(\\mathrm{e}^{\\mathrm{j}\\Omega}) = A(\\mathrm{e}^{\\mathrm{j}\\Omega})\\,\\mathrm{e}^{-\\mathrm{j}\\,\\alpha\\,\\Omega}\\,\\mathrm{e}^{\\mathrm{j}\\,\\beta}\n",
"H(\\Omega) = A(\\Omega)\\,\\mathrm{e}^{-\\mathrm{j}\\,\\alpha\\,\\Omega}\\,\\mathrm{e}^{\\mathrm{j}\\,\\beta}\n",
"\\end{equation}\n",
"\n",
"with the magnitude spectrum $A(\\mathrm{e}^{\\mathrm{j}\\Omega})\\in\\mathbb{R}$ and the phase $\\mathrm{e}^{-\\mathrm{j}\\,\\alpha\\,\\Omega}\\,\\mathrm{e}^{\\mathrm{j}\\,\\beta}$ with $\\alpha,\\beta\\in\\mathbb{R}^+$.\n",
"with the magnitude spectrum $A(\\Omega)\\in\\mathbb{R}$ and the phase $\\mathrm{e}^{-\\mathrm{j}\\,\\alpha\\,\\Omega}\\,\\mathrm{e}^{\\mathrm{j}\\,\\beta}$ with $\\alpha,\\beta\\in\\mathbb{R}^+$.\n",
"\n",
"There are four different basic types of linear-phase FIR filters that differ by the symmetry of the impulse response and the length of the finite impulse response.\n",
"\n",
Expand Down
Loading