Add few matlab parts that were part of the other paper

This commit is contained in:
Thomas Dehaeze 2019-08-14 12:14:10 +02:00
parent 81caa4e02d
commit 3d9ee5d9d1
2 changed files with 364 additions and 123 deletions

View File

@ -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-14 mer. 12:08 -->
<!-- 2019-08-14 mer. 12:13 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>On the Design of Complementary Filters for Control - Computation with Matlab</title>
@ -279,44 +279,52 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgc8a0b0b">1. Optimal Sensor Fusion for noise characteristics</a>
<li><a href="#org8101fe3">1. Optimal Sensor Fusion for noise characteristics</a>
<ul>
<li><a href="#org04ee05b">1.1. Architecture</a></li>
<li><a href="#org48007f5">1.2. Noise of the sensors</a></li>
<li><a href="#org76a1145">1.3. H-Two Synthesis</a></li>
<li><a href="#orga04dac6">1.4. Analysis</a></li>
<li><a href="#orgda648ce">1.1. Architecture</a></li>
<li><a href="#org7737a79">1.2. Noise of the sensors</a></li>
<li><a href="#orgf85a7f2">1.3. H-Two Synthesis</a></li>
<li><a href="#org9fcdb98">1.4. Analysis</a></li>
</ul>
</li>
<li><a href="#org55b10e6">2. Robustness to sensor dynamics uncertainty</a>
<li><a href="#org7d49713">2. Robustness to sensor dynamics uncertainty</a>
<ul>
<li><a href="#orgdac3786">2.1. Unknown sensor dynamics dynamics</a></li>
<li><a href="#org3bbb654">2.2. Design the complementary filters in order to limit the phase and gain uncertainty of the super sensor</a></li>
<li><a href="#org90b0e78">2.3. First Basic Example with gain mismatch</a></li>
<li><a href="#org8b3719c">2.4. <span class="todo TODO">TODO</span> More Complete example with model uncertainty</a></li>
<li><a href="#orgc1b9515">2.1. Unknown sensor dynamics dynamics</a></li>
<li><a href="#org5df7619">2.2. Design the complementary filters in order to limit the phase and gain uncertainty of the super sensor</a></li>
<li><a href="#org0328fd7">2.3. First Basic Example with gain mismatch</a></li>
<li><a href="#org81e622c">2.4. <span class="todo TODO">TODO</span> More Complete example with model uncertainty</a></li>
</ul>
</li>
<li><a href="#org8d0e75b">3. Complementary filters using analytical formula</a>
<li><a href="#org6d8c8af">3. Complementary filters using analytical formula</a>
<ul>
<li><a href="#org418be39">3.1. Analytical 1st order complementary filters</a></li>
<li><a href="#orgce86bef">3.2. Second Order Complementary Filters</a></li>
<li><a href="#org3a076cb">3.3. Third Order Complementary Filters</a></li>
<li><a href="#orgb288402">3.1. Analytical 1st order complementary filters</a></li>
<li><a href="#orgefd1169">3.2. Second Order Complementary Filters</a></li>
<li><a href="#org32c14e8">3.3. Third Order Complementary Filters</a></li>
</ul>
</li>
<li><a href="#orgb74760b">4. H-Infinity synthesis of complementary filters</a>
<li><a href="#orgc86d54b">4. H-Infinity synthesis of complementary filters</a>
<ul>
<li><a href="#org64a93c7">4.1. Synthesis Architecture</a></li>
<li><a href="#orgeb8d3d5">4.2. Weights</a></li>
<li><a href="#orgc82fc2f">4.3. H-Infinity Synthesis</a></li>
<li><a href="#org49c8dfa">4.4. Obtained Complementary Filters</a></li>
<li><a href="#org2288026">4.1. Synthesis Architecture</a></li>
<li><a href="#orga9b0474">4.2. Weights</a></li>
<li><a href="#org17ecd06">4.3. H-Infinity Synthesis</a></li>
<li><a href="#org844c90a">4.4. Obtained Complementary Filters</a></li>
</ul>
</li>
<li><a href="#org1a55138">5. Feedback Control Architecture to generate Complementary Filters</a>
<li><a href="#orgd76dc0a">5. Feedback Control Architecture to generate Complementary Filters</a>
<ul>
<li><a href="#orga294f6c">5.1. Architecture</a></li>
<li><a href="#orgc9b9e6a">5.2. Loop Gain Design</a></li>
<li><a href="#org10f79fb">5.3. Complementary Filters Obtained</a></li>
<li><a href="#org2b0a54f">5.1. Architecture</a></li>
<li><a href="#org023d478">5.2. Loop Gain Design</a></li>
<li><a href="#orgef15574">5.3. Complementary Filters Obtained</a></li>
</ul>
</li>
<li><a href="#org9a4e0ed">6. Analytical Formula found in the literature</a>
<ul>
<li><a href="#orgfa54829">6.1. Analytical Formula</a></li>
<li><a href="#org5286b79">6.2. Matlab</a></li>
<li><a href="#org6092cef">6.3. Discussion</a></li>
</ul>
</li>
<li><a href="#orgbbfeb6f">7. Comparison of the different methods of synthesis</a></li>
</ul>
</div>
</div>
@ -336,30 +344,31 @@ To achieve this, the sensors included in the filter should complement one anothe
</blockquote>
<ul class="org-ul">
<li>in section <a href="#org796449a">1</a>, the optimal design of the complementary filters in order to obtain the lowest resulting "super sensor" noise is studied</li>
<li>in section <a href="#orgc9381ca">1</a>, the optimal design of the complementary filters in order to obtain the lowest resulting "super sensor" noise is studied</li>
</ul>
<p>
When blending two sensors using complementary filters with unknown dynamics, phase lag may be introduced that renders the close-loop system unstable.
</p>
<ul class="org-ul">
<li>in section <a href="#orge343e91">2</a>, the blending robustness to sensor dynamic uncertainty is studied.</li>
<li>in section <a href="#orgc67c206">2</a>, the blending robustness to sensor dynamic uncertainty is studied.</li>
</ul>
<p>
Then, three design methods for generating two complementary filters are proposed:
</p>
<ul class="org-ul">
<li>in section <a href="#org788d7fc">3</a>, analytical formulas are proposed</li>
<li>in section <a href="#org03b46b0">4</a>, the \(\mathcal{H}_\infty\) synthesis is used</li>
<li>in section <a href="#org0636b4b">5</a>, the classical feedback architecture is used</li>
<li>in section <a href="#org91a8313">3</a>, analytical formulas are proposed</li>
<li>in section <a href="#org2358787">4</a>, the \(\mathcal{H}_\infty\) synthesis is used</li>
<li>in section <a href="#org94d0d5f">5</a>, the classical feedback architecture is used</li>
<li>in section <a href="#orga144d76">6</a>, analytical formulas found in the literature are listed</li>
</ul>
<div id="outline-container-orgc8a0b0b" class="outline-2">
<h2 id="orgc8a0b0b"><span class="section-number-2">1</span> Optimal Sensor Fusion for noise characteristics</h2>
<div id="outline-container-org8101fe3" class="outline-2">
<h2 id="org8101fe3"><span class="section-number-2">1</span> Optimal Sensor Fusion for noise characteristics</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="org796449a"></a>
<a id="orgc9381ca"></a>
</p>
<p>
The idea is to combine sensors that works in different frequency range using complementary filters.
@ -380,11 +389,11 @@ All the files (data and Matlab scripts) are accessible <a href="data/optimal_com
</div>
</div>
<div id="outline-container-org04ee05b" class="outline-3">
<h3 id="org04ee05b"><span class="section-number-3">1.1</span> Architecture</h3>
<div id="outline-container-orgda648ce" class="outline-3">
<h3 id="orgda648ce"><span class="section-number-3">1.1</span> Architecture</h3>
<div class="outline-text-3" id="text-1-1">
<p>
Let's consider the sensor fusion architecture shown on figure <a href="#org66ff4fe">1</a> where two sensors 1 and 2 are measuring the same quantity \(x\) with different noise characteristics determined by \(W_1\) and \(W_2\).
Let's consider the sensor fusion architecture shown on figure <a href="#org0214c79">1</a> where two sensors 1 and 2 are measuring the same quantity \(x\) with different noise characteristics determined by \(W_1\) and \(W_2\).
</p>
<p>
@ -392,18 +401,18 @@ Let's consider the sensor fusion architecture shown on figure <a href="#org66ff4
</p>
<div id="org66ff4fe" class="figure">
<div id="org0214c79" class="figure">
<p><img src="figs/fusion_two_noisy_sensors_with_dyn.png" alt="fusion_two_noisy_sensors_with_dyn.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Fusion of two sensors</p>
</div>
<p>
We consider that the two sensor dynamics \(G_1\) and \(G_2\) are ideal (\(G_1 = G_2 = 1\)). We obtain the architecture of figure <a href="#org8a1b0d3">2</a>.
We consider that the two sensor dynamics \(G_1\) and \(G_2\) are ideal (\(G_1 = G_2 = 1\)). We obtain the architecture of figure <a href="#org8edd1ad">2</a>.
</p>
<div id="org8a1b0d3" class="figure">
<div id="org8edd1ad" class="figure">
<p><img src="figs/fusion_two_noisy_sensors.png" alt="fusion_two_noisy_sensors.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Fusion of two sensors with ideal dynamics</p>
@ -438,8 +447,8 @@ For that, we will use the \(\mathcal{H}_2\) Synthesis.
</div>
</div>
<div id="outline-container-org48007f5" class="outline-3">
<h3 id="org48007f5"><span class="section-number-3">1.2</span> Noise of the sensors</h3>
<div id="outline-container-org7737a79" class="outline-3">
<h3 id="org7737a79"><span class="section-number-3">1.2</span> Noise of the sensors</h3>
<div class="outline-text-3" id="text-1-2">
<p>
Let's define the noise characteristics of the two sensors by choosing \(W_1\) and \(W_2\):
@ -459,7 +468,7 @@ W2 = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainb
</div>
<div id="org2400ae4" class="figure">
<div id="org535b437" class="figure">
<p><img src="figs/nosie_characteristics_sensors.png" alt="nosie_characteristics_sensors.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Noise Characteristics of the two sensors (<a href="./figs/nosie_characteristics_sensors.png">png</a>, <a href="./figs/nosie_characteristics_sensors.pdf">pdf</a>)</p>
@ -467,15 +476,15 @@ W2 = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainb
</div>
</div>
<div id="outline-container-org76a1145" class="outline-3">
<h3 id="org76a1145"><span class="section-number-3">1.3</span> H-Two Synthesis</h3>
<div id="outline-container-orgf85a7f2" class="outline-3">
<h3 id="orgf85a7f2"><span class="section-number-3">1.3</span> H-Two Synthesis</h3>
<div class="outline-text-3" id="text-1-3">
<p>
We use the generalized plant architecture shown on figure <a href="#org593a2df">4</a>.
We use the generalized plant architecture shown on figure <a href="#org178bd58">4</a>.
</p>
<div id="org593a2df" class="figure">
<div id="org178bd58" class="figure">
<p><img src="figs/h_infinity_optimal_comp_filters.png" alt="h_infinity_optimal_comp_filters.png" />
</p>
<p><span class="figure-number">Figure 4: </span>\(\mathcal{H}_2\) Synthesis - Generalized plant used for the optimal generation of complementary filters</p>
@ -493,7 +502,7 @@ Thus, if we minimize the \(\mathcal{H}_2\) norm of this transfer function, we mi
</p>
<p>
We define the generalized plant \(P\) on matlab as shown on figure <a href="#org593a2df">4</a>.
We define the generalized plant \(P\) on matlab as shown on figure <a href="#org178bd58">4</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">P = <span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span> W2 <span class="org-highlight-numbers-number">1</span>;
@ -523,30 +532,30 @@ Finally, we define \(H_2 = 1 - H_1\).
</div>
</div>
<div id="outline-container-orga04dac6" class="outline-3">
<h3 id="orga04dac6"><span class="section-number-3">1.4</span> Analysis</h3>
<div id="outline-container-org9fcdb98" class="outline-3">
<h3 id="org9fcdb98"><span class="section-number-3">1.4</span> Analysis</h3>
<div class="outline-text-3" id="text-1-4">
<p>
The complementary filters obtained are shown on figure <a href="#org9196cc2">5</a>. The PSD of the <a href="#orgcec5bf7">6</a>.
Finally, the RMS value of \(\hat{x}\) is shown on table <a href="#org18d42aa">1</a>.
The complementary filters obtained are shown on figure <a href="#org3f036f9">5</a>. The PSD of the <a href="#org272e8f4">6</a>.
Finally, the RMS value of \(\hat{x}\) is shown on table <a href="#orgf88e62b">1</a>.
The optimal sensor fusion has permitted to reduced the RMS value of the estimation error by a factor 8 compare to when using only one sensor.
</p>
<div id="org9196cc2" class="figure">
<div id="org3f036f9" class="figure">
<p><img src="figs/htwo_comp_filters.png" alt="htwo_comp_filters.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Obtained complementary filters using the \(\mathcal{H}_2\) Synthesis (<a href="./figs/htwo_comp_filters.png">png</a>, <a href="./figs/htwo_comp_filters.pdf">pdf</a>)</p>
</div>
<div id="orgcec5bf7" class="figure">
<div id="org272e8f4" class="figure">
<p><img src="figs/psd_sensors_htwo_synthesis.png" alt="psd_sensors_htwo_synthesis.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Power Spectral Density of the estimated \(\hat{x}\) using the two sensors alone and using the optimally fused signal (<a href="./figs/psd_sensors_htwo_synthesis.png">png</a>, <a href="./figs/psd_sensors_htwo_synthesis.pdf">pdf</a>)</p>
</div>
<table id="org18d42aa" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgf88e62b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> RMS value of the estimation error when using the sensor individually and when using the two sensor merged using the optimal complementary filters</caption>
<colgroup>
@ -580,18 +589,18 @@ The optimal sensor fusion has permitted to reduced the RMS value of the estimati
</div>
</div>
</div>
<div id="outline-container-org55b10e6" class="outline-2">
<h2 id="org55b10e6"><span class="section-number-2">2</span> Robustness to sensor dynamics uncertainty</h2>
<div id="outline-container-org7d49713" class="outline-2">
<h2 id="org7d49713"><span class="section-number-2">2</span> Robustness to sensor dynamics uncertainty</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="orge343e91"></a>
<a id="orgc67c206"></a>
</p>
<p>
Let's first consider ideal sensors where \(G_1 = 1\) and \(G_2 = 1\) (figure <a href="#org524433d">7</a>).
Let's first consider ideal sensors where \(G_1 = 1\) and \(G_2 = 1\) (figure <a href="#orgd65643e">7</a>).
</p>
<div id="org524433d" class="figure">
<div id="orgd65643e" class="figure">
<p><img src="figs/fusion_two_noisy_sensors_with_dyn_bis.png" alt="fusion_two_noisy_sensors_with_dyn_bis.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Fusion of two sensors</p>
@ -621,16 +630,16 @@ All the files (data and Matlab scripts) are accessible <a href="data/comp_filter
</div>
</div>
<div id="outline-container-orgdac3786" class="outline-3">
<h3 id="orgdac3786"><span class="section-number-3">2.1</span> Unknown sensor dynamics dynamics</h3>
<div id="outline-container-orgc1b9515" class="outline-3">
<h3 id="orgc1b9515"><span class="section-number-3">2.1</span> Unknown sensor dynamics dynamics</h3>
<div class="outline-text-3" id="text-2-1">
<p>
In practical systems, the sensor dynamics has always some level of uncertainty.
Let's represent that with multiplicative input uncertainty as shown on figure <a href="#org00c6572">8</a>.
Let's represent that with multiplicative input uncertainty as shown on figure <a href="#org0cb23aa">8</a>.
</p>
<div id="org00c6572" class="figure">
<div id="org0cb23aa" class="figure">
<p><img src="figs/fusion_gain_mismatch.png" alt="fusion_gain_mismatch.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Fusion of two sensors with input multiplicative uncertainty</p>
@ -675,7 +684,7 @@ Which is approximately the same as requiring
</p>
<p>
The uncertainty set of the transfer function from \(\hat{x}\) to \(x\) is bounded in the complex plane by a circle centered on 1 and with a radius equal to \(\epsilon\) (figure <a href="#org6e574cc">9</a>).
The uncertainty set of the transfer function from \(\hat{x}\) to \(x\) is bounded in the complex plane by a circle centered on 1 and with a radius equal to \(\epsilon\) (figure <a href="#orge9b44f9">9</a>).
</p>
<p>
@ -684,7 +693,7 @@ We then have that the angle introduced by the super sensor is bounded by \(\arcs
</p>
<div id="org6e574cc" class="figure">
<div id="orge9b44f9" class="figure">
<p><img src="figs/uncertainty_gain_phase_variation.png" alt="uncertainty_gain_phase_variation.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Maximum phase variation</p>
@ -696,8 +705,8 @@ Thus, we choose should choose \(\epsilon\) so that the maximum phase uncertainty
</div>
</div>
<div id="outline-container-org3bbb654" class="outline-3">
<h3 id="org3bbb654"><span class="section-number-3">2.2</span> Design the complementary filters in order to limit the phase and gain uncertainty of the super sensor</h3>
<div id="outline-container-org5df7619" class="outline-3">
<h3 id="org5df7619"><span class="section-number-3">2.2</span> Design the complementary filters in order to limit the phase and gain uncertainty of the super sensor</h3>
<div class="outline-text-3" id="text-2-2">
<p>
Let's say the two sensors dynamics \(H_1\) and \(H_2\) have been identified with the associated uncertainty weights \(W_1\) and \(W_2\).
@ -730,8 +739,8 @@ This is of primary importance in order to ensure the stability of the feedback l
</div>
</div>
<div id="outline-container-org90b0e78" class="outline-3">
<h3 id="org90b0e78"><span class="section-number-3">2.3</span> First Basic Example with gain mismatch</h3>
<div id="outline-container-org0328fd7" class="outline-3">
<h3 id="org0328fd7"><span class="section-number-3">2.3</span> First Basic Example with gain mismatch</h3>
<div class="outline-text-3" id="text-2-3">
<p>
Let's consider two ideal sensors except one sensor has not an expected gain of one but a gain of \(0.6\).
@ -743,19 +752,19 @@ G2 = <span class="org-highlight-numbers-number">0</span>.<span class="org-highli
</div>
<p>
Let's design two complementary filters as shown on figure <a href="#orga15f970">10</a>.
Let's design two complementary filters as shown on figure <a href="#orgba6e31e">10</a>.
The complementary filters shown in blue does not present a bump as the red ones but provides less sensor separation at high and low frequencies.
</p>
<div id="orga15f970" class="figure">
<div id="orgba6e31e" class="figure">
<p><img src="figs/comp_filters_robustness_test.png" alt="comp_filters_robustness_test.png" />
</p>
<p><span class="figure-number">Figure 10: </span>The two complementary filters designed for the robustness test (<a href="./figs/comp_filters_robustness_test.png">png</a>, <a href="./figs/comp_filters_robustness_test.pdf">pdf</a>)</p>
</div>
<p>
We then compute the bode plot of the super sensor transfer function \(H_1*G_1 + H_2*G_2\) for both complementary filters pair (figure <a href="#orgac681c0">11</a>).
We then compute the bode plot of the super sensor transfer function \(H_1*G_1 + H_2*G_2\) for both complementary filters pair (figure <a href="#orgd412a5a">11</a>).
</p>
<p>
@ -763,7 +772,7 @@ We see that the blue complementary filters with a lower maximum norm permits to
</p>
<div id="orgac681c0" class="figure">
<div id="orgd412a5a" class="figure">
<p><img src="figs/tf_super_sensor_comp.png" alt="tf_super_sensor_comp.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Comparison of the obtained super sensor transfer functions (<a href="./figs/tf_super_sensor_comp.png">png</a>, <a href="./figs/tf_super_sensor_comp.pdf">pdf</a>)</p>
@ -771,15 +780,15 @@ We see that the blue complementary filters with a lower maximum norm permits to
</div>
</div>
<div id="outline-container-org8b3719c" class="outline-3">
<h3 id="org8b3719c"><span class="section-number-3">2.4</span> <span class="todo TODO">TODO</span> More Complete example with model uncertainty</h3>
<div id="outline-container-org81e622c" class="outline-3">
<h3 id="org81e622c"><span class="section-number-3">2.4</span> <span class="todo TODO">TODO</span> More Complete example with model uncertainty</h3>
</div>
</div>
<div id="outline-container-org8d0e75b" class="outline-2">
<h2 id="org8d0e75b"><span class="section-number-2">3</span> Complementary filters using analytical formula</h2>
<div id="outline-container-org6d8c8af" class="outline-2">
<h2 id="org6d8c8af"><span class="section-number-2">3</span> Complementary filters using analytical formula</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="org788d7fc"></a>
<a id="org91a8313"></a>
</p>
<div class="note">
<p>
@ -789,8 +798,8 @@ All the files (data and Matlab scripts) are accessible <a href="data/comp_filter
</div>
</div>
<div id="outline-container-org418be39" class="outline-3">
<h3 id="org418be39"><span class="section-number-3">3.1</span> Analytical 1st order complementary filters</h3>
<div id="outline-container-orgb288402" class="outline-3">
<h3 id="orgb288402"><span class="section-number-3">3.1</span> Analytical 1st order complementary filters</h3>
<div class="outline-text-3" id="text-3-1">
<p>
First order complementary filters are defined with following equations:
@ -801,7 +810,7 @@ First order complementary filters are defined with following equations:
\end{align}
<p>
Their bode plot is shown figure <a href="#org216cb68">12</a>.
Their bode plot is shown figure <a href="#orga970e88">12</a>.
</p>
<div class="org-src-container">
@ -813,7 +822,7 @@ Hl1 = <span class="org-highlight-numbers-number">1</span><span class="org-type">
</div>
<div id="org216cb68" class="figure">
<div id="orga970e88" class="figure">
<p><img src="figs/comp_filter_1st_order.png" alt="comp_filter_1st_order.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Bode plot of first order complementary filter (<a href="./figs/comp_filter_1st_order.png">png</a>, <a href="./figs/comp_filter_1st_order.pdf">pdf</a>)</p>
@ -821,8 +830,8 @@ Hl1 = <span class="org-highlight-numbers-number">1</span><span class="org-type">
</div>
</div>
<div id="outline-container-orgce86bef" class="outline-3">
<h3 id="orgce86bef"><span class="section-number-3">3.2</span> Second Order Complementary Filters</h3>
<div id="outline-container-orgefd1169" class="outline-3">
<h3 id="orgefd1169"><span class="section-number-3">3.2</span> Second Order Complementary Filters</h3>
<div class="outline-text-3" id="text-3-2">
<p>
We here use analytical formula for the complementary filters \(H_L\) and \(H_H\).
@ -848,12 +857,12 @@ where:
</ul>
<p>
This is illustrated on figure <a href="#org8c54c64">13</a>.
This is illustrated on figure <a href="#orga420ceb">13</a>.
The slope of those filters at high and low frequencies is \(-2\) and \(2\) respectively for \(H_L\) and \(H_H\).
</p>
<div id="org8c54c64" class="figure">
<div id="orga420ceb" class="figure">
<p><img src="figs/comp_filters_param_alpha.png" alt="comp_filters_param_alpha.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Effect of the parameter \(\alpha\) on the shape of the generated second order complementary filters (<a href="./figs/comp_filters_param_alpha.png">png</a>, <a href="./figs/comp_filters_param_alpha.pdf">pdf</a>)</p>
@ -871,7 +880,7 @@ xlabel<span class="org-rainbow-delimiters-depth-1">(</span>'$<span class="org-ty
</div>
<div id="orgc29bd71" class="figure">
<div id="orgf07fa17" class="figure">
<p><img src="figs/param_alpha_hinf_norm.png" alt="param_alpha_hinf_norm.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Evolution of the H-Infinity norm of the complementary filters with the parameter \(\alpha\) (<a href="./figs/param_alpha_hinf_norm.png">png</a>, <a href="./figs/param_alpha_hinf_norm.pdf">pdf</a>)</p>
@ -879,8 +888,8 @@ xlabel<span class="org-rainbow-delimiters-depth-1">(</span>'$<span class="org-ty
</div>
</div>
<div id="outline-container-org3a076cb" class="outline-3">
<h3 id="org3a076cb"><span class="section-number-3">3.3</span> Third Order Complementary Filters</h3>
<div id="outline-container-org32c14e8" class="outline-3">
<h3 id="org32c14e8"><span class="section-number-3">3.3</span> Third Order Complementary Filters</h3>
<div class="outline-text-3" id="text-3-3">
<p>
The following formula gives complementary filters with slopes of \(-3\) and \(3\):
@ -899,7 +908,7 @@ The parameters are:
</ul>
<p>
The filters are defined below and the result is shown on figure <a href="#org260ae95">15</a>.
The filters are defined below and the result is shown on figure <a href="#orgbe15178">15</a>.
</p>
<div class="org-src-container">
@ -913,7 +922,7 @@ Hl3_ana = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-
</div>
<div id="org260ae95" class="figure">
<div id="orgbe15178" class="figure">
<p><img src="figs/complementary_filters_third_order.png" alt="complementary_filters_third_order.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Third order complementary filters using the analytical formula (<a href="./figs/complementary_filters_third_order.png">png</a>, <a href="./figs/complementary_filters_third_order.pdf">pdf</a>)</p>
@ -922,11 +931,11 @@ Hl3_ana = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-
</div>
</div>
<div id="outline-container-orgb74760b" class="outline-2">
<h2 id="orgb74760b"><span class="section-number-2">4</span> H-Infinity synthesis of complementary filters</h2>
<div id="outline-container-orgc86d54b" class="outline-2">
<h2 id="orgc86d54b"><span class="section-number-2">4</span> H-Infinity synthesis of complementary filters</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org03b46b0"></a>
<a id="org2358787"></a>
</p>
<div class="note">
<p>
@ -936,8 +945,8 @@ All the files (data and Matlab scripts) are accessible <a href="data/h_inf_synth
</div>
</div>
<div id="outline-container-org64a93c7" class="outline-3">
<h3 id="org64a93c7"><span class="section-number-3">4.1</span> Synthesis Architecture</h3>
<div id="outline-container-org2288026" class="outline-3">
<h3 id="org2288026"><span class="section-number-3">4.1</span> Synthesis Architecture</h3>
<div class="outline-text-3" id="text-4-1">
<p>
We here synthesize the complementary filters using the \(\mathcal{H}_\infty\) synthesis.
@ -945,18 +954,18 @@ The goal is to specify upper bounds on the norms of \(H_L\) and \(H_H\) while en
</p>
<p>
In order to do so, we use the generalized plant shown on figure <a href="#org9c465a4">16</a> where \(w_L\) and \(w_H\) weighting transfer functions that will be used to shape \(H_L\) and \(H_H\) respectively.
In order to do so, we use the generalized plant shown on figure <a href="#org4764d16">16</a> where \(w_L\) and \(w_H\) weighting transfer functions that will be used to shape \(H_L\) and \(H_H\) respectively.
</p>
<div id="org9c465a4" class="figure">
<div id="org4764d16" class="figure">
<p><img src="figs/sf_hinf_filters_plant_b.png" alt="sf_hinf_filters_plant_b.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Generalized plant used for the \(\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_L\) (figure <a href="#org7cda9f1">17</a>) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_H,\ z_L]\) is less than one:
The \(\mathcal{H}_\infty\) synthesis applied on this generalized plant will give a transfer function \(H_L\) (figure <a href="#orgd665b69">17</a>) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_H,\ z_L]\) is less than one:
\[ \left\| \begin{array}{c} H_L w_L \\ (1 - H_L) w_H \end{array} \right\|_\infty < 1 \]
</p>
@ -975,7 +984,7 @@ We then see that \(w_L\) and \(w_H\) can be used to shape both \(H_L\) and \(H_H
</p>
<div id="org7cda9f1" class="figure">
<div id="orgd665b69" class="figure">
<p><img src="figs/sf_hinf_filters_b.png" alt="sf_hinf_filters_b.png" />
</p>
<p><span class="figure-number">Figure 17: </span>\(\mathcal{H}_\infty\) synthesis of the complementary filters</p>
@ -983,8 +992,8 @@ We then see that \(w_L\) and \(w_H\) can be used to shape both \(H_L\) and \(H_H
</div>
</div>
<div id="outline-container-orgeb8d3d5" class="outline-3">
<h3 id="orgeb8d3d5"><span class="section-number-3">4.2</span> Weights</h3>
<div id="outline-container-orga9b0474" class="outline-3">
<h3 id="orga9b0474"><span class="section-number-3">4.2</span> Weights</h3>
<div class="outline-text-3" id="text-4-2">
<div class="org-src-container">
<pre class="src src-matlab">omegab = <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>;
@ -995,7 +1004,7 @@ wL = <span class="org-rainbow-delimiters-depth-1">(</span>s <span class="org-typ
</div>
<div id="org72233b9" class="figure">
<div id="org9dc1a51" class="figure">
<p><img src="figs/weights_wl_wh.png" alt="weights_wl_wh.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Weights on the complementary filters \(w_L\) and \(w_H\) and the associated performance weights (<a href="./figs/weights_wl_wh.png">png</a>, <a href="./figs/weights_wl_wh.pdf">pdf</a>)</p>
@ -1003,8 +1012,8 @@ wL = <span class="org-rainbow-delimiters-depth-1">(</span>s <span class="org-typ
</div>
</div>
<div id="outline-container-orgc82fc2f" class="outline-3">
<h3 id="orgc82fc2f"><span class="section-number-3">4.3</span> H-Infinity Synthesis</h3>
<div id="outline-container-org17ecd06" class="outline-3">
<h3 id="org17ecd06"><span class="section-number-3">4.3</span> H-Infinity Synthesis</h3>
<div class="outline-text-3" id="text-4-3">
<p>
We define the generalized plant \(P\) on matlab.
@ -1046,7 +1055,7 @@ Test bounds: 0.0000 &lt; gamma &lt;= 1.7285
</pre>
<p>
We then define the high pass filter \(H_H = 1 - H_L\). The bode plot of both \(H_L\) and \(H_H\) is shown on figure <a href="#org653f844">19</a>.
We then define the high pass filter \(H_H = 1 - H_L\). The bode plot of both \(H_L\) and \(H_H\) is shown on figure <a href="#orge5933cc">19</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Hh_hinf = <span class="org-highlight-numbers-number">1</span> <span class="org-type">-</span> Hl_hinf;
@ -1055,15 +1064,15 @@ We then define the high pass filter \(H_H = 1 - H_L\). The bode plot of both \(H
</div>
</div>
<div id="outline-container-org49c8dfa" class="outline-3">
<h3 id="org49c8dfa"><span class="section-number-3">4.4</span> Obtained Complementary Filters</h3>
<div id="outline-container-org844c90a" class="outline-3">
<h3 id="org844c90a"><span class="section-number-3">4.4</span> Obtained Complementary Filters</h3>
<div class="outline-text-3" id="text-4-4">
<p>
The obtained complementary filters are shown on figure <a href="#org653f844">19</a>.
The obtained complementary filters are shown on figure <a href="#orge5933cc">19</a>.
</p>
<div id="org653f844" class="figure">
<div id="orge5933cc" class="figure">
<p><img src="figs/hinf_filters_results.png" alt="hinf_filters_results.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Obtained complementary filters using \(\mathcal{H}_\infty\) synthesis (<a href="./figs/hinf_filters_results.png">png</a>, <a href="./figs/hinf_filters_results.pdf">pdf</a>)</p>
@ -1072,11 +1081,11 @@ The obtained complementary filters are shown on figure <a href="#org653f844">19<
</div>
</div>
<div id="outline-container-org1a55138" class="outline-2">
<h2 id="org1a55138"><span class="section-number-2">5</span> Feedback Control Architecture to generate Complementary Filters</h2>
<div id="outline-container-orgd76dc0a" class="outline-2">
<h2 id="orgd76dc0a"><span class="section-number-2">5</span> Feedback Control Architecture to generate Complementary Filters</h2>
<div class="outline-text-2" id="text-5">
<p>
<a id="org0636b4b"></a>
<a id="org94d0d5f"></a>
</p>
<p>
The idea is here to use the fact that in a classical feedback architecture, \(S + T = 1\), in order to design complementary filters.
@ -1093,11 +1102,11 @@ All the files (data and Matlab scripts) are accessible <a href="data/feedback_ge
</div>
</div>
<div id="outline-container-orga294f6c" class="outline-3">
<h3 id="orga294f6c"><span class="section-number-3">5.1</span> Architecture</h3>
<div id="outline-container-org2b0a54f" class="outline-3">
<h3 id="org2b0a54f"><span class="section-number-3">5.1</span> Architecture</h3>
<div class="outline-text-3" id="text-5-1">
<div id="orga2c4a58" class="figure">
<div id="orgb7d4dd2" class="figure">
<p><img src="figs/complementary_filters_feedback_architecture.png" alt="complementary_filters_feedback_architecture.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Architecture used to generate the complementary filters</p>
@ -1124,8 +1133,8 @@ Which contains two integrator and a lead. \(\omega_c\) is used to tune the cross
</div>
</div>
<div id="outline-container-orgc9b9e6a" class="outline-3">
<h3 id="orgc9b9e6a"><span class="section-number-3">5.2</span> Loop Gain Design</h3>
<div id="outline-container-org023d478" class="outline-3">
<h3 id="org023d478"><span class="section-number-3">5.2</span> Loop Gain Design</h3>
<div class="outline-text-3" id="text-5-2">
<p>
Let's first define the loop gain \(L\).
@ -1139,7 +1148,7 @@ L = <span class="org-rainbow-delimiters-depth-1">(</span>wc<span class="org-type
</div>
<div id="org5d40fdf" class="figure">
<div id="org5563034" class="figure">
<p><img src="figs/loop_gain_bode_plot.png" alt="loop_gain_bode_plot.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Bode plot of the loop gain \(L\) (<a href="./figs/loop_gain_bode_plot.png">png</a>, <a href="./figs/loop_gain_bode_plot.pdf">pdf</a>)</p>
@ -1147,8 +1156,8 @@ L = <span class="org-rainbow-delimiters-depth-1">(</span>wc<span class="org-type
</div>
</div>
<div id="outline-container-org10f79fb" class="outline-3">
<h3 id="org10f79fb"><span class="section-number-3">5.3</span> Complementary Filters Obtained</h3>
<div id="outline-container-orgef15574" class="outline-3">
<h3 id="orgef15574"><span class="section-number-3">5.3</span> Complementary Filters Obtained</h3>
<div class="outline-text-3" id="text-5-3">
<p>
We then compute the resulting low pass and high pass filters.
@ -1160,7 +1169,7 @@ Hh = <span class="org-highlight-numbers-number">1</span><span class="org-type">/
</div>
<div id="org6abcb3c" class="figure">
<div id="org7a3c2de" class="figure">
<p><img src="figs/low_pass_high_pass_filters.png" alt="low_pass_high_pass_filters.png" />
</p>
<p><span class="figure-number">Figure 22: </span>Low pass and High pass filters \(H_L\) and \(H_H\) for different values of \(\alpha\) (<a href="./figs/low_pass_high_pass_filters.png">png</a>, <a href="./figs/low_pass_high_pass_filters.pdf">pdf</a>)</p>
@ -1169,14 +1178,129 @@ Hh = <span class="org-highlight-numbers-number">1</span><span class="org-type">/
</div>
</div>
<div id="outline-container-org9a4e0ed" class="outline-2">
<h2 id="org9a4e0ed"><span class="section-number-2">6</span> Analytical Formula found in the literature</h2>
<div class="outline-text-2" id="text-6">
<p>
<a id="orga144d76"></a>
</p>
</div>
<div id="outline-container-orgfa54829" class="outline-3">
<h3 id="orgfa54829"><span class="section-number-3">6.1</span> Analytical Formula</h3>
<div class="outline-text-3" id="text-6-1">
<p>
<a class='org-ref-reference' href="#min15_compl_filter_desig_angle_estim">min15_compl_filter_desig_angle_estim</a>
</p>
\begin{align*}
H_L(s) = \frac{K_p s + K_i}{s^2 + K_p s + K_i} \\
H_H(s) = \frac{s^2}{s^2 + K_p s + K_i}
\end{align*}
<p>
<a class='org-ref-reference' href="#corke04_inert_visual_sensin_system_small_auton_helic">corke04_inert_visual_sensin_system_small_auton_helic</a>
</p>
\begin{align*}
H_L(s) = \frac{1}{s/p + 1} \\
H_H(s) = \frac{s/p}{s/p + 1}
\end{align*}
<p>
<a class='org-ref-reference' href="#jensen13_basic_uas">jensen13_basic_uas</a>
</p>
\begin{align*}
H_L(s) = \frac{2 \omega_0 s + \omega_0^2}{(s + \omega_0)^2} \\
H_H(s) = \frac{s^2}{(s + \omega_0)^2}
\end{align*}
\begin{align*}
H_L(s) = \frac{C(s)}{C(s) + s} \\
H_H(s) = \frac{s}{C(s) + s}
\end{align*}
<p>
<a class='org-ref-reference' href="#shaw90_bandw_enhan_posit_measur_using_measur_accel">shaw90_bandw_enhan_posit_measur_using_measur_accel</a>
</p>
\begin{align*}
H_L(s) = \frac{3 \tau s + 1}{(\tau s + 1)^3} \\
H_H(s) = \frac{\tau^3 s^3 + 3 \tau^2 s^2}{(\tau s + 1)^3}
\end{align*}
<p>
<a class='org-ref-reference' href="#baerveldt97_low_cost_low_weigh_attit">baerveldt97_low_cost_low_weigh_attit</a>
</p>
\begin{align*}
H_L(s) = \frac{2 \tau s + 1}{(\tau s + 1)^2} \\
H_H(s) = \frac{\tau^2 s^2}{(\tau s + 1)^2}
\end{align*}
</div>
</div>
<div id="outline-container-org5286b79" class="outline-3">
<h3 id="org5286b79"><span class="section-number-3">6.2</span> Matlab</h3>
<div class="outline-text-3" id="text-6-2">
<div class="org-src-container">
<pre class="src src-matlab">omega0 = <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><span class="org-constant">pi</span>; <span class="org-comment">% [rad/s]</span>
tau = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span>omega0; <span class="org-comment">% [s]</span>
<span class="org-comment">% From cite:corke04_inert_visual_sensin_system_small_auton_helic</span>
HL1 = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type">/</span>omega0 <span class="org-type">+</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>; HH1 = s<span class="org-type">/</span>omega0<span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type">/</span>omega0 <span class="org-type">+</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-comment">% From cite:jensen13_basic_uas</span>
HL2 = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">2</span><span class="org-type">*</span>omega0<span class="org-type">*</span>s <span class="org-type">+</span> omega0<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><span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type">+</span>omega0<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span>; HH2 = s<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>omega0<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span>;
<span class="org-comment">% From cite:shaw90_bandw_enhan_posit_measur_using_measur_accel</span>
HL3 = <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">3</span><span class="org-type">*</span>tau<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-1">)</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span>tau<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-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">3</span>; HH3 = <span class="org-rainbow-delimiters-depth-1">(</span>tau<span class="org-type">^</span><span class="org-highlight-numbers-number">3</span><span class="org-type">*</span>s<span class="org-type">^</span><span class="org-highlight-numbers-number">3</span> <span class="org-type">+</span> <span class="org-highlight-numbers-number">3</span><span class="org-type">*</span>tau<span class="org-type">^</span><span class="org-highlight-numbers-number">2</span><span class="org-type">*</span>s<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><span class="org-rainbow-delimiters-depth-1">(</span>tau<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-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">3</span>;
</pre>
</div>
<div id="orge38d4ce" class="figure">
<p><img src="figs/comp_filters_literature.png" alt="comp_filters_literature.png" />
</p>
<p><span class="figure-number">Figure 23: </span>Comparison of some complementary filters found in the literature (<a href="./figs/comp_filters_literature.png">png</a>, <a href="./figs/comp_filters_literature.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org6092cef" class="outline-3">
<h3 id="org6092cef"><span class="section-number-3">6.3</span> Discussion</h3>
<div class="outline-text-3" id="text-6-3">
<p>
Analytical Formula found in the literature provides either no parameter for tuning the robustness / performance trade-off.
</p>
</div>
</div>
</div>
<div id="outline-container-orgbbfeb6f" class="outline-2">
<h2 id="orgbbfeb6f"><span class="section-number-2">7</span> Comparison of the different methods of synthesis</h2>
<div class="outline-text-2" id="text-7">
<p>
<a id="orgfee2d57"></a>
The generated complementary filters using \(\mathcal{H}_\infty\) and the analytical formulas are very close to each other. However there is some difference to note here:
</p>
<ul class="org-ul">
<li>the analytical formula provides a very simple way to generate the complementary filters (and thus the controller), they could even be used to tune the controller online using the parameters \(\alpha\) and \(\omega_0\). However, these formula have the property that \(|H_H|\) and \(|H_L|\) are symmetrical with the frequency \(\omega_0\) which may not be desirable.</li>
<li>while the \(\mathcal{H}_\infty\) synthesis of the complementary filters is not as straightforward as using the analytical formula, it provides a more optimized procedure to obtain the complementary filters</li>
</ul>
</div>
</div>
<p>
<a href="ref.bib">ref.bib</a>
<h1 class='org-ref-bib-h1'>Bibliography</h1>
<ul class='org-ref-bib'><li><a id="min15_compl_filter_desig_angle_estim">[min15_compl_filter_desig_angle_estim]</a> <a name="min15_compl_filter_desig_angle_estim"></a>Min & Jeung, Complementary Filter Design for Angle Estimation Using Mems Accelerometer and Gyroscope, <i>Department of Control and Instrumentation, Changwon National University, Changwon, Korea</i>, 641-773 (2015).</li>
<li><a id="corke04_inert_visual_sensin_system_small_auton_helic">[corke04_inert_visual_sensin_system_small_auton_helic]</a> <a name="corke04_inert_visual_sensin_system_small_auton_helic"></a>Peter Corke, An Inertial and Visual Sensing System for a Small Autonomous Helicopter, <i>Journal of Robotic Systems</i>, <b>21(2)</b>, 43-51 (2004). <a href="https://doi.org/10.1002/rob.10127">link</a>. <a href="http://dx.doi.org/10.1002/rob.10127">doi</a>.</li>
<li><a id="jensen13_basic_uas">[jensen13_basic_uas]</a> <a name="jensen13_basic_uas"></a>Austin Jensen, Cal Coopmans & YangQuan Chen, Basics and guidelines of complementary filters for small UAS navigation, nil, in in: 2013 International Conference on Unmanned Aircraft Systems
(ICUAS), edited by (2013)</li>
<li><a id="shaw90_bandw_enhan_posit_measur_using_measur_accel">[shaw90_bandw_enhan_posit_measur_using_measur_accel]</a> <a name="shaw90_bandw_enhan_posit_measur_using_measur_accel"></a>Shaw & Srinivasan, Bandwidth Enhancement of Position Measurements Using Measured Acceleration, <i>Mechanical Systems and Signal Processing</i>, <b>4(1)</b>, 23-38 (1990). <a href="https://doi.org/10.1016/0888-3270(90)90038-m">link</a>. <a href="http://dx.doi.org/10.1016/0888-3270(90)90038-m">doi</a>.</li>
<li><a id="baerveldt97_low_cost_low_weigh_attit">[baerveldt97_low_cost_low_weigh_attit]</a> <a name="baerveldt97_low_cost_low_weigh_attit"></a>Baerveldt & Klang, A Low-Cost and Low-Weight Attitude Estimation System for an Autonomous Helicopter, nil, in in: Proceedings of IEEE International Conference on Intelligent Engineering Systems, edited by (1997)</li>
</ul>
</p>
</div>
<div id="postamble" class="status">
<p class="author">Author: Thomas Dehaeze</p>
<p class="date">Created: 2019-08-14 mer. 12:08</p>
<p class="date">Created: 2019-08-14 mer. 12:13</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -42,6 +42,7 @@ Then, three design methods for generating two complementary filters are proposed
- in section [[sec:comp_filters_analytical]], analytical formulas are proposed
- in section [[sec:h_inf_synthesis_complementary_filters]], the $\mathcal{H}_\infty$ synthesis is used
- in section [[sec:feedback_generate_comp_filters]], the classical feedback architecture is used
- in section [[sec:analytical_formula_literature]], analytical formulas found in the literature are listed
* Optimal Sensor Fusion for noise characteristics
:PROPERTIES:
@ -1021,6 +1022,122 @@ We then compute the resulting low pass and high pass filters.
#+CAPTION: Low pass and High pass filters $H_L$ and $H_H$ for different values of $\alpha$ ([[./figs/low_pass_high_pass_filters.png][png]], [[./figs/low_pass_high_pass_filters.pdf][pdf]])
[[file:figs/low_pass_high_pass_filters.png]]
* Analytical Formula found in the literature
<<sec:analytical_formula_literature>>
** Analytical Formula
cite:min15_compl_filter_desig_angle_estim
\begin{align*}
H_L(s) = \frac{K_p s + K_i}{s^2 + K_p s + K_i} \\
H_H(s) = \frac{s^2}{s^2 + K_p s + K_i}
\end{align*}
cite:corke04_inert_visual_sensin_system_small_auton_helic
\begin{align*}
H_L(s) = \frac{1}{s/p + 1} \\
H_H(s) = \frac{s/p}{s/p + 1}
\end{align*}
cite:jensen13_basic_uas
\begin{align*}
H_L(s) = \frac{2 \omega_0 s + \omega_0^2}{(s + \omega_0)^2} \\
H_H(s) = \frac{s^2}{(s + \omega_0)^2}
\end{align*}
\begin{align*}
H_L(s) = \frac{C(s)}{C(s) + s} \\
H_H(s) = \frac{s}{C(s) + s}
\end{align*}
cite:shaw90_bandw_enhan_posit_measur_using_measur_accel
\begin{align*}
H_L(s) = \frac{3 \tau s + 1}{(\tau s + 1)^3} \\
H_H(s) = \frac{\tau^3 s^3 + 3 \tau^2 s^2}{(\tau s + 1)^3}
\end{align*}
cite:baerveldt97_low_cost_low_weigh_attit
\begin{align*}
H_L(s) = \frac{2 \tau s + 1}{(\tau s + 1)^2} \\
H_H(s) = \frac{\tau^2 s^2}{(\tau s + 1)^2}
\end{align*}
** 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>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Matlab
#+begin_src matlab
omega0 = 1*2*pi; % [rad/s]
tau = 1/omega0; % [s]
% From cite:corke04_inert_visual_sensin_system_small_auton_helic
HL1 = 1/(s/omega0 + 1); HH1 = s/omega0/(s/omega0 + 1);
% From cite:jensen13_basic_uas
HL2 = (2*omega0*s + omega0^2)/(s+omega0)^2; HH2 = s^2/(s+omega0)^2;
% From cite:shaw90_bandw_enhan_posit_measur_using_measur_accel
HL3 = (3*tau*s + 1)/(tau*s + 1)^3; HH3 = (tau^3*s^3 + 3*tau^2*s^2)/(tau*s + 1)^3;
#+end_src
#+begin_src matlab :exports none
freqs = logspace(-1, 1, 1000);
figure;
% Magnitude
ax1 = subaxis(2,1,1);
hold on;
set(gca,'ColorOrderIndex',1); plot(freqs, abs(squeeze(freqresp(HH1, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',1); plot(freqs, abs(squeeze(freqresp(HL1, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2); plot(freqs, abs(squeeze(freqresp(HH2, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2); plot(freqs, abs(squeeze(freqresp(HL2, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',3); plot(freqs, abs(squeeze(freqresp(HH3, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',3); plot(freqs, abs(squeeze(freqresp(HL3, freqs, 'Hz'))));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
hold off;
ylim([1e-2 2]);
% Phase
ax2 = subaxis(2,1,2);
hold on;
set(gca,'ColorOrderIndex',1); plot(freqs, 180/pi*angle(squeeze(freqresp(HH1, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',1); plot(freqs, 180/pi*angle(squeeze(freqresp(HL1, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2); plot(freqs, 180/pi*angle(squeeze(freqresp(HH2, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2); plot(freqs, 180/pi*angle(squeeze(freqresp(HL2, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',3); plot(freqs, 180/pi*angle(squeeze(freqresp(HH3, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',3); plot(freqs, 180/pi*angle(squeeze(freqresp(HL3, freqs, 'Hz'))));
set(gca,'xscale','log');
yticks(-180:90:180);
ylim([-180 180]);
xlabel('Relative Frequency $\frac{\omega}{\omega_0}$'); ylabel('Phase [deg]');
hold off;
linkaxes([ax1,ax2],'x');
xlim([freqs(1), freqs(end)]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/comp_filters_literature.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:comp_filters_literature
#+CAPTION: Comparison of some complementary filters found in the literature ([[./figs/comp_filters_literature.png][png]], [[./figs/comp_filters_literature.pdf][pdf]])
[[file:figs/comp_filters_literature.png]]
** Discussion
Analytical Formula found in the literature provides either no parameter for tuning the robustness / performance trade-off.
* Comparison of the different methods of synthesis
<<sec:discussion>>
The generated complementary filters using $\mathcal{H}_\infty$ and the analytical formulas are very close to each other. However there is some difference to note here:
- the analytical formula provides a very simple way to generate the complementary filters (and thus the controller), they could even be used to tune the controller online using the parameters $\alpha$ and $\omega_0$. However, these formula have the property that $|H_H|$ and $|H_L|$ are symmetrical with the frequency $\omega_0$ which may not be desirable.
- while the $\mathcal{H}_\infty$ synthesis of the complementary filters is not as straightforward as using the analytical formula, it provides a more optimized procedure to obtain the complementary filters
* Bibliography :ignore:
bibliographystyle:unsrt
bibliography:ref.bib