Rework figures, add colors

This commit is contained in:
2021-04-30 11:18:08 +02:00
parent d960b89fd9
commit 6fda3f79f2
17 changed files with 830 additions and 458 deletions

View File

@@ -1 +0,0 @@
../tikz/figs/

View File

@@ -3,21 +3,30 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-12-11 ven. 14:05 -->
<!-- 2021-04-29 jeu. 17:25 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Complementary Filters Shaping Using \(\mathcal{H}_\infty\) Synthesis - Matlab Computation</title>
<meta name="generator" content="Org mode" />
<title>Complementary Filters Shaping Using $\mathcal{H}_\infty$ Synthesis - Matlab Computation</title>
<meta name="author" content="Thomas Dehaeze" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<script>MathJax = {
tex: {
tags: 'ams',
macros: {bm: ["\\boldsymbol{#1}",1],}
}
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
MathJax = {
svg: {
scale: 1,
fontCache: "global"
},
tex: {
tags: "ams",
multlineWidth: "%MULTLINEWIDTH",
tagSide: "right",
macros: {bm: ["\\boldsymbol{#1}",1],},
tagIndent: ".8em"
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
@@ -30,42 +39,63 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orga86008b">1. H-Infinity synthesis of complementary filters</a>
<li><a href="#sec:h_inf_synthesis_complementary_filters">1. H-Infinity synthesis of complementary filters</a>
<ul>
<li><a href="#orga8d0882">1.1. Synthesis Architecture</a></li>
<li><a href="#orgf309349">1.2. Design of Weighting Function</a></li>
<li><a href="#org3d519e3">1.3. H-Infinity Synthesis</a></li>
<li><a href="#org42911cd">1.4. Obtained Complementary Filters</a></li>
<li><a href="#org38a6275">1.1. Synthesis Architecture</a></li>
<li><a href="#org8d0a2ea">1.2. Design of Weighting Function</a></li>
<li><a href="#orgc235246">1.3. H-Infinity Synthesis</a></li>
<li><a href="#org326a6a1">1.4. Obtained Complementary Filters</a></li>
</ul>
</li>
<li><a href="#org1cd882b">2. Generating 3 complementary filters</a>
<li><a href="#orgb616673">2. Generating 3 complementary filters</a>
<ul>
<li><a href="#org201b962">2.1. Theory</a></li>
<li><a href="#orgbb81a3a">2.2. Weights</a></li>
<li><a href="#orgc782a41">2.3. H-Infinity Synthesis</a></li>
<li><a href="#orgbe6c26a">2.4. Obtained Complementary Filters</a></li>
<li><a href="#orge13ec24">2.1. Theory</a></li>
<li><a href="#org0043ce8">2.2. Weights</a></li>
<li><a href="#orge8e2214">2.3. H-Infinity Synthesis</a></li>
<li><a href="#org3e0db09">2.4. Obtained Complementary Filters</a></li>
</ul>
</li>
<li><a href="#orgfb4a473">3. Implement complementary filters for LIGO</a>
<li><a href="#orgb0c5eb8">3. Implement complementary filters for LIGO</a>
<ul>
<li><a href="#org0a64590">3.1. Specifications</a></li>
<li><a href="#org5187f2d">3.2. FIR Filter</a></li>
<li><a href="#org6e83a71">3.3. Weights</a></li>
<li><a href="#org56349cf">3.4. H-Infinity Synthesis</a></li>
<li><a href="#org3ef818f">3.5. Compare FIR and H-Infinity Filters</a></li>
<li><a href="#org68b2264">3.1. Specifications</a></li>
<li><a href="#org639758d">3.2. FIR Filter</a></li>
<li><a href="#org3361251">3.3. Weights</a></li>
<li><a href="#org3ea9781">3.4. H-Infinity Synthesis</a></li>
<li><a href="#org2e38aee">3.5. Compare FIR and H-Infinity Filters</a></li>
</ul>
</li>
<li><a href="#org6fa1123">4. Alternative Synthesis</a>
<li><a href="#org278cb17">4. Alternative Synthesis</a>
<ul>
<li><a href="#org1bb8ee7">4.1. Two generalized plants</a></li>
<li><a href="#orga117463">4.2. Shaping the Low pass filter or the high pass filter?</a></li>
<li><a href="#orgc2f7629">4.1. Two generalized plants</a></li>
<li><a href="#org14ddd98">4.2. Shaping the Low pass filter or the high pass filter?</a></li>
<li><a href="#orgc9d9779">4.3. Using Feedback architecture</a></li>
<li><a href="#org0aa4270">4.4. Adding feature in the filters</a></li>
</ul>
</li>
<li><a href="#orgf082879">5. Impose a positive slope at DC or a negative slope at infinite frequency</a>
<li><a href="#orgb026d30">5. Impose a positive slope at DC or a negative slope at infinite frequency</a>
<ul>
<li><a href="#org96df1d1">5.1. Manually shift zeros to the origin after synthesis</a></li>
<li><a href="#org6b92ce0">5.2. Imposing a positive slope at DC during the synthesis phase</a></li>
<li><a href="#org71e3235">5.3. Imposing a negative slope at infinity frequency during the synthesis phase</a></li>
<li><a href="#org4d4e2ad">5.1. Manually shift zeros to the origin after synthesis</a></li>
<li><a href="#orgf1693db">5.2. Imposing a positive slope at DC during the synthesis phase</a></li>
<li><a href="#org52c02ef">5.3. Imposing a negative slope at infinity frequency during the synthesis phase</a></li>
</ul>
</li>
<li><a href="#org29e79e7">6. Functions</a>
<ul>
<li><a href="#orgfbca8a7">6.1. <code>generateWF</code>: Generate Weighting Functions</a>
<ul>
<li><a href="#org95965a4">Function description</a></li>
<li><a href="#orgaeb61de">Optional Parameters</a></li>
<li><a href="#orgd91e493">Generate the Weighting function</a></li>
<li><a href="#org84eb536">Verification of the \(G_0\), \(G_c\) and \(G_\infty\) gains</a></li>
</ul>
</li>
<li><a href="#org2f9ac50">6.2. <code>generateCF</code>: Generate Complementary Filters</a>
<ul>
<li><a href="#org7c373f8">Function description</a></li>
<li><a href="#org00c9d5d">Optional Parameters</a></li>
<li><a href="#org92a7c04">H-Infinity Synthesis</a></li>
</ul>
</li>
</ul>
</li>
</ul>
@@ -90,25 +120,22 @@ To achieve this, the sensors included in the filter should complement one anothe
This document is divided into several sections:
</p>
<ul class="org-ul">
<li>in section <a href="#orge265c61">1</a>, the \(\mathcal{H}_\infty\) synthesis is used for generating two complementary filters</li>
<li>in section <a href="#org0f5d922">2</a>, a method using the \(\mathcal{H}_\infty\) synthesis is proposed to shape three of more complementary filters</li>
<li>in section <a href="#org2c84916">3</a>, the \(\mathcal{H}_\infty\) synthesis is used and compared with FIR complementary filters used for LIGO</li>
<li>in section <a href="#sec:h_inf_synthesis_complementary_filters">1</a>, the \(\mathcal{H}_\infty\) synthesis is used for generating two complementary filters</li>
<li>in section <a href="#orgd4d516e">2</a>, a method using the \(\mathcal{H}_\infty\) synthesis is proposed to shape three of more complementary filters</li>
<li>in section <a href="#org9327342">3</a>, the \(\mathcal{H}_\infty\) synthesis is used and compared with FIR complementary filters used for LIGO</li>
</ul>
<div class="note" id="org9abbfdc">
<div class="note" id="orgad6d854">
<p>
Add the Matlab code use to obtain the results presented in the paper are accessible <a href="matlab.zip">here</a> and presented below.
</p>
</div>
<div id="outline-container-orga86008b" class="outline-2">
<h2 id="orga86008b"><span class="section-number-2">1</span> H-Infinity synthesis of complementary filters</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="orge265c61"></a>
</p>
<div class="note" id="org7b6c965">
<div id="outline-container-sec:h_inf_synthesis_complementary_filters" class="outline-2">
<h2 id="sec:h_inf_synthesis_complementary_filters"><span class="section-number-2">1</span> H-Infinity synthesis of complementary filters</h2>
<div class="outline-text-2" id="text-sec:h_inf_synthesis_complementary_filters">
<div class="note" id="org65d886e">
<p>
The Matlab file corresponding to this section is accessible <a href="matlab/h_inf_synthesis_complementary_filters.m">here</a>.
</p>
@@ -116,8 +143,8 @@ The Matlab file corresponding to this section is accessible <a href="matlab/h_in
</div>
</div>
<div id="outline-container-orga8d0882" class="outline-3">
<h3 id="orga8d0882"><span class="section-number-3">1.1</span> Synthesis Architecture</h3>
<div id="outline-container-org38a6275" class="outline-3">
<h3 id="org38a6275"><span class="section-number-3">1.1</span> Synthesis Architecture</h3>
<div class="outline-text-3" id="text-1-1">
<p>
We here synthesize two complementary filters using the \(\mathcal{H}_\infty\) synthesis.
@@ -125,18 +152,18 @@ The goal is to specify upper bounds on the norms of the two complementary filter
</p>
<p>
In order to do so, we use the generalized plant shown on figure <a href="#orge741156">1</a> where \(W_1(s)\) and \(W_2(s)\) are weighting transfer functions that will be used to shape \(H_1(s)\) and \(H_2(s)\) respectively.
In order to do so, we use the generalized plant shown on figure <a href="#org49ae644">1</a> where \(W_1(s)\) and \(W_2(s)\) are weighting transfer functions that will be used to shape \(H_1(s)\) and \(H_2(s)\) respectively.
</p>
<div id="orge741156" class="figure">
<div id="org49ae644" class="figure">
<p><img src="figs-tikz/h_infinity_robust_fusion.png" alt="h_infinity_robust_fusion.png" />
</p>
<p><span class="figure-number">Figure 1: </span>\(\mathcal{H}_\infty\) synthesis of the complementary filters</p>
</div>
<p>
The \(\mathcal{H}_\infty\) synthesis applied on this generalized plant will give a transfer function \(H_2\) (figure <a href="#orge741156">1</a>) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_1,\ z_2]\) is less than one:
The \(\mathcal{H}_\infty\) synthesis applied on this generalized plant will give a transfer function \(H_2\) (figure <a href="#org49ae644">1</a>) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_1,\ z_2]\) is less than one:
\[ \left\| \begin{array}{c} (1 - H_2(s)) W_1(s) \\ H_2(s) W_2(s) \end{array} \right\|_\infty < 1 \]
</p>
@@ -156,8 +183,8 @@ We then see that \(W_1(s)\) and \(W_2(s)\) can be used to shape both \(H_1(s)\)
</div>
</div>
<div id="outline-container-orgf309349" class="outline-3">
<h3 id="orgf309349"><span class="section-number-3">1.2</span> Design of Weighting Function</h3>
<div id="outline-container-org8d0a2ea" class="outline-3">
<h3 id="org8d0a2ea"><span class="section-number-3">1.2</span> Design of Weighting Function</h3>
<div class="outline-text-3" id="text-1-2">
<p>
A formula is proposed to help the design of the weighting functions:
@@ -181,11 +208,11 @@ The parameters permits to specify:
</ul>
<p>
The general shape of a weighting function generated using the formula is shown in figure <a href="#org18f93a4">2</a>.
The general shape of a weighting function generated using the formula is shown in figure <a href="#orgca3464c">2</a>.
</p>
<div id="org18f93a4" class="figure">
<div id="orgca3464c" class="figure">
<p><img src="figs/weight_formula.png" alt="weight_formula.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Gain of the Weighting Function formula</p>
@@ -201,7 +228,7 @@ W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</div>
<div id="org54a46b0" class="figure">
<div id="org1ce2cf7" class="figure">
<p><img src="figs/weights_W1_W2.png" alt="weights_W1_W2.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Weights on the complementary filters \(W_1\) and \(W_2\) and the associated performance weights</p>
@@ -209,8 +236,8 @@ W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</div>
</div>
<div id="outline-container-org3d519e3" class="outline-3">
<h3 id="org3d519e3"><span class="section-number-3">1.3</span> H-Infinity Synthesis</h3>
<div id="outline-container-orgc235246" class="outline-3">
<h3 id="orgc235246"><span class="section-number-3">1.3</span> H-Infinity Synthesis</h3>
<div class="outline-text-3" id="text-1-3">
<p>
We define the generalized plant \(P\) on matlab.
@@ -230,7 +257,7 @@ And we do the \(\mathcal{H}_\infty\) synthesis using the <code>hinfsyn</code> co
</pre>
</div>
<pre class="example" id="orgb213b31">
<pre class="example" id="org44ccac0">
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Resetting value of Gamma min based on D_11, D_12, D_21 terms
@@ -264,7 +291,7 @@ Test bounds: 0.1000 &lt; gamma &lt;= 1050.0000
</pre>
<p>
We then define the high pass filter \(H_1 = 1 - H_2\). The bode plot of both \(H_1\) and \(H_2\) is shown on figure <a href="#orgc79ce80">4</a>.
We then define the high pass filter \(H_1 = 1 - H_2\). The bode plot of both \(H_1\) and \(H_2\) is shown on figure <a href="#orgdd6084f">4</a>.
</p>
<div class="org-src-container">
@@ -274,15 +301,15 @@ We then define the high pass filter \(H_1 = 1 - H_2\). The bode plot of both \(H
</div>
</div>
<div id="outline-container-org42911cd" class="outline-3">
<h3 id="org42911cd"><span class="section-number-3">1.4</span> Obtained Complementary Filters</h3>
<div id="outline-container-org326a6a1" class="outline-3">
<h3 id="org326a6a1"><span class="section-number-3">1.4</span> Obtained Complementary Filters</h3>
<div class="outline-text-3" id="text-1-4">
<p>
The obtained complementary filters are shown on figure <a href="#orgc79ce80">4</a>.
The obtained complementary filters are shown on figure <a href="#orgdd6084f">4</a>.
</p>
<div id="orgc79ce80" class="figure">
<div id="orgdd6084f" class="figure">
<p><img src="figs/hinf_filters_results.png" alt="hinf_filters_results.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Obtained complementary filters using \(\mathcal{H}_\infty\) synthesis</p>
@@ -291,13 +318,13 @@ The obtained complementary filters are shown on figure <a href="#orgc79ce80">4</
</div>
</div>
<div id="outline-container-org1cd882b" class="outline-2">
<h2 id="org1cd882b"><span class="section-number-2">2</span> Generating 3 complementary filters</h2>
<div id="outline-container-orgb616673" class="outline-2">
<h2 id="orgb616673"><span class="section-number-2">2</span> Generating 3 complementary filters</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org0f5d922"></a>
<a id="orgd4d516e"></a>
</p>
<div class="note" id="org7c35287">
<div class="note" id="org1a1e099">
<p>
The Matlab file corresponding to this section is accessible <a href="matlab/three_comp_filters.m">here</a>.
</p>
@@ -305,8 +332,8 @@ The Matlab file corresponding to this section is accessible <a href="matlab/thre
</div>
</div>
<div id="outline-container-org201b962" class="outline-3">
<h3 id="org201b962"><span class="section-number-3">2.1</span> Theory</h3>
<div id="outline-container-orge13ec24" class="outline-3">
<h3 id="orge13ec24"><span class="section-number-3">2.1</span> Theory</h3>
<div class="outline-text-3" id="text-2-1">
<p>
We want:
@@ -319,11 +346,11 @@ We want:
\end{align*}
<p>
For that, we use the \(\mathcal{H}_\infty\) synthesis with the architecture shown on figure <a href="#org86ebebf">5</a>.
For that, we use the \(\mathcal{H}_\infty\) synthesis with the architecture shown on figure <a href="#org38edab5">5</a>.
</p>
<div id="org86ebebf" class="figure">
<div id="org38edab5" class="figure">
<p><img src="figs-tikz/comp_filter_three_hinf.png" alt="comp_filter_three_hinf.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Generalized architecture for generating 3 complementary filters</p>
@@ -344,8 +371,8 @@ And thus if we choose \(H_1 = 1 - H_2 - H_3\) we have solved the problem.
</div>
</div>
<div id="outline-container-orgbb81a3a" class="outline-3">
<h3 id="orgbb81a3a"><span class="section-number-3">2.2</span> Weights</h3>
<div id="outline-container-org0043ce8" class="outline-3">
<h3 id="org0043ce8"><span class="section-number-3">2.2</span> Weights</h3>
<div class="outline-text-3" id="text-2-2">
<p>
First we define the weights.
@@ -362,7 +389,7 @@ W3 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</div>
<div id="org6ef9224" class="figure">
<div id="orgf1d851e" class="figure">
<p><img src="figs/three_weighting_functions.png" alt="three_weighting_functions.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Three weighting functions used for the \(\mathcal{H}_\infty\) synthesis of the complementary filters</p>
@@ -370,8 +397,8 @@ W3 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</div>
</div>
<div id="outline-container-orgc782a41" class="outline-3">
<h3 id="orgc782a41"><span class="section-number-3">2.3</span> H-Infinity Synthesis</h3>
<div id="outline-container-orge8e2214" class="outline-3">
<h3 id="orge8e2214"><span class="section-number-3">2.3</span> H-Infinity Synthesis</h3>
<div class="outline-text-3" id="text-2-3">
<p>
Then we create the generalized plant <code>P</code>.
@@ -392,7 +419,7 @@ And we do the \(\mathcal{H}_\infty\) synthesis.
</pre>
</div>
<pre class="example" id="orga35c0a2">
<pre class="example" id="org65963f1">
[H, ~, gamma, ~] = hinfsyn(P, 1, 2,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Resetting value of Gamma min based on D_11, D_12, D_21 terms
@@ -427,8 +454,8 @@ Test bounds: 0.1000 &lt; gamma &lt;= 1050.0000
</div>
</div>
<div id="outline-container-orgbe6c26a" class="outline-3">
<h3 id="orgbe6c26a"><span class="section-number-3">2.4</span> Obtained Complementary Filters</h3>
<div id="outline-container-org3e0db09" class="outline-3">
<h3 id="org3e0db09"><span class="section-number-3">2.4</span> Obtained Complementary Filters</h3>
<div class="outline-text-3" id="text-2-4">
<p>
The obtained filters are:
@@ -441,7 +468,7 @@ H1 = 1 <span class="org-type">-</span> H2 <span class="org-type">-</span> H3;
</div>
<div id="orga85736d" class="figure">
<div id="orgd968c86" class="figure">
<p><img src="figs/three_complementary_filters_results.png" alt="three_complementary_filters_results.png" />
</p>
<p><span class="figure-number">Figure 7: </span>The three complementary filters obtained after \(\mathcal{H}_\infty\) synthesis</p>
@@ -450,13 +477,13 @@ H1 = 1 <span class="org-type">-</span> H2 <span class="org-type">-</span> H3;
</div>
</div>
<div id="outline-container-orgfb4a473" class="outline-2">
<h2 id="orgfb4a473"><span class="section-number-2">3</span> Implement complementary filters for LIGO</h2>
<div id="outline-container-orgb0c5eb8" class="outline-2">
<h2 id="orgb0c5eb8"><span class="section-number-2">3</span> Implement complementary filters for LIGO</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="org2c84916"></a>
<a id="org9327342"></a>
</p>
<div class="note" id="org4890f37">
<div class="note" id="orgd570d71">
<p>
The Matlab file corresponding to this section is accessible <a href="matlab/comp_filters_ligo.m">here</a>.
</p>
@@ -472,8 +499,8 @@ The FIR complementary filters designed in (<a href="#citeproc_bib_item_1">Hua 20
</p>
</div>
<div id="outline-container-org0a64590" class="outline-3">
<h3 id="org0a64590"><span class="section-number-3">3.1</span> Specifications</h3>
<div id="outline-container-org68b2264" class="outline-3">
<h3 id="org68b2264"><span class="section-number-3">3.1</span> Specifications</h3>
<div class="outline-text-3" id="text-3-1">
<p>
The specifications for the filters are:
@@ -486,11 +513,11 @@ The specifications for the filters are:
</ol>
<p>
The specifications are translated in upper bounds of the complementary filters are shown on figure <a href="#org40b6368">8</a>.
The specifications are translated in upper bounds of the complementary filters are shown on figure <a href="#orge912401">8</a>.
</p>
<div id="org40b6368" class="figure">
<div id="orge912401" class="figure">
<p><img src="figs/ligo_specifications.png" alt="ligo_specifications.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Specification for the LIGO complementary filters</p>
@@ -498,8 +525,8 @@ The specifications are translated in upper bounds of the complementary filters a
</div>
</div>
<div id="outline-container-org5187f2d" class="outline-3">
<h3 id="org5187f2d"><span class="section-number-3">3.2</span> FIR Filter</h3>
<div id="outline-container-org639758d" class="outline-3">
<h3 id="org639758d"><span class="section-number-3">3.2</span> FIR Filter</h3>
<div class="outline-text-3" id="text-3-2">
<p>
We here try to implement the FIR complementary filter synthesis as explained in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
@@ -580,7 +607,7 @@ h = y(2<span class="org-type">:</span>end);
</pre>
</div>
<pre class="example" id="org199d33a">
<pre class="example" id="org1229f63">
cvx_begin
variable y(n+1,1)
% t
@@ -657,7 +684,7 @@ h = y(2:end);
</pre>
<p>
Finally, we compute the filter response over the frequency vector defined and the result is shown on figure <a href="#org1807c4b">9</a> which is very close to the filters obtain in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
Finally, we compute the filter response over the frequency vector defined and the result is shown on figure <a href="#org13d9ffd">9</a> which is very close to the filters obtain in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
</p>
<div class="org-src-container">
@@ -667,7 +694,7 @@ H = [exp(<span class="org-type">-</span><span class="org-constant">j</span><span
</div>
<div id="org1807c4b" class="figure">
<div id="org13d9ffd" class="figure">
<p><img src="figs/fir_filter_ligo.png" alt="fir_filter_ligo.png" />
</p>
<p><span class="figure-number">Figure 9: </span>FIR Complementary filters obtain after convex optimization</p>
@@ -675,8 +702,8 @@ H = [exp(<span class="org-type">-</span><span class="org-constant">j</span><span
</div>
</div>
<div id="outline-container-org6e83a71" class="outline-3">
<h3 id="org6e83a71"><span class="section-number-3">3.3</span> Weights</h3>
<div id="outline-container-org3361251" class="outline-3">
<h3 id="org3361251"><span class="section-number-3">3.3</span> Weights</h3>
<div class="outline-text-3" id="text-3-3">
<p>
We design weights that will be used for the \(\mathcal{H}_\infty\) synthesis of the complementary filters.
@@ -690,11 +717,11 @@ Here are the requirements on the filters:
</ul>
<p>
The bode plot of the weights is shown on figure <a href="#org8999a4f">10</a>.
The bode plot of the weights is shown on figure <a href="#org17273a4">10</a>.
</p>
<div id="org8999a4f" class="figure">
<div id="org17273a4" class="figure">
<p><img src="figs/ligo_weights.png" alt="ligo_weights.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Weights for the \(\mathcal{H}_\infty\) synthesis</p>
@@ -702,11 +729,11 @@ The bode plot of the weights is shown on figure <a href="#org8999a4f">10</a>.
</div>
</div>
<div id="outline-container-org56349cf" class="outline-3">
<h3 id="org56349cf"><span class="section-number-3">3.4</span> H-Infinity Synthesis</h3>
<div id="outline-container-org3ea9781" class="outline-3">
<h3 id="org3ea9781"><span class="section-number-3">3.4</span> H-Infinity Synthesis</h3>
<div class="outline-text-3" id="text-3-4">
<p>
We define the generalized plant as shown on figure <a href="#orge741156">1</a>.
We define the generalized plant as shown on figure <a href="#org49ae644">1</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">P = [0 wL;
@@ -723,7 +750,7 @@ And we do the \(\mathcal{H}_\infty\) synthesis using the <code>hinfsyn</code> co
</pre>
</div>
<pre class="example" id="orgd8777e8">
<pre class="example" id="org82970b4">
[Hl, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Resetting value of Gamma min based on D_11, D_12, D_21 terms
@@ -758,18 +785,18 @@ The high pass filter is defined as \(H_H = 1 - H_L\).
The size of the filters is shown below.
</p>
<pre class="example" id="orgc30176a">
<pre class="example" id="org5988dfe">
size(Hh), size(Hl)
State-space model with 1 outputs, 1 inputs, and 27 states.
State-space model with 1 outputs, 1 inputs, and 27 states.
</pre>
<p>
The bode plot of the obtained filters as shown on figure <a href="#orgf3626bd">11</a>.
The bode plot of the obtained filters as shown on figure <a href="#org1a89dc1">11</a>.
</p>
<div id="orgf3626bd" class="figure">
<div id="org1a89dc1" class="figure">
<p><img src="figs/hinf_synthesis_ligo_results.png" alt="hinf_synthesis_ligo_results.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Obtained complementary filters using the \(\mathcal{H}_\infty\) synthesis</p>
@@ -777,15 +804,15 @@ The bode plot of the obtained filters as shown on figure <a href="#orgf3626bd">1
</div>
</div>
<div id="outline-container-org3ef818f" class="outline-3">
<h3 id="org3ef818f"><span class="section-number-3">3.5</span> Compare FIR and H-Infinity Filters</h3>
<div id="outline-container-org2e38aee" class="outline-3">
<h3 id="org2e38aee"><span class="section-number-3">3.5</span> Compare FIR and H-Infinity Filters</h3>
<div class="outline-text-3" id="text-3-5">
<p>
Let&rsquo;s now compare the FIR filters designed in (<a href="#citeproc_bib_item_1">Hua 2005</a>) and the one obtained with the \(\mathcal{H}_\infty\) synthesis on figure <a href="#orga60b7f8">12</a>.
Let&rsquo;s now compare the FIR filters designed in (<a href="#citeproc_bib_item_1">Hua 2005</a>) and the one obtained with the \(\mathcal{H}_\infty\) synthesis on figure <a href="#orgf51384d">12</a>.
</p>
<div id="orga60b7f8" class="figure">
<div id="orgf51384d" class="figure">
<p><img src="figs/comp_fir_ligo_hinf.png" alt="comp_fir_ligo_hinf.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Comparison between the FIR filters developped for LIGO and the \(\mathcal{H}_\infty\) complementary filters</p>
@@ -794,15 +821,15 @@ Let&rsquo;s now compare the FIR filters designed in (<a href="#citeproc_bib_item
</div>
</div>
<div id="outline-container-org6fa1123" class="outline-2">
<h2 id="org6fa1123"><span class="section-number-2">4</span> Alternative Synthesis</h2>
<div id="outline-container-org278cb17" class="outline-2">
<h2 id="org278cb17"><span class="section-number-2">4</span> Alternative Synthesis</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org1bb8ee7" class="outline-3">
<h3 id="org1bb8ee7"><span class="section-number-3">4.1</span> Two generalized plants</h3>
<div id="outline-container-orgc2f7629" class="outline-3">
<h3 id="orgc2f7629"><span class="section-number-3">4.1</span> Two generalized plants</h3>
<div class="outline-text-3" id="text-4-1">
<p>
In order to synthesize the complementary filter using the proposed method, we can use two alternative generalized plant as shown in Figures <a href="#orgdfb88a5">13</a> and <a href="#orgb41d84e">14</a>.
In order to synthesize the complementary filter using the proposed method, we can use two alternative generalized plant as shown in Figures <a href="#orgdc5c349">13</a> and <a href="#orgf13eaf1">14</a>.
</p>
\begin{equation}
@@ -811,7 +838,7 @@ In order to synthesize the complementary filter using the proposed method, we ca
<div id="orgdfb88a5" class="figure">
<div id="orgdc5c349" class="figure">
<p><img src="figs/h_infinity_arch_1.png" alt="h_infinity_arch_1.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Complementary Filter Synthesis - Conf 1</p>
@@ -822,7 +849,7 @@ In order to synthesize the complementary filter using the proposed method, we ca
\end{equation}
<div id="orgb41d84e" class="figure">
<div id="orgf13eaf1" class="figure">
<p><img src="figs/h_infinity_arch_2.png" alt="h_infinity_arch_2.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Complementary Filter Synthesis - Conf 2</p>
@@ -852,7 +879,7 @@ W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</pre>
</div>
<pre class="example" id="org80f6d17">
<pre class="example" id="org14b6e96">
[H2, ~, gamma, ~] = hinfsyn(P1, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Test bounds: 0.3263 &lt;= gamma &lt;= 1000
@@ -888,7 +915,7 @@ W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</pre>
</div>
<pre class="example" id="org7155dd4">
<pre class="example" id="org594f397">
[H2b, ~, gamma, ~] = hinfsyn(P2, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Test bounds: 0.3263 &lt;= gamma &lt;= 1000
@@ -914,10 +941,10 @@ W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((
</pre>
<p>
And indeed, we can see that the exact same filters are obtained (Figure <a href="#org4ff7339">15</a>).
And indeed, we can see that the exact same filters are obtained (Figure <a href="#org806650d">15</a>).
</p>
<div id="org4ff7339" class="figure">
<div id="org806650d" class="figure">
<p><img src="figs/hinf_comp_P1_P2_syn.png" alt="hinf_comp_P1_P2_syn.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Comparison of \(H_2(s)\) when using \(P_1(s)\) or \(P_2(s)\)</p>
@@ -925,8 +952,8 @@ And indeed, we can see that the exact same filters are obtained (Figure <a href=
</div>
</div>
<div id="outline-container-orga117463" class="outline-3">
<h3 id="orga117463"><span class="section-number-3">4.2</span> Shaping the Low pass filter or the high pass filter?</h3>
<div id="outline-container-org14ddd98" class="outline-3">
<h3 id="org14ddd98"><span class="section-number-3">4.2</span> Shaping the Low pass filter or the high pass filter?</h3>
<div class="outline-text-3" id="text-4-2">
<p>
Let&rsquo;s see if there is a difference by explicitly shaping \(H_1(s)\) or \(H_2(s)\).
@@ -956,7 +983,7 @@ Let&rsquo;s first synthesize \(H_1(s)\):
</pre>
</div>
<pre class="example" id="org45692a7">
<pre class="example" id="org661bf48">
[H1, ~, gamma, ~] = hinfsyn(P1, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Test bounds: 0.3263 &lt;= gamma &lt;= 1.712
@@ -995,7 +1022,7 @@ And now \(H_2(s)\):
</pre>
</div>
<pre class="example" id="org6543cab">
<pre class="example" id="org5a20bfb">
[H2b, ~, gamma, ~] = hinfsyn(P2, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
Test bounds: 0.3263 &lt;= gamma &lt;= 1000
@@ -1021,24 +1048,104 @@ And now \(H_2(s)\):
</pre>
<p>
And compare \(H_1(s)\) with \(1 - H_2(s)\) and \(H_2(s)\) with \(1 - H_1(s)\) in Figure <a href="#org4a9724c">16</a>.
And compare \(H_1(s)\) with \(1 - H_2(s)\) and \(H_2(s)\) with \(1 - H_1(s)\) in Figure <a href="#orgb9c9d7c">16</a>.
</p>
<div id="org4a9724c" class="figure">
<div id="orgb9c9d7c" class="figure">
<p><img src="figs/hinf_comp_H1_H2_syn.png" alt="hinf_comp_H1_H2_syn.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Comparison of \(H_1(s)\) with \(1-H_2(s)\), and \(H_2(s)\) with \(1-H_1(s)\)</p>
</div>
</div>
</div>
<div id="outline-container-orgc9d9779" class="outline-3">
<h3 id="orgc9d9779"><span class="section-number-3">4.3</span> Using Feedback architecture</h3>
<div class="outline-text-3" id="text-4-3">
<div class="org-src-container">
<pre class="src src-matlab">n = 2; w0 = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>11; G0 = 1<span class="org-type">/</span>10; G1 = 1000; Gc = 1<span class="org-type">/</span>2;
W1 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n))<span class="org-type">/</span>((1<span class="org-type">/</span>G1)<span class="org-type">^</span>(1<span class="org-type">/</span>n)<span class="org-type">*</span>(1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (1<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n)))<span class="org-type">^</span>n;
n = 3; w0 = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>10; G0 = 1000; G1 = 0.1; Gc = 1<span class="org-type">/</span>2;
W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n))<span class="org-type">/</span>((1<span class="org-type">/</span>G1)<span class="org-type">^</span>(1<span class="org-type">/</span>n)<span class="org-type">*</span>(1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (1<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n)))<span class="org-type">^</span>n;
</pre>
</div>
<div id="outline-container-orgf082879" class="outline-2">
<h2 id="orgf082879"><span class="section-number-2">5</span> Impose a positive slope at DC or a negative slope at infinite frequency</h2>
<p>
Let&rsquo;s first synthesize \(H_1(s)\):
</p>
<div class="org-src-container">
<pre class="src src-matlab">P = [W1 <span class="org-type">-</span>W1;
0 W2;
1 <span class="org-type">-</span>1];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[K, <span class="org-type">~</span>, gamma, <span class="org-type">~</span>] = hinfsyn(P, 1, 1,<span class="org-string">'TOLGAM'</span>, 0.001, <span class="org-string">'METHOD'</span>, <span class="org-string">'lmi'</span>, <span class="org-string">'DISPLAY'</span>, <span class="org-string">'on'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">H1 = inv(1 <span class="org-type">+</span> K);
H2 = 1 <span class="org-type">-</span> H1;
</pre>
</div>
</div>
</div>
<div id="outline-container-org0aa4270" class="outline-3">
<h3 id="org0aa4270"><span class="section-number-3">4.4</span> Adding feature in the filters</h3>
<div class="outline-text-3" id="text-4-4">
<div class="org-src-container">
<pre class="src src-matlab">n = 2; w0 = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>11; G0 = 1<span class="org-type">/</span>10; G1 = 1000; Gc = 1<span class="org-type">/</span>2;
W1 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n))<span class="org-type">/</span>((1<span class="org-type">/</span>G1)<span class="org-type">^</span>(1<span class="org-type">/</span>n)<span class="org-type">*</span>(1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (1<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n)))<span class="org-type">^</span>n;
n = 3; w0 = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>10; G0 = 1000; G1 = 0.1; Gc = 1<span class="org-type">/</span>2;
W2 = (((1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n))<span class="org-type">/</span>((1<span class="org-type">/</span>G1)<span class="org-type">^</span>(1<span class="org-type">/</span>n)<span class="org-type">*</span>(1<span class="org-type">/</span>w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(G0<span class="org-type">/</span>Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>n))<span class="org-type">/</span>(1<span class="org-type">-</span>(Gc<span class="org-type">/</span>G1)<span class="org-type">^</span>(2<span class="org-type">/</span>n)))<span class="org-type">*</span>s <span class="org-type">+</span> (1<span class="org-type">/</span>Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>n)))<span class="org-type">^</span>n;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Wf = (1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>1)<span class="org-type">/</span>s;
Wf = s<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>1e2);
<span class="org-comment">% </span><span class="org-comment"><span class="org-constant">W2 </span></span><span class="org-comment">= W2/Wf/(1 + s/2/pi/1e3);</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">P = [W1 <span class="org-type">-</span>Wf<span class="org-type">*</span>W1;
0 Wf<span class="org-type">*</span>W2;
1 <span class="org-type">-</span>Wf];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[Ka, <span class="org-type">~</span>, gamma, <span class="org-type">~</span>] = hinfsyn(P, 1, 1,<span class="org-string">'TOLGAM'</span>, 0.001, <span class="org-string">'METHOD'</span>, <span class="org-string">'lmi'</span>, <span class="org-string">'DISPLAY'</span>, <span class="org-string">'on'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">K = Ka<span class="org-type">*</span>Wf;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">H1 = inv(1 <span class="org-type">+</span> K);
H2 = 1 <span class="org-type">-</span> H1;
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgb026d30" class="outline-2">
<h2 id="orgb026d30"><span class="section-number-2">5</span> Impose a positive slope at DC or a negative slope at infinite frequency</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-org96df1d1" class="outline-3">
<h3 id="org96df1d1"><span class="section-number-3">5.1</span> Manually shift zeros to the origin after synthesis</h3>
<div id="outline-container-org4d4e2ad" class="outline-3">
<h3 id="org4d4e2ad"><span class="section-number-3">5.1</span> Manually shift zeros to the origin after synthesis</h3>
<div class="outline-text-3" id="text-5-1">
<p>
Suppose we want \(H_2(s)\) to be an high pass filter with a slope of +2 at low frequency (from 0Hz).
@@ -1084,7 +1191,7 @@ And we do the \(\mathcal{H}_\infty\) synthesis using the <code>hinfsyn</code> co
<p>
Looking at the zeros, we see two low frequency complex conjugate zeros.
</p>
<pre class="example" id="orge6a4f22">
<pre class="example" id="org45e17b6">
z{1}
ans =
-4690930.24283199 + 0i
@@ -1119,12 +1226,12 @@ And as usual, \(H_{1z}(s)\) is defined as the complementary of \(H_{2z}(s)\):
</div>
<p>
The bode plots of \(H_1(s)\), \(H_2(s)\), \(H_{1z}(s)\) and \(H_{2z}(s)\) are shown in Figure <a href="#org4631977">17</a>.
The bode plots of \(H_1(s)\), \(H_2(s)\), \(H_{1z}(s)\) and \(H_{2z}(s)\) are shown in Figure <a href="#orga18e536">17</a>.
And we see that \(H_{1z}(s)\) is slightly modified when setting the zeros at the origin for \(H_{2z}(s)\).
</p>
<div id="org4631977" class="figure">
<div id="orga18e536" class="figure">
<p><img src="figs/comp_filters_shift_zero.png" alt="comp_filters_shift_zero.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Bode plots of \(H_1(s)\), \(H_2(s)\), \(H_{1z}(s)\) and \(H_{2z}(s)\)</p>
@@ -1132,16 +1239,16 @@ And we see that \(H_{1z}(s)\) is slightly modified when setting the zeros at the
</div>
</div>
<div id="outline-container-org6b92ce0" class="outline-3">
<h3 id="org6b92ce0"><span class="section-number-3">5.2</span> Imposing a positive slope at DC during the synthesis phase</h3>
<div id="outline-container-orgf1693db" class="outline-3">
<h3 id="orgf1693db"><span class="section-number-3">5.2</span> Imposing a positive slope at DC during the synthesis phase</h3>
<div class="outline-text-3" id="text-5-2">
<p>
Suppose we want to synthesize \(H_2(s)\) such that it has a slope of +2 from DC.
We can include this &ldquo;feature&rdquo; in the generalized plant as shown in Figure <a href="#org00fe83c">18</a>.
We can include this &ldquo;feature&rdquo; in the generalized plant as shown in Figure <a href="#orgf2b673c">18</a>.
</p>
<div id="org00fe83c" class="figure">
<div id="orgf2b673c" class="figure">
<p><img src="figs/h_infinity_arch_H2_feature.png" alt="h_infinity_arch_H2_feature.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Generalized plant with included wanted feature represented by \(H_{2w}(s)\)</p>
@@ -1184,7 +1291,7 @@ H2w = (s<span class="org-type">/</span>w0<span class="org-type">/</span>(s<span
</div>
<p>
We define the generalized plant as shown in Figure <a href="#org00fe83c">18</a>.
We define the generalized plant as shown in Figure <a href="#orgf2b673c">18</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">P = [W1 <span class="org-type">-</span>W1;
@@ -1218,11 +1325,11 @@ And we define \(H_1(s)\) to be the complementary of \(H_2(s)\):
</div>
<p>
The obtained complementary filters are shown in Figure <a href="#org551ae15">19</a>.
The obtained complementary filters are shown in Figure <a href="#orgf11ca9c">19</a>.
</p>
<div id="org551ae15" class="figure">
<div id="orgf11ca9c" class="figure">
<p><img src="figs/comp_filters_H2_feature.png" alt="comp_filters_H2_feature.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Obtained complementary fitlers</p>
@@ -1230,15 +1337,15 @@ The obtained complementary filters are shown in Figure <a href="#org551ae15">19<
</div>
</div>
<div id="outline-container-org71e3235" class="outline-3">
<h3 id="org71e3235"><span class="section-number-3">5.3</span> Imposing a negative slope at infinity frequency during the synthesis phase</h3>
<div id="outline-container-org52c02ef" class="outline-3">
<h3 id="org52c02ef"><span class="section-number-3">5.3</span> Imposing a negative slope at infinity frequency during the synthesis phase</h3>
<div class="outline-text-3" id="text-5-3">
<p>
Let&rsquo;s suppose we now want to shape a low pass filter that as a negative slope until infinite frequency.
</p>
<p>
The used technique is the same as in the previous section, and the generalized plant is shown in Figure <a href="#org00fe83c">18</a>.
The used technique is the same as in the previous section, and the generalized plant is shown in Figure <a href="#orgf2b673c">18</a>.
</p>
<p>
@@ -1296,11 +1403,11 @@ And \(H_1(s)\) is defined as follows:
</div>
<p>
The obtained complementary filters are shown in Figure <a href="#org7f33e5d">20</a>.
The obtained complementary filters are shown in Figure <a href="#orgab78578">20</a>.
</p>
<div id="org7f33e5d" class="figure">
<div id="orgab78578" class="figure">
<p><img src="figs/comp_filters_H2_feature_neg_slope.png" alt="comp_filters_H2_feature_neg_slope.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Obtained complementary fitlers</p>
@@ -1318,10 +1425,179 @@ The obtained complementary filters are shown in Figure <a href="#org7f33e5d">20<
<div class="csl-bib-body">
<div class="csl-entry"><a name="citeproc_bib_item_1"></a>Hua, Wensheng. 2005. “Low Frequency Vibration Isolation and Alignment System for Advanced LIGO.” stanford university.</div>
</div>
<div id="outline-container-org29e79e7" class="outline-2">
<h2 id="org29e79e7"><span class="section-number-2">6</span> Functions</h2>
<div class="outline-text-2" id="text-6">
</div>
<div id="outline-container-orgfbca8a7" class="outline-3">
<h3 id="orgfbca8a7"><span class="section-number-3">6.1</span> <code>generateWF</code>: Generate Weighting Functions</h3>
<div class="outline-text-3" id="text-6-1">
<p>
<a id="org0d68f63"></a>
</p>
<p>
This Matlab function is accessible <a href="matlab/src/generateWF.m">here</a>.
</p>
</div>
<div id="outline-container-org95965a4" class="outline-4">
<h4 id="org95965a4">Function description</h4>
<div class="outline-text-4" id="text-org95965a4">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[W]</span> = <span class="org-function-name">generateWF</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% createWeight -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [W] = generateWeight(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - n - Weight Order (integer)</span>
<span class="org-comment">% - G0 - Low frequency Gain</span>
<span class="org-comment">% - G1 - High frequency Gain</span>
<span class="org-comment">% - Gc - Gain of the weight at frequency w0</span>
<span class="org-comment">% - w0 - Frequency at which |W(j w0)| = Gc [rad/s]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - W - Generated Weight</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgaeb61de" class="outline-4">
<h4 id="orgaeb61de">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgaeb61de">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.n (1,1) double {mustBeInteger, mustBePositive} = 1
<span class="org-variable-name">args</span>.G0 (1,1) double {mustBeNumeric, mustBePositive} = 0.1
<span class="org-variable-name">args</span>.Ginf (1,1) double {mustBeNumeric, mustBePositive} = 10
<span class="org-variable-name">args</span>.Gc (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-variable-name">args</span>.w0 (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-keyword">end</span>
mustBeBetween(args.G0, args.Gc, args.Ginf);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd91e493" class="outline-4">
<h4 id="orgd91e493">Generate the Weighting function</h4>
<div class="outline-text-4" id="text-orgd91e493">
<div class="org-src-container">
<pre class="src src-matlab">s = zpk(<span class="org-string">'s'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">W = (((1<span class="org-type">/</span>args.w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(args.G0<span class="org-type">/</span>args.Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>args.n))<span class="org-type">/</span>(1<span class="org-type">-</span>(args.Gc<span class="org-type">/</span>args.Ginf)<span class="org-type">^</span>(2<span class="org-type">/</span>args.n)))<span class="org-type">*</span>s <span class="org-type">+</span> ...
(args.G0<span class="org-type">/</span>args.Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>args.n))<span class="org-type">/</span>...
((1<span class="org-type">/</span>args.Ginf)<span class="org-type">^</span>(1<span class="org-type">/</span>args.n)<span class="org-type">*</span>(1<span class="org-type">/</span>args.w0)<span class="org-type">*</span>sqrt((1<span class="org-type">-</span>(args.G0<span class="org-type">/</span>args.Gc)<span class="org-type">^</span>(2<span class="org-type">/</span>args.n))<span class="org-type">/</span>(1<span class="org-type">-</span>(args.Gc<span class="org-type">/</span>args.Ginf)<span class="org-type">^</span>(2<span class="org-type">/</span>args.n)))<span class="org-type">*</span>s <span class="org-type">+</span> ...
(1<span class="org-type">/</span>args.Gc)<span class="org-type">^</span>(1<span class="org-type">/</span>args.n)))<span class="org-type">^</span>args.n;
</pre>
</div>
</div>
</div>
<div id="outline-container-org84eb536" class="outline-4">
<h4 id="org84eb536">Verification of the \(G_0\), \(G_c\) and \(G_\infty\) gains</h4>
<div class="outline-text-4" id="text-org84eb536">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% Custom validation function</span>
<span class="org-keyword">function</span> <span class="org-function-name">mustBeBetween</span>(<span class="org-variable-name">a</span>,<span class="org-variable-name">b</span>,<span class="org-variable-name">c</span>)
<span class="org-keyword">if</span> <span class="org-type">~</span>((a <span class="org-type">&gt;</span> b <span class="org-type">&amp;&amp;</span> b <span class="org-type">&gt;</span> c) <span class="org-type">||</span> (c <span class="org-type">&gt;</span> b <span class="org-type">&amp;&amp;</span> b <span class="org-type">&gt;</span> a))
eid = <span class="org-string">'createWeight:inputError'</span>;
msg = <span class="org-string">'Gc should be between G0 and Ginf.'</span>;
throwAsCaller(MException(eid,msg))
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org2f9ac50" class="outline-3">
<h3 id="org2f9ac50"><span class="section-number-3">6.2</span> <code>generateCF</code>: Generate Complementary Filters</h3>
<div class="outline-text-3" id="text-6-2">
<p>
<a id="orgf94493e"></a>
</p>
<p>
This Matlab function is accessible <a href="matlab/src/generateCF.m">here</a>.
</p>
</div>
<div id="outline-container-org7c373f8" class="outline-4">
<h4 id="org7c373f8">Function description</h4>
<div class="outline-text-4" id="text-org7c373f8">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[H1, H2]</span> = <span class="org-function-name">generateCF</span>(<span class="org-variable-name">W1</span>, <span class="org-variable-name">W2</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% createWeight -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [W] = generateCF(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - W1 - Weighting Function for H1</span>
<span class="org-comment">% - W2 - Weighting Function for H2</span>
<span class="org-comment">% - args:</span>
<span class="org-comment">% - method - H-Infinity solver ('lmi' or 'ric')</span>
<span class="org-comment">% - display - Display synthesis results ('on' or 'off')</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - H1 - Generated H1 Filter</span>
<span class="org-comment">% - H2 - Generated H2 Filter</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org00c9d5d" class="outline-4">
<h4 id="org00c9d5d">Optional Parameters</h4>
<div class="outline-text-4" id="text-org00c9d5d">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">W1</span>
<span class="org-variable-name">W2</span>
<span class="org-variable-name">args</span>.method char {mustBeMember(args.method,{<span class="org-string">'lmi'</span>, <span class="org-string">'ric'</span>})} = <span class="org-string">'ric'</span>
<span class="org-variable-name">args</span>.display char {mustBeMember(args.display,{<span class="org-string">'on'</span>, <span class="org-string">'off'</span>})} = <span class="org-string">'on'</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org92a7c04" class="outline-4">
<h4 id="org92a7c04">H-Infinity Synthesis</h4>
<div class="outline-text-4" id="text-org92a7c04">
<div class="org-src-container">
<pre class="src src-matlab">P = [W1 <span class="org-type">-</span>W1;
0 W2;
1 0];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[H2, <span class="org-type">~</span>, gamma, <span class="org-type">~</span>] = hinfsyn(P, 1, 1,<span class="org-string">'TOLGAM'</span>, 0.001, <span class="org-string">'METHOD'</span>, args.method, <span class="org-string">'DISPLAY'</span>, args.display);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">H1 = 1 <span class="org-type">-</span> H2;
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Thomas Dehaeze</p>
<p class="date">Created: 2020-12-11 ven. 14:05</p>
<p class="date">Created: 2021-04-29 jeu. 17:25</p>
</div>
</body>
</html>

View File

@@ -43,7 +43,7 @@ One use of complementary filter is described below:
#+end_quote
This document is divided into several sections:
- in section [[sec:h_inf_synthesis_complementary_filters]], the $\mathcal{H}_\infty$ synthesis is used for generating two complementary filters
- in section [[#sec:h_inf_synthesis_complementary_filters]], the $\mathcal{H}_\infty$ synthesis is used for generating two complementary filters
- in section [[sec:three_comp_filters]], a method using the $\mathcal{H}_\infty$ synthesis is proposed to shape three of more complementary filters
- in section [[sec:comp_filters_ligo]], the $\mathcal{H}_\infty$ synthesis is used and compared with FIR complementary filters used for LIGO
@@ -55,8 +55,8 @@ This document is divided into several sections:
:PROPERTIES:
:header-args:matlab+: :tangle matlab/h_inf_synthesis_complementary_filters.m
:header-args:matlab+: :comments org :mkdirp yes
:CUSTOM_ID: sec:h_inf_synthesis_complementary_filters
:END:
<<sec:h_inf_synthesis_complementary_filters>>
** Introduction :ignore:
#+begin_note
@@ -93,7 +93,7 @@ In order to do so, we use the generalized plant shown on figure [[fig:h_infinity
#+name: fig:h_infinity_robst_fusion
#+caption: $\mathcal{H}_\infty$ synthesis of the complementary filters
[[file:figs-tikz/h_infinity_robust_fusion.png]]
[[file:figs/h_infinity_robust_fusion.png]]
The $\mathcal{H}_\infty$ synthesis applied on this generalized plant will give a transfer function $H_2$ (figure [[fig:h_infinity_robst_fusion]]) such that the $\mathcal{H}_\infty$ norm of the transfer function from $w$ to $[z_1,\ z_2]$ is less than one:
\[ \left\| \begin{array}{c} (1 - H_2(s)) W_1(s) \\ H_2(s) W_2(s) \end{array} \right\|_\infty < 1 \]
@@ -352,7 +352,7 @@ For that, we use the $\mathcal{H}_\infty$ synthesis with the architecture shown
#+name: fig:comp_filter_three_hinf
#+caption: Generalized architecture for generating 3 complementary filters
[[file:figs-tikz/comp_filter_three_hinf.png]]
[[file:figs/comp_filter_three_hinf.png]]
The $\mathcal{H}_\infty$ objective is:
\begin{align*}
@@ -585,7 +585,7 @@ exportFig('figs/ligo_specifications.pdf', 'width', 'wide', 'height', 'normal');
#+RESULTS:
[[file:figs/ligo_specifications.png]]
** TODO FIR Filter
** FIR Filter
We here try to implement the FIR complementary filter synthesis as explained in cite:hua05_low_ligo.
For that, we use the [[http://cvxr.com/cvx/][CVX matlab Toolbox]].
@@ -937,7 +937,7 @@ exportFig('figs/hinf_synthesis_ligo_results.pdf', 'width', 'wide', 'height', 'no
#+RESULTS:
[[file:figs/hinf_synthesis_ligo_results.png]]
** TODO Compare FIR and H-Infinity Filters
** Compare FIR and H-Infinity Filters
Let's now compare the FIR filters designed in cite:hua05_low_ligo and the one obtained with the $\mathcal{H}_\infty$ synthesis on figure [[fig:comp_fir_ligo_hinf]].
#+begin_src matlab :exports none
@@ -965,25 +965,25 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Magnitude');
set(gca, 'XTickLabel',[]);
ylim([5e-3, 10]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2);
leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2);
leg.ItemTokenSize(1) = 16;
% Phase
ax2 = nexttile;
hold on;
set(gca,'ColorOrderIndex',1);
plot(freqs, 180/pi*angle(squeeze(freqresp(Hh, freqs, 'Hz'))), '-');
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hh, freqs, 'Hz')))), '-');
set(gca,'ColorOrderIndex',2);
plot(freqs, 180/pi*angle(squeeze(freqresp(Hl, freqs, 'Hz'))), '-');
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hl, freqs, 'Hz')))), '-');
set(gca,'ColorOrderIndex',1);
plot(w, 180/pi*angle(H), '--');
set(gca,' H2ColorOrderIndex',2);
plot(w, 180/pi*angle(1-H), '--');
plot(w, 180/pi*unwrap(angle(H)), '--');
set(gca,'ColorOrderIndex',2);
plot(w, 180/pi*unwrap(angle(1-H)), '--');
set(gca, 'XScale', 'log');
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
yticks([-180:90:180]); ylim([-180, 180]);
yticks([-450:90:180]); ylim([-450, 200]);
linkaxes([ax1,ax2],'x');
xlim([freqs(1), freqs(end)]);
@@ -1897,7 +1897,9 @@ function [H1, H2] = generateCF(W1, W2, args)
% Inputs:
% - W1 - Weighting Function for H1
% - W2 - Weighting Function for H2
% - args -
% - args:
% - method - H-Infinity solver ('lmi' or 'ric')
% - display - Display synthesis results ('on' or 'off')
%
% Outputs:
% - H1 - Generated H1 Filter

View File

@@ -6,7 +6,9 @@ function [H1, H2] = generateCF(W1, W2, args)
% Inputs:
% - W1 - Weighting Function for H1
% - W2 - Weighting Function for H2
% - args -
% - args:
% - method - H-Infinity solver ('lmi' or 'ric')
% - display - Display synthesis results ('on' or 'off')
%
% Outputs:
% - H1 - Generated H1 Filter