Update link to journal and matlab scripts
This commit is contained in:
parent
ad04f8a16d
commit
b6ff1da85d
44
index.html
44
index.html
@ -3,21 +3,30 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2020-11-12 jeu. 10:44 -->
|
<!-- 2021-06-21 lun. 11:42 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Complementary Filters Shaping Using \(\mathcal{H}_\infty\) Synthesis</title>
|
<title>Complementary Filters Shaping Using $\mathcal{H}_\infty$ Synthesis</title>
|
||||||
<meta name="generator" content="Org mode" />
|
|
||||||
<meta name="author" content="Thomas Dehaeze" />
|
<meta name="author" content="Thomas Dehaeze" />
|
||||||
|
<meta name="generator" content="Org Mode" />
|
||||||
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
||||||
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
||||||
<script>MathJax = {
|
<script>
|
||||||
|
MathJax = {
|
||||||
|
svg: {
|
||||||
|
scale: 1,
|
||||||
|
fontCache: "global"
|
||||||
|
},
|
||||||
tex: {
|
tex: {
|
||||||
tags: 'ams',
|
tags: "ams",
|
||||||
macros: {bm: ["\\boldsymbol{#1}",1],}
|
multlineWidth: "%MULTLINEWIDTH",
|
||||||
|
tagSide: "right",
|
||||||
|
macros: {bm: ["\\boldsymbol{#1}",1],},
|
||||||
|
tagIndent: ".8em"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
<script id="MathJax-script" async
|
||||||
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="org-div-home-and-up">
|
<div id="org-div-home-and-up">
|
||||||
@ -41,18 +50,27 @@ This method is shown to be easily applicable for the synthesis of complex comple
|
|||||||
</p>
|
</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<div id="outline-container-org51c6c0b" class="outline-2">
|
<div id="outline-container-org16737c1" class="outline-2">
|
||||||
<h2 id="org51c6c0b">Paper (<a href="paper/paper.pdf">link</a>)</h2>
|
<h2 id="org16737c1">Paper (<a href="journal/journal.pdf">link</a>)</h2>
|
||||||
<div class="outline-text-2" id="text-org51c6c0b">
|
<div class="outline-text-2" id="text-org16737c1">
|
||||||
<p>
|
<p>
|
||||||
The paper has been created <a href="https://orgmode.org/">Org Mode</a> (generating <a href="https://www.latex-project.org/">LaTeX</a> code) under <a href="https://www.gnu.org/software/emacs/">Emacs</a>.
|
The paper has been created <a href="https://orgmode.org/">Org Mode</a> (generating <a href="https://www.latex-project.org/">LaTeX</a> code) under <a href="https://www.gnu.org/software/emacs/">Emacs</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org6820ca5" class="outline-2">
|
<div id="outline-container-orgb50a720" class="outline-2">
|
||||||
<h2 id="org6820ca5">Tikz Figures (<a href="tikz/index.html">link</a>)</h2>
|
<h2 id="orgb50a720">Matlab Scripts (<a href="matlab/index.html">link</a>)</h2>
|
||||||
<div class="outline-text-2" id="text-org6820ca5">
|
<div class="outline-text-2" id="text-orgb50a720">
|
||||||
|
<p>
|
||||||
|
All the <a href="https://fr.mathworks.com/">Matlab</a> code that was used for the paper are accessible so that all the results are reproducible.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-org06a9b71" class="outline-2">
|
||||||
|
<h2 id="org06a9b71">Tikz Figures (<a href="tikz/index.html">link</a>)</h2>
|
||||||
|
<div class="outline-text-2" id="text-org06a9b71">
|
||||||
<p>
|
<p>
|
||||||
All the figures for the paper have been generated using <a href="https://sourceforge.net/projects/pgf/">TikZ</a>.
|
All the figures for the paper have been generated using <a href="https://sourceforge.net/projects/pgf/">TikZ</a>.
|
||||||
</p>
|
</p>
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
This method is shown to be easily applicable for the synthesis of complex complementary filters.
|
This method is shown to be easily applicable for the synthesis of complex complementary filters.
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
* Paper ([[file:paper/paper.pdf][link]])
|
* Paper ([[file:journal/journal.pdf][link]])
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:UNNUMBERED: t
|
:UNNUMBERED: t
|
||||||
:END:
|
:END:
|
||||||
The paper has been created [[https://orgmode.org/][Org Mode]] (generating [[https://www.latex-project.org/][LaTeX]] code) under [[https://www.gnu.org/software/emacs/][Emacs]].
|
The paper has been created [[https://orgmode.org/][Org Mode]] (generating [[https://www.latex-project.org/][LaTeX]] code) under [[https://www.gnu.org/software/emacs/][Emacs]].
|
||||||
|
|
||||||
* Matlab Scripts ([[file:matlab/index.org][link]]) :noexport:
|
* Matlab Scripts ([[file:matlab/index.org][link]])
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:UNNUMBERED: t
|
:UNNUMBERED: t
|
||||||
:END:
|
:END:
|
||||||
|
247
matlab/index.org
247
matlab/index.org
@ -167,10 +167,10 @@ exportFig('figs/weight_formula.pdf', 'width', 'wide', 'height', 'normal');
|
|||||||
[[file:figs/weight_formula.png]]
|
[[file:figs/weight_formula.png]]
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
n = 2; w0 = 2*pi*10; G0 = 1/10; G1 = 1000; Gc = 0.45;
|
n = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 0.45;
|
||||||
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;
|
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 = 0.45;
|
n = 2; w0 = 2*pi*10; G0 = 1/10; G1 = 1000; Gc = 0.45;
|
||||||
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;
|
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;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -249,6 +249,28 @@ H1 = 1 - H2;
|
|||||||
** Obtained Complementary Filters
|
** Obtained Complementary Filters
|
||||||
The obtained complementary filters are shown on figure [[fig:hinf_filters_results]].
|
The obtained complementary filters are shown on figure [[fig:hinf_filters_results]].
|
||||||
|
|
||||||
|
#+begin_src matlab :results output replace :exports results :tangle no
|
||||||
|
zpk(H1)
|
||||||
|
zpk(H2)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
#+begin_example
|
||||||
|
zpk(H1)
|
||||||
|
ans =
|
||||||
|
|
||||||
|
(s+1.289e05) (s+153.6) (s+3.842)^3
|
||||||
|
-------------------------------------------------------
|
||||||
|
(s+1.29e05) (s^2 + 102.1s + 2733) (s^2 + 69.45s + 3272)
|
||||||
|
|
||||||
|
zpk(H2)
|
||||||
|
ans =
|
||||||
|
|
||||||
|
125.61 (s+3358)^2 (s^2 + 46.61s + 813.8)
|
||||||
|
-------------------------------------------------------
|
||||||
|
(s+1.29e05) (s^2 + 102.1s + 2733) (s^2 + 69.45s + 3272)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
#+begin_src matlab :exports none
|
||||||
figure;
|
figure;
|
||||||
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||||
@ -1315,45 +1337,67 @@ exportFig('figs/hinf_comp_H1_H2_syn.pdf', 'width', 'wide', 'height', 'normal');
|
|||||||
[[file:figs/hinf_comp_H1_H2_syn.png]]
|
[[file:figs/hinf_comp_H1_H2_syn.png]]
|
||||||
|
|
||||||
** Using Feedback architecture
|
** Using Feedback architecture
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
n = 2; w0 = 2*pi*11; G0 = 1/10; G1 = 1000; Gc = 1/2;
|
n = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 0.45;
|
||||||
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;
|
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;
|
n = 2; w0 = 2*pi*10; G0 = 1/10; G1 = 1000; Gc = 0.45;
|
||||||
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;
|
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;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Let's first synthesize $H_1(s)$:
|
Let's first synthesize $H_1(s)$:
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
P = [W1 -W1;
|
P = [ W1 0 1;
|
||||||
0 W2;
|
-W1 W2 -1];
|
||||||
1 -1];
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab :results output replace :exports both
|
#+begin_src matlab :results output replace :exports both
|
||||||
[K, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on');
|
[L, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
H1 = inv(1 + K);
|
H1 = inv(1 + L);
|
||||||
H2 = 1 - H1;
|
H2 = 1 - H1;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :results output replace :exports results :tangle no
|
||||||
|
zpk(H1)
|
||||||
|
zpk(H2)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
#+begin_example
|
||||||
|
zpk(H1)
|
||||||
|
ans =
|
||||||
|
|
||||||
|
(s+2.115e07) (s+153.6) (s+4.613) (s^2 + 6.858s + 12.03)
|
||||||
|
--------------------------------------------------------
|
||||||
|
(s+2.117e07) (s^2 + 102.1s + 2732) (s^2 + 69.43s + 3271)
|
||||||
|
|
||||||
|
zpk(H2)
|
||||||
|
ans =
|
||||||
|
|
||||||
|
20455 (s+3425) (s+3318) (s^2 + 46.58s + 813.2)
|
||||||
|
--------------------------------------------------------
|
||||||
|
(s+2.117e07) (s^2 + 102.1s + 2732) (s^2 + 69.43s + 3271)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
#+begin_src matlab :exports none
|
||||||
freqs = logspace(-2, 4, 1000);
|
freqs = logspace(-2, 4, 1000);
|
||||||
|
|
||||||
figure;
|
figure;
|
||||||
hold on;
|
hold on;
|
||||||
plot(freqs, abs(squeeze(freqresp(H1, freqs, 'Hz'))), '-', 'DisplayName', '$H_1$');
|
|
||||||
plot(freqs, abs(squeeze(freqresp(H2, freqs, 'Hz'))), '-', 'DisplayName', '$H_2$');
|
|
||||||
set(gca,'ColorOrderIndex',1);
|
set(gca,'ColorOrderIndex',1);
|
||||||
plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$|W_1|^{-1}$');
|
plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$|W_1|^{-1}$');
|
||||||
plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$|W_2|^{-1}$');
|
plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$|W_2|^{-1}$');
|
||||||
|
set(gca,'ColorOrderIndex',1);
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H1, freqs, 'Hz'))), '-', 'DisplayName', '$|H_1|$');
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H2, freqs, 'Hz'))), '-', 'DisplayName', '$|H_2|$');
|
||||||
|
plot(freqs, abs(squeeze(freqresp(L, freqs, 'Hz'))), 'k--', 'DisplayName', '$|L|$');
|
||||||
hold off;
|
hold off;
|
||||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||||
legend('location', 'northeast', 'FontSize', 8, 'NumColumns', 2);
|
legend('location', 'northeast', 'FontSize', 8, 'NumColumns', 3);
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Adding feature in the filters
|
** Adding feature in the filters
|
||||||
@ -1999,6 +2043,183 @@ There is no difference between " open-loop" shaping and "close-loop" shaping:
|
|||||||
- same obtained filter orders
|
- same obtained filter orders
|
||||||
#+end_important
|
#+end_important
|
||||||
|
|
||||||
|
** Integral Action
|
||||||
|
*** Test
|
||||||
|
#+begin_src matlab
|
||||||
|
freqs = logspace(-2, 3, 1000);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
\begin{equation}
|
||||||
|
W_1(s) = \frac{W_{10}(s)}{s}
|
||||||
|
\end{equation}
|
||||||
|
with $W_{10}(0) \neq 0$
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
W10 = 0.1*(s+125.7)^2/(s+1.257)^2*(s + 0.0001)/(1 + s/1000);
|
||||||
|
W1 = W10/s;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
n = 2; w0 = 2*pi*10; G0 = 1/10; G1 = 1000; Gc = 0.5;
|
||||||
|
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;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$|W_1|^{-1}$');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$|W_2|^{-1}$');
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Magnitude');
|
||||||
|
hold off;
|
||||||
|
xlim([freqs(1), freqs(end)]);
|
||||||
|
ylim([1e-4, 20]);
|
||||||
|
xticks([0.1, 1, 10, 100, 1000]);
|
||||||
|
leg = legend('location', 'southeast', 'FontSize', 8);
|
||||||
|
leg.ItemTokenSize(1) = 18;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
V = 1;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
P = [ V*W10 W10;
|
||||||
|
0 W2;
|
||||||
|
-V -1];
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
And we do the $\mathcal{H}_\infty$ synthesis using the =hinfsyn= command.
|
||||||
|
#+begin_src matlab :results output replace :exports both
|
||||||
|
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
H1 = 1 - H2;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||||
|
|
||||||
|
% Magnitude
|
||||||
|
ax1 = nexttile([2, 1]);
|
||||||
|
hold on;
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$w_1$');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$w_2$');
|
||||||
|
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H1, freqs, 'Hz'))), '-', 'DisplayName', '$H_1$');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H2, freqs, 'Hz'))), '-', 'DisplayName', '$H_2$');
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
ylabel('Magnitude');
|
||||||
|
set(gca, 'XTickLabel',[]);
|
||||||
|
ylim([1e-4, 20]);
|
||||||
|
yticks([1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1]);
|
||||||
|
leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2);
|
||||||
|
leg.ItemTokenSize(1) = 18;
|
||||||
|
|
||||||
|
% Phase
|
||||||
|
ax2 = nexttile;
|
||||||
|
hold on;
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, 180/pi*phase(squeeze(freqresp(H1, freqs, 'Hz'))), '-');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, 180/pi*phase(squeeze(freqresp(H2, freqs, 'Hz'))), '-');
|
||||||
|
hold off;
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||||
|
set(gca, 'XScale', 'log');
|
||||||
|
yticks([-180:90:180]);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2],'x');
|
||||||
|
xlim([freqs(1), freqs(end)]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Example 6.7.3
|
||||||
|
#+begin_src matlab
|
||||||
|
n = 2; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 0.45;
|
||||||
|
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 = 2; w0 = 2*pi*10; G0 = 1/10; G1 = 1000; Gc = 0.45;
|
||||||
|
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;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
V = 1/(1 + s/2/pi/100);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
V = W2;
|
||||||
|
W2 = tf(1);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
P = [W1 -W1;
|
||||||
|
0 W2;
|
||||||
|
V 0];
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :results output replace :exports both
|
||||||
|
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
H2 = H2*V;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
H1 = 1 - H2;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||||
|
|
||||||
|
% Magnitude
|
||||||
|
ax1 = nexttile([2, 1]);
|
||||||
|
hold on;
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W1, freqs, 'Hz'))), '--', 'DisplayName', '$w_1$');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, 1./abs(squeeze(freqresp(W2, freqs, 'Hz'))), '--', 'DisplayName', '$w_2$');
|
||||||
|
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H1, freqs, 'Hz'))), '-', 'DisplayName', '$H_1$');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, abs(squeeze(freqresp(H2, freqs, 'Hz'))), '-', 'DisplayName', '$H_2$');
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
ylabel('Magnitude');
|
||||||
|
set(gca, 'XTickLabel',[]);
|
||||||
|
ylim([1e-4, 20]);
|
||||||
|
yticks([1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1]);
|
||||||
|
leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2);
|
||||||
|
leg.ItemTokenSize(1) = 18;
|
||||||
|
|
||||||
|
% Phase
|
||||||
|
ax2 = nexttile;
|
||||||
|
hold on;
|
||||||
|
set(gca,'ColorOrderIndex',1)
|
||||||
|
plot(freqs, 180/pi*phase(squeeze(freqresp(H1, freqs, 'Hz'))), '-');
|
||||||
|
set(gca,'ColorOrderIndex',2)
|
||||||
|
plot(freqs, 180/pi*phase(squeeze(freqresp(H2, freqs, 'Hz'))), '-');
|
||||||
|
hold off;
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||||
|
set(gca, 'XScale', 'log');
|
||||||
|
yticks([-180:90:180]);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2],'x');
|
||||||
|
xlim([freqs(1), freqs(end)]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Impose a positive slope at DC or a negative slope at infinite frequency
|
* Impose a positive slope at DC or a negative slope at infinite frequency
|
||||||
** Introduction :ignore:
|
** Introduction :ignore:
|
||||||
|
|
||||||
|
@ -213,17 +213,17 @@ Configuration file is accessible [[file:config.org][here]].
|
|||||||
\node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {};
|
\node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {};
|
||||||
\node[addb, right=0.4 of addu] (addn) {};
|
\node[addb, right=0.4 of addu] (addn) {};
|
||||||
|
|
||||||
\draw[->] ($(input)+(-0.7, 0)$) node[above right]{$x$} -- (addu);
|
\draw[->] ($(input)+(-0.8, 0)$) node[above right]{$x$} -- (addu);
|
||||||
\draw[->] (input.center) |- (W1.west);
|
\draw[->] (input.center) |- (W1.west);
|
||||||
\draw[->] (W1.east) -- (delta1.west);
|
\draw[->] (W1.east) -- (delta1.west);
|
||||||
\draw[->] (delta1.east) -| (addu.north);
|
\draw[->] (delta1.east) -| (addu.north);
|
||||||
\draw[->] (addu.east) -- (addn.west);
|
\draw[->] (addu.east) -- (addn.west);
|
||||||
\draw[<-] (addn.north) -- ++(0, 0.7)node[below right](n1){$n_1$};
|
\draw[<-] (addn.north) -- ++(0, 0.6)node[below right](n1){$n_1$};
|
||||||
\draw[->] (addn.east) -- ++(0.9, 0) node[above left]{$\hat{x}_1$};
|
\draw[->] (addn.east) -- ++(0.9, 0) node[above left]{$\hat{x}_1$};
|
||||||
|
|
||||||
\begin{scope}[on background layer]
|
\begin{scope}[on background layer]
|
||||||
\node[fit={(input.west |- addu.south) ($(delta1.north -| addn.east) + (0.1, 0.4)$)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {};
|
\node[fit={(input.west |- addu.south) ($(delta1.north -| addn.east) + (0.1, 0)$)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {};
|
||||||
\node[below] at (sensor1cal.north) {Normalized Sensor};
|
\node[below left, align=right] at (sensor1cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor}};
|
||||||
\end{scope}
|
\end{scope}
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -423,19 +423,19 @@ Configuration file is accessible [[file:config.org][here]].
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/ligo_super_sensor_architecture.png]]
|
[[file:figs/ligo_super_sensor_architecture.png]]
|
||||||
|
|
||||||
* Feedback Loop Sensor Fusion Architecture
|
* Closed-Loop Complementary Filters
|
||||||
#+begin_src latex :file feedback_sensor_fusion.pdf :tangle figs/feedback_sensor_fusion.tex
|
#+begin_src latex :file feedback_sensor_fusion.pdf :tangle figs/feedback_sensor_fusion.tex
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\node[addb={+}{}{}{}{-}] (addfb) at (0, 0){};
|
\node[addb={+}{}{}{}{-}] (addfb) at (0, 0){};
|
||||||
\node[block, right=1 of addfb] (L){$L$};
|
\node[block, right=1 of addfb] (L){$L(s)$};
|
||||||
\node[addb={+}{}{}{}{}, right=1 of L] (adddy){};
|
\node[addb={+}{}{}{}{}, right=1 of L] (adddy){};
|
||||||
|
|
||||||
\draw[<-] (addfb.west) -- ++(-1, 0) node[above right]{$\hat{x}_1$};
|
\draw[<-] (addfb.west) -- ++(-1, 0) node[above right]{$\hat{x}_2$};
|
||||||
\draw[->] (addfb.east) -- (L.west);
|
\draw[->] (addfb.east) -- (L.west);
|
||||||
\draw[->] (L.east) -- (adddy.west);
|
\draw[->] (L.east) -- (adddy.west);
|
||||||
\draw[->] (adddy.east) -- ++(1.4, 0) node[above left]{$\hat{x}$};
|
\draw[->] (adddy.east) -- ++(1.4, 0) node[above left]{$\hat{x}$};
|
||||||
\draw[->] ($(adddy.east) + (0.5, 0)$) node[branch]{} -- ++(0, -0.8) coordinate(botc) -| (addfb.south);
|
\draw[->] ($(adddy.east) + (0.5, 0)$) node[branch]{} -- ++(0, -0.8) coordinate(botc) -| (addfb.south);
|
||||||
\draw[<-] (adddy.north) -- ++(0, 1) node[below right]{$\hat{x}_2$};
|
\draw[<-] (adddy.north) -- ++(0, 1) node[below right]{$\hat{x}_1$};
|
||||||
|
|
||||||
\begin{scope}[on background layer]
|
\begin{scope}[on background layer]
|
||||||
\node[fit={(L.north-|addfb.west) (botc)}, fill=black!10!white, draw, inner sep=6pt] (supersensor) {};
|
\node[fit={(L.north-|addfb.west) (botc)}, fill=black!10!white, draw, inner sep=6pt] (supersensor) {};
|
||||||
@ -445,25 +445,61 @@ Configuration file is accessible [[file:config.org][here]].
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+name: fig:feedback_sensor_fusion
|
#+name: fig:feedback_sensor_fusion
|
||||||
#+caption: ([[./figs/feedback_sensor_fusion.png][png]], [[./figs/feedback_sensor_fusion.pdf][pdf]], [[./figs/feedback_sensor_fusion.tex][tex]]).
|
#+caption: "Closed-Loop" complementary filters ([[./figs/feedback_sensor_fusion.png][png]], [[./figs/feedback_sensor_fusion.pdf][pdf]], [[./figs/feedback_sensor_fusion.tex][tex]]).
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/feedback_sensor_fusion.png]]
|
[[file:figs/feedback_sensor_fusion.png]]
|
||||||
|
|
||||||
* Feedback Loop Sensor Fusion Architecture
|
* Closed-Loop Fusion Architecture
|
||||||
|
#+begin_src latex :file feedback_sensor_fusion_arch.pdf :tangle figs/feedback_sensor_fusion_arch.tex
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\node[addb={+}{}{}{}{-}] (addfb) at (0, 0){};
|
||||||
|
\node[block, right=1 of addfb] (L){$L(s)$};
|
||||||
|
\node[addb={+}{}{}{}{}, right=1 of L] (adddy){};
|
||||||
|
|
||||||
|
\node[block, left=1.2 of addfb] (sensor2){Sensor 2};
|
||||||
|
\node[block, above=0.4 of sensor2] (sensor1){Sensor 1};
|
||||||
|
\node[branch, left=0.6 of sensor2] (x){};
|
||||||
|
|
||||||
|
\draw[->] (addfb.east) -- (L.west);
|
||||||
|
\draw[->] (L.east) -- (adddy.west);
|
||||||
|
\draw[->] (adddy.east) -- ++(1.4, 0) node[above left]{$\hat{x}$};
|
||||||
|
\draw[->] ($(adddy.east) + (0.5, 0)$) node[branch]{} -- ++(0, -0.8) coordinate(botc) -| (addfb.south);
|
||||||
|
\draw[->] (x.center) |- (sensor1.west);
|
||||||
|
\draw[->] ($(x)-(0.8,0)$) node[above right]{$x$} -- (sensor2.west);
|
||||||
|
\draw[->] (sensor2.east)node[above right=0 and 0.25]{$\hat{x}_2$} -- (addfb.west);
|
||||||
|
\draw[->] (sensor1.east)node[above right=0 and 0.25]{$\hat{x}_1$} -| (adddy.north);
|
||||||
|
|
||||||
|
\begin{scope}[on background layer]
|
||||||
|
\node[fit={(x|-sensor1.north) (botc)}, fill=black!10!white, draw, inner sep=9pt] (supersensor) {};
|
||||||
|
\node[fit={(sensor1.north-|addfb.west) (botc)}, fill=black!20!white, draw, inner sep=6pt] (feedbackfilter) {};
|
||||||
|
\node[fit={(sensor2.west|-botc) (sensor1.north east)}, fill=black!20!white, draw, inner sep=6pt] (sensors) {};
|
||||||
|
\node[above, align=center] at (sensors.south) {{\tiny Normalized}\\[-0.5em]{\tiny sensors}};
|
||||||
|
\node[below, align=center] at (feedbackfilter.north) {{\tiny "Closed-Loop"}\\[-0.5em]{\tiny complementary filters}};
|
||||||
|
% \node[above, align=center] at (supersensor.north) {Super Sensor};
|
||||||
|
\end{scope}
|
||||||
|
\end{tikzpicture}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: fig:feedback_sensor_fusion_arch
|
||||||
|
#+caption: ([[./figs/feedback_sensor_fusion_arch.png][png]], [[./figs/feedback_sensor_fusion_arch.pdf][pdf]], [[./figs/feedback_sensor_fusion_arch.tex][tex]]).
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:figs/feedback_sensor_fusion_arch.png]]
|
||||||
|
|
||||||
|
* TODO Feedback Loop Sensor Fusion Architecture
|
||||||
#+begin_src latex :file feedback_synthesis_architecture.pdf :tangle figs/feedback_synthesis_architecture.tex
|
#+begin_src latex :file feedback_synthesis_architecture.pdf :tangle figs/feedback_synthesis_architecture.tex
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\node[block] (W1) at (0,0) {$W_1$};
|
\node[block] (W2) at (0,0) {$W_2$};
|
||||||
\node[addb={+}{}{}{}{-}, right=1 of W1] (addfb){};
|
\node[addb={+}{}{}{}{-}, right=1 of W2] (addfb){};
|
||||||
\node[addb={+}{}{}{}{}, right=4.5 of W1] (adddy){};
|
\node[addb={+}{}{}{}{}, right=4.5 of W2] (adddy){};
|
||||||
\node[block, above=0.8 of adddy] (W2){$W_2$};
|
\node[block, above=0.8 of adddy] (W1){$W_1$};
|
||||||
|
|
||||||
\draw[<-] (W1.west) -- ++(-1, 0) node[above right]{$w_1$};
|
\draw[<-] (W2.west) -- ++(-1, 0) node[above right]{$w_2$};
|
||||||
\draw[->] (W1.east) -- (addfb.west) node[above left]{$\tilde{w}_1$};
|
\draw[->] (W2.east) -- (addfb.west) node[above left]{$\tilde{w}_2$};
|
||||||
\draw[->] (addfb.east) -- ++(1, 0) node[above left]{$v$};
|
\draw[->] (addfb.east) -- ++(1, 0) node[above left]{$v$};
|
||||||
\draw[<-] (adddy.west) -- ++(-1, 0) node[above right]{$u$};
|
\draw[<-] (adddy.west) -- ++(-1, 0) node[above right]{$u$};
|
||||||
\draw[->] (adddy.east) -- ++(1.4, 0) node[above left]{$z$};
|
\draw[->] (adddy.east) -- ++(1.4, 0) node[above left]{$z$};
|
||||||
\draw[->] (W2.south) -- (adddy.north) node[above right]{$\tilde{w}_2$};
|
\draw[->] (W1.south) -- (adddy.north) node[above right]{$\tilde{w}_1$};
|
||||||
\draw[<-] (W2.north) -- ++(0, 1) node[below right]{$w_2$};
|
\draw[<-] (W1.north) -- ++(0, 1) node[below right]{$w_1$};
|
||||||
\draw[->] ($(adddy.east) + (0.5, 0)$) node[branch]{} -- ++(0, -0.8) -| (addfb.south);
|
\draw[->] ($(adddy.east) + (0.5, 0)$) node[branch]{} -- ++(0, -0.8) -| (addfb.south);
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -473,29 +509,29 @@ Configuration file is accessible [[file:config.org][here]].
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/feedback_synthesis_architecture.png]]
|
[[file:figs/feedback_synthesis_architecture.png]]
|
||||||
|
|
||||||
* Feedback Loop Sensor Fusion Architecture
|
* Feedback Sensor Fusion - Generalized Plant
|
||||||
#+begin_src latex :file feedback_synthesis_architecture_generalized_plant.pdf :tangle figs/feedback_synthesis_architecture_generalized_plant.tex
|
#+begin_src latex :file feedback_synthesis_architecture_generalized_plant.pdf :tangle figs/feedback_synthesis_architecture_generalized_plant.tex
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\node[block={4.5cm}{3.0cm}, fill=black!10!white] (P) {};
|
\node[block={4.5cm}{3.0cm}, fill=black!10!white] (P) {};
|
||||||
\node[above] at (P.north) {$P_L(s)$};
|
\node[above] at (P.north) {$P_L(s)$};
|
||||||
|
|
||||||
\coordinate[] (inputw2) at ($(P.south west)!0.75!(P.north west) + (-0.7, 0)$);
|
\coordinate[] (inputw1) at ($(P.south west)!0.75!(P.north west) + (-0.7, 0)$);
|
||||||
\coordinate[] (inputw1) at ($(P.south west)!0.40!(P.north west) + (-0.7, 0)$);
|
\coordinate[] (inputw2) at ($(P.south west)!0.40!(P.north west) + (-0.7, 0)$);
|
||||||
\coordinate[] (inputu) at ($(P.south west)!0.15!(P.north west) + (-0.7, 0)$);
|
\coordinate[] (inputu) at ($(P.south west)!0.15!(P.north west) + (-0.7, 0)$);
|
||||||
|
|
||||||
\coordinate[] (outputz) at ($(P.south east)!0.75!(P.north east) + ( 0.7, 0)$);
|
\coordinate[] (outputz) at ($(P.south east)!0.75!(P.north east) + ( 0.7, 0)$);
|
||||||
\coordinate[] (outputv) at ($(P.south east)!0.40!(P.north east) + ( 0.7, 0)$);
|
\coordinate[] (outputv) at ($(P.south east)!0.40!(P.north east) + ( 0.7, 0)$);
|
||||||
|
|
||||||
\node[block, right=1.2 of inputw1] (W1){$W_1(s)$};
|
|
||||||
\node[block, right=1.2 of inputw2] (W2){$W_2(s)$};
|
\node[block, right=1.2 of inputw2] (W2){$W_2(s)$};
|
||||||
\node[addb={+}{}{}{}{}, right=0.8 of W2] (add) {};
|
\node[block, right=1.2 of inputw1] (W1){$W_1(s)$};
|
||||||
\node[addb={+}{}{-}{}{}, right=1.8 of W1] (sub) {};
|
\node[addb={+}{}{}{}{}, right=0.8 of W1] (add) {};
|
||||||
|
\node[addb={+}{}{-}{}{}, right=1.8 of W2] (sub) {};
|
||||||
|
|
||||||
\draw[->] (inputw1) node[above right]{$w_1$} -- (W1.west);
|
|
||||||
\draw[->] (inputw2) node[above right]{$w_2$} -- (W2.west);
|
\draw[->] (inputw2) node[above right]{$w_2$} -- (W2.west);
|
||||||
|
\draw[->] (inputw1) node[above right]{$w_1$} -- (W1.west);
|
||||||
\draw[->] (inputu) node[above right]{$u$} -| (add.south);
|
\draw[->] (inputu) node[above right]{$u$} -| (add.south);
|
||||||
\draw[->] (W1.east) -- (sub.west);
|
\draw[->] (W2.east) -- (sub.west);
|
||||||
\draw[->] (W2.east) -- (add.west);
|
\draw[->] (W1.east) -- (add.west);
|
||||||
\draw[->] (add.east) -- (outputz)node[above left]{$z$};
|
\draw[->] (add.east) -- (outputz)node[above left]{$z$};
|
||||||
\draw[->] (sub.east) -- (outputv)node[above left]{$v$};
|
\draw[->] (sub.east) -- (outputv)node[above left]{$v$};
|
||||||
\draw[->] (add-|sub) node[branch]{} -- (sub.north);
|
\draw[->] (add-|sub) node[branch]{} -- (sub.north);
|
||||||
@ -595,7 +631,7 @@ Configuration file is accessible [[file:config.org][here]].
|
|||||||
#+begin_src latex :file comp_filter_three_hinf.pdf :tangle figs/comp_filter_three_hinf.tex
|
#+begin_src latex :file comp_filter_three_hinf.pdf :tangle figs/comp_filter_three_hinf.tex
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\node[block={5.0cm}{4.5cm}, fill=black!10!white] (P) {};
|
\node[block={5.0cm}{4.5cm}, fill=black!10!white] (P) {};
|
||||||
\node[above] at (P.north) {$P(s)$};
|
\node[above] at (P.north) {$P_3(s)$};
|
||||||
|
|
||||||
\coordinate[] (inputw) at ($(P.south west)!0.8!(P.north west) + (-0.7, 0)$);
|
\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[] (inputu) at ($(P.south west)!0.4!(P.north west) + (-0.7, 0)$);
|
||||||
|
Loading…
Reference in New Issue
Block a user