Correcly export code blocks
This commit is contained in:
parent
c8ac218db5
commit
b47a6fa6da
2906
matlab/index.html
2906
matlab/index.html
File diff suppressed because it is too large
Load Diff
@ -101,7 +101,7 @@ The Campbell Diagram displays the evolution of the real and imaginary parts of t
|
||||
|
||||
It is shown in Figure [[fig:campbell_diagram]], and one can see that the system becomes unstable for $\Omega > \omega_0$ (the real part of one of the poles becomes positive).
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Ws = linspace(0, 2, 51); % Vector of considered rotation speed [rad/s]
|
||||
|
||||
p_ws = zeros(4, length(Ws));
|
||||
@ -117,7 +117,7 @@ It is shown in Figure [[fig:campbell_diagram]], and one can see that the system
|
||||
clear pole_G;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
ax1 = subplot(1,2,1);
|
||||
@ -185,7 +185,7 @@ Define the rotating speed for the Simscape Model.
|
||||
W = 0.1; % Rotation Speed [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = tf(zeros(2));
|
||||
Kdvf = tf(zeros(2));
|
||||
|
||||
@ -223,7 +223,7 @@ The same transfer function from $[F_u, F_v]$ to $[d_u, d_v]$ is written down fro
|
||||
|
||||
Both transfer functions are compared in Figure [[fig:plant_simscape_analytical]] and are found to perfectly match.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-1, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -302,7 +302,7 @@ The transfer functions from $[F_u, F_v]$ to $[d_u, d_v]$ are identified for the
|
||||
|
||||
They are compared in Figure [[fig:plant_compare_rotating_speed]].
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -402,7 +402,7 @@ Let's define initial values for the model.
|
||||
w0 = sqrt(k/m); % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0; % [N/m]
|
||||
cp = 0; % [N/(m/s)]
|
||||
#+end_src
|
||||
@ -438,7 +438,7 @@ The rotation speed is set to $\Omega = 0.1 \omega_0$.
|
||||
W = 0.1*w0; % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = tf(zeros(2));
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
@ -472,7 +472,7 @@ The same transfer function from $[F_u, F_v]$ to $[f_u, f_v]$ is written down fro
|
||||
|
||||
The two are compared in Figure [[fig:plant_iff_comp_simscape_analytical]] and found to perfectly match.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-1, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -550,7 +550,7 @@ The transfer functions from $[F_u, F_v]$ to $[f_u, f_v]$ are identified for the
|
||||
#+end_src
|
||||
|
||||
The obtained transfer functions are shown in Figure [[fig:plant_iff_compare_rotating_speed]].
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -649,7 +649,7 @@ It is shown that for non-null rotating speed, one pole is bound to the right-hal
|
||||
xlim([freqs(1), freqs(end)]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 4, 100);
|
||||
@ -722,7 +722,7 @@ Let's define initial values for the model.
|
||||
w0 = sqrt(k/m); % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0; % [N/m]
|
||||
cp = 0; % [N/(m/s)]
|
||||
#+end_src
|
||||
@ -743,12 +743,12 @@ Let's arbitrary choose the following control parameters:
|
||||
wi = 0.1*w0;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = (g/(wi+s))*eye(2);
|
||||
#+end_src
|
||||
|
||||
And the following rotating speed.
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
W = 0.1*w0;
|
||||
#+end_src
|
||||
|
||||
@ -759,7 +759,7 @@ And the following rotating speed.
|
||||
#+end_src
|
||||
|
||||
The obtained Loop Gain is shown in Figure [[fig:loop_gain_modified_iff]].
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -801,7 +801,7 @@ The obtained Loop Gain is shown in Figure [[fig:loop_gain_modified_iff]].
|
||||
** Root Locus
|
||||
As shown in the Root Locus plot (Figure [[fig:root_locus_modified_iff]]), for some value of the gain, the system remains stable.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 4, 100);
|
||||
@ -877,7 +877,7 @@ In order to visualize the effect of $\omega_i$ on the attainable damping, the Ro
|
||||
wis = [0.01, 0.1, 0.5, 1]*w0; % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 4, 100);
|
||||
@ -975,7 +975,7 @@ To find the optimum, the gain that maximize the simultaneous damping of the mode
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
yyaxis left
|
||||
plot(wis, opt_zeta, '-o', 'DisplayName', '$\xi_{cl}$');
|
||||
@ -1040,7 +1040,7 @@ Let's define initial values for the model.
|
||||
w0 = sqrt(k/m); % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0; % [N/m]
|
||||
cp = 0; % [N/(m/s)]
|
||||
#+end_src
|
||||
@ -1080,7 +1080,7 @@ The rotation speed is set to $\Omega = 0.1 \omega_0$.
|
||||
W = 0.1*w0; % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = tf(zeros(2));
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
@ -1094,7 +1094,7 @@ The results are shown in Figure [[fig:plant_iff_kp]].
|
||||
|
||||
One can see that for $k_p > m \Omega^2$, the systems shows alternating complex conjugate poles and zeros.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
%% Name of the Simulink File
|
||||
mdl = 'rotating_frame';
|
||||
|
||||
@ -1137,7 +1137,7 @@ One can see that for $k_p > m \Omega^2$, the systems shows alternating complex c
|
||||
Giff_l.OutputName = {'fu', 'fv'};
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -1194,7 +1194,7 @@ Thus, decentralized IFF controller with pure integrators can be used if:
|
||||
k_{p} > m \Omega^2
|
||||
\end{equation}
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 2, 100);
|
||||
@ -1306,7 +1306,7 @@ To study the second point, Root Locus plots for the following values of $k_p$ ar
|
||||
|
||||
It is shown that large values of $k_p$ decreases the attainable damping.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 4, 100);
|
||||
@ -1375,7 +1375,7 @@ Let's take $k_p = 5 m \Omega^2$ and find the optimal IFF control gain $g$ such t
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 4, 100);
|
||||
@ -1458,7 +1458,7 @@ Let's define initial values for the model.
|
||||
w0 = sqrt(k/m); % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0; % [N/m]
|
||||
cp = 0; % [N/(m/s)]
|
||||
#+end_src
|
||||
@ -1469,7 +1469,7 @@ The rotating speed is set to $\Omega = 0.1 \omega_0$.
|
||||
W = 0.1*w0;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = tf(zeros(2));
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
@ -1506,7 +1506,7 @@ The same transfer function from $[F_u, F_v]$ to $[v_u, v_v]$ is written down fro
|
||||
|
||||
The two are compared in Figure [[fig:plant_iff_comp_simscape_analytical]] and found to perfectly match.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-1, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -1579,7 +1579,7 @@ The corresponding Root Locus plots for the following rotating speeds are shown i
|
||||
|
||||
It is shown that for rotating speed $\Omega < \omega_0$, the closed loop system is unconditionally stable and arbitrary damping can be added to the poles.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
gains = logspace(-2, 1, 100);
|
||||
|
||||
figure;
|
||||
@ -1659,12 +1659,12 @@ Let's define initial values for the model.
|
||||
w0 = sqrt(k/m); % [rad/s]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0; % [N/m]
|
||||
cp = 0; % [N/(m/s)]
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kiff = tf(zeros(2));
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
@ -1676,7 +1676,7 @@ The rotating speed is set to $\Omega = 0.1 \omega_0$.
|
||||
|
||||
** Root Locus
|
||||
*** Pseudo Integrator IFF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
#+end_src
|
||||
@ -1728,7 +1728,7 @@ The rotating speed is set to $\Omega = 0.1 \omega_0$.
|
||||
#+end_src
|
||||
|
||||
*** DVF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
#+end_src
|
||||
@ -1752,7 +1752,7 @@ The rotating speed is set to $\Omega = 0.1 \omega_0$.
|
||||
#+end_src
|
||||
|
||||
*** Root Locus :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(-2, 2, 100);
|
||||
@ -1819,7 +1819,7 @@ The rotating speed is set to $\Omega = 0.1 \omega_0$.
|
||||
** Controllers - Optimal Gains
|
||||
In order to compare to three considered Active Damping techniques, gains that yield maximum damping of all the modes are computed for each case.
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
%% IFF with pseudo integrators
|
||||
gains = linspace(0, (w0^2/W^2 - 1)*wi, 100);
|
||||
opt_zeta_iff = 0;
|
||||
@ -1837,7 +1837,7 @@ In order to compare to three considered Active Damping techniques, gains that yi
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
%% IFF with Parallel Stiffness
|
||||
gains = logspace(-2, 4, 100);
|
||||
opt_zeta_kp = 0;
|
||||
@ -1855,7 +1855,7 @@ In order to compare to three considered Active Damping techniques, gains that yi
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
%% Direct Velocity Feedback
|
||||
gains = logspace(0, 2, 100);
|
||||
opt_zeta_dvf = 0;
|
||||
@ -1889,7 +1889,7 @@ The obtained damping ratio and control are shown below.
|
||||
** Transmissibility
|
||||
<<sec:comp_transmissibilty>>
|
||||
*** Open Loop :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf = tf(zeros(2));
|
||||
Kiff = tf(zeros(2));
|
||||
|
||||
@ -1916,7 +1916,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** Pseudo Integrator IFF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
|
||||
@ -1955,7 +1955,7 @@ The obtained damping ratio and control are shown below.
|
||||
Kiff = opt_gain_kp/s*tf(eye(2));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
|
||||
@ -1978,7 +1978,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** DVF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
|
||||
@ -2008,7 +2008,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** Transmissibility :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
@ -2039,7 +2039,7 @@ The obtained damping ratio and control are shown below.
|
||||
** Compliance
|
||||
<<sec:comp_compliance>>
|
||||
*** Open Loop :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf = tf(zeros(2));
|
||||
Kiff = tf(zeros(2));
|
||||
|
||||
@ -2066,7 +2066,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** Pseudo Integrator IFF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
|
||||
@ -2095,7 +2095,7 @@ The obtained damping ratio and control are shown below.
|
||||
Kiff = opt_gain_kp/s*tf(eye(2));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf = tf(zeros(2));
|
||||
#+end_src
|
||||
|
||||
@ -2108,7 +2108,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** DVF :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
kp = 0;
|
||||
cp = 0;
|
||||
|
||||
@ -2128,7 +2128,7 @@ The obtained damping ratio and control are shown below.
|
||||
#+end_src
|
||||
|
||||
*** Compliance :ignore:
|
||||
#+begin_src matlab :exports code
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-2, 1, 1000);
|
||||
|
||||
figure;
|
||||
|
Loading…
Reference in New Issue
Block a user