Update path
This commit is contained in:
parent
feff71de74
commit
b8057c37f0
321
index.html
321
index.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2019-08-15 jeu. 12:24 -->
|
||||
<!-- 2019-10-08 mar. 13:27 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>List of filters - Matlab Implementation</title>
|
||||
@ -280,40 +280,79 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgb268523">1. Low Pass</a>
|
||||
<li><a href="#orge8f7972">1. Proportional - Integral - Derivative</a>
|
||||
<ul>
|
||||
<li><a href="#orgc6f2664">1.1. First Order</a></li>
|
||||
<li><a href="#org9a99d55">1.2. Second Order</a></li>
|
||||
<li><a href="#org360c529">1.3. Combine multiple filters</a></li>
|
||||
<li><a href="#org8aafed7">1.1. Proportional</a></li>
|
||||
<li><a href="#org37b43e8">1.2. Integral</a></li>
|
||||
<li><a href="#orgfb65936">1.3. Derivative</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb54c74e">2. High Pass</a>
|
||||
<li><a href="#orgfed2e4e">2. Low Pass</a>
|
||||
<ul>
|
||||
<li><a href="#orgd3a001c">2.1. First Order</a></li>
|
||||
<li><a href="#orgbb7602b">2.2. Second Order</a></li>
|
||||
<li><a href="#org593e27b">2.3. Combine multiple filters</a></li>
|
||||
<li><a href="#orga8faa42">2.1. First Order</a></li>
|
||||
<li><a href="#org170a9b0">2.2. Second Order</a></li>
|
||||
<li><a href="#orgf8f61f9">2.3. Combine multiple filters</a></li>
|
||||
<li><a href="#orge265051">2.4. Nice combination</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org499bdf6">3. Band Pass</a></li>
|
||||
<li><a href="#orge29baf7">4. Notch</a></li>
|
||||
<li><a href="#org55acbde">5. Chebyshev</a>
|
||||
<li><a href="#org7e3ece6">3. High Pass</a>
|
||||
<ul>
|
||||
<li><a href="#org04af1b5">5.1. Chebyshev Type I</a></li>
|
||||
<li><a href="#org291d74d">3.1. First Order</a></li>
|
||||
<li><a href="#org5d4ea15">3.2. Second Order</a></li>
|
||||
<li><a href="#orge71c2dd">3.3. Combine multiple filters</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org791f35b">4. Band Pass</a></li>
|
||||
<li><a href="#orge054b4d">5. Notch</a></li>
|
||||
<li><a href="#orgf94d78a">6. Bump</a></li>
|
||||
<li><a href="#org6255d82">7. Chebyshev</a>
|
||||
<ul>
|
||||
<li><a href="#org2bfe9f5">7.1. Chebyshev Type I</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org127884a">8. Lead - Lag</a>
|
||||
<ul>
|
||||
<li><a href="#orgb58ebc8">8.1. Lead</a></li>
|
||||
<li><a href="#org700da69">8.2. Lag</a></li>
|
||||
<li><a href="#orgf2125da">8.3. Lead Lag</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orga776beb">9. Complementary</a></li>
|
||||
<li><a href="#org18d2496">10. Performance Weight</a></li>
|
||||
<li><a href="#org2ee1e4e">11. Combine Filters</a>
|
||||
<ul>
|
||||
<li><a href="#org890b908">11.1. Additive</a></li>
|
||||
<li><a href="#org6f10b80">11.2. Multiplicative</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org214e83b">6. Complementary</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgb268523" class="outline-2">
|
||||
<h2 id="orgb268523"><span class="section-number-2">1</span> Low Pass</h2>
|
||||
<div id="outline-container-orge8f7972" class="outline-2">
|
||||
<h2 id="orge8f7972"><span class="section-number-2">1</span> Proportional - Integral - Derivative</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgc6f2664" class="outline-3">
|
||||
<h3 id="orgc6f2664"><span class="section-number-3">1.1</span> First Order</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div id="outline-container-org8aafed7" class="outline-3">
|
||||
<h3 id="org8aafed7"><span class="section-number-3">1.1</span> Proportional</h3>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org37b43e8" class="outline-3">
|
||||
<h3 id="org37b43e8"><span class="section-number-3">1.2</span> Integral</h3>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfb65936" class="outline-3">
|
||||
<h3 id="orgfb65936"><span class="section-number-3">1.3</span> Derivative</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfed2e4e" class="outline-2">
|
||||
<h2 id="orgfed2e4e"><span class="section-number-2">2</span> Low Pass</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orga8faa42" class="outline-3">
|
||||
<h3 id="orga8faa42"><span class="section-number-3">2.1</span> First Order</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
\[ H(s) = \frac{1}{1 + s/\omega_0} \]
|
||||
</p>
|
||||
@ -326,7 +365,7 @@ H = <span class="org-highlight-numbers-number">1</span><span class="org-type">/<
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgdd885c3" class="figure">
|
||||
<div id="org92da067" class="figure">
|
||||
<p><img src="figs/lpf_first_order.png" alt="lpf_first_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 1: </span>First Order Low Pass Filter (<a href="./figs/lpf_first_order.png">png</a>, <a href="./figs/lpf_first_order.pdf">pdf</a>.</p>
|
||||
@ -335,9 +374,9 @@ H = <span class="org-highlight-numbers-number">1</span><span class="org-type">/<
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org9a99d55" class="outline-3">
|
||||
<h3 id="org9a99d55"><span class="section-number-3">1.2</span> Second Order</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div id="outline-container-org170a9b0" class="outline-3">
|
||||
<h3 id="org170a9b0"><span class="section-number-3">2.2</span> Second Order</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
\[ H(s) = \frac{1}{1 + 2 \xi / \omega_0 s + s^2/\omega_0^2} \]
|
||||
</p>
|
||||
@ -351,7 +390,7 @@ H = <span class="org-highlight-numbers-number">1</span><span class="org-type">/<
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org43d0a1a" class="figure">
|
||||
<div id="orgd09d719" class="figure">
|
||||
<p><img src="figs/lpf_second_order.png" alt="lpf_second_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 2: </span>Second Order Low Pass Filter (<a href="./figs/lpf_second_order.png">png</a>, <a href="./figs/lpf_second_order.pdf">pdf</a>.</p>
|
||||
@ -360,9 +399,9 @@ H = <span class="org-highlight-numbers-number">1</span><span class="org-type">/<
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org360c529" class="outline-3">
|
||||
<h3 id="org360c529"><span class="section-number-3">1.3</span> Combine multiple filters</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div id="outline-container-orgf8f61f9" class="outline-3">
|
||||
<h3 id="orgf8f61f9"><span class="section-number-3">2.3</span> Combine multiple filters</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
\[ H(s) = \left( \frac{1}{1 + s/\omega_0} \right)^n \]
|
||||
</p>
|
||||
@ -376,23 +415,42 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highli
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org63ca6d5" class="figure">
|
||||
<div id="org05c14e7" class="figure">
|
||||
<p><img src="figs/lpf_multiple_first_order.png" alt="lpf_multiple_first_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 3: </span>Combine Multiple First Order Low Pass Filter (<a href="./figs/lpf_multiple_first_order.png">png</a>, <a href="./figs/lpf_multiple_first_order.pdf">pdf</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgb54c74e" class="outline-2">
|
||||
<h2 id="orgb54c74e"><span class="section-number-2">2</span> High Pass</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<div id="outline-container-orge265051" class="outline-3">
|
||||
<h3 id="orge265051"><span class="section-number-3">2.4</span> Nice combination</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
\begin{equation}
|
||||
W(s) = G_c * \left(\frac{\frac{1}{\omega_0}\sqrt{\frac{1 - \left(\frac{G_0}{G_c}\right)^{\frac{2}{n}}}{1 - \left(\frac{G_c}{G_\infty}\right)^{\frac{2}{n}}}} s + \left(\frac{G_0}{G_c}\right)^{\frac{1}{n}}}{\frac{1}{\omega_0} \sqrt{\frac{1 - \left(\frac{G_0}{G_c}\right)^{\frac{2}{n}}}{\left(\frac{G_\infty}{G_c}\right)^{\frac{2}{n}} - 1}} s + 1}\right)^n
|
||||
\end{equation}
|
||||
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">n = <span class="org-highlight-numbers-number">2</span>; w0 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">11</span>; G0 = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span><span class="org-highlight-numbers-number">10</span>; G1 = <span class="org-highlight-numbers-number">1000</span>; Gc = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span><span class="org-highlight-numbers-number">2</span>;
|
||||
wL = Gc<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-rainbow-delimiters-depth-3">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">/</span>w0<span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">-</span><span class="org-rainbow-delimiters-depth-5">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-rainbow-delimiters-depth-5">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">*</span>s <span class="org-type">+</span> <span class="org-rainbow-delimiters-depth-3">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>w0<span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">-</span><span class="org-rainbow-delimiters-depth-5">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-rainbow-delimiters-depth-5">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">*</span>s <span class="org-type">+</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span>n;
|
||||
|
||||
n = <span class="org-highlight-numbers-number">3</span>; w0 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">9</span>; G0 = <span class="org-highlight-numbers-number">10000</span>; G1 = <span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">1</span>; Gc = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span><span class="org-highlight-numbers-number">2</span>;
|
||||
wH = Gc<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-rainbow-delimiters-depth-3">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">/</span>w0<span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">-</span><span class="org-rainbow-delimiters-depth-5">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-rainbow-delimiters-depth-5">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">*</span>s <span class="org-type">+</span> <span class="org-rainbow-delimiters-depth-3">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>w0<span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">-</span><span class="org-rainbow-delimiters-depth-5">(</span>G0<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-4">(</span><span class="org-rainbow-delimiters-depth-5">(</span>G1<span class="org-type">/</span>Gc<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">^</span><span class="org-rainbow-delimiters-depth-5">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-5">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-type">*</span>s <span class="org-type">+</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span>n;
|
||||
</pre>
|
||||
</div>
|
||||
<div id="outline-container-orgd3a001c" class="outline-3">
|
||||
<h3 id="orgd3a001c"><span class="section-number-3">2.1</span> First Order</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7e3ece6" class="outline-2">
|
||||
<h2 id="org7e3ece6"><span class="section-number-2">3</span> High Pass</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org291d74d" class="outline-3">
|
||||
<h3 id="org291d74d"><span class="section-number-3">3.1</span> First Order</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
\[ H(s) = \frac{s/\omega_0}{1 + s/\omega_0} \]
|
||||
</p>
|
||||
@ -405,7 +463,7 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type"
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orga1cad81" class="figure">
|
||||
<div id="orgc492a24" class="figure">
|
||||
<p><img src="figs/hpf_first_order.png" alt="hpf_first_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 4: </span>First Order High Pass Filter (<a href="./figs/hpf_first_order.png">png</a>, <a href="./figs/hpf_first_order.pdf">pdf</a>.</p>
|
||||
@ -414,9 +472,9 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type"
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgbb7602b" class="outline-3">
|
||||
<h3 id="orgbb7602b"><span class="section-number-3">2.2</span> Second Order</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<div id="outline-container-org5d4ea15" class="outline-3">
|
||||
<h3 id="org5d4ea15"><span class="section-number-3">3.2</span> Second Order</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<p>
|
||||
\[ H(s) = \frac{s^2/\omega_0^2}{1 + 2 \xi / \omega_0 s + s^2/\omega_0^2} \]
|
||||
</p>
|
||||
@ -430,7 +488,7 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type"
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org3189fd8" class="figure">
|
||||
<div id="orga8fa21b" class="figure">
|
||||
<p><img src="figs/hpf_second_order.png" alt="hpf_second_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 5: </span>Second Order High Pass Filter (<a href="./figs/hpf_second_order.png">png</a>, <a href="./figs/hpf_second_order.pdf">pdf</a>.</p>
|
||||
@ -439,9 +497,9 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type"
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org593e27b" class="outline-3">
|
||||
<h3 id="org593e27b"><span class="section-number-3">2.3</span> Combine multiple filters</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<div id="outline-container-orge71c2dd" class="outline-3">
|
||||
<h3 id="orge71c2dd"><span class="section-number-3">3.3</span> Combine multiple filters</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
<p>
|
||||
\[ H(s) = \left( \frac{s/\omega_0}{1 + s/\omega_0} \right)^n \]
|
||||
</p>
|
||||
@ -455,7 +513,7 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbo
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org496a810" class="figure">
|
||||
<div id="orge98e2ed" class="figure">
|
||||
<p><img src="figs/hpf_multiple_first_order.png" alt="hpf_multiple_first_order.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 6: </span>Combine Multiple First Order High Pass Filter (<a href="./figs/hpf_multiple_first_order.png">png</a>, <a href="./figs/hpf_multiple_first_order.pdf">pdf</a>.</p>
|
||||
@ -466,21 +524,38 @@ H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbo
|
||||
|
||||
|
||||
|
||||
<div id="outline-container-org499bdf6" class="outline-2">
|
||||
<h2 id="org499bdf6"><span class="section-number-2">3</span> Band Pass</h2>
|
||||
<div id="outline-container-org791f35b" class="outline-2">
|
||||
<h2 id="org791f35b"><span class="section-number-2">4</span> Band Pass</h2>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge29baf7" class="outline-2">
|
||||
<h2 id="orge29baf7"><span class="section-number-2">4</span> Notch</h2>
|
||||
<div id="outline-container-orge054b4d" class="outline-2">
|
||||
<h2 id="orge054b4d"><span class="section-number-2">5</span> Notch</h2>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org55acbde" class="outline-2">
|
||||
<h2 id="org55acbde"><span class="section-number-2">5</span> Chebyshev</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<div id="outline-container-orgf94d78a" class="outline-2">
|
||||
<h2 id="orgf94d78a"><span class="section-number-2">6</span> Bump</h2>
|
||||
<div class="outline-text-2" id="text-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">n = <span class="org-highlight-numbers-number">4</span>;
|
||||
w0 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span>;
|
||||
A = <span class="org-highlight-numbers-number">10</span>;
|
||||
|
||||
a = sqrt<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">*</span>A<span class="org-type">^</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-type">-</span> <span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span>A<span class="org-type">^</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-2">(</span>A<span class="org-type">^</span><span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span>n<span class="org-rainbow-delimiters-depth-3">)</span> <span class="org-type">-</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||
G = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span><span class="org-rainbow-delimiters-depth-3">(</span>w0<span class="org-type">/</span>a<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">*</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span><span class="org-rainbow-delimiters-depth-3">(</span>w0<span class="org-type">*</span>a<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>w0<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span>n;
|
||||
bodeFig<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">{</span>G<span class="org-rainbow-delimiters-depth-2">}</span><span class="org-rainbow-delimiters-depth-1">)</span>
|
||||
</pre>
|
||||
</div>
|
||||
<div id="outline-container-org04af1b5" class="outline-3">
|
||||
<h3 id="org04af1b5"><span class="section-number-3">5.1</span> Chebyshev Type I</h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org6255d82" class="outline-2">
|
||||
<h2 id="org6255d82"><span class="section-number-2">7</span> Chebyshev</h2>
|
||||
<div class="outline-text-2" id="text-7">
|
||||
</div>
|
||||
<div id="outline-container-org2bfe9f5" class="outline-3">
|
||||
<h3 id="org2bfe9f5"><span class="section-number-3">7.1</span> Chebyshev Type I</h3>
|
||||
<div class="outline-text-3" id="text-7-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">n = <span class="org-highlight-numbers-number">4</span>; <span class="org-comment">% Order of the filter</span>
|
||||
Rp = <span class="org-highlight-numbers-number">3</span>; <span class="org-comment">% Maximum peak-to-peak ripple [dB]</span>
|
||||
@ -492,7 +567,7 @@ H = ss<span class="org-rainbow-delimiters-depth-1">(</span>A, B, C, D<span class
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgad8bf8c" class="figure">
|
||||
<div id="org175fae7" class="figure">
|
||||
<p><img src="figs/cheby1_hpf.png" alt="cheby1_hpf.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 7: </span>First Order Low Pass Filter (<a href="./figs/cheby1_hpf.png">png</a>, <a href="./figs/cheby1_hpf.pdf">pdf</a>.</p>
|
||||
@ -501,13 +576,141 @@ H = ss<span class="org-rainbow-delimiters-depth-1">(</span>A, B, C, D<span class
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org214e83b" class="outline-2">
|
||||
<h2 id="org214e83b"><span class="section-number-2">6</span> Complementary</h2>
|
||||
<div id="outline-container-org127884a" class="outline-2">
|
||||
<h2 id="org127884a"><span class="section-number-2">8</span> Lead - Lag</h2>
|
||||
<div class="outline-text-2" id="text-8">
|
||||
</div>
|
||||
<div id="outline-container-orgb58ebc8" class="outline-3">
|
||||
<h3 id="orgb58ebc8"><span class="section-number-3">8.1</span> Lead</h3>
|
||||
<div class="outline-text-3" id="text-8-1">
|
||||
<p>
|
||||
\[ H(s) = \frac{1 + s/\omega_z}{1 + s/\omega_p}, \quad \omega_z < \omega_p \]
|
||||
</p>
|
||||
|
||||
<ul class="org-ul">
|
||||
<li class="off"><code>[ ]</code> Find a nice parametrisation to be able to specify the center frequency and the phase added</li>
|
||||
<li class="off"><code>[ ]</code> Compute also the change in magnitude</li>
|
||||
</ul>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">h = <span class="org-highlight-numbers-number">2</span>.<span class="org-highlight-numbers-number">0</span>;
|
||||
wz = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>h; <span class="org-comment">% [rad/s]</span>
|
||||
wp = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>h; <span class="org-comment">% [rad/s]</span>
|
||||
|
||||
H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wz<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wp<span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgbcca770" class="figure">
|
||||
<p><img src="figs/lead_filter.png" alt="lead_filter.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 8: </span>Lead Filter (<a href="./figs/lead_filter.png">png</a>, <a href="./figs/lead_filter.pdf">pdf</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org700da69" class="outline-3">
|
||||
<h3 id="org700da69"><span class="section-number-3">8.2</span> Lag</h3>
|
||||
<div class="outline-text-3" id="text-8-2">
|
||||
<p>
|
||||
\[ H(s) = \frac{1 + s/\omega_z}{1 + s/\omega_p}, \quad \omega_z > \omega_p \]
|
||||
</p>
|
||||
|
||||
<ul class="org-ul">
|
||||
<li class="off"><code>[ ]</code> Find a nice parametrisation to be able to specify the center frequency and the phase added</li>
|
||||
<li class="off"><code>[ ]</code> Compute also the change in magnitude</li>
|
||||
</ul>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">h = <span class="org-highlight-numbers-number">2</span>.<span class="org-highlight-numbers-number">0</span>;
|
||||
wz = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>h; <span class="org-comment">% [rad/s]</span>
|
||||
wp = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>h; <span class="org-comment">% [rad/s]</span>
|
||||
|
||||
H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wz<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wp<span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org4ddf70a" class="figure">
|
||||
<p><img src="figs/lag_filter.png" alt="lag_filter.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 9: </span>Lag Filter (<a href="./figs/lag_filter.png">png</a>, <a href="./figs/lag_filter.pdf">pdf</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf2125da" class="outline-3">
|
||||
<h3 id="orgf2125da"><span class="section-number-3">8.3</span> Lead Lag</h3>
|
||||
<div class="outline-text-3" id="text-8-3">
|
||||
<p>
|
||||
\[ H(s) = \frac{1 + s/\omega_z}{1 + s/\omega_p} \frac{1 + s/\omega_z}{1 + s/\omega_p}, \quad \omega_z > \omega_p \]
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">wz1 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">1</span>; <span class="org-comment">% [rad/s]</span>
|
||||
wp1 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">1</span>; <span class="org-comment">% [rad/s]</span>
|
||||
wz2 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">10</span>; <span class="org-comment">% [rad/s]</span>
|
||||
wp2 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span><span class="org-highlight-numbers-number">20</span>; <span class="org-comment">% [rad/s]</span>
|
||||
|
||||
H = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wz1<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wp1<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wz2<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span> <span class="org-type">+</span> s<span class="org-type">/</span>wp2<span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orge8b5da5" class="figure">
|
||||
<p><img src="figs/lead_lag_filter.png" alt="lead_lag_filter.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 10: </span>Lead Lag Filter (<a href="./figs/lead_lag_filter.png">png</a>, <a href="./figs/lead_lag_filter.pdf">pdf</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga776beb" class="outline-2">
|
||||
<h2 id="orga776beb"><span class="section-number-2">9</span> Complementary</h2>
|
||||
</div>
|
||||
<div id="outline-container-org18d2496" class="outline-2">
|
||||
<h2 id="org18d2496"><span class="section-number-2">10</span> Performance Weight</h2>
|
||||
<div class="outline-text-2" id="text-10">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">w0 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span>; <span class="org-comment">% [rad/s]</span>
|
||||
A = <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">2</span>;
|
||||
M = <span class="org-highlight-numbers-number">5</span>;
|
||||
|
||||
H = <span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type">/</span>sqrt<span class="org-rainbow-delimiters-depth-2">(</span>M<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-type">+</span> w0<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span>s <span class="org-type">+</span> w0<span class="org-type">*</span>sqrt<span class="org-rainbow-delimiters-depth-2">(</span>A<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span>;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="figure">
|
||||
<p><img src="figs/weight_first_order.png" alt="weight_first_order.png" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2ee1e4e" class="outline-2">
|
||||
<h2 id="org2ee1e4e"><span class="section-number-2">11</span> Combine Filters</h2>
|
||||
<div class="outline-text-2" id="text-11">
|
||||
</div>
|
||||
<div id="outline-container-org890b908" class="outline-3">
|
||||
<h3 id="org890b908"><span class="section-number-3">11.1</span> Additive</h3>
|
||||
<div class="outline-text-3" id="text-11-1">
|
||||
<ul class="org-ul">
|
||||
<li class="off"><code>[ ]</code> Explain how phase and magnitude combine</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6f10b80" class="outline-3">
|
||||
<h3 id="org6f10b80"><span class="section-number-3">11.2</span> Multiplicative</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2019-08-15 jeu. 12:24</p>
|
||||
<p class="date">Created: 2019-10-08 mar. 13:27</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
182
index.org
182
index.org
@ -15,7 +15,7 @@
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
|
||||
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/MEGA/These/LaTeX/}{config.tex}")
|
||||
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
|
||||
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
|
||||
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
|
||||
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
|
||||
@ -37,7 +37,6 @@
|
||||
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||||
:END:
|
||||
|
||||
|
||||
* Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
<<matlab-dir>>
|
||||
@ -113,7 +112,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_first_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_first_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -143,7 +142,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_first_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_first_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -213,7 +212,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_second_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_second_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -243,7 +242,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_second_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_second_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -253,7 +252,6 @@
|
||||
#+RESULTS:
|
||||
[[file:figs/lpf_second_order.png]]
|
||||
|
||||
|
||||
** Combine multiple filters
|
||||
\[ H(s) = \left( \frac{1}{1 + s/\omega_0} \right)^n \]
|
||||
|
||||
@ -313,7 +311,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_multiple_first_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_multiple_first_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -343,15 +341,13 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lpf_multiple_first_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlpf_multiple_first_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+name: fig:lpf_multiple_first_order
|
||||
#+caption: Combine Multiple First Order Low Pass Filter ([[./figs/lpf_multiple_first_order.png][png]], [[./figs/lpf_multiple_first_order.pdf][pdf]].
|
||||
#+RESULTS:
|
||||
[[file:figs/lpf_multiple_first_order.png]]
|
||||
|
||||
|
||||
** Nice combination
|
||||
@ -427,7 +423,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_first_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_first_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -457,7 +453,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_first_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_first_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -527,7 +523,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_second_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_second_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -557,7 +553,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_second_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_second_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -627,7 +623,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_multiple_first_order.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_multiple_first_order.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -657,7 +653,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/hpf_multiple_first_order.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/mathpf_multiple_first_order.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -673,6 +669,18 @@
|
||||
|
||||
* Notch
|
||||
|
||||
* Bump
|
||||
#+begin_src matlab
|
||||
n = 4;
|
||||
w0 = 2*pi;
|
||||
A = 10;
|
||||
|
||||
a = sqrt(2*A^(2/n) - 1 + 2*A^(1/n)*sqrt(A^(2/n) - 1));
|
||||
G = ((1 + s/(w0/a))*(1 + s/(w0*a))/(1 + s/w0)^2)^n;
|
||||
bodeFig({G})
|
||||
#+end_src
|
||||
|
||||
|
||||
* Chebyshev
|
||||
** Chebyshev Type I
|
||||
|
||||
@ -734,7 +742,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/cheby1_hpf.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matcheby1_hpf.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -764,7 +772,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/cheby1_hpf.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matcheby1_hpf.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -838,7 +846,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lead_filter.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlead_filter.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -868,7 +876,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lead_filter.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlead_filter.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -941,7 +949,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lag_filter.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlag_filter.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -971,7 +979,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lag_filter.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlag_filter.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -1042,7 +1050,7 @@
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lead_lag_filter.csv};
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlead_lag_filter.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
@ -1072,7 +1080,7 @@
|
||||
ymajorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/MEGA/These/Matlab/filters/mat/lead_lag_filter.csv};
|
||||
table [x=freqs, y=phase, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matlead_lag_filter.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
@ -1083,8 +1091,132 @@
|
||||
[[file:figs/lead_lag_filter.png]]
|
||||
|
||||
* Complementary
|
||||
* Performance Weight
|
||||
|
||||
#+begin_src matlab
|
||||
w0 = 2*pi; % [rad/s]
|
||||
A = 1e-2;
|
||||
M = 5;
|
||||
|
||||
H = (s/sqrt(M) + w0)^2/(s + w0*sqrt(A))^2;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 2, 1000);
|
||||
resp = squeeze(freqresp(inv(H), freqs, 'Hz'));
|
||||
Ha = abs(resp);
|
||||
Hp = 180/pi*phase(resp);
|
||||
|
||||
T = table(freqs', Ha, Hp, 'VariableNames', {'freqs', 'amplitude', 'phase'});
|
||||
writetable(T,'mat/weight_first_order.csv');
|
||||
#+end_src
|
||||
|
||||
#+begin_src latex :file weight_first_order.pdf :tangle figs/weight_first_order.tex :exports results
|
||||
\setlength\fwidth{8cm}
|
||||
\setlength\fheight{4cm}
|
||||
|
||||
\definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}%
|
||||
\definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}%
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=\fwidth,
|
||||
height=\fheight,
|
||||
at={(0,0)},
|
||||
scale only axis,
|
||||
separate axis lines,
|
||||
every outer x axis line/.append style={black},
|
||||
every x tick label/.append style={font=\color{black}},
|
||||
every x tick/.append style={black},
|
||||
xmode=log,
|
||||
xmin=0.01,
|
||||
xmax=100,
|
||||
xminorticks=true,
|
||||
xlabel={Frequency [Hz]},
|
||||
every outer y axis line/.append style={black},
|
||||
every y tick label/.append style={font=\color{black}},
|
||||
every y tick/.append style={black},
|
||||
ymode=log,
|
||||
ymin=5e-3,
|
||||
ymax=1e1,
|
||||
yminorticks=true,
|
||||
ylabel={Amplitude},
|
||||
axis background/.style={fill=white},
|
||||
xmajorgrids,
|
||||
xminorgrids,
|
||||
ymajorgrids,
|
||||
yminorgrids
|
||||
]
|
||||
\addplot[color=black, mark=none]
|
||||
table [x=freqs, y=amplitude, col sep=comma] {/home/thomas/Cloud/thesis/matlab/filters/matweight_first_order.csv};
|
||||
|
||||
\draw[dashed] (0.01,1e-2) -- (1,1e-2) node[right]{$A$};
|
||||
\draw[dashed] (1,5) node[left]{$M$} -- (100,5);
|
||||
\draw[dashed] (1,1) -- (1,0.5) node[below]{$\omega_b^*$};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
[[file:figs/weight_first_order.png]]
|
||||
|
||||
* Combine Filters
|
||||
** Additive
|
||||
- [ ] Explain how phase and magnitude combine
|
||||
|
||||
** Multiplicative
|
||||
* Filters representing noise
|
||||
Let's consider a noise $n$ that is shaped from a white-noise $\tilde{n}$ with unitary PSD ($\Phi_\tilde{n}(\omega) = 1$) using a transfer function $G(s)$.
|
||||
The PSD of $n$ is then:
|
||||
\[ \Phi_n(\omega) = |G(j\omega)|^2 \Phi_{\tilde{n}}(\omega) = |G(j\omega)|^2 \]
|
||||
|
||||
The PSD $\Phi_n(\omega)$ is expressed in $\text{unit}^2/\text{Hz}$.
|
||||
|
||||
And the root mean square (RMS) of $n(t)$ is:
|
||||
\[ \sigma_n = \sqrt{\int_{0}^{\infty} \Phi_n(\omega) d\omega} \]
|
||||
|
||||
** First Order Low Pass Filter
|
||||
\[ G(s) = \frac{g_0}{1 + \frac{s}{\omega_c}} \]
|
||||
|
||||
#+begin_src matlab
|
||||
g0 = 1; % Noise Density in unit/sqrt(Hz)
|
||||
wc = 1; % Cut-Off frequency [rad/s]
|
||||
|
||||
G = g0/(1 + s/wc);
|
||||
|
||||
% Frequency vector [Hz]
|
||||
freqs = logspace(-3, 3, 1000);
|
||||
|
||||
% PSD of n in [unit^2/Hz]
|
||||
Phi_n = abs(squeeze(freqresp(G, freqs, 'Hz'))).^2;
|
||||
|
||||
% RMS value of n in [unit, rms]
|
||||
sigma_n = sqrt(trapz(freqs, Phi_n))
|
||||
#+end_src
|
||||
|
||||
\[ \sigma = \frac{1}{2} g_0 \sqrt{\omega_c} \]
|
||||
with:
|
||||
- $g_0$ the Noise Density of $n$ in $\text{unit}/\sqrt{Hz}$
|
||||
- $\omega_c$ the bandwidth over which the noise is located, in rad/s
|
||||
- $\sigma$ the rms noise
|
||||
|
||||
If the cut-off frequency is to be expressed in Hz:
|
||||
\[ \sigma = \frac{1}{2} g_0 \sqrt{2\pi f_c} = \sqrt{\frac{\pi}{2}} g_0 \sqrt{f_c} \]
|
||||
|
||||
|
||||
Thus, if a sensor is said to have a RMS noise of $\sigma = 10 nm\ rms$ over a bandwidth of $\omega_c = 100 rad/s$, we can estimated the noise density of the sensor to be (supposing a first order low pass filter noise shape):
|
||||
\[ g_0 = \frac{2 \sigma}{\sqrt{\omega_c}} \quad \left[ m/\sqrt{Hz} \right] \]
|
||||
|
||||
#+begin_src matlab :results value replace
|
||||
2*10e-9/sqrt(100)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 2e-09
|
||||
|
||||
#+begin_src matlab :results value replace
|
||||
6*0.5*20e-12*sqrt(2*pi*100)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 1.504e-09
|
||||
|
Loading…
Reference in New Issue
Block a user