Window used for pwelch
function.
@@ -1628,46 +1779,46 @@ han_win = hanning(ceil(length(En(:, 1))
-
-
-
7 Useful Functions
+
+
7 Useful Functions
-
-
7.1 prepareTomographyExperiment
+
+
7.1 prepareTomographyExperiment
-
+
@@ -1675,9 +1826,9 @@ This Matlab function is accessible h
-
-
Function Description
-
+
+
Function Description
+
function [] = prepareTomographyExperiment(args)
@@ -1685,9 +1836,9 @@ This Matlab function is accessible
h
-
-
Optional Parameters
-
+
+
Optional Parameters
+
arguments
args.nass_actuator char {mustBeMember(args.nass_actuator,{'piezo', 'lorentz'})} = 'piezo'
@@ -1699,9 +1850,9 @@ This Matlab function is accessible h
-
-
Initialize the Simulation
-
+
+
Initialize the Simulation
+
We initialize all the stages with the default parameters.
@@ -1755,7 +1906,7 @@ save(
'./mat/controllers.mat',
Author: Dehaeze Thomas
-Created: 2020-01-21 mar. 17:28
+Created: 2020-02-04 mar. 16:13
diff --git a/active_damping/index.org b/active_damping/index.org
index e4b210c..e8c2b5d 100644
--- a/active_damping/index.org
+++ b/active_damping/index.org
@@ -65,20 +65,6 @@ The disturbances are:
:END:
<
>
-** ZIP file containing the data and matlab files :ignore:
-#+begin_src bash :exports none :results none
- if [ matlab/undamped_system.m -nt data/undamped_system.zip ]; then
- cp matlab/undamped_system.m undamped_system.m;
- zip data/undamped_system \
- undamped_system.m
- rm undamped_system.m;
- fi
-#+end_src
-
-#+begin_note
- All the files (data and Matlab scripts) are accessible [[file:data/undamped_system.zip][here]].
-#+end_note
-
** Introduction :ignore:
We first look at the undamped system.
The performance of this undamped system will be compared with the damped system using various techniques.
@@ -369,6 +355,1316 @@ We load the results of tomography experiments.
#+CAPTION: Position Error during tomography experiment - Rotations ([[./figs/nass_act_damp_undamped_sim_tomo_rot.png][png]], [[./figs/nass_act_damp_undamped_sim_tomo_rot.pdf][pdf]])
[[file:figs/nass_act_damp_undamped_sim_tomo_rot.png]]
+* Variability of the system dynamics for Active Damping
+:PROPERTIES:
+:header-args:matlab+: :tangle matlab/act_damp_variability_plant.m
+:header-args:matlab+: :comments org :mkdirp yes
+:END:
+<>
+
+** Introduction :ignore:
+The goal of this section is to study how the dynamics of the Active Damping plants are changing with the experimental conditions.
+These experimental conditions are:
+- The mass of the sample (section [[sec:variability_sample_mass]])
+- The spindle angle with a null rotating speed (section [[sec:variability_spindle_angle]])
+- The spindle rotation speed (section [[sec:variability_rotation_speed]])
+- The tilt angle (section [[sec:variability_tilt_angle]])
+- The scans of the translation stage (section [[sec:variability_ty_scans]])
+
+For the identification of the dynamics, the system is simulation for $\approx 0.5s$ before the linearization is performed.
+This is done in order for the transient phase to be over.
+
+** Matlab Init :noexport:ignore:
+#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
+ <>
+#+end_src
+
+#+begin_src matlab :exports none :results silent :noweb yes
+ <>
+#+end_src
+
+#+begin_src matlab :tangle no
+ simulinkproject('../');
+ addpath('active_damping/src/');
+#+end_src
+
+#+begin_src matlab
+ open('active_damping/matlab/sim_nass_active_damping.slx')
+ load('mat/conf_simscape.mat');
+#+end_src
+
+** Variation of the Sample Mass
+<>
+*** Introduction :ignore:
+For all the identifications, the disturbances are disabled and no controller are used.
+
+*** Initialize the Simulation :noexport:
+We initialize all the stages with the default parameters.
+#+begin_src matlab
+ initializeGround();
+ initializeGranite();
+ initializeTy();
+ initializeRy();
+ initializeRz();
+ initializeMicroHexapod();
+ initializeAxisc();
+ initializeMirror();
+#+end_src
+
+No disturbances.
+#+begin_src matlab
+ initializeDisturbances('enable', false);
+#+end_src
+
+The nano-hexapod is a piezoelectric hexapod.
+#+begin_src matlab
+ initializeNanoHexapod('actuator', 'piezo');
+#+end_src
+
+We set the references to zero.
+#+begin_src matlab
+ initializeReferences();
+#+end_src
+
+And all the controllers are set to 0.
+#+begin_src matlab
+ K = tf(zeros(6));
+ save('./mat/controllers.mat', 'K', '-append');
+ K_ine = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_ine', '-append');
+ K_iff = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_iff', '-append');
+ K_dvf = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_dvf', '-append');
+#+end_src
+
+*** Identification :ignore:
+#+begin_src matlab :exports none
+ %% Options for Linearized
+ options = linearizeOptions;
+ options.SampleTime = 0;
+
+ %% Name of the Simulink File
+ mdl = 'sim_nass_active_damping';
+
+ %% Input/Output definition
+ clear io; io_i = 1;
+ io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
+#+end_src
+
+We identify the dynamics for the following sample mass.
+#+begin_src matlab
+ masses = [1, 10, 50]; % [kg]
+#+end_src
+
+#+begin_src matlab :exports none
+ Gm = {zeros(length(masses))};
+ Gm_iff = {zeros(length(masses))};
+ Gm_dvf = {zeros(length(masses))};
+ Gm_ine = {zeros(length(masses))};
+
+ for i = 1:length(masses)
+ initializeSample('mass', masses(i));
+
+ %% Run the linearization
+ G = linearize(mdl, io, 0.3, options);
+ G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
+ G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
+ 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
+ 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
+ Gm(i) = {G};
+ Gm_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gm_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gm_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ end
+#+end_src
+
+#+begin_src matlab :exports none
+ save('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine', '-append');
+#+end_src
+
+*** Plots :ignore:
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine');
+#+end_src
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gm_iff)
+ plot(freqs, abs(squeeze(freqresp(Gm_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gm_iff)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_sample_mass
+#+CAPTION: Variability of the IFF plant with the Sample Mass ([[./figs/act_damp_variability_iff_sample_mass.png][png]], [[./figs/act_damp_variability_iff_sample_mass.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_sample_mass.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+
+ for i = 1:length(Gm_dvf)
+ plot(freqs, abs(squeeze(freqresp(Gm_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gm_dvf)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_sample_mass
+#+CAPTION: Variability of the DVF plant with the Sample Mass ([[./figs/act_damp_variability_dvf_sample_mass.png][png]], [[./figs/act_damp_variability_dvf_sample_mass.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_sample_mass.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gm_ine)
+ plot(freqs, abs(squeeze(freqresp(Gm_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gm_ine)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_sample_mass
+#+CAPTION: Variability of the Inertial plant with the Sample Mass ([[./figs/act_damp_variability_ine_sample_mass.png][png]], [[./figs/act_damp_variability_ine_sample_mass.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_sample_mass.png]]
+
+** Variation of the Spindle Angle
+<>
+*** Introduction :ignore:
+*** Initialize the Simulation :noexport:
+We initialize all the stages with the default parameters.
+#+begin_src matlab
+ initializeGround();
+ initializeGranite();
+ initializeTy();
+ initializeRy();
+ initializeRz();
+ initializeMicroHexapod();
+ initializeAxisc();
+ initializeMirror();
+#+end_src
+
+No disturbances.
+#+begin_src matlab
+ initializeDisturbances('enable', false);
+#+end_src
+
+The nano-hexapod is a piezoelectric hexapod.
+#+begin_src matlab
+ initializeNanoHexapod('actuator', 'piezo');
+ initializeSample('mass', 50);
+#+end_src
+
+And all the controllers are set to 0.
+#+begin_src matlab
+ K = tf(zeros(6));
+ save('./mat/controllers.mat', 'K', '-append');
+ K_ine = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_ine', '-append');
+ K_iff = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_iff', '-append');
+ K_dvf = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_dvf', '-append');
+#+end_src
+
+*** Identification :ignore:
+#+begin_src matlab :exports none
+ %% Options for Linearized
+ options = linearizeOptions;
+ options.SampleTime = 0;
+
+ %% Name of the Simulink File
+ mdl = 'sim_nass_active_damping';
+
+ %% Input/Output definition
+ clear io; io_i = 1;
+ io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
+#+end_src
+
+We identify the dynamics for the following Spindle angles.
+#+begin_src matlab
+ Rz_amplitudes = [0, pi/4, pi/2, pi]; % [rad]
+#+end_src
+
+#+begin_src matlab :exports none
+ Ga = {zeros(length(Rz_amplitudes))};
+ Ga_iff = {zeros(length(Rz_amplitudes))};
+ Ga_dvf = {zeros(length(Rz_amplitudes))};
+ Ga_ine = {zeros(length(Rz_amplitudes))};
+
+ for i = 1:length(Rz_amplitudes)
+ initializeReferences('Rz_type', 'constant', 'Rz_amplitude', Rz_amplitudes(i))
+
+ %% Run the linearization
+ G = linearize(mdl, io, 0.3, options);
+ G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
+ G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
+ 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
+ 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
+ Ga(i) = {G};
+ Ga_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Ga_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Ga_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ end
+#+end_src
+
+#+begin_src matlab :exports none
+ save('./active_damping/mat/plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine', '-append');
+#+end_src
+
+*** Plots :ignore:
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine');
+#+end_src
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Ga_iff)
+ plot(freqs, abs(squeeze(freqresp(Ga_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Ga_iff)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_spindle_angle
+#+CAPTION: Variability of the IFF plant with the Spindle Angle ([[./figs/act_damp_variability_iff_spindle_angle.png][png]], [[./figs/act_damp_variability_iff_spindle_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_spindle_angle.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+
+ for i = 1:length(Ga_dvf)
+ plot(freqs, abs(squeeze(freqresp(Ga_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Ga_dvf)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_spindle_angle
+#+CAPTION: Variability of the DVF plant with the Spindle Angle ([[./figs/act_damp_variability_dvf_spindle_angle.png][png]], [[./figs/act_damp_variability_dvf_spindle_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_spindle_angle.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Ga_ine)
+ plot(freqs, abs(squeeze(freqresp(Ga_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Ga_ine)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
+ end
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_spindle_angle
+#+CAPTION: Variability of the Inertial plant with the Spindle Angle ([[./figs/act_damp_variability_ine_spindle_angle.png][png]], [[./figs/act_damp_variability_ine_spindle_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_spindle_angle.png]]
+
+** Variation of the Spindle Rotation Speed
+<>
+*** Introduction :ignore:
+*** Initialize the Simulation :noexport:
+We initialize all the stages with the default parameters.
+#+begin_src matlab
+ initializeGround();
+ initializeGranite();
+ initializeTy();
+ initializeRy();
+ initializeRz();
+ initializeMicroHexapod();
+ initializeAxisc();
+ initializeMirror();
+#+end_src
+
+No disturbances.
+#+begin_src matlab
+ initializeDisturbances('enable', false);
+#+end_src
+
+The nano-hexapod is a piezoelectric hexapod.
+#+begin_src matlab
+ initializeNanoHexapod('actuator', 'piezo');
+ initializeSample('mass', 50);
+#+end_src
+
+And all the controllers are set to 0.
+#+begin_src matlab
+ K = tf(zeros(6));
+ save('./mat/controllers.mat', 'K', '-append');
+ K_ine = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_ine', '-append');
+ K_iff = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_iff', '-append');
+ K_dvf = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_dvf', '-append');
+#+end_src
+
+*** Identification :ignore:
+#+begin_src matlab :exports none
+ %% Options for Linearized
+ options = linearizeOptions;
+ options.SampleTime = 0;
+
+ %% Name of the Simulink File
+ mdl = 'sim_nass_active_damping';
+
+ %% Input/Output definition
+ clear io; io_i = 1;
+ io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
+#+end_src
+
+We identify the dynamics for the following Spindle rotation periods.
+#+begin_src matlab
+ Rz_periods = [60, 6, 2, 1]; % [s]
+#+end_src
+
+The identification of the dynamics is done at the same Spindle angle position.
+
+#+begin_src matlab :exports none
+ Gw = {zeros(length(Rz_periods))};
+ Gw_iff = {zeros(length(Rz_periods))};
+ Gw_dvf = {zeros(length(Rz_periods))};
+ Gw_ine = {zeros(length(Rz_periods))};
+
+ for i = 1:length(Rz_periods)
+ initializeReferences('Rz_type', 'rotating', ...
+ 'Rz_period', Rz_periods(i), ... % Rotation period [s]
+ 'Rz_amplitude', -0.5*(2*pi/Rz_periods(i))); % Angle offset [rad]
+
+ load('mat/nass_references.mat', 'Rz'); % We load the reference for the Spindle
+ [~, i_end] = min(abs(Rz.signals.values)); % Obtain the indice where the spindle angle is zero
+ t_sim = Rz.time(i_end) % Simulation time before identification [s]
+
+ %% Run the linearization
+ G = linearize(mdl, io, t_sim, options);
+ G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
+ G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
+ 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
+ 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
+
+ Gw(i) = {G};
+ Gw_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gw_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gw_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ end
+#+end_src
+
+#+begin_src matlab :exports none
+ save('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine', '-append');
+#+end_src
+
+*** Dynamics of the Active Damping plants
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine');
+ load('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
+#+end_src
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 10000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gw_iff)
+ plot(freqs, abs(squeeze(freqresp(Gw_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gw_iff)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', 'No Rotation');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_spindle_speed
+#+CAPTION: Variability of the IFF plant with the Spindle rotation speed ([[./figs/act_damp_variability_iff_spindle_speed.png][png]], [[./figs/act_damp_variability_iff_spindle_speed.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_spindle_speed.png]]
+
+#+begin_src matlab :exports none
+ xlim([20, 30]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_spindle_speed_zoom
+#+CAPTION: Variability of the IFF plant with the Spindle rotation speed ([[./figs/act_damp_variability_iff_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_iff_spindle_speed_zoom.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_spindle_speed_zoom.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 5000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+
+ for i = 1:length(Gw_dvf)
+ plot(freqs, abs(squeeze(freqresp(Gw_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gw_dvf)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', 'No Rotation');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_spindle_speed
+#+CAPTION: Variability of the DVF plant with the Spindle rotation speed ([[./figs/act_damp_variability_dvf_spindle_speed.png][png]], [[./figs/act_damp_variability_dvf_spindle_speed.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_spindle_speed.png]]
+
+#+begin_src matlab :exports none
+ xlim([20, 30]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_spindle_speed_zoom
+#+CAPTION: Variability of the DVF plant with the Spindle rotation speed ([[./figs/act_damp_variability_dvf_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_dvf_spindle_speed_zoom.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_spindle_speed_zoom.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 5000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gw_ine)
+ plot(freqs, abs(squeeze(freqresp(Gw_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gw_ine)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', 'No Rotation');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_spindle_speed
+#+CAPTION: Variability of the Inertial plant with the Spindle rotation speed ([[./figs/act_damp_variability_ine_spindle_speed.png][png]], [[./figs/act_damp_variability_ine_spindle_speed.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_spindle_speed.png]]
+
+#+begin_src matlab :exports none
+ xlim([20, 30]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_spindle_speed_zoom
+#+CAPTION: Variability of the Inertial plant with the Spindle rotation speed ([[./figs/act_damp_variability_ine_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_ine_spindle_speed_zoom.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_spindle_speed_zoom.png]]
+
+*** Variation of the poles and zeros with the Spindle rotation frequency
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine');
+ load('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
+#+end_src
+
+
+#+begin_src matlab :exports none
+ figure;
+
+ subplot(1,2,1);
+ hold on;
+ for i = 1:length(Gw_iff)
+ G_poles = pole(Gw_iff{i}('Fnlm1', 'Fnl1'));
+ plot(1/Rz_periods(i), real(G_poles(imag(G_poles)<2*pi*30 & imag(G_poles)>2*pi*22)), 'kx');
+ end
+ G_poles = pole(G_iff('Fnlm1', 'Fnl1'));
+ plot(0, real(G_poles(imag(G_poles)<2*pi*30 & imag(G_poles)>2*pi*22)), 'kx');
+ hold off;
+ ylim([-inf, 0]);
+ xlabel('Rotation Speed [Hz]');
+ ylabel('Real Part');
+
+ subplot(1,2,2);
+ hold on;
+ for i = 1:length(Gw_iff)
+ G_poles = pole(Gw_iff{i}('Fnlm1', 'Fnl1'));
+ plot(1/Rz_periods(i), imag(G_poles(imag(G_poles)<2*pi*30 & imag(G_poles)>2*pi*22)), 'kx');
+ end
+ G_poles = pole(G_iff('Fnlm1', 'Fnl1'));
+ plot(0, imag(G_poles(imag(G_poles)<2*pi*30 & imag(G_poles)>2*pi*22)), 'kx');
+ hold off;
+ ylim([0, inf]);
+ xlabel('Rotation Speed [Hz]');
+ ylabel('Imaginary Part');
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/campbell_diagram_spindle_rotation.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:campbell_diagram_spindle_rotation
+#+CAPTION: Evolution of the pole with respect to the spindle rotation speed ([[./figs/campbell_diagram_spindle_rotation.png][png]], [[./figs/campbell_diagram_spindle_rotation.pdf][pdf]])
+[[file:figs/campbell_diagram_spindle_rotation.png]]
+
+#+begin_src matlab :exports none
+ figure;
+
+ subplot(1,2,1);
+ hold on;
+ for i = 1:length(Gw_ine)
+ set(gca,'ColorOrderIndex',1);
+ G_zeros = zero(Gw_ine{i}('Vnlm1', 'Fnl1'));
+ plot(1/Rz_periods(i), real(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+
+ set(gca,'ColorOrderIndex',2);
+ G_zeros = zero(Gw_iff{i}('Fnlm1', 'Fnl1'));
+ plot(1/Rz_periods(i), real(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+
+ set(gca,'ColorOrderIndex',3);
+ G_zeros = zero(Gw_dvf{i}('Dnlm1', 'Fnl1'));
+ plot(1/Rz_periods(i), real(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+ end
+ hold off;
+ xlabel('Rotation Speed [Hz]');
+ ylabel('Real Part');
+
+ subplot(1,2,2);
+ hold on;
+ for i = 1:length(Gw_ine)
+ set(gca,'ColorOrderIndex',1);
+ G_zeros = zero(Gw_ine{i}('Vnlm1', 'Fnl1'));
+ p_ine = plot(1/Rz_periods(i), imag(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+
+ set(gca,'ColorOrderIndex',2);
+ G_zeros = zero(Gw_iff{i}('Fnlm1', 'Fnl1'));
+ p_iff = plot(1/Rz_periods(i), imag(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+
+ set(gca,'ColorOrderIndex',3);
+ G_zeros = zero(Gw_dvf{i}('Dnlm1', 'Fnl1'));
+ p_dvf = plot(1/Rz_periods(i), imag(G_zeros(imag(G_zeros)<2*pi*25 & imag(G_zeros)>2*pi*22)), 'o');
+ end
+ hold off;
+ xlabel('Rotation Speed [Hz]');
+ ylabel('Imaginary Part');
+ legend([p_ine p_iff p_dvf],{'Inertial Sensor','Force Sensor', 'Relative Motion Sensor'}, 'location', 'southwest');
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/variation_zeros_active_damping_plants.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:variation_zeros_active_damping_plants
+#+CAPTION: Evolution of the zero with respect to the spindle rotation speed ([[./figs/variation_zeros_active_damping_plants.png][png]], [[./figs/variation_zeros_active_damping_plants.pdf][pdf]])
+[[file:figs/variation_zeros_active_damping_plants.png]]
+
+** Variation of the Tilt Angle
+<>
+*** Introduction :ignore:
+*** Initialize the Simulation :noexport:
+We initialize all the stages with the default parameters.
+#+begin_src matlab
+ initializeGround();
+ initializeGranite();
+ initializeTy();
+ initializeRy();
+ initializeRz();
+ initializeMicroHexapod();
+ initializeAxisc();
+ initializeMirror();
+#+end_src
+
+No disturbances.
+#+begin_src matlab
+ initializeDisturbances('enable', false);
+#+end_src
+
+The nano-hexapod is a piezoelectric hexapod.
+#+begin_src matlab
+ initializeNanoHexapod('actuator', 'piezo');
+ initializeSample('mass', 50);
+#+end_src
+
+And all the controllers are set to 0.
+#+begin_src matlab
+ K = tf(zeros(6));
+ save('./mat/controllers.mat', 'K', '-append');
+ K_ine = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_ine', '-append');
+ K_iff = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_iff', '-append');
+ K_dvf = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_dvf', '-append');
+#+end_src
+
+*** Identification :ignore:
+#+begin_src matlab :exports none
+ %% Options for Linearized
+ options = linearizeOptions;
+ options.SampleTime = 0;
+
+ %% Name of the Simulink File
+ mdl = 'sim_nass_active_damping';
+
+ %% Input/Output definition
+ clear io; io_i = 1;
+ io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
+#+end_src
+
+We identify the dynamics for the following Tilt stage angles.
+#+begin_src matlab
+ Ry_amplitudes = [-3*pi/180, 3*pi/180]; % [rad]
+#+end_src
+
+#+begin_src matlab :exports none
+ Gy = {zeros(length(Ry_amplitudes))};
+ Gy_iff = {zeros(length(Ry_amplitudes))};
+ Gy_dvf = {zeros(length(Ry_amplitudes))};
+ Gy_ine = {zeros(length(Ry_amplitudes))};
+
+ for i = 1:length(Ry_amplitudes)
+ initializeReferences('Ry_type', 'constant', 'Ry_amplitude', Ry_amplitudes(i))
+
+ %% Run the linearization
+ G = linearize(mdl, io, 0.3, options);
+ G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
+ G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
+ 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
+ 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
+ Gy(i) = {G};
+ Gy_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gy_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ Gy_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
+ end
+#+end_src
+
+#+begin_src matlab :exports none
+ save('./active_damping/mat/plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine', '-append');
+#+end_src
+
+*** Plots :ignore:
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine');
+ load('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
+#+end_src
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gy_iff)
+ plot(freqs, abs(squeeze(freqresp(Gy_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gy_iff)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_tilt_angle
+#+CAPTION: Variability of the IFF plant with the Tilt stage Angle ([[./figs/act_damp_variability_iff_tilt_angle.png][png]], [[./figs/act_damp_variability_iff_tilt_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_tilt_angle.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+
+ for i = 1:length(Gy_dvf)
+ plot(freqs, abs(squeeze(freqresp(Gy_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gy_dvf)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_tilt_angle
+#+CAPTION: Variability of the DVF plant with the Tilt Angle ([[./figs/act_damp_variability_dvf_tilt_angle.png][png]], [[./figs/act_damp_variability_dvf_tilt_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_tilt_angle.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gy_ine)
+ plot(freqs, abs(squeeze(freqresp(Gy_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gy_ine)
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_tilt_angle
+#+CAPTION: Variability of the Inertial plant with the Tilt Angle ([[./figs/act_damp_variability_ine_tilt_angle.png][png]], [[./figs/act_damp_variability_ine_tilt_angle.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_tilt_angle.png]]
+
+** Scans of the Translation Stage
+<>
+*** Introduction :ignore:
+We want here to verify if the dynamics used for Active damping is varying when using the translation stage for scans.
+
+*** Initialize the Simulation :noexport:
+We initialize all the stages with the default parameters.
+#+begin_src matlab
+ initializeGround();
+ initializeGranite();
+ initializeTy();
+ initializeRy();
+ initializeRz();
+ initializeMicroHexapod();
+ initializeAxisc();
+ initializeMirror();
+#+end_src
+
+No disturbances.
+#+begin_src matlab
+ initializeDisturbances('enable', false);
+#+end_src
+
+The nano-hexapod is a piezoelectric hexapod and the mass of the sample is set to 50kg.
+#+begin_src matlab
+ initializeNanoHexapod('actuator', 'piezo');
+ initializeSample('mass', 50);
+#+end_src
+
+And all the controllers are set to 0.
+#+begin_src matlab
+ K = tf(zeros(6));
+ save('./mat/controllers.mat', 'K', '-append');
+ K_ine = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_ine', '-append');
+ K_iff = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_iff', '-append');
+ K_dvf = tf(zeros(6));
+ save('./mat/controllers.mat', 'K_dvf', '-append');
+#+end_src
+
+*** Identification :ignore:
+#+begin_src matlab :exports none
+ %% Options for Linearized
+ options = linearizeOptions;
+ options.SampleTime = 0;
+
+ %% Name of the Simulink File
+ mdl = 'sim_nass_active_damping';
+
+ %% Input/Output definition
+ clear io; io_i = 1;
+ io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
+ io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
+#+end_src
+
+We initialize the translation stage reference to be a sinus with an amplitude of 5mm and a period of 1s (Figure [[fig:ty_scanning_reference_sinus]]).
+#+begin_src matlab
+ initializeReferences('Dy_type', 'sinusoidal', ...
+ 'Dy_amplitude', 5e-3, ... % [m]
+ 'Dy_period', 1); % [s]
+#+end_src
+
+#+begin_src matlab :exports none
+ load('mat/nass_references.mat', 'Dy');
+ figure;
+ plot(Dy.time, Dy.signals.values);
+ xlabel('Time [s]'); ylabel('Dy - Position [m]');
+ xlim([0, 2]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/ty_scanning_reference_sinus.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:ty_scanning_reference_sinus
+#+CAPTION: Reference path for the translation stage ([[./figs/ty_scanning_reference_sinus.png][png]], [[./figs/ty_scanning_reference_sinus.pdf][pdf]])
+[[file:figs/ty_scanning_reference_sinus.png]]
+
+We identify the dynamics at different positions (times) when scanning with the Translation stage.
+#+begin_src matlab
+ t_lin = [0.5, 0.75, 1, 1.25];
+#+end_src
+
+#+begin_src matlab :exports none
+ Gty = {zeros(length(t_lin))};
+ Gty_iff = {zeros(length(t_lin))};
+ Gty_dvf = {zeros(length(t_lin))};
+ Gty_ine = {zeros(length(t_lin))};
+
+ %% Run the linearization
+ G = linearize(mdl, io, t_lin, options);
+ G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
+ G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
+ 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
+ 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
+
+ for i = 1:length(t_lin)
+ Gty(i) = {G(:,:,i)};
+ Gty_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}, i))};
+ Gty_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}, i))};
+ Gty_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}, i))};
+ end
+#+end_src
+
+#+begin_src matlab :exports none
+ Gty_tlin = t_lin;
+ save('./active_damping/mat/plants_variable.mat', 'Gty_tlin', 'Dy', 'Gty_iff', 'Gty_dvf', 'Gty_ine', '-append');
+#+end_src
+
+*** Plots :ignore:
+#+begin_src matlab :exports none
+ load('./active_damping/mat/plants_variable.mat', 'Gty_tlin', 'Dy', 'Gty_iff', 'Gty_dvf', 'Gty_ine');
+ load('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
+#+end_src
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gty_iff)
+ plot(freqs, abs(squeeze(freqresp(Gty_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gty_iff)
+ [~, i_t] = min(abs(Dy.time - Gty_tlin(i)));
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gty_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Dy = %.0f$ [mm]', 1e3*Dy.signals.values(i_t)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_iff_ty_scans.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_iff_ty_scans
+#+CAPTION: Variability of the IFF plant at different Ty scan positions ([[./figs/act_damp_variability_iff_ty_scans.png][png]], [[./figs/act_damp_variability_iff_ty_scans.pdf][pdf]])
+[[file:figs/act_damp_variability_iff_ty_scans.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+
+ for i = 1:length(Gty_dvf)
+ plot(freqs, abs(squeeze(freqresp(Gty_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gty_dvf)
+ [~, i_t] = min(abs(Dy.time - Gty_tlin(i)));
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gty_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Dy = %.0f$ [mm]', 1e3*Dy.signals.values(i_t)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_ty_scans.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_dvf_ty_scans
+#+CAPTION: Variability of the DVF plant at different Ty scan positions ([[./figs/act_damp_variability_dvf_ty_scans.png][png]], [[./figs/act_damp_variability_dvf_ty_scans.pdf][pdf]])
+[[file:figs/act_damp_variability_dvf_ty_scans.png]]
+
+#+begin_src matlab :exports none
+ freqs = logspace(0, 3, 1000);
+
+ figure;
+
+ ax1 = subplot(2, 1, 1);
+ hold on;
+ for i = 1:length(Gty_ine)
+ plot(freqs, abs(squeeze(freqresp(Gty_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
+ end
+ plot(freqs, abs(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
+ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
+
+ ax2 = subplot(2, 1, 2);
+ hold on;
+ for i = 1:length(Gty_ine)
+ [~, i_t] = min(abs(Dy.time - Gty_tlin(i)));
+ plot(freqs, 180/pi*angle(squeeze(freqresp(Gty_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Dy = %.0f$ [mm]', 1e3*Dy.signals.values(i_t)));
+ end
+ plot(freqs, 180/pi*angle(squeeze(freqresp(G_ine('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'k--', 'DisplayName', '$Ry = 0$ [deg]');
+ hold off;
+ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
+ ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
+ ylim([-180, 180]);
+ yticks([-180, -90, 0, 90, 180]);
+ legend('location', 'southwest');
+
+ linkaxes([ax1,ax2],'x');
+ xlim([freqs(1), freqs(end)]);
+#+end_src
+
+#+HEADER: :tangle no :exports results :results none :noweb yes
+#+begin_src matlab :var filepath="figs/act_damp_variability_ine_ty_scans.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
+<>
+#+end_src
+
+#+NAME: fig:act_damp_variability_ine_ty_scans
+#+CAPTION: Variability of the Inertial plant at different Ty scan positions ([[./figs/act_damp_variability_ine_ty_scans.png][png]], [[./figs/act_damp_variability_ine_ty_scans.pdf][pdf]])
+[[file:figs/act_damp_variability_ine_ty_scans.png]]
+
+** Conclusion
+
+#+name: tab:active_damping_plant_variability
+#+caption: Conclusion on the variability of the system dynamics for active damping
+| | |
+| | *Change of Dynamics* |
+|---------------------------+--------------------------------------------|
+| *Sample Mass* | Large |
+| *Spindle Angle* | Small |
+| *Spindle Rotation Speed* | First resonance is split in two resonances |
+| *Tilt Angle* | Negligible |
+| *Translation Stage scans* | Negligible |
+
+Also, for the Inertial Sensor, a RHP zero may appear when the spindle is rotating fast.
+
+#+begin_important
+ When using either a force sensor or a relative motion sensor for active damping, the only "parameter" that induce a large change for the dynamics to be controlled is the *sample mass*.
+ Thus, the developed damping techniques should be robust to variations of the sample mass.
+#+end_important
+
* Integral Force Feedback
:PROPERTIES:
:header-args:matlab+: :tangle matlab/iff.m
@@ -1941,941 +3237,6 @@ We load the results of tomography experiments.
Inertial Control:
#+end_important
-* Variability of the system dynamics for Active Damping
-:PROPERTIES:
-:header-args:matlab+: :tangle matlab/act_damp_variability_plant.m
-:header-args:matlab+: :comments org :mkdirp yes
-:END:
-<>
-
-** ZIP file containing the data and matlab files :ignore:
-#+begin_src bash :exports none :results none
-if [ matlab/act_damp_variability_plant.m -nt data/act_damp_variability_plant.zip ]; then
-cp matlab/act_damp_variability_plant.m act_damp_variability_plant.m;
-zip data/act_damp_variability_plant \
-act_damp_variability_plant.m
-rm act_damp_variability_plant.m;
-fi
-#+end_src
-
-#+begin_note
-All the files (data and Matlab scripts) are accessible [[file:data/act_damp_variability_plant.zip][here]].
-#+end_note
-
-** Introduction :ignore:
-** Matlab Init :noexport:ignore:
-#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
- <>
-#+end_src
-
-#+begin_src matlab :exports none :results silent :noweb yes
- <>
-#+end_src
-
-#+begin_src matlab :tangle no
- simulinkproject('../');
- addpath('active_damping/src/');
-#+end_src
-
-#+begin_src matlab
- open('active_damping/matlab/sim_nass_active_damping.slx')
- load('mat/conf_simscape.mat');
-#+end_src
-
-** Variation of the Sample Mass
-*** Introduction :ignore:
-For all the identifications, the disturbances are disabled and no controller are used.
-
-*** Initialize the Simulation :noexport:
-We initialize all the stages with the default parameters.
-#+begin_src matlab
- initializeGround();
- initializeGranite();
- initializeTy();
- initializeRy();
- initializeRz();
- initializeMicroHexapod();
- initializeAxisc();
- initializeMirror();
-#+end_src
-
-No disturbances.
-#+begin_src matlab
- initializeDisturbances('enable', false);
-#+end_src
-
-The nano-hexapod is a piezoelectric hexapod.
-#+begin_src matlab
- initializeNanoHexapod('actuator', 'piezo');
-#+end_src
-
-We set the references to zero.
-#+begin_src matlab
- initializeReferences();
-#+end_src
-
-And all the controllers are set to 0.
-#+begin_src matlab
- K = tf(zeros(6));
- save('./mat/controllers.mat', 'K', '-append');
- K_ine = tf(zeros(6));
- save('./mat/controllers.mat', 'K_ine', '-append');
- K_iff = tf(zeros(6));
- save('./mat/controllers.mat', 'K_iff', '-append');
- K_dvf = tf(zeros(6));
- save('./mat/controllers.mat', 'K_dvf', '-append');
-#+end_src
-
-*** Identification :ignore:
-#+begin_src matlab :exports none
- %% Options for Linearized
- options = linearizeOptions;
- options.SampleTime = 0;
-
- %% Name of the Simulink File
- mdl = 'sim_nass_active_damping';
-
- %% Input/Output definition
- clear io; io_i = 1;
- io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
-#+end_src
-
-We identify the dynamics for the following sample mass.
-#+begin_src matlab
- masses = [1, 10, 50]; % [kg]
-#+end_src
-
-#+begin_src matlab :exports none
- Gm = {zeros(length(masses))};
- Gm_iff = {zeros(length(masses))};
- Gm_dvf = {zeros(length(masses))};
- Gm_ine = {zeros(length(masses))};
-
- for i = 1:length(masses)
- initializeSample('mass', masses(i));
-
- %% Run the linearization
- G = linearize(mdl, io, 0.1, options);
- G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
- G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
- 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
- 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
- Gm(i) = {G};
- Gm_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gm_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gm_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- end
-#+end_src
-
-#+begin_src matlab :exports none
- save('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine', '-append');
-#+end_src
-
-*** Plots :ignore:
-#+begin_src matlab :exports none
- load('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine');
-#+end_src
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gm_iff)
- plot(freqs, abs(squeeze(freqresp(Gm_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gm_iff)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_iff_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_iff_sample_mass
-#+CAPTION: Variability of the IFF plant with the Sample Mass ([[./figs/act_damp_variability_iff_sample_mass.png][png]], [[./figs/act_damp_variability_iff_sample_mass.pdf][pdf]])
-[[file:figs/act_damp_variability_iff_sample_mass.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
-
- for i = 1:length(Gm_dvf)
- plot(freqs, abs(squeeze(freqresp(Gm_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gm_dvf)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_dvf_sample_mass
-#+CAPTION: Variability of the DVF plant with the Sample Mass ([[./figs/act_damp_variability_dvf_sample_mass.png][png]], [[./figs/act_damp_variability_dvf_sample_mass.pdf][pdf]])
-[[file:figs/act_damp_variability_dvf_sample_mass.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gm_ine)
- plot(freqs, abs(squeeze(freqresp(Gm_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gm_ine)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gm_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$M = %.0f$ [kg]', masses(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_ine_sample_mass.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_ine_sample_mass
-#+CAPTION: Variability of the Inertial plant with the Sample Mass ([[./figs/act_damp_variability_ine_sample_mass.png][png]], [[./figs/act_damp_variability_ine_sample_mass.pdf][pdf]])
-[[file:figs/act_damp_variability_ine_sample_mass.png]]
-
-** Variation of the Spindle Angle
-*** Introduction :ignore:
-*** Initialize the Simulation :noexport:
-We initialize all the stages with the default parameters.
-#+begin_src matlab
- initializeGround();
- initializeGranite();
- initializeTy();
- initializeRy();
- initializeRz();
- initializeMicroHexapod();
- initializeAxisc();
- initializeMirror();
-#+end_src
-
-No disturbances.
-#+begin_src matlab
- initializeDisturbances('enable', false);
-#+end_src
-
-The nano-hexapod is a piezoelectric hexapod.
-#+begin_src matlab
- initializeNanoHexapod('actuator', 'piezo');
- initializeSample('mass', 50);
-#+end_src
-
-And all the controllers are set to 0.
-#+begin_src matlab
- K = tf(zeros(6));
- save('./mat/controllers.mat', 'K', '-append');
- K_ine = tf(zeros(6));
- save('./mat/controllers.mat', 'K_ine', '-append');
- K_iff = tf(zeros(6));
- save('./mat/controllers.mat', 'K_iff', '-append');
- K_dvf = tf(zeros(6));
- save('./mat/controllers.mat', 'K_dvf', '-append');
-#+end_src
-
-*** Identification :ignore:
-#+begin_src matlab :exports none
- %% Options for Linearized
- options = linearizeOptions;
- options.SampleTime = 0;
-
- %% Name of the Simulink File
- mdl = 'sim_nass_active_damping';
-
- %% Input/Output definition
- clear io; io_i = 1;
- io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
-#+end_src
-
-We identify the dynamics for the following Spindle angles.
-#+begin_src matlab
- Rz_amplitudes = [0, pi/4, pi/2, pi]; % [rad]
-#+end_src
-
-#+begin_src matlab :exports none
- Ga = {zeros(length(Rz_amplitudes))};
- Ga_iff = {zeros(length(Rz_amplitudes))};
- Ga_dvf = {zeros(length(Rz_amplitudes))};
- Ga_ine = {zeros(length(Rz_amplitudes))};
-
- for i = 1:length(Rz_amplitudes)
- initializeReferences('Rz_type', 'constant', 'Rz_amplitude', Rz_amplitudes(i))
-
- %% Run the linearization
- G = linearize(mdl, io, 0.1, options);
- G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
- G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
- 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
- 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
- Ga(i) = {G};
- Ga_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Ga_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Ga_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- end
-#+end_src
-
-#+begin_src matlab :exports none
- save('./active_damping/mat/plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine', '-append');
-#+end_src
-
-*** Plots :ignore:
-#+begin_src matlab :exports none
- load('./active_damping/mat/plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine');
-#+end_src
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Ga_iff)
- plot(freqs, abs(squeeze(freqresp(Ga_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Ga_iff)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_iff_spindle_angle
-#+CAPTION: Variability of the IFF plant with the Spindle Angle ([[./figs/act_damp_variability_iff_spindle_angle.png][png]], [[./figs/act_damp_variability_iff_spindle_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_iff_spindle_angle.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
-
- for i = 1:length(Ga_dvf)
- plot(freqs, abs(squeeze(freqresp(Ga_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Ga_dvf)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_dvf_spindle_angle
-#+CAPTION: Variability of the DVF plant with the Spindle Angle ([[./figs/act_damp_variability_dvf_spindle_angle.png][png]], [[./figs/act_damp_variability_dvf_spindle_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_dvf_spindle_angle.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Ga_ine)
- plot(freqs, abs(squeeze(freqresp(Ga_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Ga_ine)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Ga_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [deg]', Rz_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_ine_spindle_angle
-#+CAPTION: Variability of the Inertial plant with the Spindle Angle ([[./figs/act_damp_variability_ine_spindle_angle.png][png]], [[./figs/act_damp_variability_ine_spindle_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_ine_spindle_angle.png]]
-
-** Variation of the Spindle Rotation Speed
-*** Introduction :ignore:
-*** Initialize the Simulation :noexport:
-We initialize all the stages with the default parameters.
-#+begin_src matlab
- initializeGround();
- initializeGranite();
- initializeTy();
- initializeRy();
- initializeRz();
- initializeMicroHexapod();
- initializeAxisc();
- initializeMirror();
-#+end_src
-
-No disturbances.
-#+begin_src matlab
- initializeDisturbances('enable', false);
-#+end_src
-
-The nano-hexapod is a piezoelectric hexapod.
-#+begin_src matlab
- initializeNanoHexapod('actuator', 'piezo');
- initializeSample('mass', 50);
-#+end_src
-
-And all the controllers are set to 0.
-#+begin_src matlab
- K = tf(zeros(6));
- save('./mat/controllers.mat', 'K', '-append');
- K_ine = tf(zeros(6));
- save('./mat/controllers.mat', 'K_ine', '-append');
- K_iff = tf(zeros(6));
- save('./mat/controllers.mat', 'K_iff', '-append');
- K_dvf = tf(zeros(6));
- save('./mat/controllers.mat', 'K_dvf', '-append');
-#+end_src
-
-*** Identification :ignore:
-#+begin_src matlab :exports none
- %% Options for Linearized
- options = linearizeOptions;
- options.SampleTime = 0;
-
- %% Name of the Simulink File
- mdl = 'sim_nass_active_damping';
-
- %% Input/Output definition
- clear io; io_i = 1;
- io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
-#+end_src
-
-We identify the dynamics for the following Spindle rotation periods.
-#+begin_src matlab
- Rz_periods = [60, 10, 1]; % [s]
-#+end_src
-
-The goal is to identify the dynamics:
-- after the transient phase
-- at the same spindle angle
-
-#+begin_src matlab
- Gw = {zeros(length(Rz_periods))};
- Gw_iff = {zeros(length(Rz_periods))};
- Gw_dvf = {zeros(length(Rz_periods))};
- Gw_ine = {zeros(length(Rz_periods))};
-
- for i = 1:length(Rz_periods)
- initializeReferences('Rz_type', 'rotating', ...
- 'Rz_period', Rz_periods(i), ... % Rotation period [s]
- 'Rz_amplitude', -0.5*(2*pi/Rz_periods(i))); % Angle offset [rad]
-
- load('mat/nass_references.mat', 'Rz'); % We load the reference for the Spindle
- [~, i_end] = min(abs(Rz.signals.values)); % Obtain the indice where the spindle angle is zero
- t_sim = Rz.time(i_end) % Simulation time before identification [s]
-
- %% Run the linearization
- G = linearize(mdl, io, t_sim, options);
- G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
- G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
- 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
- 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
-
- Gw(i) = {G};
- Gw_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gw_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gw_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- end
-#+end_src
-
-#+begin_src matlab :exports none
- save('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine', '-append');
-#+end_src
-
-*** Plots :ignore:
-#+begin_src matlab :exports none
- load('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine');
-#+end_src
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 5000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gw_iff)
- plot(freqs, abs(squeeze(freqresp(Gw_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gw_iff)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_iff_spindle_speed
-#+CAPTION: Variability of the IFF plant with the Spindle rotation speed ([[./figs/act_damp_variability_iff_spindle_speed.png][png]], [[./figs/act_damp_variability_iff_spindle_speed.pdf][pdf]])
-[[file:figs/act_damp_variability_iff_spindle_speed.png]]
-
-#+begin_src matlab :exports none
- xlim([10, 30]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_iff_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_iff_spindle_speed_zoom
-#+CAPTION: Variability of the IFF plant with the Spindle rotation speed ([[./figs/act_damp_variability_iff_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_iff_spindle_speed_zoom.pdf][pdf]])
-[[file:figs/act_damp_variability_iff_spindle_speed_zoom.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 5000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
-
- for i = 1:length(Gw_dvf)
- plot(freqs, abs(squeeze(freqresp(Gw_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gw_dvf)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_dvf_spindle_speed
-#+CAPTION: Variability of the DVF plant with the Spindle rotation speed ([[./figs/act_damp_variability_dvf_spindle_speed.png][png]], [[./figs/act_damp_variability_dvf_spindle_speed.pdf][pdf]])
-[[file:figs/act_damp_variability_dvf_spindle_speed.png]]
-
-#+begin_src matlab :exports none
- xlim([10, 30]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_dvf_spindle_speed_zoom
-#+CAPTION: Variability of the DVF plant with the Spindle rotation speed ([[./figs/act_damp_variability_dvf_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_dvf_spindle_speed_zoom.pdf][pdf]])
-[[file:figs/act_damp_variability_dvf_spindle_speed_zoom.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 5000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gw_ine)
- plot(freqs, abs(squeeze(freqresp(Gw_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gw_ine)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gw_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Rz = %.0f$ [rpm]', 60/Rz_periods(i)));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_speed.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_ine_spindle_speed
-#+CAPTION: Variability of the Inertial plant with the Spindle rotation speed ([[./figs/act_damp_variability_ine_spindle_speed.png][png]], [[./figs/act_damp_variability_ine_spindle_speed.pdf][pdf]])
-[[file:figs/act_damp_variability_ine_spindle_speed.png]]
-
-#+begin_src matlab :exports none
- xlim([10, 30]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_ine_spindle_speed_zoom.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_ine_spindle_speed_zoom
-#+CAPTION: Variability of the Inertial plant with the Spindle rotation speed ([[./figs/act_damp_variability_ine_spindle_speed_zoom.png][png]], [[./figs/act_damp_variability_ine_spindle_speed_zoom.pdf][pdf]])
-[[file:figs/act_damp_variability_ine_spindle_speed_zoom.png]]
-
-** Variation of the Tilt Angle
-*** Introduction :ignore:
-*** Initialize the Simulation :noexport:
-We initialize all the stages with the default parameters.
-#+begin_src matlab
- initializeGround();
- initializeGranite();
- initializeTy();
- initializeRy();
- initializeRz();
- initializeMicroHexapod();
- initializeAxisc();
- initializeMirror();
-#+end_src
-
-No disturbances.
-#+begin_src matlab
- initializeDisturbances('enable', false);
-#+end_src
-
-The nano-hexapod is a piezoelectric hexapod.
-#+begin_src matlab
- initializeNanoHexapod('actuator', 'piezo');
- initializeSample('mass', 50);
-#+end_src
-
-And all the controllers are set to 0.
-#+begin_src matlab
- K = tf(zeros(6));
- save('./mat/controllers.mat', 'K', '-append');
- K_ine = tf(zeros(6));
- save('./mat/controllers.mat', 'K_ine', '-append');
- K_iff = tf(zeros(6));
- save('./mat/controllers.mat', 'K_iff', '-append');
- K_dvf = tf(zeros(6));
- save('./mat/controllers.mat', 'K_dvf', '-append');
-#+end_src
-
-*** Identification :ignore:
-#+begin_src matlab :exports none
- %% Options for Linearized
- options = linearizeOptions;
- options.SampleTime = 0;
-
- %% Name of the Simulink File
- mdl = 'sim_nass_active_damping';
-
- %% Input/Output definition
- clear io; io_i = 1;
- io(io_i) = linio([mdl, '/Fnl'], 1, 'openinput'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1;
- io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1;
-#+end_src
-
-We identify the dynamics for the following Tilt stage angles.
-#+begin_src matlab
- Ry_amplitudes = [0, 20*pi/180]; % [rad]
-#+end_src
-
-#+begin_src matlab :exports none
- Gy = {zeros(length(Ry_amplitudes))};
- Gy_iff = {zeros(length(Ry_amplitudes))};
- Gy_dvf = {zeros(length(Ry_amplitudes))};
- Gy_ine = {zeros(length(Ry_amplitudes))};
-
- for i = 1:length(Ry_amplitudes)
- initializeReferences('Ry_type', 'constant', 'Ry_amplitude', Ry_amplitudes(i))
-
- %% Run the linearization
- G = linearize(mdl, io, 0.25, options);
- G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
- G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ...
- 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6', ...
- 'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'};
- Gy(i) = {G};
- Gy_iff(i) = {minreal(G({'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gy_dvf(i) = {minreal(G({'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- Gy_ine(i) = {minreal(G({'Vnlm1', 'Vnlm2', 'Vnlm3', 'Vnlm4', 'Vnlm5', 'Vnlm6'}, {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}))};
- end
-#+end_src
-
-#+begin_src matlab :exports none
- save('./active_damping/mat/plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine', '-append');
-#+end_src
-
-*** Plots :ignore:
-#+begin_src matlab :exports none
- load('./active_damping/mat/plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine');
-#+end_src
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gy_iff)
- plot(freqs, abs(squeeze(freqresp(Gy_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gy_iff)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_iff{i}('Fnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_iff_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_iff_tilt_angle
-#+CAPTION: Variability of the IFF plant with the Spindle Angle ([[./figs/act_damp_variability_iff_tilt_angle.png][png]], [[./figs/act_damp_variability_iff_tilt_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_iff_tilt_angle.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
-
- for i = 1:length(Gy_dvf)
- plot(freqs, abs(squeeze(freqresp(Gy_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gy_dvf)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_dvf{i}('Dnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_dvf_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_dvf_tilt_angle
-#+CAPTION: Variability of the DVF plant with the Spindle Angle ([[./figs/act_damp_variability_dvf_tilt_angle.png][png]], [[./figs/act_damp_variability_dvf_tilt_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_dvf_tilt_angle.png]]
-
-#+begin_src matlab :exports none
- freqs = logspace(0, 3, 1000);
-
- figure;
-
- ax1 = subplot(2, 1, 1);
- hold on;
- for i = 1:length(Gy_ine)
- plot(freqs, abs(squeeze(freqresp(Gy_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
- ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
-
- ax2 = subplot(2, 1, 2);
- hold on;
- for i = 1:length(Gy_ine)
- plot(freqs, 180/pi*angle(squeeze(freqresp(Gy_ine{i}('Vnlm1', 'Fnl1'), freqs, 'Hz'))), 'DisplayName', sprintf('$Ry = %.0f$ [deg]', Ry_amplitudes(i)*180/pi));
- end
- hold off;
- set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
- ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
- ylim([-180, 180]);
- yticks([-180, -90, 0, 90, 180]);
- legend('location', 'southwest');
-
- linkaxes([ax1,ax2],'x');
- xlim([freqs(1), freqs(end)]);
-#+end_src
-
-#+HEADER: :tangle no :exports results :results none :noweb yes
-#+begin_src matlab :var filepath="figs/act_damp_variability_ine_tilt_angle.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
-<>
-#+end_src
-
-#+NAME: fig:act_damp_variability_ine_tilt_angle
-#+CAPTION: Variability of the Inertial plant with the Spindle Angle ([[./figs/act_damp_variability_ine_tilt_angle.png][png]], [[./figs/act_damp_variability_ine_tilt_angle.pdf][pdf]])
-[[file:figs/act_damp_variability_ine_tilt_angle.png]]
-
-** Conclusion
-
* Comparison
<>
** Introduction :ignore:
diff --git a/active_damping/mat/plants_variable.mat b/active_damping/mat/plants_variable.mat
index c11bd0b..a98d7cc 100644
Binary files a/active_damping/mat/plants_variable.mat and b/active_damping/mat/plants_variable.mat differ
diff --git a/active_damping/mat/undamped_plants.mat b/active_damping/mat/undamped_plants.mat
index 812b563..a773304 100644
Binary files a/active_damping/mat/undamped_plants.mat and b/active_damping/mat/undamped_plants.mat differ
diff --git a/active_damping/matlab/sim_nass_active_damping.slx b/active_damping/matlab/sim_nass_active_damping.slx
index 22db770..52ae7e1 100644
Binary files a/active_damping/matlab/sim_nass_active_damping.slx and b/active_damping/matlab/sim_nass_active_damping.slx differ
diff --git a/figs/act_damp_variability_dvf_sample_mass.pdf b/figs/act_damp_variability_dvf_sample_mass.pdf
index 38fa88d..6411e37 100644
Binary files a/figs/act_damp_variability_dvf_sample_mass.pdf and b/figs/act_damp_variability_dvf_sample_mass.pdf differ
diff --git a/figs/act_damp_variability_dvf_sample_mass.png b/figs/act_damp_variability_dvf_sample_mass.png
index 4a94492..8a2f978 100644
Binary files a/figs/act_damp_variability_dvf_sample_mass.png and b/figs/act_damp_variability_dvf_sample_mass.png differ
diff --git a/figs/act_damp_variability_dvf_spindle_angle.pdf b/figs/act_damp_variability_dvf_spindle_angle.pdf
index 7010429..bb39a5b 100644
Binary files a/figs/act_damp_variability_dvf_spindle_angle.pdf and b/figs/act_damp_variability_dvf_spindle_angle.pdf differ
diff --git a/figs/act_damp_variability_dvf_spindle_angle.png b/figs/act_damp_variability_dvf_spindle_angle.png
index 009a67b..c86c501 100644
Binary files a/figs/act_damp_variability_dvf_spindle_angle.png and b/figs/act_damp_variability_dvf_spindle_angle.png differ
diff --git a/figs/act_damp_variability_dvf_spindle_speed.pdf b/figs/act_damp_variability_dvf_spindle_speed.pdf
index 41776e6..90a8381 100644
Binary files a/figs/act_damp_variability_dvf_spindle_speed.pdf and b/figs/act_damp_variability_dvf_spindle_speed.pdf differ
diff --git a/figs/act_damp_variability_dvf_spindle_speed.png b/figs/act_damp_variability_dvf_spindle_speed.png
index 8fa5e74..a39f68c 100644
Binary files a/figs/act_damp_variability_dvf_spindle_speed.png and b/figs/act_damp_variability_dvf_spindle_speed.png differ
diff --git a/figs/act_damp_variability_dvf_spindle_speed_zoom.pdf b/figs/act_damp_variability_dvf_spindle_speed_zoom.pdf
index e0553e1..e4072f7 100644
Binary files a/figs/act_damp_variability_dvf_spindle_speed_zoom.pdf and b/figs/act_damp_variability_dvf_spindle_speed_zoom.pdf differ
diff --git a/figs/act_damp_variability_dvf_spindle_speed_zoom.png b/figs/act_damp_variability_dvf_spindle_speed_zoom.png
index 28f8699..a519d04 100644
Binary files a/figs/act_damp_variability_dvf_spindle_speed_zoom.png and b/figs/act_damp_variability_dvf_spindle_speed_zoom.png differ
diff --git a/figs/act_damp_variability_dvf_tilt_angle.pdf b/figs/act_damp_variability_dvf_tilt_angle.pdf
index 9605959..c8e4068 100644
Binary files a/figs/act_damp_variability_dvf_tilt_angle.pdf and b/figs/act_damp_variability_dvf_tilt_angle.pdf differ
diff --git a/figs/act_damp_variability_dvf_tilt_angle.png b/figs/act_damp_variability_dvf_tilt_angle.png
index c20df2d..3b7ae15 100644
Binary files a/figs/act_damp_variability_dvf_tilt_angle.png and b/figs/act_damp_variability_dvf_tilt_angle.png differ
diff --git a/figs/act_damp_variability_dvf_ty_scans.pdf b/figs/act_damp_variability_dvf_ty_scans.pdf
new file mode 100644
index 0000000..2584119
Binary files /dev/null and b/figs/act_damp_variability_dvf_ty_scans.pdf differ
diff --git a/figs/act_damp_variability_dvf_ty_scans.png b/figs/act_damp_variability_dvf_ty_scans.png
new file mode 100644
index 0000000..319e83b
Binary files /dev/null and b/figs/act_damp_variability_dvf_ty_scans.png differ
diff --git a/figs/act_damp_variability_iff_sample_mass.pdf b/figs/act_damp_variability_iff_sample_mass.pdf
index 503bf8e..84f2ecf 100644
Binary files a/figs/act_damp_variability_iff_sample_mass.pdf and b/figs/act_damp_variability_iff_sample_mass.pdf differ
diff --git a/figs/act_damp_variability_iff_sample_mass.png b/figs/act_damp_variability_iff_sample_mass.png
index 9905752..adfbb9e 100644
Binary files a/figs/act_damp_variability_iff_sample_mass.png and b/figs/act_damp_variability_iff_sample_mass.png differ
diff --git a/figs/act_damp_variability_iff_spindle_angle.pdf b/figs/act_damp_variability_iff_spindle_angle.pdf
index b41fca4..4f06955 100644
Binary files a/figs/act_damp_variability_iff_spindle_angle.pdf and b/figs/act_damp_variability_iff_spindle_angle.pdf differ
diff --git a/figs/act_damp_variability_iff_spindle_angle.png b/figs/act_damp_variability_iff_spindle_angle.png
index 466752e..4dd94ca 100644
Binary files a/figs/act_damp_variability_iff_spindle_angle.png and b/figs/act_damp_variability_iff_spindle_angle.png differ
diff --git a/figs/act_damp_variability_iff_spindle_speed.pdf b/figs/act_damp_variability_iff_spindle_speed.pdf
index baceb24..ffdfdea 100644
Binary files a/figs/act_damp_variability_iff_spindle_speed.pdf and b/figs/act_damp_variability_iff_spindle_speed.pdf differ
diff --git a/figs/act_damp_variability_iff_spindle_speed.png b/figs/act_damp_variability_iff_spindle_speed.png
index d161d99..f6fddf0 100644
Binary files a/figs/act_damp_variability_iff_spindle_speed.png and b/figs/act_damp_variability_iff_spindle_speed.png differ
diff --git a/figs/act_damp_variability_iff_spindle_speed_zoom.pdf b/figs/act_damp_variability_iff_spindle_speed_zoom.pdf
index dfc28e7..d62e463 100644
Binary files a/figs/act_damp_variability_iff_spindle_speed_zoom.pdf and b/figs/act_damp_variability_iff_spindle_speed_zoom.pdf differ
diff --git a/figs/act_damp_variability_iff_spindle_speed_zoom.png b/figs/act_damp_variability_iff_spindle_speed_zoom.png
index 57596b0..562bdd5 100644
Binary files a/figs/act_damp_variability_iff_spindle_speed_zoom.png and b/figs/act_damp_variability_iff_spindle_speed_zoom.png differ
diff --git a/figs/act_damp_variability_iff_tilt_angle.pdf b/figs/act_damp_variability_iff_tilt_angle.pdf
index 1b5cf47..234a55c 100644
Binary files a/figs/act_damp_variability_iff_tilt_angle.pdf and b/figs/act_damp_variability_iff_tilt_angle.pdf differ
diff --git a/figs/act_damp_variability_iff_tilt_angle.png b/figs/act_damp_variability_iff_tilt_angle.png
index fff553c..fb3a57e 100644
Binary files a/figs/act_damp_variability_iff_tilt_angle.png and b/figs/act_damp_variability_iff_tilt_angle.png differ
diff --git a/figs/act_damp_variability_iff_ty_scans.pdf b/figs/act_damp_variability_iff_ty_scans.pdf
new file mode 100644
index 0000000..7b7003a
Binary files /dev/null and b/figs/act_damp_variability_iff_ty_scans.pdf differ
diff --git a/figs/act_damp_variability_iff_ty_scans.png b/figs/act_damp_variability_iff_ty_scans.png
new file mode 100644
index 0000000..5c28761
Binary files /dev/null and b/figs/act_damp_variability_iff_ty_scans.png differ
diff --git a/figs/act_damp_variability_ine_sample_mass.pdf b/figs/act_damp_variability_ine_sample_mass.pdf
index 5c352f5..1f74ae0 100644
Binary files a/figs/act_damp_variability_ine_sample_mass.pdf and b/figs/act_damp_variability_ine_sample_mass.pdf differ
diff --git a/figs/act_damp_variability_ine_sample_mass.png b/figs/act_damp_variability_ine_sample_mass.png
index 3b94f44..87b156e 100644
Binary files a/figs/act_damp_variability_ine_sample_mass.png and b/figs/act_damp_variability_ine_sample_mass.png differ
diff --git a/figs/act_damp_variability_ine_spindle_angle.pdf b/figs/act_damp_variability_ine_spindle_angle.pdf
index 0219d64..24805b0 100644
Binary files a/figs/act_damp_variability_ine_spindle_angle.pdf and b/figs/act_damp_variability_ine_spindle_angle.pdf differ
diff --git a/figs/act_damp_variability_ine_spindle_angle.png b/figs/act_damp_variability_ine_spindle_angle.png
index f54aeef..29d8f8b 100644
Binary files a/figs/act_damp_variability_ine_spindle_angle.png and b/figs/act_damp_variability_ine_spindle_angle.png differ
diff --git a/figs/act_damp_variability_ine_spindle_speed.pdf b/figs/act_damp_variability_ine_spindle_speed.pdf
index cd218f2..c3da317 100644
Binary files a/figs/act_damp_variability_ine_spindle_speed.pdf and b/figs/act_damp_variability_ine_spindle_speed.pdf differ
diff --git a/figs/act_damp_variability_ine_spindle_speed.png b/figs/act_damp_variability_ine_spindle_speed.png
index 43334c2..62b50bf 100644
Binary files a/figs/act_damp_variability_ine_spindle_speed.png and b/figs/act_damp_variability_ine_spindle_speed.png differ
diff --git a/figs/act_damp_variability_ine_spindle_speed_zoom.pdf b/figs/act_damp_variability_ine_spindle_speed_zoom.pdf
index e90de7c..fb8ce55 100644
Binary files a/figs/act_damp_variability_ine_spindle_speed_zoom.pdf and b/figs/act_damp_variability_ine_spindle_speed_zoom.pdf differ
diff --git a/figs/act_damp_variability_ine_spindle_speed_zoom.png b/figs/act_damp_variability_ine_spindle_speed_zoom.png
index 6fe8077..b985d21 100644
Binary files a/figs/act_damp_variability_ine_spindle_speed_zoom.png and b/figs/act_damp_variability_ine_spindle_speed_zoom.png differ
diff --git a/figs/act_damp_variability_ine_tilt_angle.pdf b/figs/act_damp_variability_ine_tilt_angle.pdf
index ae3a9b4..65d9582 100644
Binary files a/figs/act_damp_variability_ine_tilt_angle.pdf and b/figs/act_damp_variability_ine_tilt_angle.pdf differ
diff --git a/figs/act_damp_variability_ine_tilt_angle.png b/figs/act_damp_variability_ine_tilt_angle.png
index b49f953..cb68d5d 100644
Binary files a/figs/act_damp_variability_ine_tilt_angle.png and b/figs/act_damp_variability_ine_tilt_angle.png differ
diff --git a/figs/act_damp_variability_ine_ty_scans.pdf b/figs/act_damp_variability_ine_ty_scans.pdf
new file mode 100644
index 0000000..9739b93
Binary files /dev/null and b/figs/act_damp_variability_ine_ty_scans.pdf differ
diff --git a/figs/act_damp_variability_ine_ty_scans.png b/figs/act_damp_variability_ine_ty_scans.png
new file mode 100644
index 0000000..f82e227
Binary files /dev/null and b/figs/act_damp_variability_ine_ty_scans.png differ
diff --git a/figs/campbell_diagram_spindle_rotation.pdf b/figs/campbell_diagram_spindle_rotation.pdf
new file mode 100644
index 0000000..5bee98d
Binary files /dev/null and b/figs/campbell_diagram_spindle_rotation.pdf differ
diff --git a/figs/campbell_diagram_spindle_rotation.png b/figs/campbell_diagram_spindle_rotation.png
new file mode 100644
index 0000000..ef385e1
Binary files /dev/null and b/figs/campbell_diagram_spindle_rotation.png differ
diff --git a/figs/ty_scanning_reference_sinus.pdf b/figs/ty_scanning_reference_sinus.pdf
new file mode 100644
index 0000000..e63c3cf
Binary files /dev/null and b/figs/ty_scanning_reference_sinus.pdf differ
diff --git a/figs/ty_scanning_reference_sinus.png b/figs/ty_scanning_reference_sinus.png
new file mode 100644
index 0000000..e57d819
Binary files /dev/null and b/figs/ty_scanning_reference_sinus.png differ
diff --git a/figs/variation_zeros_active_damping_plants.pdf b/figs/variation_zeros_active_damping_plants.pdf
new file mode 100644
index 0000000..4495f06
Binary files /dev/null and b/figs/variation_zeros_active_damping_plants.pdf differ
diff --git a/figs/variation_zeros_active_damping_plants.png b/figs/variation_zeros_active_damping_plants.png
new file mode 100644
index 0000000..050d811
Binary files /dev/null and b/figs/variation_zeros_active_damping_plants.png differ
diff --git a/simscape_subsystems/index.org b/simscape_subsystems/index.org
index 463fc0b..6c32212 100644
--- a/simscape_subsystems/index.org
+++ b/simscape_subsystems/index.org
@@ -1123,36 +1123,36 @@ The =sample= structure is saved.
:UNNUMBERED: t
:END:
#+begin_src matlab
- %% Translation stage - Dy
- t = 0:Ts:Tmax; % Time Vector [s]
- Dy = zeros(length(t), 1);
- Dyd = zeros(length(t), 1);
- Dydd = zeros(length(t), 1);
- switch args.Dy_type
- case 'constant'
- Dy(:) = args.Dy_amplitude;
- Dyd(:) = 0;
- Dydd(:) = 0;
- case 'triangular'
- % This is done to unsure that we start with no displacement
- Dy_raw = args.Dy_amplitude*sawtooth(2*pi*t/args.Dy_period,1/2);
- i0 = find(t>=args.Dy_period/4,1);
- Dy(1:end-i0+1) = Dy_raw(i0:end);
- Dy(end-i0+2:end) = Dy_raw(end); % we fix the last value
+ %% Translation stage - Dy
+ t = 0:Ts:Tmax; % Time Vector [s]
+ Dy = zeros(length(t), 1);
+ Dyd = zeros(length(t), 1);
+ Dydd = zeros(length(t), 1);
+ switch args.Dy_type
+ case 'constant'
+ Dy(:) = args.Dy_amplitude;
+ Dyd(:) = 0;
+ Dydd(:) = 0;
+ case 'triangular'
+ % This is done to unsure that we start with no displacement
+ Dy_raw = args.Dy_amplitude*sawtooth(2*pi*t/args.Dy_period,1/2);
+ i0 = find(t>=args.Dy_period/4,1);
+ Dy(1:end-i0+1) = Dy_raw(i0:end);
+ Dy(end-i0+2:end) = Dy_raw(end); % we fix the last value
- % The signal is filtered out
- Dy = lsim(H_lpf, Dy, t);
- Dyd = lsim(H_lpf*s, Dy, t);
- Dydd = lsim(H_lpf*s^2, Dy, t);
- case 'sinusoidal'
- Dy(:) = args.Dy_amplitude*sin(2*pi/args.Dy_period*t);
- Dyd = args.Dy_amplitude*2*pi/args.Dy_period*cos(2*pi/args.Dy_period*t);
- Dydd = -args.Dy_amplitude*(2*pi/args.Dy_period)^2*sin(2*pi/args.Dy_period*t);
- otherwise
- warning('Dy_type is not set correctly');
- end
+ % The signal is filtered out
+ Dy = lsim(H_lpf, Dy, t);
+ Dyd = lsim(H_lpf*s, Dy, t);
+ Dydd = lsim(H_lpf*s^2, Dy, t);
+ case 'sinusoidal'
+ Dy(:) = args.Dy_amplitude*sin(2*pi/args.Dy_period*t);
+ Dyd = args.Dy_amplitude*2*pi/args.Dy_period*cos(2*pi/args.Dy_period*t);
+ Dydd = -args.Dy_amplitude*(2*pi/args.Dy_period)^2*sin(2*pi/args.Dy_period*t);
+ otherwise
+ warning('Dy_type is not set correctly');
+ end
- Dy = struct('time', t, 'signals', struct('values', Dy), 'deriv', Dyd, 'dderiv', Dydd);
+ Dy = struct('time', t, 'signals', struct('values', Dy), 'deriv', Dyd, 'dderiv', Dydd);
#+end_src
** Tilt Stage
@@ -1160,37 +1160,37 @@ The =sample= structure is saved.
:UNNUMBERED: t
:END:
#+begin_src matlab
- %% Tilt Stage - Ry
- t = 0:Ts:Tmax; % Time Vector [s]
- Ry = zeros(length(t), 1);
- Ryd = zeros(length(t), 1);
- Rydd = zeros(length(t), 1);
+ %% Tilt Stage - Ry
+ t = 0:Ts:Tmax; % Time Vector [s]
+ Ry = zeros(length(t), 1);
+ Ryd = zeros(length(t), 1);
+ Rydd = zeros(length(t), 1);
- switch args.Ry_type
- case 'constant'
- Ry(:) = args.Ry_amplitude;
- Ryd(:) = 0;
- Rydd(:) = 0;
- case 'triangular'
- Ry_raw = args.Ry_amplitude*sawtooth(2*pi*t/args.Ry_period,1/2);
- i0 = find(t>=args.Ry_period/4,1);
- Ry(1:end-i0+1) = Ry_raw(i0:end);
- Ry(end-i0+2:end) = Ry_raw(end); % we fix the last value
+ switch args.Ry_type
+ case 'constant'
+ Ry(:) = args.Ry_amplitude;
+ Ryd(:) = 0;
+ Rydd(:) = 0;
+ case 'triangular'
+ Ry_raw = args.Ry_amplitude*sawtooth(2*pi*t/args.Ry_period,1/2);
+ i0 = find(t>=args.Ry_period/4,1);
+ Ry(1:end-i0+1) = Ry_raw(i0:end);
+ Ry(end-i0+2:end) = Ry_raw(end); % we fix the last value
- % The signal is filtered out
- Ry = lsim(H_lpf, Ry, t);
- Ryd = lsim(H_lpf*s, Ry, t);
- Rydd = lsim(H_lpf*s^2, Ry, t);
- case 'sinusoidal'
- Ry(:) = args.Ry_amplitude*sin(2*pi/args.Ry_period*t);
+ % The signal is filtered out
+ Ry = lsim(H_lpf, Ry, t);
+ Ryd = lsim(H_lpf*s, Ry, t);
+ Rydd = lsim(H_lpf*s^2, Ry, t);
+ case 'sinusoidal'
+ Ry(:) = args.Ry_amplitude*sin(2*pi/args.Ry_period*t);
- Ryd = args.Ry_amplitude*2*pi/args.Ry_period*cos(2*pi/args.Ry_period*t);
- Rydd = -args.Ry_amplitude*(2*pi/args.Ry_period)^2*sin(2*pi/args.Ry_period*t);
- otherwise
- warning('Ry_type is not set correctly');
- end
+ Ryd = args.Ry_amplitude*2*pi/args.Ry_period*cos(2*pi/args.Ry_period*t);
+ Rydd = -args.Ry_amplitude*(2*pi/args.Ry_period)^2*sin(2*pi/args.Ry_period*t);
+ otherwise
+ warning('Ry_type is not set correctly');
+ end
- Ry = struct('time', t, 'signals', struct('values', Ry), 'deriv', Ryd, 'dderiv', Rydd);
+ Ry = struct('time', t, 'signals', struct('values', Ry), 'deriv', Ryd, 'dderiv', Rydd);
#+end_src
** Spindle
@@ -1273,11 +1273,11 @@ The =sample= structure is saved.
:UNNUMBERED: t
:END:
#+begin_src matlab
- %% Axis Compensation - Rm
- t = [0, Ts];
+ %% Axis Compensation - Rm
+ t = [0, Ts];
- Rm = [args.Rm_pos, args.Rm_pos];
- Rm = struct('time', t, 'signals', struct('values', Rm));
+ Rm = [args.Rm_pos, args.Rm_pos];
+ Rm = struct('time', t, 'signals', struct('values', Rm));
#+end_src
** Nano Hexapod
@@ -1285,18 +1285,18 @@ The =sample= structure is saved.
:UNNUMBERED: t
:END:
#+begin_src matlab
- %% Nano-Hexapod
- t = [0, Ts];
- Dn = zeros(length(t), 6);
+ %% Nano-Hexapod
+ t = [0, Ts];
+ Dn = zeros(length(t), 6);
- switch args.Dn_type
- case 'constant'
- Dn = [args.Dn_pos, args.Dn_pos];
- otherwise
- warning('Dn_type is not set correctly');
- end
+ switch args.Dn_type
+ case 'constant'
+ Dn = [args.Dn_pos, args.Dn_pos];
+ otherwise
+ warning('Dn_type is not set correctly');
+ end
- Dn = struct('time', t, 'signals', struct('values', Dn));
+ Dn = struct('time', t, 'signals', struct('values', Dn));
#+end_src
** Save