diff --git a/Figures/perfconp.pdf b/Figures/perfconp.pdf
new file mode 100644
index 0000000..15518cb
Binary files /dev/null and b/Figures/perfconp.pdf differ
diff --git a/Figures/perfconp.png b/Figures/perfconp.png
new file mode 100644
index 0000000..f9cebf1
Binary files /dev/null and b/Figures/perfconp.png differ
diff --git a/Figures/perfconp.svg b/Figures/perfconp.svg
new file mode 100644
index 0000000..87408bf
--- /dev/null
+++ b/Figures/perfconp.svg
@@ -0,0 +1,568 @@
+
+
diff --git a/rotating_frame.org b/rotating_frame.org
index 77b66bb..e90f1b5 100644
--- a/rotating_frame.org
+++ b/rotating_frame.org
@@ -1092,19 +1092,64 @@ However, when we look at the poles of the closed loop with a diagonal controller
| -1.1837+0.0041777i |
| -1.1837-0.0041777i |
-*** TODO Close loop performance
-First we compute the close loop transfer functions.
+*** Close loop performance
+First, we create the closed loop systems. Then, we plot the transfer function from the reference signals $[\epsilon_u, \epsilon_v]$ to the output $[d_u, d_v]$ (figure [[fig:perfcomp]]).
#+begin_src matlab :results none :exports code
- Gcl = feedback(Gvc, K);
- Gtcl = feedback(Gtvc, K);
+ K.InputName = 'e';
+ K.OutputName = 'u';
+
+ Gtvc.InputName = 'u';
+ Gtvc.OutputName = 'y';
+
+ Gvc.InputName = 'u';
+ Gvc.OutputName = 'y';
+
+ Sum = sumblk('e = r-y', 2);
+
+ Tvc = connect(Gvc, K, Sum, 'r', 'y');
+ Ttvc = connect(Gtvc, K, Sum, 'r', 'y');
#+end_src
-
#+begin_src matlab :results none :exports code
+ freqs = logspace(-2, 2, 1000);
+
figure;
- bode(Gcl, Gtcl)
+ ax1 = subplot(1,2,1);
+ hold on;
+ plot(freqs, abs(squeeze(freqresp(Tvc(1, 1), freqs, 'Hz'))));
+ plot(freqs, abs(squeeze(freqresp(Ttvc(1, 1), freqs, 'Hz'))));
+ hold off;
+ xlim([freqs(1), freqs(end)]);
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ xlabel('Frequency [Hz]'); ylabel('Magnitude [m/N]');
+ legend({'w = 0 [rpm]', 'w = 60 [rpm]'}, 'Location', 'southwest')
+ title('$G_{r_u \to d_u}$')
+
+ ax2 = subplot(1,2,2);
+ hold on;
+ plot(freqs, abs(squeeze(freqresp(Tvc(1, 2), freqs, 'Hz'))));
+ plot(freqs, abs(squeeze(freqresp(Ttvc(1, 2), freqs, 'Hz'))));
+ hold off;
+ xlim([freqs(1), freqs(end)]);
+ ylim([1e-5, 1]);
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ xlabel('Frequency [Hz]');
+ title('$G_{r_u \to d_v}$')
+
+ linkaxes([ax1,ax2],'x');
#+end_src
+#+HEADER: :tangle no :exports results :results file :noweb yes
+#+HEADER: :var filepath="Figures/perfconp.png" :var figsize="full-tall"
+#+begin_src matlab
+ <>
+#+end_src
+
+#+NAME: fig:perfcomp
+#+CAPTION: Close loop performance for $\omega = 0$ and $\omega = 60 rpm$
+#+RESULTS:
+[[file:Figures/perfconp.png]]
+
*** Effect of rotation speed
We first identify the system (voice coil and light mass) for multiple rotation speed.
Then we compute the bode plot of the diagonal element (figure [[fig:Guu_ws]]) and of the coupling element (figure [[fig:Guv_ws]]).
@@ -1112,7 +1157,7 @@ Then we compute the bode plot of the diagonal element (figure [[fig:Guu_ws]]) an
As the rotation frequency increases:
- one pole goes to lower frequencies while the other goes to higher frequencies
- one zero appears between the two poles
-- the zero disappears when $\omega > \sqrt{\frac{k}{m}}$ and the low frequency pole becomes unstable (positive real part)
+- [ ] the zero disappears when $\omega > \sqrt{\frac{k}{m}}$ and the low frequency pole becomes unstable (positive real part)
To stabilize the unstable pole, we need a control bandwidth of at least twice of frequency of the unstable pole.
@@ -1214,7 +1259,6 @@ To stabilize the unstable pole, we need a control bandwidth of at least twice of
[[file:Figures/Guv_ws.png]]
** TODO Plant Control - MIMO approach
-
** test
#+begin_src matlab :exports none :results silent