aboutsummaryrefslogtreecommitdiffstats
path: root/tex/filters.tex
blob: f1ec82063d055054296cdf40f6ab8b4201800e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
\section{Filters}

\subsection{Normalized Frequency}

For this section we will always use a normalized frequency \(\Omega = \omega/\omega_r\) for some reference frequency \(\omega_r\). For TP and HP filters \(\omega_r = \omega_D\) (cut-off frequency), whereas for BP and BS \(\omega_r = \omega_m\) (frequency in the middle of the band).

\begin{figure}[]
  \centering
  \begin{tikzpicture}[
      axis tick/.style = {
        inner sep = 1mm,
        outer sep = 1mm,
      },
      x axis tick/.style = {
        axis tick,
        path picture = {
          \draw[thick, -]
            ($(path picture bounding box) + (0,.1)$) --
            ($(path picture bounding box) - (0,.1)$);
        }
      },
      y axis tick/.style = {
        axis tick,
        path picture = {
          \draw[thick, -]
            ($(path picture bounding box) + (.1,0)$) --
            ($(path picture bounding box) - (.1,0)$);
        }
      }
    ]

    \pgfmathsetmacro\xlen{5}
    \pgfmathsetmacro\ylen{3}

    \coordinate (O) at (0,0);
    \draw[thick, ->] (O) to
      % node[pos = .5, x axis tick, label = -90:1] {}
      node[pos = .4, x axis tick, label = -90:\(\Omega_D\)] (OmegaD) {}
      node[pos = .65, x axis tick, label = -90:\(\Omega_S\)] (OmegaS) {}
      ++(\xlen,0) node[right] {\(\Omega\)};

    \draw[thick, ->] (O) to
      node[pos = .2, y axis tick, label = 180:\(A_\text{max}\)] (Amax) {}
      node[pos = .7, y axis tick, label = 180:\(A_\text{min}\)] (Amin) {}
      ++(0,\ylen) node[above] {\(A\)/dB};

    \draw[dashed, lightgray]
      (Amin) -- ++(\xlen,0)
      (Amax) -- ++(\xlen,0)
      (OmegaD) -- ++(0,\ylen)
      (OmegaS) -- ++(0,\ylen);

    \draw[very thick, red!80!black] (Amax) -| ($(OmegaD) +(0,3)$);
    \draw[very thick, red!80!black] (OmegaS) -- (Amin -| OmegaS) -- ++(1.5,0);

    \node[align = center] at (1,1.3) {Stamp \\ (passband)};
    \node[align = center] at (4.3,1.3) {Mold \\ (stopband)};

  \end{tikzpicture}
\end{figure}

\subsection{LPF Approximations}
The approximations of ideal low pass filters generally have (with some exceptions) the form
\[
  |H(j\Omega)|^2 = H(j\Omega)\cdot H^*(j\Omega)= \frac{1}{1 + K(\Omega^2)},
\]
where \(K\) is the so called \emph{charcteristic function}. For a nicer notation we will define the \emph{attenuation} function
\[
  A(\Omega) = 10 \log \left(|H(j\Omega)|^{-2}\right),
  \quad [A] = \text{dB}.
\]
With that, ideally wish to have an approximation that satisfies the following requirements:
\begin{itemize}
  \item \(A(\Omega = 0) = 1\) = 0\text{ dB}
  \item \(A(\Omega = 1) = 1/\sqrt{2} \approx -3\text{ dB}\)
  \item \(A(\Omega \to \infty) = 0\)
\end{itemize}

\paragraph{Critically damped filter}

\paragraph{Butterworth} Let \(K(\Omega^2) = \Omega^{2n}\), thus
\[
  A(\Omega) = 10 \log\left(1 + \Omega^{2n}\right).
\]
To find the order of the filter given two parameters the formula is
\[
  n = \left\lceil \frac{1}{2} \log\left(
        \frac{10^{A_\text{min}/10} -1}{10^{A_\text{max}/10} -1}
        - \frac{\Omega_S}{\Omega_D}
      \right) \right\rceil.
\]

\paragraph{Chebyshev I} Let \(K(\Omega^2) = e^2 C_n^2(\Omega)\), so
\[
  A(\Omega) = 10 \log\left(1 + e^2C_n^2(\Omega) \right),
\]
where \(C_n = \cos(n\arccos(\Omega))\) for \(|\Omega| \leq 1\) (in the passband), and when \(|\Omega| > 1\) (in the stopband) \(C_n = \cosh(n\arccosh(\Omega))\), is a so called Chebyshev polynomial of \(n\)-th order. \(e\) is a parameter, \emph{not the natural number (2.71\ldots)}. Chebyshev polynomials can be computed recursively with the formula
\[
  C_n = 2\Omega C_{n-1} - C_{n-2},
\]
and knowing that \(C_1 = \Omega\) and \(C_2 = 2\Omega^2 - 1\).

The idea is that in the passband the attenuation is periodic and stays more or less constant, and in the stopband the function is no longer periodic and damps the frequencies. To find the parameter \(e\) given an \(A_\text{max}\)
\[
  e = \sqrt{10^{A_\text{max}/10} - 1},
\]
and to find the order given two parameters
\[
  n = \left\lceil \frac{
    \arccosh\sqrt{
      \frac{10^{A_\text{min}/10} -1}{10^{A_\text{max}}-1}
    }
  }{
    \arccosh(\Omega_S/\Omega_D)
  } \right\rceil.
\]

\paragraph{Chebyshev II} Also known as \emph{inverse} Chebyshev. Let \(K(\Omega^2) = 1/e^2 C_n^2(1/\Omega)\).

\paragraph{Cauer}

% vim:ts=2 sw=2 et: