Add first article
@@ -1,22 +1,4 @@
|
||||
+++
|
||||
title = "Research"
|
||||
title = "Publications"
|
||||
draft = false
|
||||
hugotoc = false
|
||||
+++
|
||||
|
||||
Research pages of Thomas Dehaeze.
|
||||
|
||||
**Papers** (abstract, PDF, code links):
|
||||
|
||||
- *Mechatronics Approach for the Development of a Nano-Active-Stabilization-System* (dehaeze21, ICALEPCS) — /link coming with the first migrated page/
|
||||
- *Sample Stabilization for Tomography Experiments in Presence of Large Plant Uncertainty* (dehaeze18)
|
||||
- *Complementary Filter Shaping Using Synthetic Frequency Responses* (dehaeze19)
|
||||
- *Active Damping of Rotating Platforms with Integral Force Feedback* (dehaeze20)
|
||||
- *Optimal and Robust Complementary Filters Design* (dehaeze20)
|
||||
- *Virtual Sensor Fusion for High Precision Control* (dehaeze20, Mechatronics journal)
|
||||
- *Design of Complementary Filters* (dehaeze21)
|
||||
- *Closed-Loop Shaping using Complementary Filters* (dehaeze26)
|
||||
- *Cubic Architecture Decoupling* (dehaeze26, ASME)
|
||||
- *Decoupling of Parallel Manipulators* (dehaeze26)
|
||||
- *Nano Active Stabilization System* (dehaeze26, IUCr)
|
||||
- *Multibody Simulation of Reduced Order Flexible Bodies* (brumund21)
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
+++
|
||||
title = "Complementary Filters Shaping Using $\\mathcal{H}_\\infty$ Synthesis"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
venue = "ICCMA 2019"
|
||||
year = 2019
|
||||
pubtype = "conference"
|
||||
doi = "10.1109/ICCMA46720.2019.8988642"
|
||||
code = "https://git.tdehaeze.xyz/tdehaeze/dehaeze19_compl_filter_shapin_using_synth"
|
||||
+++
|
||||
|
||||
> **Abstract**:
|
||||
>
|
||||
> For many applications, large bandwidth and dynamic ranges are requiring to use several sensors, whose signals are combined using complementary filters.
|
||||
> This paper presents a method for designing these complementary filters using \\(\mathcal{H}\_\infty\\) synthesis that allows to shape the filter norms.
|
||||
> This method is shown to be easily applicable for the synthesis of complex complementary filters.
|
||||
|
||||
|
||||
## Paper ([link](paper/dehaeze19_compl_filter_shapin_using_synth.pdf)) {#paper--link-paper-dehaeze19-compl-filter-shapin-using-synth-dot-pdf}
|
||||
|
||||
The paper has been created [Org Mode](https://orgmode.org/) (generating [LaTeX](https://www.latex-project.org/) code) under [Emacs](https://www.gnu.org/software/emacs/).
|
||||
|
||||
|
||||
## Matlab Scripts ([link]({{< relref "matlab/index.md" >}})) {#matlab-scripts--link-matlab-index-dot-md}
|
||||
|
||||
All the [Matlab](https://fr.mathworks.com/) code that was used for the paper are accessible so that all the results are reproducible.
|
||||
|
||||
|
||||
## Tikz Figures ([link]({{< relref "tikz/_index.md" >}})) {#tikz-figures--link-tikz-index-dot-md}
|
||||
|
||||
All the figures for the paper have been generated using [TikZ](https://sourceforge.net/projects/pgf/).
|
||||
|
||||
|
||||
## Poster ([link](poster/dehaeze19_compl_filter_shapin_using_synth_poster.pdf)) {#poster--link-poster-dehaeze19-compl-filter-shapin-using-synth-poster-dot-pdf}
|
||||
|
||||
The poster has been created using the [tikzposter](https://www.ctan.org/pkg/tikzposter) package for [beamer](https://sourceforge.net/projects/latex-beamer/).
|
||||
|
||||
|
||||
## Presentation ([link](talk/dehaeze19_compl_filter_shapin_using_synth_talk.pdf)) {#presentation--link-talk-dehaeze19-compl-filter-shapin-using-synth-talk-dot-pdf}
|
||||
|
||||
The presentation for the [ICCMA 2019](http://iccma.org/) conference has been created using the [beamer](https://github.com/josephwright/beamer) package.
|
||||
|
||||
|
||||
## Cite this paper {#cite-this-paper}
|
||||
|
||||
To cite this paper use the following bibtex code.
|
||||
|
||||
```bibtex
|
||||
@inproceedings{dehaeze19_compl_filter_shapin_using_synth,
|
||||
author = {Dehaeze, Thomas and Vermat, Mohit and Collette Christophe},
|
||||
title = {Complementary Filters Shaping Using $\mathcal{H}_\infty$ Synthesis},
|
||||
booktitle = {7th International Conference on Control, Mechatronics and Automation (ICCMA)},
|
||||
year = {2019},
|
||||
language = {english},
|
||||
doi = {10.1109/ICCMA46720.2019.8988642},
|
||||
}
|
||||
```
|
||||
|
||||
You can also use the formatted citation below.
|
||||
|
||||
> Dehaeze T., Vermat M., and Collette C., "Complementary Filters Shaping Using ℋ∞ Synthesis," 2019 7th International Conference on Control, Mechatronics and Automation (ICCMA), Delft, Netherlands, 2019, pp. 459-464.
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,566 @@
|
||||
+++
|
||||
title = "Complementary Filters Shaping Using $\\mathcal{H}_\\infty$ Synthesis - Matlab Computation"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
In this document, the design of complementary filters is studied.
|
||||
|
||||
One use of complementary filter is described below:
|
||||
|
||||
> The basic idea of a complementary filter involves taking two or more sensors, filtering out unreliable frequencies for each sensor, and combining the filtered outputs to get a better estimate throughout the entire bandwidth of the system.
|
||||
> To achieve this, the sensors included in the filter should complement one another by performing better over specific parts of the system bandwidth.
|
||||
|
||||
- in section , the \\(\mathcal{H}\_\infty\\) synthesis is used for generating two complementary filters
|
||||
- in section , a method using the \\(\mathcal{H}\_\infty\\) synthesis is proposed to shape three of more complementary filters
|
||||
- in section , the \\(\mathcal{H}\_\infty\\) synthesis is used and compared with FIR complementary filters used for LIGO
|
||||
|
||||
<div class="note">
|
||||
|
||||
Add the Matlab code use to obtain the results presented in the paper are accessible [here](https://git.tdehaeze.xyz/tdehaeze/dehaeze19_compl_filter_shapin_using_synth/archive/master.zip) and presented below.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## H-Infinity synthesis of complementary filters {#h-infinity-synthesis-of-complementary-filters}
|
||||
|
||||
<span class="org-target" id="org-target--sec-h-inf-synthesis-complementary-filters"></span>
|
||||
|
||||
<div class="note">
|
||||
|
||||
The Matlab file corresponding to this section is accessible [here](https://git.tdehaeze.xyz/tdehaeze/dehaeze19_compl_filter_shapin_using_synth/src/branch/master/matlab/matlab/h_inf_synthesis_complementary_filters.m).
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
### Synthesis Architecture {#synthesis-architecture}
|
||||
|
||||
We here synthesize two complementary filters using the \\(\mathcal{H}\_\infty\\) synthesis.
|
||||
The goal is to specify upper bounds on the norms of the two complementary filters \\(H\_1(s)\\) and \\(H\_2(s)\\) while ensuring their complementary property (\\(H\_1(s) + H\_2(s) = 1\\)).
|
||||
|
||||
In order to do so, we use the generalized plant shown on figure [Figure 1](#figure--fig:h-infinity-robst-fusion) 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.
|
||||
|
||||
<a id="figure--fig:h-infinity-robst-fusion"></a>
|
||||
|
||||
{{< figure src="h_infinity_robust_fusion.png" caption="<span class='figure-number'>Figure 1: </span>\\(\mathcal{H}\_\infty\\) synthesis of the complementary filters" >}}
|
||||
|
||||
The \\(\mathcal{H}\_\infty\\) synthesis applied on this generalized plant will give a transfer function \\(H\_2\\) (figure [Figure 1](#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 \\]
|
||||
|
||||
Thus, if the above condition is verified, we can define \\(H\_1(s) = 1 - H\_2(s)\\) and we have that:
|
||||
\\[ \left\\| \begin{array}{c} H\_1(s) W\_1(s) \\\ H\_2(s) W\_2(s) \end{array} \right\\|\_\infty < 1 \\]
|
||||
Which is almost (with an maximum error of \\(\sqrt{2}\\)) equivalent to:
|
||||
|
||||
\begin{align\*}
|
||||
|H\_1(j\omega)| &< \frac{1}{|W\_1(j\omega)|}, \quad \forall \omega \\\\
|
||||
|H\_2(j\omega)| &< \frac{1}{|W\_2(j\omega)|}, \quad \forall \omega
|
||||
\end{align\*}
|
||||
|
||||
We then see that \\(W\_1(s)\\) and \\(W\_2(s)\\) can be used to shape both \\(H\_1(s)\\) and \\(H\_2(s)\\) while ensuring their complementary property by the definition of \\(H\_1(s) = 1 - H\_2(s)\\).
|
||||
|
||||
|
||||
### Design of Weighting Function {#design-of-weighting-function}
|
||||
|
||||
A formula is proposed to help the design of the weighting functions:
|
||||
|
||||
\begin{equation}
|
||||
W(s) = \left( \frac{
|
||||
\frac{1}{\omega\_0} \sqrt{\frac{1 - \left(\frac{G\_0}{G\_c}\right)^{\frac{2}{n}}}{1 - \left(\frac{G\_c}{G\_\infty}\right)^{\frac{2}{n}}}} s + \left(\frac{G\_0}{G\_c}\right)^{\frac{1}{n}}
|
||||
}{
|
||||
\left(\frac{1}{G\_\infty}\right)^{\frac{1}{n}} \frac{1}{\omega\_0} \sqrt{\frac{1 - \left(\frac{G\_0}{G\_c}\right)^{\frac{2}{n}}}{1 - \left(\frac{G\_c}{G\_\infty}\right)^{\frac{2}{n}}}} s + \left(\frac{1}{G\_c}\right)^{\frac{1}{n}}
|
||||
}\right)^n
|
||||
\end{equation}
|
||||
|
||||
The parameters permits to specify:
|
||||
|
||||
- the low frequency gain: \\(G\_0 = lim\_{\omega \to 0} |W(j\omega)|\\)
|
||||
- the high frequency gain: \\(G\_\infty = lim\_{\omega \to \infty} |W(j\omega)|\\)
|
||||
- the absolute gain at \\(\omega\_0\\): \\(G\_c = |W(j\omega\_0)|\\)
|
||||
- the absolute slope between high and low frequency: \\(n\\)
|
||||
|
||||
The general shape of a weighting function generated using the formula is shown in figure [Figure 2](#figure--fig:weight-formula).
|
||||
|
||||
<a id="figure--fig:weight-formula"></a>
|
||||
|
||||
{{< figure src="weight_formula.png" caption="<span class='figure-number'>Figure 2: </span>Amplitude of the proposed formula for the weighting functions" >}}
|
||||
|
||||
```matlab
|
||||
n = 2; w0 = 2*pi*11; G0 = 1/10; G1 = 1000; Gc = 1/2;
|
||||
W1 = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
|
||||
|
||||
n = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 1/2;
|
||||
W2 = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
|
||||
```
|
||||
|
||||
<a id="figure--fig:weights-W1-W2"></a>
|
||||
|
||||
{{< figure src="figs/weights_W1_W2.png" caption="<span class='figure-number'>Figure 3: </span>Weights on the complementary filters \\(W\_1\\) and \\(W\_2\\) and the associated performance weights" >}}
|
||||
|
||||
|
||||
### H-Infinity Synthesis {#h-infinity-synthesis}
|
||||
|
||||
We define the generalized plant \\(P\\) on matlab.
|
||||
|
||||
```matlab
|
||||
P = [W1 -W1;
|
||||
0 W2;
|
||||
1 0];
|
||||
```
|
||||
|
||||
And we do the \\(\mathcal{H}\_\infty\\) synthesis using the `hinfsyn` command.
|
||||
|
||||
```matlab
|
||||
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
|
||||
```
|
||||
|
||||
```text
|
||||
[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
|
||||
|
||||
Test bounds: 0.1000 < gamma <= 1050.0000
|
||||
|
||||
gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f
|
||||
1.050e+03 2.8e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
525.050 2.8e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
262.575 2.8e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
131.337 2.8e+01 2.4e-07 4.1e+00 -1.0e-13 0.0000 p
|
||||
65.719 2.8e+01 2.4e-07 4.1e+00 -9.5e-14 0.0000 p
|
||||
32.909 2.8e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
16.505 2.8e+01 2.4e-07 4.1e+00 -1.0e-13 0.0000 p
|
||||
8.302 2.8e+01 2.4e-07 4.1e+00 -7.2e-14 0.0000 p
|
||||
4.201 2.8e+01 2.4e-07 4.1e+00 -2.5e-25 0.0000 p
|
||||
2.151 2.7e+01 2.4e-07 4.1e+00 -3.8e-14 0.0000 p
|
||||
1.125 2.6e+01 2.4e-07 4.1e+00 -5.4e-24 0.0000 p
|
||||
0.613 2.3e+01 -3.7e+01# 4.1e+00 0.0e+00 0.0000 f
|
||||
0.869 2.6e+01 -3.7e+02# 4.1e+00 0.0e+00 0.0000 f
|
||||
0.997 2.6e+01 -1.1e+04# 4.1e+00 0.0e+00 0.0000 f
|
||||
1.061 2.6e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
1.029 2.6e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
1.013 2.6e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
1.005 2.6e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
1.001 2.6e+01 -3.1e+04# 4.1e+00 -3.8e-14 0.0000 f
|
||||
1.003 2.6e+01 -2.8e+05# 4.1e+00 0.0e+00 0.0000 f
|
||||
1.004 2.6e+01 2.4e-07 4.1e+00 -5.8e-24 0.0000 p
|
||||
1.004 2.6e+01 2.4e-07 4.1e+00 0.0e+00 0.0000 p
|
||||
|
||||
Gamma value achieved: 1.0036
|
||||
```
|
||||
|
||||
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 [Figure 4](#figure--fig:hinf-filters-results).
|
||||
|
||||
```matlab
|
||||
H1 = 1 - H2;
|
||||
```
|
||||
|
||||
|
||||
### Obtained Complementary Filters {#obtained-complementary-filters}
|
||||
|
||||
The obtained complementary filters are shown on figure [Figure 4](#figure--fig:hinf-filters-results).
|
||||
|
||||
<a id="figure--fig:hinf-filters-results"></a>
|
||||
|
||||
{{< figure src="figs/hinf_filters_results.png" caption="<span class='figure-number'>Figure 4: </span>Obtained complementary filters using \\(\mathcal{H}\_\infty\\) synthesis" >}}
|
||||
|
||||
|
||||
## Generating 3 complementary filters {#generating-3-complementary-filters}
|
||||
|
||||
<span class="org-target" id="org-target--sec-three-comp-filters"></span>
|
||||
|
||||
<div class="note">
|
||||
|
||||
The Matlab file corresponding to this section is accessible [here](https://git.tdehaeze.xyz/tdehaeze/dehaeze19_compl_filter_shapin_using_synth/src/branch/master/matlab/matlab/three_comp_filters.m).
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
### Theory {#theory}
|
||||
|
||||
We want:
|
||||
|
||||
\begin{align\*}
|
||||
& |H\_1(j\omega)| < 1/|W\_1(j\omega)|, \quad \forall\omega\\\\
|
||||
& |H\_2(j\omega)| < 1/|W\_2(j\omega)|, \quad \forall\omega\\\\
|
||||
& |H\_3(j\omega)| < 1/|W\_3(j\omega)|, \quad \forall\omega\\\\
|
||||
& H\_1(s) + H\_2(s) + H\_3(s) = 1
|
||||
\end{align\*}
|
||||
|
||||
For that, we use the \\(\mathcal{H}\_\infty\\) synthesis with the architecture shown on figure [Figure 5](#figure--fig:comp-filter-three-hinf).
|
||||
|
||||
<a id="figure--fig:comp-filter-three-hinf"></a>
|
||||
|
||||
{{< figure src="comp_filter_three_hinf.png" caption="<span class='figure-number'>Figure 5: </span>Generalized architecture for generating 3 complementary filters" >}}
|
||||
|
||||
The \\(\mathcal{H}\_\infty\\) objective is:
|
||||
|
||||
\begin{align\*}
|
||||
& |(1 - H\_2(j\omega) - H\_3(j\omega)) W\_1(j\omega)| < 1, \quad \forall\omega\\\\
|
||||
& |H\_2(j\omega) W\_2(j\omega)| < 1, \quad \forall\omega\\\\
|
||||
& |H\_3(j\omega) W\_3(j\omega)| < 1, \quad \forall\omega\\\\
|
||||
\end{align\*}
|
||||
|
||||
And thus if we choose \\(H\_1 = 1 - H\_2 - H\_3\\) we have solved the problem.
|
||||
|
||||
|
||||
### Weights {#weights}
|
||||
|
||||
First we define the weights.
|
||||
|
||||
```matlab
|
||||
n = 2; w0 = 2*pi*1; G0 = 1/10; G1 = 1000; Gc = 1/2;
|
||||
W1 = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
|
||||
|
||||
W2 = 0.22*(1 + s/2/pi/1)^2/(sqrt(1e-4) + s/2/pi/1)^2*(1 + s/2/pi/10)^2/(1 + s/2/pi/1000)^2;
|
||||
|
||||
n = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 1/2;
|
||||
W3 = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
|
||||
```
|
||||
|
||||
<a id="figure--fig:three-weighting-functions"></a>
|
||||
|
||||
{{< figure src="figs/three_weighting_functions.png" caption="<span class='figure-number'>Figure 6: </span>Three weighting functions used for the \\(\mathcal{H}\_\infty\\) synthesis of the complementary filters" >}}
|
||||
|
||||
|
||||
### H-Infinity Synthesis {#h-infinity-synthesis}
|
||||
|
||||
Then we create the generalized plant `P`.
|
||||
|
||||
```matlab
|
||||
P = [W1 -W1 -W1;
|
||||
0 W2 0 ;
|
||||
0 0 W3;
|
||||
1 0 0];
|
||||
```
|
||||
|
||||
And we do the \\(\mathcal{H}\_\infty\\) synthesis.
|
||||
|
||||
```matlab
|
||||
[H, ~, gamma, ~] = hinfsyn(P, 1, 2,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
|
||||
```
|
||||
|
||||
```text
|
||||
[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
|
||||
|
||||
Test bounds: 0.1000 < gamma <= 1050.0000
|
||||
|
||||
gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f
|
||||
1.050e+03 3.2e+00 4.5e-13 6.3e-02 -1.2e-11 0.0000 p
|
||||
525.050 3.2e+00 1.3e-13 6.3e-02 0.0e+00 0.0000 p
|
||||
262.575 3.2e+00 2.1e-12 6.3e-02 -1.5e-13 0.0000 p
|
||||
131.337 3.2e+00 1.1e-12 6.3e-02 -7.2e-29 0.0000 p
|
||||
65.719 3.2e+00 2.0e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
32.909 3.2e+00 7.4e-13 6.3e-02 -5.9e-13 0.0000 p
|
||||
16.505 3.2e+00 1.4e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
8.302 3.2e+00 1.6e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
4.201 3.2e+00 1.6e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
2.151 3.2e+00 1.6e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
1.125 3.2e+00 2.8e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
0.613 3.0e+00 -2.5e+03# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.869 3.1e+00 -2.9e+01# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.997 3.2e+00 1.9e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
0.933 3.1e+00 -6.9e+02# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.965 3.1e+00 -3.0e+03# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.981 3.1e+00 -8.6e+03# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.989 3.2e+00 -2.7e+04# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.993 3.2e+00 -5.7e+05# 6.3e-02 0.0e+00 0.0000 f
|
||||
0.995 3.2e+00 2.2e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
0.994 3.2e+00 1.6e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
0.994 3.2e+00 1.0e-12 6.3e-02 0.0e+00 0.0000 p
|
||||
|
||||
Gamma value achieved: 0.9936
|
||||
```
|
||||
|
||||
|
||||
### Obtained Complementary Filters {#obtained-complementary-filters}
|
||||
|
||||
The obtained filters are:
|
||||
|
||||
```matlab
|
||||
H2 = tf(H(1));
|
||||
H3 = tf(H(2));
|
||||
H1 = 1 - H2 - H3;
|
||||
```
|
||||
|
||||
<a id="figure--fig:three-complementary-filters-results"></a>
|
||||
|
||||
{{< figure src="figs/three_complementary_filters_results.png" caption="<span class='figure-number'>Figure 7: </span>The three complementary filters obtained after \\(\mathcal{H}\_\infty\\) synthesis" >}}
|
||||
|
||||
|
||||
## Try to implement complementary filters for LIGO {#try-to-implement-complementary-filters-for-ligo}
|
||||
|
||||
<span class="org-target" id="org-target--sec-comp-filters-ligo"></span>
|
||||
|
||||
<div class="note">
|
||||
|
||||
The Matlab file corresponding to this section is accessible [here](https://git.tdehaeze.xyz/tdehaeze/dehaeze19_compl_filter_shapin_using_synth/src/branch/master/matlab/matlab/comp_filters_ligo.m).
|
||||
|
||||
</div>
|
||||
|
||||
Let's try to design complementary filters that are corresponding to the complementary filters design for the LIGO and described in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
|
||||
|
||||
The FIR complementary filters designed in (<a href="#citeproc_bib_item_1">Hua 2005</a>) are of order 512.
|
||||
|
||||
|
||||
### Specifications {#specifications}
|
||||
|
||||
The specifications for the filters are:
|
||||
|
||||
1. From \\(0\\) to \\(0.008\text{ Hz}\\),the magnitude of the filter’s transfer function should be less than or equal to \\(8 \times 10^{-3}\\)
|
||||
2. From \\(0.008\text{ Hz}\\) to \\(0.04\text{ Hz}\\), it attenuates the input signal proportional to frequency cubed
|
||||
3. Between \\(0.04\text{ Hz}\\) and \\(0.1\text{ Hz}\\), the magnitude of the transfer function should be less than 3
|
||||
4. Above \\(0.1\text{ Hz}\\), the maximum of the magnitude of the complement filter should be as close to zero as possible. In our system, we would like to have the magnitude of the complementary filter to be less than \\(0.1\\). As the filters obtained in (<a href="#citeproc_bib_item_1">Hua 2005</a>) have a magnitude of \\(0.045\\), we will set that as our requirement
|
||||
|
||||
The specifications are translated in upper bounds of the complementary filters are shown on figure [Figure 8](#figure--fig:ligo-specifications).
|
||||
|
||||
<a id="figure--fig:ligo-specifications"></a>
|
||||
|
||||
{{< figure src="figs/ligo_specifications.png" caption="<span class='figure-number'>Figure 8: </span>Specification for the LIGO complementary filters" >}}
|
||||
|
||||
|
||||
### FIR Filter {#fir-filter}
|
||||
|
||||
We here try to implement the FIR complementary filter synthesis as explained in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
|
||||
For that, we use the [CVX matlab Toolbox](http://cvxr.com/cvx/).
|
||||
|
||||
We setup the CVX toolbox and use the `SeDuMi` solver.
|
||||
|
||||
```matlab
|
||||
cvx_startup;
|
||||
cvx_solver sedumi;
|
||||
```
|
||||
|
||||
We define the frequency vectors on which we will constrain the norm of the FIR filter.
|
||||
|
||||
```matlab
|
||||
w1 = 0:4.06e-4:0.008;
|
||||
w2 = 0.008:4.06e-4:0.04;
|
||||
w3 = 0.04:8.12e-4:0.1;
|
||||
w4 = 0.1:8.12e-4:0.83;
|
||||
```
|
||||
|
||||
We then define the order of the FIR filter.
|
||||
|
||||
```matlab
|
||||
n = 512;
|
||||
```
|
||||
|
||||
```matlab
|
||||
A1 = [ones(length(w1),1), cos(kron(w1'.*(2*pi),[1:n-1]))];
|
||||
A2 = [ones(length(w2),1), cos(kron(w2'.*(2*pi),[1:n-1]))];
|
||||
A3 = [ones(length(w3),1), cos(kron(w3'.*(2*pi),[1:n-1]))];
|
||||
A4 = [ones(length(w4),1), cos(kron(w4'.*(2*pi),[1:n-1]))];
|
||||
|
||||
B1 = [zeros(length(w1),1), sin(kron(w1'.*(2*pi),[1:n-1]))];
|
||||
B2 = [zeros(length(w2),1), sin(kron(w2'.*(2*pi),[1:n-1]))];
|
||||
B3 = [zeros(length(w3),1), sin(kron(w3'.*(2*pi),[1:n-1]))];
|
||||
B4 = [zeros(length(w4),1), sin(kron(w4'.*(2*pi),[1:n-1]))];
|
||||
```
|
||||
|
||||
We run the convex optimization.
|
||||
|
||||
```matlab
|
||||
cvx_begin
|
||||
|
||||
variable y(n+1,1)
|
||||
|
||||
% t
|
||||
maximize(-y(1))
|
||||
|
||||
for i = 1:length(w1)
|
||||
norm([0 A1(i,:); 0 B1(i,:)]*y) <= 8e-3;
|
||||
end
|
||||
|
||||
for i = 1:length(w2)
|
||||
norm([0 A2(i,:); 0 B2(i,:)]*y) <= 8e-3*(2*pi*w2(i)/(0.008*2*pi))^3;
|
||||
end
|
||||
|
||||
for i = 1:length(w3)
|
||||
norm([0 A3(i,:); 0 B3(i,:)]*y) <= 3;
|
||||
end
|
||||
|
||||
for i = 1:length(w4)
|
||||
norm([[1 0]'- [0 A4(i,:); 0 B4(i,:)]*y]) <= y(1);
|
||||
end
|
||||
|
||||
cvx_end
|
||||
|
||||
h = y(2:end);
|
||||
```
|
||||
|
||||
```text
|
||||
cvx_begin
|
||||
variable y(n+1,1)
|
||||
% t
|
||||
maximize(-y(1))
|
||||
for i = 1:length(w1)
|
||||
norm([0 A1(i,:); 0 B1(i,:)]*y) <= 8e-3;
|
||||
end
|
||||
for i = 1:length(w2)
|
||||
norm([0 A2(i,:); 0 B2(i,:)]*y) <= 8e-3*(2*pi*w2(i)/(0.008*2*pi))^3;
|
||||
end
|
||||
for i = 1:length(w3)
|
||||
norm([0 A3(i,:); 0 B3(i,:)]*y) <= 3;
|
||||
end
|
||||
for i = 1:length(w4)
|
||||
norm([[1 0]'- [0 A4(i,:); 0 B4(i,:)]*y]) <= y(1);
|
||||
end
|
||||
cvx_end
|
||||
|
||||
Calling SeDuMi 1.34: 4291 variables, 1586 equality constraints
|
||||
For improved efficiency, SeDuMi is solving the dual problem.
|
||||
------------------------------------------------------------
|
||||
SeDuMi 1.34 (beta) by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
|
||||
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
|
||||
eqs m = 1586, order n = 3220, dim = 4292, blocks = 1073
|
||||
nnz(A) = 1100727 + 0, nnz(ADA) = 1364794, nnz(L) = 683190
|
||||
it : b*y gap delta rate t/tP* t/tD* feas cg cg prec
|
||||
0 : 4.11E+02 0.000
|
||||
1 : -2.58E+00 1.25E+02 0.000 0.3049 0.9000 0.9000 4.87 1 1 3.0E+02
|
||||
2 : -2.36E+00 3.90E+01 0.000 0.3118 0.9000 0.9000 1.83 1 1 6.6E+01
|
||||
3 : -1.69E+00 1.31E+01 0.000 0.3354 0.9000 0.9000 1.76 1 1 1.5E+01
|
||||
4 : -8.60E-01 7.10E+00 0.000 0.5424 0.9000 0.9000 2.48 1 1 4.8E+00
|
||||
5 : -4.91E-01 5.44E+00 0.000 0.7661 0.9000 0.9000 3.12 1 1 2.5E+00
|
||||
6 : -2.96E-01 3.88E+00 0.000 0.7140 0.9000 0.9000 2.62 1 1 1.4E+00
|
||||
7 : -1.98E-01 2.82E+00 0.000 0.7271 0.9000 0.9000 2.14 1 1 8.5E-01
|
||||
8 : -1.39E-01 2.00E+00 0.000 0.7092 0.9000 0.9000 1.78 1 1 5.4E-01
|
||||
9 : -9.99E-02 1.30E+00 0.000 0.6494 0.9000 0.9000 1.51 1 1 3.3E-01
|
||||
10 : -7.57E-02 8.03E-01 0.000 0.6175 0.9000 0.9000 1.31 1 1 2.0E-01
|
||||
11 : -5.99E-02 4.22E-01 0.000 0.5257 0.9000 0.9000 1.17 1 1 1.0E-01
|
||||
12 : -5.28E-02 2.45E-01 0.000 0.5808 0.9000 0.9000 1.08 1 1 5.9E-02
|
||||
13 : -4.82E-02 1.28E-01 0.000 0.5218 0.9000 0.9000 1.05 1 1 3.1E-02
|
||||
14 : -4.56E-02 5.65E-02 0.000 0.4417 0.9045 0.9000 1.02 1 1 1.4E-02
|
||||
15 : -4.43E-02 2.41E-02 0.000 0.4265 0.9004 0.9000 1.01 1 1 6.0E-03
|
||||
16 : -4.37E-02 8.90E-03 0.000 0.3690 0.9070 0.9000 1.00 1 1 2.3E-03
|
||||
17 : -4.35E-02 3.24E-03 0.000 0.3641 0.9164 0.9000 1.00 1 1 9.5E-04
|
||||
18 : -4.34E-02 1.55E-03 0.000 0.4788 0.9086 0.9000 1.00 1 1 4.7E-04
|
||||
19 : -4.34E-02 8.77E-04 0.000 0.5653 0.9169 0.9000 1.00 1 1 2.8E-04
|
||||
20 : -4.34E-02 5.05E-04 0.000 0.5754 0.9034 0.9000 1.00 1 1 1.6E-04
|
||||
21 : -4.34E-02 2.94E-04 0.000 0.5829 0.9136 0.9000 1.00 1 1 9.9E-05
|
||||
22 : -4.34E-02 1.63E-04 0.015 0.5548 0.9000 0.0000 1.00 1 1 6.6E-05
|
||||
23 : -4.33E-02 9.42E-05 0.000 0.5774 0.9053 0.9000 1.00 1 1 3.9E-05
|
||||
24 : -4.33E-02 6.27E-05 0.000 0.6658 0.9148 0.9000 1.00 1 1 2.6E-05
|
||||
25 : -4.33E-02 3.75E-05 0.000 0.5972 0.9187 0.9000 1.00 1 1 1.6E-05
|
||||
26 : -4.33E-02 1.89E-05 0.000 0.5041 0.9117 0.9000 1.00 1 1 8.6E-06
|
||||
27 : -4.33E-02 9.72E-06 0.000 0.5149 0.9050 0.9000 1.00 1 1 4.5E-06
|
||||
28 : -4.33E-02 2.94E-06 0.000 0.3021 0.9194 0.9000 1.00 1 1 1.5E-06
|
||||
29 : -4.33E-02 9.73E-07 0.000 0.3312 0.9189 0.9000 1.00 2 2 5.3E-07
|
||||
30 : -4.33E-02 2.82E-07 0.000 0.2895 0.9063 0.9000 1.00 2 2 1.6E-07
|
||||
31 : -4.33E-02 8.05E-08 0.000 0.2859 0.9049 0.9000 1.00 2 2 4.7E-08
|
||||
32 : -4.33E-02 1.43E-08 0.000 0.1772 0.9059 0.9000 1.00 2 2 8.8E-09
|
||||
|
||||
iter seconds digits c*x b*y
|
||||
32 49.4 6.8 -4.3334083581e-02 -4.3334090214e-02
|
||||
|Ax-b| = 3.7e-09, [Ay-c]_+ = 1.1E-10, |x|= 1.0e+00, |y|= 2.6e+00
|
||||
|
||||
Detailed timing (sec)
|
||||
Pre IPM Post
|
||||
3.902E+00 4.576E+01 1.035E-02
|
||||
Max-norms: ||b||=1, ||c|| = 3,
|
||||
Cholesky |add|=0, |skip| = 0, ||L.L|| = 4.26267.
|
||||
------------------------------------------------------------
|
||||
Status: Solved
|
||||
Optimal value (cvx_optval): -0.0433341
|
||||
h = y(2:end);
|
||||
```
|
||||
|
||||
Finally, we compute the filter response over the frequency vector defined and the result is shown on figure [Figure 9](#figure--fig:fir-filter-ligo) which is very close to the filters obtain in (<a href="#citeproc_bib_item_1">Hua 2005</a>).
|
||||
|
||||
```matlab
|
||||
w = [w1 w2 w3 w4];
|
||||
H = [exp(-j*kron(w'.*2*pi,[0:n-1]))]*h;
|
||||
```
|
||||
|
||||
<a id="figure--fig:fir-filter-ligo"></a>
|
||||
|
||||
{{< figure src="figs/fir_filter_ligo.png" caption="<span class='figure-number'>Figure 9: </span>FIR Complementary filters obtain after convex optimization" >}}
|
||||
|
||||
|
||||
### Weights {#weights}
|
||||
|
||||
We design weights that will be used for the \\(\mathcal{H}\_\infty\\) synthesis of the complementary filters.
|
||||
These weights will determine the order of the obtained filters.
|
||||
Here are the requirements on the filters:
|
||||
|
||||
- reasonable order
|
||||
- to be as close as possible to the specified upper bounds
|
||||
- stable minimum phase
|
||||
|
||||
The bode plot of the weights is shown on figure [Figure 10](#figure--fig:ligo-weights).
|
||||
|
||||
<a id="figure--fig:ligo-weights"></a>
|
||||
|
||||
{{< figure src="figs/ligo_weights.png" caption="<span class='figure-number'>Figure 10: </span>Weights for the \\(\mathcal{H}\_\infty\\) synthesis" >}}
|
||||
|
||||
|
||||
### H-Infinity Synthesis {#h-infinity-synthesis}
|
||||
|
||||
We define the generalized plant as shown on figure [Figure 1](#figure--fig:h-infinity-robst-fusion).
|
||||
|
||||
```matlab
|
||||
P = [0 wL;
|
||||
wH -wH;
|
||||
1 0];
|
||||
```
|
||||
|
||||
And we do the \\(\mathcal{H}\_\infty\\) synthesis using the `hinfsyn` command.
|
||||
|
||||
```matlab
|
||||
[Hl, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
|
||||
```
|
||||
|
||||
```text
|
||||
[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
|
||||
|
||||
Test bounds: 0.3276 < gamma <= 1.8063
|
||||
|
||||
gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f
|
||||
1.806 1.4e-02 -1.7e-16 3.6e-03 -4.8e-12 0.0000 p
|
||||
1.067 1.3e-02 -4.2e-14 3.6e-03 -1.9e-12 0.0000 p
|
||||
0.697 1.3e-02 -3.0e-01# 3.6e-03 -3.5e-11 0.0000 f
|
||||
0.882 1.3e-02 -9.5e-01# 3.6e-03 -1.2e-34 0.0000 f
|
||||
0.975 1.3e-02 -2.7e+00# 3.6e-03 -1.6e-12 0.0000 f
|
||||
1.021 1.3e-02 -8.7e+00# 3.6e-03 -4.5e-16 0.0000 f
|
||||
1.044 1.3e-02 -6.5e-14 3.6e-03 -3.0e-15 0.0000 p
|
||||
1.032 1.3e-02 -1.8e+01# 3.6e-03 0.0e+00 0.0000 f
|
||||
1.038 1.3e-02 -3.8e+01# 3.6e-03 0.0e+00 0.0000 f
|
||||
1.041 1.3e-02 -8.3e+01# 3.6e-03 -2.9e-33 0.0000 f
|
||||
1.042 1.3e-02 -1.9e+02# 3.6e-03 -3.4e-11 0.0000 f
|
||||
1.043 1.3e-02 -5.3e+02# 3.6e-03 -7.5e-13 0.0000 f
|
||||
|
||||
Gamma value achieved: 1.0439
|
||||
```
|
||||
|
||||
The high pass filter is defined as \\(H\_H = 1 - H\_L\\).
|
||||
|
||||
```matlab
|
||||
Hh = 1 - Hl;
|
||||
```
|
||||
|
||||
The size of the filters is shown below.
|
||||
|
||||
```text
|
||||
State-space model with 1 outputs, 1 inputs, and 27 states.
|
||||
State-space model with 1 outputs, 1 inputs, and 27 states.
|
||||
```
|
||||
|
||||
The bode plot of the obtained filters as shown on figure [Figure 11](#figure--fig:hinf-synthesis-ligo-results).
|
||||
|
||||
<a id="figure--fig:hinf-synthesis-ligo-results"></a>
|
||||
|
||||
{{< figure src="figs/hinf_synthesis_ligo_results.png" caption="<span class='figure-number'>Figure 11: </span>Obtained complementary filters using the \\(\mathcal{H}\_\infty\\) synthesis" >}}
|
||||
|
||||
|
||||
### Compare FIR and H-Infinity Filters {#compare-fir-and-h-infinity-filters}
|
||||
|
||||
Let'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 [Figure 12](#figure--fig:comp-fir-ligo-hinf).
|
||||
|
||||
<a id="figure--fig:comp-fir-ligo-hinf"></a>
|
||||
|
||||
{{< figure src="figs/comp_fir_ligo_hinf.png" caption="<span class='figure-number'>Figure 12: </span>Comparison between the FIR filters developped for LIGO and the \\(\mathcal{H}\_\infty\\) complementary filters" >}}
|
||||
|
||||
|
||||
|
||||
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><div class="csl-bib-body">
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_1"></a>Hua, Wensheng. 2005. “Low Frequency Vibration Isolation and Alignment System for Advanced LIGO.” stanford university.</div>
|
||||
</div>
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 49 KiB |
@@ -0,0 +1,104 @@
|
||||
+++
|
||||
title = "Complementary Filters Shaping Using $\\mathcal{H}_\\infty$ Synthesis - Python Computation"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
## H-Infinity synthesis of complementary filters {#h-infinity-synthesis-of-complementary-filters}
|
||||
|
||||
|
||||
### Imports Necessary Python Modules {#imports-necessary-python-modules}
|
||||
|
||||
```python
|
||||
import os
|
||||
from math import pi, sqrt
|
||||
|
||||
import numpy as np
|
||||
|
||||
import matplotlib as mpl
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from control import *
|
||||
```
|
||||
|
||||
```python
|
||||
# mpl.use('TKAgg')
|
||||
mpl.use('Agg')
|
||||
```
|
||||
|
||||
```python
|
||||
# mpl.style.use('ggplot')
|
||||
mpl.style.use('seaborn-colorblind')
|
||||
```
|
||||
|
||||
|
||||
### Design of Weighting Function {#design-of-weighting-function}
|
||||
|
||||
```python
|
||||
A1 = 1e-2;
|
||||
M1 = 10;
|
||||
w1 = 1*2*pi;
|
||||
|
||||
W1 = tf([1, 2*w1*sqrt(A1), (w1**2)*A1], [1/M1, 2*w1/sqrt(M1), w1**2]);
|
||||
```
|
||||
|
||||
```python
|
||||
A2 = 1e-1;
|
||||
M2 = 100;
|
||||
w2 = 2*2*pi;
|
||||
|
||||
W2 = tf([1/M2, 2*w2/sqrt(M2), w2**2], [1, 2*w2*sqrt(A2), (w2**2)*A2]);
|
||||
```
|
||||
|
||||
```python
|
||||
fig=plt.figure()
|
||||
bode_plot(W1, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='${W_1}^{-1}$', color='tab:blue')
|
||||
bode_plot(W2, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='${W_2}^{-1}$', color='tab:red')
|
||||
plt.legend(loc='upper right')
|
||||
plt.show(block=False)
|
||||
```
|
||||
|
||||
<a id="figure--fig:weights-W1-W2"></a>
|
||||
|
||||
{{< figure src="figs/weights_W1_W2.png" caption="<span class='figure-number'>Figure 1: </span>Weights \\(W\_1\\) and \\(W\_2\\) on the complementary filters" >}}
|
||||
|
||||
|
||||
### H-Infinity Synthesis {#h-infinity-synthesis}
|
||||
|
||||
```python
|
||||
P = tf([[W1.den[0][0], -W1.den[0][0]],
|
||||
[[0], W2.den[0][0]],
|
||||
[[1], [0]]],
|
||||
[[W1.num[0][0], W1.num[0][0]],
|
||||
[[1], W2.num[0][0]],
|
||||
[[1], [1]]])
|
||||
```
|
||||
|
||||
```python
|
||||
H2, CL, gam, rcond = hinfsyn(tf2ss(P), 1, 1)
|
||||
```
|
||||
|
||||
```text
|
||||
0.9676461123885229
|
||||
```
|
||||
|
||||
```python
|
||||
H1 = 1 - H2
|
||||
```
|
||||
|
||||
|
||||
### Obtained Complementary Filters {#obtained-complementary-filters}
|
||||
|
||||
```python
|
||||
fig=plt.figure()
|
||||
bode_plot(W1, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='${W_1}^{-1}$', color='tab:blue')
|
||||
bode_plot(W2, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='${W_2}^{-1}$', color='tab:red')
|
||||
bode_plot(H1, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='$H_1$', color='tab:blue', linestyle='--')
|
||||
bode_plot(H2, Hz=True, omega_limits=[0.01, 100.0], Plot=True, label='$H_2$', color='tab:red', linestyle='--')
|
||||
plt.legend(loc='upper right')
|
||||
plt.show(block=False)
|
||||
```
|
||||
|
||||
<a id="figure--fig:hinf-filters-results"></a>
|
||||
|
||||
{{< figure src="figs/hinf_filters_results.png" caption="<span class='figure-number'>Figure 2: </span>Obtained complementary filters using \\(\mathcal{H}\_\infty\\) synthesis" >}}
|
||||
@@ -0,0 +1,608 @@
|
||||
+++
|
||||
title = "Complementary Filters Shaping Using $\\mathcal{H}_\\infty$ Synthesis - Tikz Figures"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Configuration file is accessible [here]({{< relref "config.md" >}}).
|
||||
|
||||
|
||||
## Fig 1: Sensor Fusion Architecture {#fig-1-sensor-fusion-architecture}
|
||||
|
||||
```latex
|
||||
\begin{tikzpicture}
|
||||
\node[branch] (x) at (0, 0);
|
||||
\node[block, above right=0.5 and 0.5 of x](G1){$G_1(s)$};
|
||||
\node[block, below right=0.5 and 0.5 of x](G2){$G_2(s)$};
|
||||
\node[addb, right=0.8 of G1](add1){};
|
||||
\node[addb, right=0.8 of G2](add2){};
|
||||
\node[block, right=0.8 of add1](H1){$H_1(s)$};
|
||||
\node[block, right=0.8 of add2](H2){$H_2(s)$};
|
||||
\node[addb, right=5 of x](add){};
|
||||
|
||||
\draw[] ($(x)+(-0.7, 0)$) node[above right]{$x$} -- (x.center);
|
||||
\draw[->] (x.center) |- (G1.west);
|
||||
\draw[->] (x.center) |- (G2.west);
|
||||
\draw[->] (G1.east) -- (add1.west);
|
||||
\draw[->] (G2.east) -- (add2.west);
|
||||
\draw[<-] (add1.north) -- ++(0, 0.8)node[below right](n1){$n_1$};
|
||||
\draw[<-] (add2.north) -- ++(0, 0.8)node[below right](n2){$n_2$};
|
||||
\draw[->] (add1.east) -- (H1.west);
|
||||
\draw[->] (add2.east) -- (H2.west);
|
||||
\draw[->] (H1) -| (add.north);
|
||||
\draw[->] (H2) -| (add.south);
|
||||
\draw[->] (add.east) -- ++(0.7, 0) node[above left]{$\hat{x}$};
|
||||
|
||||
\begin{scope}[on background layer]
|
||||
\node[fit={($(G2.south-|x)+(-0.2, -0.3)$) ($(n1.north east-|add.east)+(0.2, 0.3)$)}, fill=black!10!white, draw, dashed, inner sep=0pt] (supersensor) {};
|
||||
\node[below left] at (supersensor.north east) {Super Sensor};
|
||||
|
||||
\node[fit={($(G1.south west)+(-0.3, -0.1)$) ($(n1.north east)+(0.0, 0.1)$)}, fill=black!20!white, draw, dashed, inner sep=0pt] (sensor1) {};
|
||||
\node[below right] at (sensor1.north west) {Sensor 1};
|
||||
\node[fit={($(G2.south west)+(-0.3, -0.1)$) ($(n2.north east)+(0.0, 0.1)$)}, fill=black!20!white, draw, dashed, inner sep=0pt] (sensor2) {};
|
||||
\node[below right] at (sensor2.north west) {Sensor 2};
|
||||
\end{scope}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:fusion-super-sensor"></a>
|
||||
|
||||
{{< figure src="figs/fusion_super_sensor.png" caption="<span class='figure-number'>Figure 1: </span>Sensor Fusion Architecture ([png](figs/fusion_super_sensor.png), [pdf](figs/fusion_super_sensor.pdf), [tex](./figs/fusion_super_sensor.tex))." >}}
|
||||
|
||||
|
||||
## Fig 2: Sensor fusion architecture with sensor dynamics uncertainty {#fig-2-sensor-fusion-architecture-with-sensor-dynamics-uncertainty}
|
||||
|
||||
```latex
|
||||
\begin{tikzpicture}
|
||||
\node[branch] (x) at (0, 0);
|
||||
\node[addb, above right=0.8 and 4 of x](add1){};
|
||||
\node[addb, below right=0.8 and 4 of x](add2){};
|
||||
\node[block, above left=0.2 and 0.1 of add1](delta1){$\Delta_1(s)$};
|
||||
\node[block, above left=0.2 and 0.1 of add2](delta2){$\Delta_2(s)$};
|
||||
\node[block, left=0.5 of delta1](W1){$w_1(s)$};
|
||||
\node[block, left=0.5 of delta2](W2){$w_2(s)$};
|
||||
\node[block, right=0.5 of add1](H1){$H_1(s)$};
|
||||
\node[block, right=0.5 of add2](H2){$H_2(s)$};
|
||||
\node[addb, right=6 of x](add){};
|
||||
|
||||
\draw[] ($(x)+(-0.7, 0)$) node[above right]{$x$} -- (x.center);
|
||||
\draw[->] (x.center) |- (add1.west);
|
||||
\draw[->] (x.center) |- (add2.west);
|
||||
\draw[->] ($(add1-|W1.west)+(-0.5, 0)$)node[branch](S1){} |- (W1.west);
|
||||
\draw[->] ($(add2-|W2.west)+(-0.5, 0)$)node[branch](S1){} |- (W2.west);
|
||||
\draw[->] (W1.east) -- (delta1.west);
|
||||
\draw[->] (W2.east) -- (delta2.west);
|
||||
\draw[->] (delta1.east) -| (add1.north);
|
||||
\draw[->] (delta2.east) -| (add2.north);
|
||||
\draw[->] (add1.east) -- (H1.west);
|
||||
\draw[->] (add2.east) -- (H2.west);
|
||||
\draw[->] (H1.east) -| (add.north);
|
||||
\draw[->] (H2.east) -| (add.south);
|
||||
\draw[->] (add.east) -- ++(0.7, 0) node[above left]{$\hat{x}$};
|
||||
|
||||
\begin{scope}[on background layer]
|
||||
\node[block, fit={($(W1.north-|S1)+(-0.2, 0.2)$) ($(add1.south east)+(0.2, -0.3)$)}, fill=black!20!white, dashed, inner sep=0pt] (sensor1) {};
|
||||
\node[above right] at (sensor1.south west) {Sensor 1};
|
||||
\node[block, fit={($(W2.north-|S1)+(-0.2, 0.2)$) ($(add2.south east)+(0.2, -0.3)$)}, fill=black!20!white, dashed, inner sep=0pt] (sensor2) {};
|
||||
\node[above right] at (sensor2.south west) {Sensor 2};
|
||||
\end{scope}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:sensor-fusion-dynamic-uncertainty"></a>
|
||||
|
||||
{{< figure src="figs/sensor_fusion_dynamic_uncertainty.png" caption="<span class='figure-number'>Figure 2: </span>Sensor fusion architecture with sensor dynamics uncertainty ([png](figs/sensor_fusion_dynamic_uncertainty.png), [pdf](figs/sensor_fusion_dynamic_uncertainty.pdf), [tex](./figs/sensor_fusion_dynamic_uncertainty.tex))." >}}
|
||||
|
||||
|
||||
## Fig 3: Uncertainty set of the super sensor dynamics {#fig-3-uncertainty-set-of-the-super-sensor-dynamics}
|
||||
|
||||
```latex
|
||||
\begin{tikzpicture}
|
||||
\begin{scope}[shift={(4, 0)}]
|
||||
|
||||
% Uncertainty Circle
|
||||
\node[draw, circle, fill=black!20!white, minimum size=3.6cm] (c) at (0, 0) {};
|
||||
\path[draw, dotted] (0, 0) circle [radius=1.0];
|
||||
\path[draw, dashed] (135:1.0) circle [radius=0.8];
|
||||
|
||||
% Center of Circle
|
||||
\node[below] at (0, 0){$1$};
|
||||
|
||||
\draw[<->, dashed] (0, 0) node[branch]{} -- coordinate[midway](r1) ++(45:1.0);
|
||||
\draw[<->, dashed] (135:1.0)node[branch]{} -- coordinate[midway](r2) ++(90:0.8);
|
||||
|
||||
\node[] (l1) at (2, 1.5) {$|w_1 H_1|$};
|
||||
\draw[->, dashed, out=-90, in=0] (l1.south) to (r1);
|
||||
|
||||
\node[] (l2) at (-2.5, 1.5) {$|w_2 H_2|$};
|
||||
\draw[->, dashed, out=0, in=-180] (l2.east) to (r2);
|
||||
|
||||
\draw[<->, dashed] (0, 0) -- coordinate[near end](r3) ++(200:1.8);
|
||||
\node[] (l3) at (-2.5, -1.5) {$|w_1 H_1| + |w_2 H_2|$};
|
||||
\draw[->, dashed, out=90, in=-90] (l3.north) to (r3);
|
||||
\end{scope}
|
||||
|
||||
% Real and Imaginary Axis
|
||||
\draw[->] (-0.5, 0) -- (7.0, 0) node[below left]{Re};
|
||||
\draw[->] (0, -1.7) -- (0, 1.7) node[below left]{Im};
|
||||
|
||||
\draw[dashed] (0, 0) -- (tangent cs:node=c,point={(0, 0)},solution=2);
|
||||
\draw[dashed] (1, 0) arc (0:28:1) node[midway, right]{$\Delta \phi$};
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:uncertainty-set-super-sensor"></a>
|
||||
|
||||
{{< figure src="figs/uncertainty_set_super_sensor.png" caption="<span class='figure-number'>Figure 3: </span>Uncertainty region of the super sensor dynamics in the complex plane (solid circle), of the sensor 1 (dotted circle) and of the sensor 2 (dashed circle) ([png](figs/uncertainty_set_super_sensor.png), [pdf](figs/uncertainty_set_super_sensor.pdf), [tex](./figs/uncertainty_set_super_sensor.tex))." >}}
|
||||
|
||||
|
||||
## Fig 4: Architecture used for \\(\mathcal{H}\_\infty\\) synthesis of complementary filters {#fig-4-architecture-used-for-mathcal-h-infty-synthesis-of-complementary-filters}
|
||||
|
||||
```latex
|
||||
\begin{tikzpicture}
|
||||
\node[block={4.0cm}{2.5cm}, fill=black!20!white, dashed] (P) {};
|
||||
\node[above] at (P.north) {$P(s)$};
|
||||
|
||||
\coordinate[] (inputw) at ($(P.south west)!0.75!(P.north west) + (-0.7, 0)$);
|
||||
\coordinate[] (inputu) at ($(P.south west)!0.35!(P.north west) + (-0.7, 0)$);
|
||||
|
||||
\coordinate[] (output1) at ($(P.south east)!0.75!(P.north east) + ( 0.7, 0)$);
|
||||
\coordinate[] (output2) at ($(P.south east)!0.35!(P.north east) + ( 0.7, 0)$);
|
||||
\coordinate[] (outputv) at ($(P.south east)!0.1!(P.north east) + ( 0.7, 0)$);
|
||||
|
||||
\node[block, left=1.4 of output1] (W1){$W_1(s)$};
|
||||
\node[block, left=1.4 of output2] (W2){$W_2(s)$};
|
||||
\node[addb={+}{}{}{}{-}, left=of W1] (sub) {};
|
||||
|
||||
\node[block, below=0.3 of P] (H2) {$H_2(s)$};
|
||||
|
||||
\draw[->] (inputw) node[above right]{$w$} -- (sub.west);
|
||||
\draw[->] (H2.west) -| ($(inputu)+(0.35, 0)$) node[above]{$u$} -- (W2.west);
|
||||
\draw[->] (inputu-|sub) node[branch]{} -- (sub.south);
|
||||
\draw[->] (sub.east) -- (W1.west);
|
||||
\draw[->] ($(sub.west)+(-0.6, 0)$) node[branch]{} |- ($(outputv)+(-0.35, 0)$) node[above]{$v$} |- (H2.east);
|
||||
\draw[->] (W1.east) -- (output1)node[above left]{$z_1$};
|
||||
\draw[->] (W2.east) -- (output2)node[above left]{$z_2$};
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:h-infinity-robust-fusion"></a>
|
||||
|
||||
{{< figure src="figs/h_infinity_robust_fusion.png" caption="<span class='figure-number'>Figure 4: </span>Architecture used for \\(\mathcal{H}\_\infty\\) synthesis of complementary filters ([png](figs/h_infinity_robust_fusion.png), [pdf](figs/h_infinity_robust_fusion.pdf), [tex](./figs/h_infinity_robust_fusion.tex))." >}}
|
||||
|
||||
|
||||
## Fig 5: Magnitude of a weighting function generated using the proposed formula {#fig-5-magnitude-of-a-weighting-function-generated-using-the-proposed-formula}
|
||||
|
||||
```latex
|
||||
\setlength\fwidth{6.5cm}
|
||||
\setlength\fheight{3.5cm}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=1.0\fheight,
|
||||
at={(0.0\fwidth, 0.0\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.1,
|
||||
xmax=100,
|
||||
xtick={0.1,1,10, 100},
|
||||
xminorticks=true,
|
||||
ymode=log,
|
||||
ymin=0.0005,
|
||||
ymax=20,
|
||||
ytick={0.001, 0.01, 0.1, 1, 10},
|
||||
yminorticks=true,
|
||||
ylabel={Magnitude},
|
||||
xlabel={Frequency [Hz]},
|
||||
xminorgrids,
|
||||
yminorgrids,
|
||||
]
|
||||
|
||||
\addplot [color=black, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=ampl, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matweight_formula.csv};
|
||||
|
||||
\addplot [color=black, dashed, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
1 10\\
|
||||
100 10\\
|
||||
};
|
||||
\addplot [color=black, dashed, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
0.1 0.001\\
|
||||
3 0.001\\
|
||||
};
|
||||
|
||||
\addplot [color=black, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
0.1 1\\
|
||||
100 1\\
|
||||
};
|
||||
|
||||
\addplot [color=black, dashed, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
10 2\\
|
||||
10 1\\
|
||||
};
|
||||
|
||||
\node[below] at (2, 10) {$G_\infty$};
|
||||
\node[above] at (2, 0.001) {$G_0$};
|
||||
|
||||
\node[branch] at (10, 2){};
|
||||
\draw[dashed, line cap=round] (7, 2) -- (20, 2) node[right]{$G_c$};
|
||||
\draw[dashed, line cap=round] (10, 2) -- (10, 1) node[below]{$\omega_c$};
|
||||
|
||||
\node[right] at (3, 0.1) {$+n$};
|
||||
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:weight-formula"></a>
|
||||
|
||||
{{< figure src="figs/weight_formula.png" caption="<span class='figure-number'>Figure 5: </span>Magnitude of a weighting function generated using the proposed formula ([png](figs/weight_formula.png), [pdf](figs/weight_formula.pdf), [tex](./figs/weight_formula.tex))." >}}
|
||||
|
||||
|
||||
## Fig 6: Frequency response of the weighting functions and complementary filters obtained using \\(\mathcal{H}\_\infty\\) synthesis {#fig-6-frequency-response-of-the-weighting-functions-and-complementary-filters-obtained-using-mathcal-h-infty-synthesis}
|
||||
|
||||
```latex
|
||||
\setlength\fwidth{6.5cm}
|
||||
\setlength\fheight{6cm}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.5\fheight,
|
||||
at={(0.0\fwidth, 0.47\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.1,
|
||||
xmax=1000,
|
||||
xtick={0.1, 1, 10, 100, 1000},
|
||||
xticklabels={{}},
|
||||
xminorticks=true,
|
||||
ymode=log,
|
||||
ymin=0.0005,
|
||||
ymax=20,
|
||||
ytick={0.001, 0.01, 0.1, 1, 10},
|
||||
yminorticks=true,
|
||||
ylabel={Magnitude},
|
||||
xminorgrids,
|
||||
yminorgrids,
|
||||
]
|
||||
\addplot [color=mycolor1, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=H1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv};
|
||||
|
||||
\addplot [color=mycolor2, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=H2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv};
|
||||
|
||||
\addplot [color=mycolor1, dashed, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=W1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_weights.csv};
|
||||
|
||||
\addplot [color=mycolor2, dashed, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=W2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_weights.csv};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.45\fheight,
|
||||
at={(0.0\fwidth, 0.0\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.1,
|
||||
xmax=1000,
|
||||
xtick={0.1, 1, 10, 100, 1000},
|
||||
xminorticks=true,
|
||||
xlabel={Frequency [Hz]},
|
||||
ymin=-200,
|
||||
ymax=200,
|
||||
ytick={-180, -90, 0, 90, 180},
|
||||
ylabel={Phase [deg]},
|
||||
xminorgrids,
|
||||
legend style={at={(1,1.1)}, outer sep=2pt , anchor=north east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}},
|
||||
]
|
||||
\addlegendimage{color=mycolor1, dashed, line width=1.5pt}
|
||||
\addlegendentry{$W_1^{-1}$};
|
||||
\addlegendimage{color=mycolor2, dashed, line width=1.5pt}
|
||||
\addlegendentry{$W_2^{-1}$};
|
||||
\addplot [color=mycolor1, line width=1.5pt]
|
||||
table [x=freqs, y=H1p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv};
|
||||
\addlegendentry{$H_1$};
|
||||
\addplot [color=mycolor2, line width=1.5pt]
|
||||
table [x=freqs, y=H2p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv};
|
||||
\addlegendentry{$H_2$};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:hinf-synthesis-results"></a>
|
||||
|
||||
{{< figure src="figs/hinf_synthesis_results.png" caption="<span class='figure-number'>Figure 6: </span>Frequency response of the weighting functions and complementary filters obtained using \\(\mathcal{H}\_\infty\\) synthesis ([png](figs/hinf_synthesis_results.png), [pdf](figs/hinf_synthesis_results.pdf), [tex](./figs/hinf_synthesis_results.tex))." >}}
|
||||
|
||||
|
||||
## Fig 7: Architecture for \\(\mathcal{H}\_\infty\\) synthesis of three complementary filters {#fig-7-architecture-for-mathcal-h-infty-synthesis-of-three-complementary-filters}
|
||||
|
||||
```latex
|
||||
\begin{tikzpicture}
|
||||
\node[block={5.0cm}{3.5cm}, fill=black!20!white, dashed] (P) {};
|
||||
\node[above] at (P.north) {$P(s)$};
|
||||
|
||||
\coordinate[] (inputw) at ($(P.south west)!0.8!(P.north west) + (-0.7, 0)$);
|
||||
\coordinate[] (inputu) at ($(P.south west)!0.4!(P.north west) + (-0.7, 0)$);
|
||||
|
||||
\coordinate[] (output1) at ($(P.south east)!0.8!(P.north east) + (0.7, 0)$);
|
||||
\coordinate[] (output2) at ($(P.south east)!0.55!(P.north east) + (0.7, 0)$);
|
||||
\coordinate[] (output3) at ($(P.south east)!0.3!(P.north east) + (0.7, 0)$);
|
||||
\coordinate[] (outputv) at ($(P.south east)!0.1!(P.north east) + (0.7, 0)$);
|
||||
|
||||
\node[block, left=1.4 of output1] (W1){$W_1(s)$};
|
||||
\node[block, left=1.4 of output2] (W2){$W_2(s)$};
|
||||
\node[block, left=1.4 of output3] (W3){$W_3(s)$};
|
||||
\node[addb={+}{}{}{}{-}, left=of W1] (sub1) {};
|
||||
\node[addb={+}{}{}{}{-}, left=of sub1] (sub2) {};
|
||||
|
||||
\node[block, below=0.3 of P] (H) {$\begin{bmatrix}H_2(s) \\ H_3(s)\end{bmatrix}$};
|
||||
|
||||
\draw[->] (inputw) node[above right](w){$w$} -- (sub2.west);
|
||||
\draw[->] (W3-|sub1)node[branch]{} -- (sub1.south);
|
||||
\draw[->] (W2-|sub2)node[branch]{} -- (sub2.south);
|
||||
\draw[->] ($(sub2.west)+(-0.5, 0)$) node[branch]{} |- (outputv) |- (H.east);
|
||||
\draw[->] ($(H.south west)!0.7!(H.north west)$) -| (inputu|-W2) -- (W2.west);
|
||||
\draw[->] ($(H.south west)!0.3!(H.north west)$) -| ($(inputu|-W3)+(0.4, 0)$) -- (W3.west);
|
||||
|
||||
\draw[->] (sub2.east) -- (sub1.west);
|
||||
\draw[->] (sub1.east) -- (W1.west);
|
||||
\draw[->] (W1.east) -- (output1)node[above left](z){$z_1$};
|
||||
\draw[->] (W2.east) -- (output2)node[above left]{$z_2$};
|
||||
\draw[->] (W3.east) -- (output3)node[above left]{$z_3$};
|
||||
\node[above] at (W2-|w){$u_1$};
|
||||
\node[above] at (W3-|w){$u_2$};
|
||||
\node[above] at (outputv-|z){$v$};
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:comp-filter-three-hinf"></a>
|
||||
|
||||
{{< figure src="figs/comp_filter_three_hinf.png" caption="<span class='figure-number'>Figure 7: </span>Architecture for \\(\mathcal{H}\_\infty\\) synthesis of three complementary filters ([png](figs/comp_filter_three_hinf.png), [pdf](figs/comp_filter_three_hinf.pdf), [tex](./figs/comp_filter_three_hinf.tex))." >}}
|
||||
|
||||
|
||||
## Fig 8: Frequency response of the weighting functions and three complementary filters obtained using \\(\mathcal{H}\_\infty\\) synthesis {#fig-8-frequency-response-of-the-weighting-functions-and-three-complementary-filters-obtained-using-mathcal-h-infty-synthesis}
|
||||
|
||||
```latex
|
||||
\setlength\fwidth{6.5cm}
|
||||
\setlength\fheight{6cm}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.55\fheight,
|
||||
at={(0.0\fwidth, 0.42\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.1,
|
||||
xmax=100,
|
||||
xticklabels={{}},
|
||||
xminorticks=true,
|
||||
ymode=log,
|
||||
ymin=0.0005,
|
||||
ymax=20,
|
||||
ytick={0.001, 0.01, 0.1, 1, 10},
|
||||
yminorticks=true,
|
||||
ylabel={Magnitude},
|
||||
xminorgrids,
|
||||
yminorgrids,
|
||||
legend columns=2,
|
||||
legend style={
|
||||
/tikz/column 2/.style={
|
||||
column sep=5pt,
|
||||
},
|
||||
at={(1,0)}, outer sep=2pt , anchor=south east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}
|
||||
},
|
||||
]
|
||||
\addplot [color=mycolor1, dashed, line width=1.5pt]
|
||||
table [x=freqs, y=W1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv};
|
||||
\addlegendentry{${W_1}^{-1}$};
|
||||
\addplot [color=mycolor1, line width=1.5pt]
|
||||
table [x=freqs, y=H1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
\addlegendentry{$H_1$};
|
||||
|
||||
|
||||
\addplot [color=mycolor2, dashed, line width=1.5pt]
|
||||
table [x=freqs, y=W2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv};
|
||||
\addlegendentry{${W_2}^{-1}$};
|
||||
\addplot [color=mycolor2, line width=1.5pt]
|
||||
table [x=freqs, y=H2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
\addlegendentry{$H_2$};
|
||||
|
||||
\addplot [color=mycolor3, dashed, line width=1.5pt]
|
||||
table [x=freqs, y=W3, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv};
|
||||
\addlegendentry{${W_3}^{-1}$};
|
||||
\addplot [color=mycolor3, line width=1.5pt]
|
||||
table [x=freqs, y=H3, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
\addlegendentry{$H_3$};
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.4\fheight,
|
||||
at={(0.0\fwidth, 0.0\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.1,
|
||||
xmax=100,
|
||||
xminorticks=true,
|
||||
xlabel={Frequency [Hz]},
|
||||
ymin=-240,
|
||||
ymax=240,
|
||||
ytick={-180, -90, 0, 90, 180},
|
||||
ylabel={Phase [deg]},
|
||||
xminorgrids,
|
||||
]
|
||||
|
||||
\addplot [color=mycolor1, line width=1.5pt]
|
||||
table [x=freqs, y=H1p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
|
||||
\addplot [color=mycolor2, line width=1.5pt]
|
||||
table [x=freqs, y=H2p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
|
||||
\addplot [color=mycolor3, line width=1.5pt]
|
||||
table [x=freqs, y=H3p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:hinf-three-synthesis-results"></a>
|
||||
|
||||
{{< figure src="figs/hinf_three_synthesis_results.png" caption="<span class='figure-number'>Figure 8: </span>Frequency response of the weighting functions and three complementary filters obtained using \\(\mathcal{H}\_\infty\\) synthesis ([png](figs/hinf_three_synthesis_results.png), [pdf](figs/hinf_three_synthesis_results.pdf), [tex](./figs/hinf_three_synthesis_results.tex))." >}}
|
||||
|
||||
|
||||
## Fig 9: Specifications and weighting functions magnitude used for \\(\mathcal{H}\_\infty\\) synthesis {#fig-9-specifications-and-weighting-functions-magnitude-used-for-mathcal-h-infty-synthesis}
|
||||
|
||||
```latex
|
||||
\setlength\fwidth{6.5cm}
|
||||
\setlength\fheight{3.2cm}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=1.0\fheight,
|
||||
at={(0.0\fwidth, 0.0\fheight)},
|
||||
scale only axis,
|
||||
separate axis lines,
|
||||
every outer x axis line/.append style={black},
|
||||
every x tick label/.append style={font=\color{black}},
|
||||
every x tick/.append style={black},
|
||||
xmode=log,
|
||||
xmin=0.001,
|
||||
xmax=1,
|
||||
xminorticks=true,
|
||||
xlabel={Frequency [Hz]},
|
||||
every outer y axis line/.append style={black},
|
||||
every y tick label/.append style={font=\color{black}},
|
||||
every y tick/.append style={black},
|
||||
ymode=log,
|
||||
ymin=0.005,
|
||||
ymax=20,
|
||||
yminorticks=true,
|
||||
ylabel={Magnitude},
|
||||
axis background/.style={fill=white},
|
||||
xmajorgrids,
|
||||
xminorgrids,
|
||||
ymajorgrids,
|
||||
yminorgrids,
|
||||
legend style={at={(0,1)}, outer sep=2pt, anchor=north west, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}}
|
||||
]
|
||||
|
||||
\addplot [color=mycolor1, line width=1.5pt]
|
||||
table [x=freqs, y=wHm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matligo_weights.csv};
|
||||
\addlegendentry{$|w_H|^{-1}$}
|
||||
|
||||
\addplot [color=mycolor2, line width=1.5pt]
|
||||
table [x=freqs, y=wLm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matligo_weights.csv};
|
||||
\addlegendentry{$|w_L|^{-1}$}
|
||||
|
||||
\addplot [color=black, dotted, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
0.0005 0.008\\
|
||||
0.008 0.008\\
|
||||
};
|
||||
\addlegendentry{Specifications}
|
||||
|
||||
\addplot [color=black, dotted, line width=1.5pt, forget plot]
|
||||
table[row sep=crcr]{%
|
||||
0.008 0.008\\
|
||||
0.04 1\\
|
||||
};
|
||||
\addplot [color=black, dotted, line width=1.5pt, forget plot]
|
||||
table[row sep=crcr]{%
|
||||
0.04 3\\
|
||||
0.1 3\\
|
||||
};
|
||||
\addplot [color=black, dotted, line width=1.5pt]
|
||||
table[row sep=crcr]{%
|
||||
0.1 0.045\\
|
||||
2 0.045\\
|
||||
};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:ligo-weights"></a>
|
||||
|
||||
{{< figure src="figs/ligo_weights.png" caption="<span class='figure-number'>Figure 9: </span>Specifications and weighting functions magnitude used for \\(\mathcal{H}\_\infty\\) synthesis ([png](figs/ligo_weights.png), [pdf](figs/ligo_weights.pdf), [tex](./figs/ligo_weights.tex))." >}}
|
||||
|
||||
|
||||
## Fig 10: Comparison of the FIR filters (solid) with the filters obtained with \\(\mathcal{H}\_\infty\\) synthesis (dashed) {#fig-10-comparison-of-the-fir-filters--solid--with-the-filters-obtained-with-mathcal-h-infty-synthesis--dashed}
|
||||
|
||||
```latex
|
||||
\setlength\fwidth{6.5cm}
|
||||
\setlength\fheight{6.8cm}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.60\fheight,
|
||||
at={(0.0\fwidth, 0.32\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.001,
|
||||
xmax=1,
|
||||
xtick={0.001,0.01,0.1,1},
|
||||
xticklabels={{}},
|
||||
xminorticks=true,
|
||||
ymode=log,
|
||||
ymin=0.002,
|
||||
ymax=5,
|
||||
ytick={0.001, 0.01, 0.1, 1, 10},
|
||||
yminorticks=true,
|
||||
ylabel={Magnitude},
|
||||
xminorgrids,
|
||||
yminorgrids,
|
||||
legend style={at={(1,0)}, outer sep=2pt, anchor=south east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}}
|
||||
]
|
||||
\addplot [color=mycolor1, line width=1.5pt]
|
||||
table [x=freqs, y=Hhm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv};
|
||||
\addlegendentry{$H_H(s)$ - $\mathcal{H}_\infty$}
|
||||
\addplot [color=mycolor1, dashed, line width=1.5pt]
|
||||
table [x=freqs, y=Hhm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv};
|
||||
\addlegendentry{$H_H(s)$ - FIR}
|
||||
\addplot [color=mycolor2, line width=1.5pt]
|
||||
table [x=freqs, y=Hlm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv};
|
||||
\addlegendentry{$H_L(s)$ - $\mathcal{H}_\infty$}
|
||||
\addplot [color=mycolor2, dashed, line width=1.5pt]
|
||||
table [x=freqs, y=Hlm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv};
|
||||
\addlegendentry{$H_L(s)$ - FIR}
|
||||
\end{axis}
|
||||
|
||||
\begin{axis}[%
|
||||
width=1.0\fwidth,
|
||||
height=0.3\fheight,
|
||||
at={(0.0\fwidth, 0.0\fheight)},
|
||||
scale only axis,
|
||||
xmode=log,
|
||||
xmin=0.001,
|
||||
xmax=1,
|
||||
xtick={0.001, 0.01, 0.1, 1},
|
||||
xminorticks=true,
|
||||
xlabel={Frequency [Hz]},
|
||||
ymin=-180,
|
||||
ymax=180,
|
||||
ytick={-180, -90, 0, 90, 180},
|
||||
ylabel={Phase [deg]},
|
||||
xminorgrids,
|
||||
]
|
||||
\addplot [color=mycolor1, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=Hhp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv};
|
||||
\addplot [color=mycolor1, dashed, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=Hhp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv};
|
||||
\addplot [color=mycolor2, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=Hlp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv};
|
||||
\addplot [color=mycolor2, dashed, line width=1.5pt, forget plot]
|
||||
table [x=freqs, y=Hlp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
```
|
||||
|
||||
<a id="figure--fig:comp-fir-ligo-hinf"></a>
|
||||
|
||||
{{< figure src="figs/comp_fir_ligo_hinf.png" caption="<span class='figure-number'>Figure 10: </span>Comparison of the FIR filters (solid) with the filters obtained with \\(\mathcal{H}\_\infty\\) synthesis (dashed) ([png](figs/comp_fir_ligo_hinf.png), [pdf](figs/comp_fir_ligo_hinf.pdf), [tex](./figs/comp_fir_ligo_hinf.tex))." >}}
|
||||
@@ -0,0 +1,706 @@
|
||||
+++
|
||||
title = "LaTeX Configuration for Tikz Figures"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
## Packages {#packages}
|
||||
|
||||
```latex
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
\usepackage[french, english]{babel} % Last language is main language
|
||||
|
||||
\usepackage{lmodern} % Latin Modern Font
|
||||
\usepackage{gensymb} % Generic symbols for both text and math mode
|
||||
|
||||
\usepackage{standalone} % Used to generate standalone Tikz
|
||||
|
||||
\usepackage{amsmath} % Main math Package
|
||||
\usepackage{mathtools} % Extension package to amsmath
|
||||
\usepackage{amsthm} % Typesetting theorems (AMS style)
|
||||
\usepackage{amsfonts} % More fonts from the AMS
|
||||
\usepackage{textcomp} % provide many text symbols
|
||||
\usepackage{steinmetz} % For phase symbol
|
||||
|
||||
\usepackage{xstring} % Utils to manipulate strings
|
||||
\usepackage{etoolbox} % Add basic if/then
|
||||
\usepackage{esvect} % Beautyfull vectors
|
||||
\usepackage{graphicx} % Enhanced support for graphics
|
||||
\usepackage{grffile} % Used by matlab2tikz
|
||||
|
||||
\usepackage{microtype} % typographic tuning
|
||||
\usepackage{setspace} % for line spacing, e.g. \onehalfspacing
|
||||
\usepackage{tabularx} % table features
|
||||
\usepackage{enumitem} % for simple list modifications
|
||||
\usepackage{booktabs} % better table support
|
||||
|
||||
\usepackage{stackengine} %
|
||||
|
||||
\usepackage[load-configurations=abbreviations]{siunitx} % SI units
|
||||
\sisetup{
|
||||
locale = US,
|
||||
detect-all,
|
||||
range-phrase=--,
|
||||
range-units=single
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Tikz related packages {#tikz-related-packages}
|
||||
|
||||
```latex
|
||||
\usepackage{tikz} % Tikz
|
||||
\usepackage{tikzscale} % Used to scale Tikz graphics
|
||||
\usepackage{adjustbox} % Used to proper positioning of tikz pictures
|
||||
\usepackage{circuitikz} % Draw electronic circuits
|
||||
\usepackage{pgfpages} % Needed to use notes
|
||||
\usepackage{pgfplots} % Used to plot functions
|
||||
```
|
||||
|
||||
|
||||
## Tikz Libraries {#tikz-libraries}
|
||||
|
||||
```latex
|
||||
\usetikzlibrary{arrows} % Arrow tip library
|
||||
\usetikzlibrary{arrows.meta} % Add some arrows
|
||||
\usetikzlibrary{calc} % The library allows advanced Coordinate Calculations
|
||||
\usetikzlibrary{intersections} % calculate intersections of paths
|
||||
\usetikzlibrary{matrix} %
|
||||
\usetikzlibrary{patterns} %
|
||||
\usetikzlibrary{shapes} % Defines circle and rectangle
|
||||
\usetikzlibrary{shapes.geometric} % Use for the shape diamond and isosceles triangle
|
||||
\usetikzlibrary{snakes} % snake=coil and snake=zigzag using segment amplitude=10pt
|
||||
\usetikzlibrary{positioning} % Additional options for placing nodes
|
||||
\usetikzlibrary{3d} % Plot 3D shapes
|
||||
\usetikzlibrary{spy} % Creating a magnified area
|
||||
\usetikzlibrary{decorations.text} % Used to make text follows a curve
|
||||
\usetikzlibrary{decorations.pathmorphing} % deformation of a path
|
||||
\usetikzlibrary{decorations.markings} % Used for spring and damper
|
||||
\usetikzlibrary{babel} % A tiny library that make the interaction with the babel package easier
|
||||
\usetikzlibrary{plotmarks} % This library defines a number of plot marks
|
||||
\usetikzlibrary{fit} % Used to make rectangle as nodes by specifying two points
|
||||
\usetikzlibrary{backgrounds} % Used to put things under others
|
||||
```
|
||||
|
||||
|
||||
## PGF Plot libraries and config {#pgf-plot-libraries-and-config}
|
||||
|
||||
```latex
|
||||
\usepgfplotslibrary{patchplots}
|
||||
\usepgfplotslibrary{groupplots}
|
||||
|
||||
\pgfplotsset{compat=newest}
|
||||
\pgfplotsset{plot coordinates/math parser=false}
|
||||
```
|
||||
|
||||
|
||||
## Setup size of figures {#setup-size-of-figures}
|
||||
|
||||
```latex
|
||||
\newlength{\fheight}
|
||||
\newlength{\fwidth}
|
||||
|
||||
\setlength{\fwidth}{85mm}
|
||||
\setlength{\fheight}{112mm}
|
||||
```
|
||||
|
||||
|
||||
## Setup Arrows style {#setup-arrows-style}
|
||||
|
||||
```latex
|
||||
\tikzset{>=Stealth}
|
||||
% Setup default Linewidth
|
||||
\tikzset{every path/.style={line width=1pt}}
|
||||
```
|
||||
|
||||
|
||||
## Colors {#colors}
|
||||
|
||||
```latex
|
||||
\usepackage{xcolor}% Color extension
|
||||
|
||||
\definecolor{mycolor1}{RGB}{79,115,193}
|
||||
\definecolor{mycolor2}{RGB}{213,91,53}
|
||||
\definecolor{mycolor3}{RGB}{152,126,49}
|
||||
```
|
||||
|
||||
|
||||
## Control {#control}
|
||||
|
||||
|
||||
### Blocks {#blocks}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
block/.style n args={2}{%
|
||||
draw,
|
||||
fill=white,
|
||||
minimum width = #1,
|
||||
minimum height = #2,
|
||||
},
|
||||
block/.default={1.2cm}{1.0cm}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Branches {#branches}
|
||||
|
||||
```latex
|
||||
\tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt]
|
||||
\tikzstyle{->top}=[-{Stealth[color=black, scale=0.8]}, draw=white, double=black, double distance=1pt, line width=1pt]
|
||||
\tikzstyle{<-top}=[{stealth[color=black, scale=0.8]}-, draw=white, double=black, double distance=1pt, line width=1pt]
|
||||
```
|
||||
|
||||
|
||||
### Hand Writen Style {#hand-writen-style}
|
||||
|
||||
Usefull for schematic plots
|
||||
|
||||
```latex
|
||||
\tikzstyle{handwriten}=[decorate,decoration={random steps,amplitude=0.1pt,segment length=0.8pt}]
|
||||
```
|
||||
|
||||
|
||||
### DAC {#dac}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
DAC/.style={%
|
||||
draw,
|
||||
signal,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### ADC {#adc}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
ADC/.style={%
|
||||
draw,
|
||||
signal,
|
||||
signal to = west,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Gain {#gain}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
gain right/.style={%
|
||||
draw,
|
||||
regular polygon,
|
||||
regular polygon sides = 3,
|
||||
inner sep = 2pt,
|
||||
shape border rotate=-90
|
||||
},
|
||||
gain left/.style={%
|
||||
draw,
|
||||
regular polygon,
|
||||
regular polygon sides = 3,
|
||||
inner sep = 2pt,
|
||||
shape border rotate=90
|
||||
},
|
||||
gain top/.style={%
|
||||
draw,
|
||||
regular polygon,
|
||||
regular polygon sides = 3,
|
||||
inner sep = 2pt,
|
||||
shape border rotate=0
|
||||
},
|
||||
gain bottom/.style={%
|
||||
draw,
|
||||
regular polygon,
|
||||
regular polygon sides = 3,
|
||||
inner sep = 2pt,
|
||||
shape border rotate=180
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Add / Substract / Divide / Multiply block {#add-substract-divide-multiply-block}
|
||||
|
||||
```latex
|
||||
\tikzset{% Add block with Circled operations
|
||||
addc/.style n args={5}{%
|
||||
draw,
|
||||
fill=white,
|
||||
circle,
|
||||
outer sep = 0pt,
|
||||
inner sep = 0pt,
|
||||
minimum size = 2em,
|
||||
execute at begin node={\LARGE $#1$},
|
||||
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
|
||||
\ifx#2\empty\else
|
||||
node[draw, circle, outer sep=6pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}%
|
||||
\fi
|
||||
\ifx#3\empty\else
|
||||
node[draw, circle, outer sep=6pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}%
|
||||
\fi
|
||||
\ifx#4\empty\else
|
||||
node[draw, circle, outer sep=6pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}%
|
||||
\fi
|
||||
\ifx#5\empty\else
|
||||
node[draw, circle, outer sep=6pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}%
|
||||
\fi
|
||||
}
|
||||
},
|
||||
addc/.default={+}{}{}{}{},
|
||||
}
|
||||
```
|
||||
|
||||
```latex
|
||||
\tikzset{% Add Block
|
||||
addb/.style n args={5}{%
|
||||
draw,
|
||||
fill=white,
|
||||
circle,
|
||||
outer sep = 0pt,
|
||||
inner sep = 0pt,
|
||||
minimum size = 2em,
|
||||
execute at begin node={\LARGE $#1$},
|
||||
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
|
||||
\ifx#2\empty\else
|
||||
node[outer sep=2pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}%
|
||||
\fi
|
||||
\ifx#3\empty\else
|
||||
node[outer sep=2pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}%
|
||||
\fi
|
||||
\ifx#4\empty\else
|
||||
node[outer sep=2pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}%
|
||||
\fi
|
||||
\ifx#5\empty\else
|
||||
node[outer sep=2pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}%
|
||||
\fi
|
||||
}
|
||||
},
|
||||
addb/.default={+}{}{}{}{},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Plots {#plots}
|
||||
|
||||
|
||||
### Default line caps {#default-line-caps}
|
||||
|
||||
```latex
|
||||
\pgfplotsset{
|
||||
every axis plot/.append style={line join=round},
|
||||
every axis plot/.append style={line cap=round},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Grid {#grid}
|
||||
|
||||
```latex
|
||||
\pgfplotsset{grid style={black}}
|
||||
\pgfplotsset{major grid style={black!30!white}}
|
||||
\pgfplotsset{minor grid style={black!10!white}}
|
||||
\pgfplotsset{xmajorgrids}
|
||||
\pgfplotsset{ymajorgrids}
|
||||
```
|
||||
|
||||
|
||||
### Lines {#lines}
|
||||
|
||||
```latex
|
||||
\pgfplotsset{separate axis lines=false} % draw axis as rectangle and not as 4 lines
|
||||
\pgfplotsset{every outer x axis line/.append style={black}}
|
||||
\pgfplotsset{every outer y axis line/.append style={black}}
|
||||
\pgfplotsset{axis background/.style={fill=white}}
|
||||
\pgfplotsset{axis x line*=bottom} % solid line on the bottom with thin on the top
|
||||
\pgfplotsset{axis y line*=left} % solid line on the left with thin on the right
|
||||
```
|
||||
|
||||
|
||||
### Ticks {#ticks}
|
||||
|
||||
```latex
|
||||
\pgfplotsset{every y tick label/.append style={font=\color{black}}}
|
||||
\pgfplotsset{every y tick/.append style={black}}
|
||||
\pgfplotsset{every x tick label/.append style={font=\color{black}}}
|
||||
\pgfplotsset{every x tick/.append style={black}}
|
||||
```
|
||||
|
||||
|
||||
### Size {#size}
|
||||
|
||||
If `scale only axis=false` (the default), pgfplots will try to produce the desired width including labels, titles and ticks.
|
||||
|
||||
```latex
|
||||
\pgfplotsset{scale only axis=true}
|
||||
```
|
||||
|
||||
|
||||
### Label {#label}
|
||||
|
||||
Used to align all of ylabel of one figure.
|
||||
|
||||
```latex
|
||||
\pgfplotsset{ylabel absolute}
|
||||
```
|
||||
|
||||
|
||||
### Legend {#legend}
|
||||
|
||||
```latex
|
||||
% https://tex.stackexchange.com/questions/54794/using-a-pgfplots-style-legend-in-a-plain-old-tikzpicture#54834
|
||||
|
||||
% argument #1: any options
|
||||
\newenvironment{customlegend}[1][]{%
|
||||
\begingroup
|
||||
% inits/clears the lists (which might be populated from previous
|
||||
% axes):
|
||||
\csname pgfplots@init@cleared@structures\endcsname
|
||||
\pgfplotsset{#1}%
|
||||
}{%
|
||||
% draws the legend:
|
||||
\csname pgfplots@createlegend\endcsname
|
||||
\endgroup
|
||||
}%
|
||||
|
||||
% makes \addlegendimage available (typically only available within an
|
||||
% axis environment):
|
||||
\def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}
|
||||
|
||||
% definition to insert numbers
|
||||
% \pgfkeys{/pgfplots/number in legend/.style={%
|
||||
% /pgfplots/legend image code/.code={%
|
||||
% \node at (0.125,-0.0225){#1}; % <= changed x value
|
||||
% },%
|
||||
% },
|
||||
% }
|
||||
\pgfplotsset{
|
||||
every legend to name picture/.style={west}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Mechanical {#mechanical}
|
||||
|
||||
|
||||
### Spring {#spring}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
spring/.style={%
|
||||
thick,
|
||||
decoration={
|
||||
zigzag,
|
||||
pre length = #1cm,
|
||||
post length = #1cm,
|
||||
segment length = 6
|
||||
},
|
||||
decorate
|
||||
},
|
||||
spring/.default={0.2}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Coil {#coil}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
coil/.style n args={2}{%
|
||||
thick,
|
||||
decoration={
|
||||
coil,
|
||||
pre length = #1cm,
|
||||
post length = #2cm,
|
||||
segment length = 4
|
||||
},
|
||||
decorate
|
||||
},
|
||||
coil/.default={0.3}{0.3}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Damper {#damper}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
damper/.style n args={2}{%
|
||||
thick,
|
||||
decoration={markings, mark connection node=dmp, mark=at position 0.5 with {
|
||||
\node (dmp) [thick,
|
||||
inner sep = 0pt,
|
||||
transform shape,
|
||||
rotate =-90,
|
||||
minimum width = #1pt,
|
||||
minimum height = #2pt,
|
||||
draw=none] {};
|
||||
\draw [thick] ($(dmp.north east)+(0.6*#2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(0.6*#2pt,0)$);
|
||||
\draw [thick] ($(dmp.north)+(0,-0.3*#1pt)$) -- ($(dmp.north)+(0,0.3*#1pt)$);
|
||||
}
|
||||
},
|
||||
decorate
|
||||
},
|
||||
damper/.default={12}{3}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Actuator {#actuator}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
actuator/.style n args={2}{%
|
||||
thick,
|
||||
draw=none,
|
||||
decoration={
|
||||
markings,
|
||||
mark connection node=my node,
|
||||
mark=at position .5 with {
|
||||
\node [draw, inner sep=0pt, minimum width=#1cm, minimum height=#2cm,
|
||||
transform shape, fill=white] (my node) {};
|
||||
},
|
||||
mark=at position .0 with {
|
||||
\draw[<-] (0, 0) -- (my node);
|
||||
},
|
||||
mark=at position 1.0 with {
|
||||
\draw[<-] (0, 0) -- (my node);
|
||||
}
|
||||
},
|
||||
decorate
|
||||
},
|
||||
actuator/.default={0.5}{0.2}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Ground {#ground}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
ground/.style n args={2}{%
|
||||
fill,
|
||||
pattern = north east lines,
|
||||
draw = none,
|
||||
anchor = north,
|
||||
minimum width = #1cm,
|
||||
minimum height = #2cm,
|
||||
append after command={
|
||||
(\tikzlastnode.north west) edge (\tikzlastnode.north east)
|
||||
}
|
||||
},
|
||||
ground/.default={2.5}{0.3}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Force Sensor {#force-sensor}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
forcesensor/.style n args={2}{%
|
||||
rectangle,
|
||||
outer sep=0pt,
|
||||
inner sep=0pt,
|
||||
draw=black,
|
||||
fill=white!60!black,
|
||||
anchor=south,
|
||||
minimum width =#1cm,
|
||||
minimum height=#2cm,
|
||||
append after command={
|
||||
[every edge/.append style={
|
||||
thick,
|
||||
black,
|
||||
}]
|
||||
(\tikzlastnode.north west) edge (\tikzlastnode.south east)
|
||||
(\tikzlastnode.north east) edge (\tikzlastnode.south west)
|
||||
}
|
||||
},
|
||||
forcesensor/.default={2.0}{0.5}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Inertial Sensor {#inertial-sensor}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
inertialsensor/.style={%
|
||||
rectangle,
|
||||
outer sep=0pt,
|
||||
inner sep=0pt,
|
||||
draw=black,
|
||||
fill=white!60!black,
|
||||
anchor=south east,
|
||||
minimum size=#1cm,
|
||||
append after command={
|
||||
[every edge/.append style={
|
||||
thick,
|
||||
black,
|
||||
}]
|
||||
(\tikzlastnode.north west) edge (\tikzlastnode.south east)
|
||||
(\tikzlastnode.north east) edge (\tikzlastnode.south west)
|
||||
}
|
||||
},
|
||||
inertialsensor/.default={0.3}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Cross {#cross}
|
||||
|
||||
```latex
|
||||
\tikzstyle{cross}=[path picture={
|
||||
\draw[black]
|
||||
(path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
|
||||
}]
|
||||
|
||||
```
|
||||
|
||||
|
||||
### Piezoelectric actuator {#piezoelectric-actuator}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
piezo/.style n args={3}{%
|
||||
draw,
|
||||
rectangle,
|
||||
minimum width = #1cm,
|
||||
minimum height = #2cm,
|
||||
fill=blue!10!white,
|
||||
anchor=center,
|
||||
append after command={
|
||||
[every edge/.append style={
|
||||
thick,
|
||||
black,
|
||||
}]
|
||||
\foreach \i in {1,...,#3}{
|
||||
(${\i/(1+#3)}*(\tikzlastnode.north west)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south west)+0.1*(#1,0)$) edge (${\i/(1+#3)}*(\tikzlastnode.north east)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south east)-0.1*(#1,0)$)
|
||||
}
|
||||
}
|
||||
},
|
||||
piezo/.default={2}{4}{10}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Voice coil {#voice-coil}
|
||||
|
||||
```latex
|
||||
\def\voicecoil#1#2#3{
|
||||
% ======================
|
||||
% Parameters
|
||||
% ======================
|
||||
\def\voicecoilw{#1} % Total Width
|
||||
\def\voicecoilh{#2} % Total Height
|
||||
|
||||
\def\magnetw{\voicecoilw} % Width of the magnet
|
||||
\def\magneth{\voicecoilh/1.4} % Height of the magnet
|
||||
|
||||
\def\magnetwb{0.15*\magnetw} % Width of the borders of the magnet
|
||||
\def\magnetmw{0.15*\magnetw} % Width of the middle part of the magnet
|
||||
\def\magnetwg{0.5*\magnetw} % Width of the gap of the magnet
|
||||
|
||||
\def\magnethl{\magnetwb} % Height of the low part of the magnet
|
||||
\def\magnetmh{0.15*\magneth} % Height of the middle part of the magnet
|
||||
\def\magnethg{0.2*\magneth} % Height of the gap of the magnet
|
||||
% ======================
|
||||
|
||||
\begin{scope}[shift={(0.5*\voicecoilw, 0.5*\voicecoilh)}, rotate=#3, shift={(0, -0.5*\voicecoilh)}]
|
||||
% ======================
|
||||
% Magnet
|
||||
% ======================
|
||||
\draw[fill=white] (0, 0) -| ++(0.5*\magnetw, \magneth) -| ++(-0.5*\magnetw+0.5*\magnetwg, -\magnethg) -| (0.5*\magnetw-\magnetwb, \magnethl) -| (-0.5*\magnetw+\magnetwb, \magneth-\magnethg) -| (-0.5*\magnetwg, \magneth) -| (-0.5*\magnetw, 0) -- (cycle);
|
||||
\begin{scope}[shift={(0, \magnethl)}]
|
||||
\draw[fill=red] (-0.5*\magnetmw, 0) rectangle (0.5*\magnetmw, \magnetmh);
|
||||
\draw[fill=blue] (-0.5*\magnetmw, \magnetmh) rectangle (0.5*\magnetmw, 2*\magnetmh);
|
||||
% Top conductive Magnet
|
||||
\draw[fill=white] (-0.5*\magnetmw, 2*\magnetmh) -| (0.5*\magnetmw, -\magnethl+\magneth-\magnethg) -| ++(0.1, \magnethg) -| ++(-0.2-\magnetmw, -\magnethg) -| (-0.5*\magnetmw, \magnetmh);
|
||||
\end{scope}
|
||||
% ======================
|
||||
|
||||
% ======================
|
||||
% Coil
|
||||
% ======================
|
||||
\pgfmathsetmacro{\coilwidth}{0.5*0.5*\magnetmw+0.5*0.1+0.25*\magnetwg}%
|
||||
\draw[] ( \coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
|
||||
\draw[] (-\coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
|
||||
% Point on the coil
|
||||
\foreach \x in {0,1,...,9}
|
||||
{
|
||||
\node[circle,inner sep=0.6pt,fill] at ( \coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
|
||||
\node[circle,inner sep=0.6pt,fill] at (-\coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
|
||||
}
|
||||
\draw[fill=white] (-0.5*\magnetw, 1.2*\magneth) rectangle ++(\magnetw, \magnethg);
|
||||
% ======================
|
||||
|
||||
% ======================
|
||||
% Coordinates
|
||||
% ======================
|
||||
% Force
|
||||
\coordinate[] (vc_force) at (0, \magneth-0.5*\magnethg);
|
||||
% Coil
|
||||
\coordinate[] (vc_coil) at (0, \voicecoilh);
|
||||
% Magnet
|
||||
\coordinate[] (vc_magnet) at (0, 0);
|
||||
% Coil Wires
|
||||
\coordinate[] (vc_wire_one) at ( \coilwidth, 1.2*\magneth);
|
||||
\coordinate[] (vc_wire_two) at (-\coilwidth, 1.2*\magneth);
|
||||
% ======================
|
||||
\end{scope}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Optics {#optics}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
->-/.style={
|
||||
decoration={
|
||||
markings,
|
||||
mark = at position #1 with {\arrow{>}
|
||||
}
|
||||
},
|
||||
postaction={decorate}
|
||||
}
|
||||
}
|
||||
\tikzset{%
|
||||
-<-/.style={
|
||||
decoration={
|
||||
markings,
|
||||
mark = at position #1 with {\arrow{<}
|
||||
}
|
||||
},
|
||||
postaction={decorate}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Misc {#misc}
|
||||
|
||||
```latex
|
||||
\tikzset{%
|
||||
labelc/.style= {%
|
||||
draw,
|
||||
fill=white,
|
||||
shape=circle,
|
||||
inner sep=2pt,
|
||||
outer sep=6pt,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## More Defaults specific to this paper {#more-defaults-specific-to-this-paper}
|
||||
|
||||
```latex
|
||||
\tikzset{block/.default={0.8cm}{0.8cm}}
|
||||
\tikzset{addb/.append style={scale=0.7}}
|
||||
\tikzset{node distance=0.6}
|
||||
```
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -1,5 +1,6 @@
|
||||
+++
|
||||
title = "Mechatronics Approach for the Development of a Nano-Active-Stabilization-System"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
|
||||