Work on Control (HAC-LAC) + Models

This commit is contained in:
2020-03-13 17:40:22 +01:00
parent 493268638b
commit fab78b6527
78 changed files with 5395 additions and 2475 deletions

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -139,12 +139,12 @@ We then create transfer functions corresponding to the active damping plants.
And we save them for further analysis.
#+begin_src matlab
save('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
save('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
*** Obtained Plants for Active Damping
#+begin_src matlab
load('./active_damping/mat/undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
#+begin_src matlab :exports none
@@ -306,12 +306,12 @@ We identify the dynamics of the system using the =linearize= function.
And we save them for further analysis.
#+begin_src matlab
save('./active_damping/mat/cart_plants.mat', 'G_cart', 'masses');
save('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses');
#+end_src
*** Obtained Plants
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'G_cart', 'masses');
load('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses');
#+end_src
#+begin_src matlab :exports none
@@ -431,13 +431,13 @@ And we simulate the system.
Finally, we save the simulation results for further analysis
#+begin_src matlab
save('./active_damping/mat/tomo_exp.mat', 'En', 'Eg', '-append');
save('./mat/active_damping_tomo_exp.mat', 'En', 'Eg', '-append');
#+end_src
*** Results
We load the results of tomography experiments.
#+begin_src matlab
load('./active_damping/mat/tomo_exp.mat', 'En');
load('./mat/active_damping_tomo_exp.mat', 'En');
Fs = 1e3; % Sampling Frequency of the Data
t = (1/Fs)*[0:length(En(:,1))-1];
#+end_src
@@ -599,12 +599,12 @@ We identify the dynamics for the following sample mass.
#+end_src
#+begin_src matlab :exports none
save('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine', '-append');
save('./mat/active_damping_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');
load('./mat/active_damping_plants_variable.mat', 'masses', 'Gm_iff', 'Gm_dvf', 'Gm_ine');
#+end_src
#+begin_src matlab :exports none
@@ -779,12 +779,12 @@ We identify the dynamics for the following Spindle angles.
#+end_src
#+begin_src matlab :exports none
save('./active_damping/mat/plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine', '-append');
save('./mat/active_damping_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');
load('./mat/active_damping_plants_variable.mat', 'Rz_amplitudes', 'Ga_iff', 'Ga_dvf', 'Ga_ine');
#+end_src
#+begin_src matlab :exports none
@@ -967,13 +967,13 @@ The identification of the dynamics is done at the same Spindle angle position.
#+end_src
#+begin_src matlab :exports none
save('./active_damping/mat/plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine', '-append');
save('./mat/active_damping_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');
load('./mat/active_damping_plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
#+begin_src matlab :exports none
@@ -1141,8 +1141,8 @@ The identification of the dynamics is done at the same Spindle angle position.
*** 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');
load('./mat/active_damping_plants_variable.mat', 'Rz_periods', 'Gw_iff', 'Gw_dvf', 'Gw_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
@@ -1290,13 +1290,13 @@ We identify the dynamics for the following Tilt stage angles.
#+end_src
#+begin_src matlab :exports none
save('./active_damping/mat/plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine', '-append');
save('./mat/active_damping_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');
load('./mat/active_damping_plants_variable.mat', 'Ry_amplitudes', 'Gy_iff', 'Gy_dvf', 'Gy_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
#+begin_src matlab :exports none
@@ -1502,13 +1502,13 @@ We identify the dynamics at different positions (times) when scanning with the T
#+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');
save('./mat/active_damping_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');
load('./mat/active_damping_plants_variable.mat', 'Gty_tlin', 'Dy', 'Gty_iff', 'Gty_dvf', 'Gty_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
#+end_src
#+begin_src matlab :exports none
@@ -1717,8 +1717,8 @@ The control architecture is represented in figure [[fig:iff_1dof]] where one of
*** Plant
Let's load the previously identified undamped plant:
#+begin_src matlab
load('./active_damping/mat/undamped_plants.mat', 'G_iff');
load('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_iff');
load('./mat/active_damping_undamped_plants.mat', 'G_iff');
load('./mat/active_damping_plants_variable.mat', 'masses', 'Gm_iff');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure [[fig:iff_plant]]).
@@ -1819,7 +1819,7 @@ feedback architecture.
We save the controller for further analysis.
#+begin_src matlab
save('./active_damping/mat/K_iff.mat', 'K_iff');
save('./mat/active_damping_K_iff.mat', 'K_iff');
#+end_src
** Identification of the damped plant :noexport:
@@ -1831,7 +1831,7 @@ We initialize all the stages with the default parameters.
We set the IFF controller.
#+begin_src matlab
load('./active_damping/mat/K_iff.mat', 'K_iff');
load('./mat/active_damping_K_iff.mat', 'K_iff');
initializeController('type', 'iff', 'K', K_iff);
#+end_src
@@ -1852,7 +1852,7 @@ We identify the dynamics of the system using the =linearize= function.
We identify the dynamics for the following sample mass.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses');
load('./mat/active_damping_cart_plants.mat', 'masses');
#+end_src
#+begin_src matlab :exports none
@@ -1877,13 +1877,13 @@ We identify the dynamics for the following sample mass.
And we save them for further analysis.
#+begin_src matlab
save('./active_damping/mat/cart_plants.mat', 'G_cart_iff', '-append');
save('./mat/active_damping_cart_plants.mat', 'G_cart_iff', '-append');
#+end_src
*** Damped Plant
Now, look at the new damped plant to control.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses', 'G_cart', 'G_cart_iff');
load('./mat/active_damping_cart_plants.mat', 'masses', 'G_cart', 'G_cart_iff');
#+end_src
It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure [[fig:plant_iff_damped]].
@@ -2022,7 +2022,7 @@ We initialize elements for the tomography experiment.
We set the IFF controller.
#+begin_src matlab
load('./active_damping/mat/K_iff.mat', 'K_iff');
load('./mat/active_damping_K_iff.mat', 'K_iff');
initializeController('type', 'iff', 'K', K_iff);
#+end_src
@@ -2041,12 +2041,12 @@ Finally, we save the simulation results for further analysis
#+begin_src matlab
En_iff = En;
Eg_iff = Eg;
save('./active_damping/mat/tomo_exp.mat', 'En_iff', 'Eg_iff', '-append');
save('./mat/active_damping_tomo_exp.mat', 'En_iff', 'Eg_iff', '-append');
#+end_src
*** Compare with Undamped system
#+begin_src matlab :exports none
load('./active_damping/mat/tomo_exp.mat', 'En', 'En_iff');
load('./mat/active_damping_tomo_exp.mat', 'En', 'En_iff');
Fs = 1e3; % Sampling Frequency of the Data
t = (1/Fs)*[0:length(En(:,1))-1];
#+end_src
@@ -2198,8 +2198,8 @@ The actuator displacement can be measured with a capacitive sensor for instance.
*** Plant
Let's load the undamped plant:
#+begin_src matlab
load('./active_damping/mat/undamped_plants.mat', 'G_dvf');
load('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_dvf');
load('./mat/active_damping_undamped_plants.mat', 'G_dvf');
load('./mat/active_damping_plants_variable.mat', 'masses', 'Gm_dvf');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure [[fig:dvf_plant]]).
@@ -2299,7 +2299,7 @@ We create the diagonal controller and we add a minus sign as we have a positive
We save the controller for further analysis.
#+begin_src matlab
save('./active_damping/mat/K_dvf.mat', 'K_dvf');
save('./mat/active_damping_K_dvf.mat', 'K_dvf');
#+end_src
** Identification of the damped plant :noexport:
@@ -2311,7 +2311,7 @@ We initialize all the stages with the default parameters.
We set the DVF controller.
#+begin_src matlab
load('./active_damping/mat/K_dvf.mat', 'K_dvf');
load('./mat/active_damping_K_dvf.mat', 'K_dvf');
initializeController('type', 'dvf', 'K', K_dvf);
#+end_src
@@ -2332,7 +2332,7 @@ We identify the dynamics of the system using the =linearize= function.
We identify the dynamics for the following sample mass.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses');
load('./mat/active_damping_cart_plants.mat', 'masses');
#+end_src
#+begin_src matlab :exports none
@@ -2357,13 +2357,13 @@ We identify the dynamics for the following sample mass.
And we save them for further analysis.
#+begin_src matlab
save('./active_damping/mat/cart_plants.mat', 'G_cart_dvf', '-append');
save('./mat/active_damping_cart_plants.mat', 'G_cart_dvf', '-append');
#+end_src
*** Damped Plant
Now, look at the new damped plant to control.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses', 'G_cart', 'G_cart_dvf');
load('./mat/active_damping_cart_plants.mat', 'masses', 'G_cart', 'G_cart_dvf');
#+end_src
It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure [[fig:plant_dvf_damped]].
@@ -2502,7 +2502,7 @@ We initialize elements for the tomography experiment.
We set the DVF controller.
#+begin_src matlab
load('./active_damping/mat/K_dvf.mat', 'K_dvf');
load('./mat/active_damping_K_dvf.mat', 'K_dvf');
initializeController('type', 'dvf', 'K', K_dvf);
#+end_src
@@ -2521,12 +2521,12 @@ Finally, we save the simulation results for further analysis
#+begin_src matlab
En_dvf = En;
Eg_dvf = Eg;
save('./active_damping/mat/tomo_exp.mat', 'En_dvf', 'Eg_dvf', '-append');
save('./mat/active_damping_tomo_exp.mat', 'En_dvf', 'Eg_dvf', '-append');
#+end_src
*** Compare with Undamped system
#+begin_src matlab :exports none
load('./active_damping/mat/tomo_exp.mat', 'En', 'En_dvf');
load('./mat/active_damping_tomo_exp.mat', 'En', 'En_dvf');
Fs = 1e3; % Sampling Frequency of the Data
t = (1/Fs)*[0:length(En(:,1))-1];
#+end_src
@@ -2675,8 +2675,8 @@ In Inertial Control, a feedback is applied between the measured *absolute* motio
*** Plant
Let's load the undamped plant:
#+begin_src matlab
load('./active_damping/mat/undamped_plants.mat', 'G_ine');
load('./active_damping/mat/plants_variable.mat', 'masses', 'Gm_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_ine');
load('./mat/active_damping_plants_variable.mat', 'masses', 'Gm_ine');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure [[fig:ine_plant]]).
@@ -2774,7 +2774,7 @@ We create the diagonal controller and we add a minus sign as we have a positive
We save the controller for further analysis.
#+begin_src matlab
save('./active_damping/mat/K_ine.mat', 'K_ine');
save('./mat/active_damping_K_ine.mat', 'K_ine');
#+end_src
** Identification of the damped plant :noexport:
@@ -2786,7 +2786,7 @@ We initialize all the stages with the default parameters.
We set the Inertial controller.
#+begin_src matlab
load('./active_damping/mat/K_ine.mat', 'K_ine');
load('./mat/active_damping_K_ine.mat', 'K_ine');
initializeController('type', 'ine', 'K', K_ine);
#+end_src
@@ -2807,7 +2807,7 @@ We identify the dynamics of the system using the =linearize= function.
We identify the dynamics for the following sample mass.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses');
load('./mat/active_damping_cart_plants.mat', 'masses');
#+end_src
#+begin_src matlab :exports none
@@ -2832,13 +2832,13 @@ We identify the dynamics for the following sample mass.
And we save them for further analysis.
#+begin_src matlab
save('./active_damping/mat/cart_plants.mat', 'G_cart_dvf', '-append');
save('./mat/active_damping_cart_plants.mat', 'G_cart_dvf', '-append');
#+end_src
*** Damped Plant
Now, look at the new damped plant to control.
#+begin_src matlab
load('./active_damping/mat/cart_plants.mat', 'masses', 'G_cart', 'G_cart_ine');
load('./mat/active_damping_cart_plants.mat', 'masses', 'G_cart', 'G_cart_ine');
#+end_src
It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure [[fig:plant_ine_damped]].
@@ -2990,7 +2990,7 @@ Inertial Control should not be used.
** Load the plants
#+begin_src matlab
load('./active_damping/mat/plants.mat', 'G', 'G_iff', 'G_ine', 'G_dvf');
load('./mat/active_damping_plants.mat', 'G', 'G_iff', 'G_ine', 'G_dvf');
#+end_src
** TODO Sensitivity to Disturbance
@@ -3239,7 +3239,7 @@ Inertial Control should not be used.
** Tomography Experiment - Frequency Domain analysis
#+begin_src matlab
load('./active_damping/mat/tomo_exp.mat', 'En', 'En_iff', 'En_dvf');
load('./mat/active_damping_tomo_exp.mat', 'En', 'En_iff', 'En_dvf');
Fs = 1e3; % Sampling Frequency of the Data
t = (1/Fs)*[0:length(En(:,1))-1];
#+end_src

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -121,13 +121,13 @@ The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
All the controllers are set to 0.
#+begin_src matlab
K = tf(zeros(6));
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(zeros(6));
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(zeros(6));
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
** Identification
@@ -138,7 +138,7 @@ We identify the various transfer functions of the system
And we save it for further analysis.
#+begin_src matlab
save('./active_damping_uniaxial/mat/plants.mat', 'G', '-append');
save('./mat/active_damping_uniaxial_plants.mat', 'G', '-append');
#+end_src
** Sensitivity to disturbances
@@ -468,7 +468,7 @@ And the closed loop system is computed below.
** Control Design
Let's load the undamped plant:
#+begin_src matlab
load('./active_damping_uniaxial/mat/plants.mat', 'G');
load('./mat/active_damping_uniaxial_plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure [[fig:iff_plant]]).
@@ -573,13 +573,13 @@ Let's initialize the system prior to identification.
All the controllers are set to 0.
#+begin_src matlab
K = tf(zeros(6));
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = -K_iff*eye(6);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(zeros(6));
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(zeros(6));
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
We identify the system dynamics now that the IFF controller is ON.
@@ -589,7 +589,7 @@ We identify the system dynamics now that the IFF controller is ON.
And we save the damped plant for further analysis
#+begin_src matlab
save('./active_damping_uniaxial/mat/plants.mat', 'G_iff', '-append');
save('./mat/active_damping_uniaxial_plants.mat', 'G_iff', '-append');
#+end_src
** Sensitivity to disturbances
@@ -1007,7 +1007,7 @@ And the closed loop system is computed below.
** Control Design
Let's load the undamped plant:
#+begin_src matlab
load('./active_damping_uniaxial/mat/plants.mat', 'G');
load('./mat/active_damping_uniaxial_plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure [[fig:rmc_plant]]).
@@ -1113,13 +1113,13 @@ Let's initialize the system prior to identification.
And initialize the controllers.
#+begin_src matlab
K = tf(zeros(6));
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = -K_rmc*eye(6);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(zeros(6));
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
We identify the system dynamics now that the RMC controller is ON.
@@ -1129,7 +1129,7 @@ We identify the system dynamics now that the RMC controller is ON.
And we save the damped plant for further analysis.
#+begin_src matlab
save('./active_damping_uniaxial/mat/plants.mat', 'G_rmc', '-append');
save('./mat/active_damping_uniaxial_plants.mat', 'G_rmc', '-append');
#+end_src
** Sensitivity to disturbances
@@ -1520,7 +1520,7 @@ The obtained sensitivity to disturbances is shown in figure [[fig:dvf_1dof_sensi
** Control Design
Let's load the undamped plant:
#+begin_src matlab
load('./active_damping_uniaxial/mat/plants.mat', 'G');
load('./mat/active_damping_uniaxial_plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure [[fig:dvf_plant]]).
@@ -1624,13 +1624,13 @@ Let's initialize the system prior to identification.
And initialize the controllers.
#+begin_src matlab
K = tf(zeros(6));
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(zeros(6));
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = -K_dvf*eye(6);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
We identify the system dynamics now that the RMC controller is ON.
@@ -1640,7 +1640,7 @@ We identify the system dynamics now that the RMC controller is ON.
And we save the damped plant for further analysis.
#+begin_src matlab
save('./active_damping_uniaxial/mat/plants.mat', 'G_dvf', '-append');
save('./mat/active_damping_uniaxial_plants.mat', 'G_dvf', '-append');
#+end_src
** Sensitivity to disturbances
@@ -1812,7 +1812,7 @@ Direct Velocity Feedback:
** Load the plants
#+begin_src matlab
load('./active_damping_uniaxial/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
load('./mat/active_damping_uniaxial_plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
#+end_src
** Sensitivity to Disturbance

1459
org/control_requirements.org Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -356,10 +356,10 @@ The PSD of the relative velocity between the hexapod and the marble in $[(m/s)^2
Also, the Ground Motion is measured.
#+begin_src matlab
gm = load('./disturbances/mat/psd_gm.mat', 'f', 'psd_gm', 'psd_gv');
rz = load('./disturbances/mat/pxsp_r.mat', 'f', 'pxsp_r');
tyz = load('./disturbances/mat/pxz_ty_r.mat', 'f', 'pxz_ty_r');
tyx = load('./disturbances/mat/pxe_ty_r.mat', 'f', 'pxe_ty_r');
gm = load('./mat/psd_gm.mat', 'f', 'psd_gm');
rz = load('./mat/pxsp_r.mat', 'f', 'pxsp_r');
tyz = load('./mat/pxz_ty_r.mat', 'f', 'pxz_ty_r');
tyx = load('./mat/pxe_ty_r.mat', 'f', 'pxe_ty_r');
#+end_src
#+begin_src matlab :exports none
@@ -553,7 +553,7 @@ We should verify that this is coherent with the measurements.
:PROPERTIES:
:CUSTOM_ID: Save
:END:
The PSD of the disturbance force are now saved for further analysis (the mat file is accessible [[file:mat/dist_psd.mat][here]]).
The PSD of the disturbance force are now saved for further analysis.
#+begin_src matlab
dist_f = struct();
@@ -564,5 +564,85 @@ The PSD of the disturbance force are now saved for further analysis (the mat fil
dist_f.psd_ty = tyz.psd_f; % Power Spectral Density of the force induced by the Ty stage in the Z direction [N^2/Hz]
dist_f.psd_rz = rz.psd_f; % Power Spectral Density of the force induced by the Rz stage in the Z direction [N^2/Hz]
save('./disturbances/mat/dist_psd.mat', 'dist_f');
save('./mat/dist_psd.mat', 'dist_f');
#+end_src
* Error motion of the Sample without Control
#+begin_src matlab
initializeGround();
initializeGranite('Foffset', false);
initializeTy('Foffset', false);
initializeRy('Foffset', false);
initializeRz('Foffset', false);
initializeMicroHexapod('Foffset', false);
initializeAxisc('type', 'rigid');
initializeMirror('type', 'rigid');
#+end_src
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
#+begin_src matlab
initializeNanoHexapod('type', 'rigid');
initializeSample('type', 'rigid', 'mass', 50);
#+end_src
We set the references and disturbances to zero.
#+begin_src matlab
initializeReferences();
initializeDisturbances();
#+end_src
We set the controller type to Open-Loop.
#+begin_src matlab
initializeController('type', 'open-loop');
#+end_src
And we put some gravity.
#+begin_src matlab
initializeSimscapeConfiguration('gravity', false);
#+end_src
We do not need to log any signal.
#+begin_src matlab
initializeLoggingConfiguration('log', 'all');
#+end_src
#+begin_src matlab
initializePosError('error', false);
#+end_src
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '1');
#+end_src
We simulate the model.
#+begin_src matlab
sim('nass_model');
#+end_src
#+begin_src matlab
figure;
subplot(1, 2, 1);
hold on;
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 1), 'DisplayName', 'X');
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 2), 'DisplayName', 'Y');
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 3), 'DisplayName', 'Z');
hold off;
xlabel('Time [s]');
ylabel('Position error [m]');
legend();
subplot(1, 2, 2);
hold on;
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 4));
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 5));
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 6));
hold off;
xlabel('Time [s]');
ylabel('Orientation error [rad]');
#+end_src
#+begin_src matlab
Eg = simout.Em.Eg;
save('./mat/motion_error_ol.mat', 'Eg');
#+end_src

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -127,12 +127,12 @@ We simulate the model.
And we save the obtained data.
#+begin_src matlab
tomo_align_no_dist = struct('t', t, 'MTr', MTr);
save('experiment_tomography/mat/experiment.mat', 'tomo_align_no_dist', '-append');
save('./mat/experiment_tomography.mat', 'tomo_align_no_dist', '-append');
#+end_src
** Analysis
#+begin_src matlab
load('experiment_tomography/mat/experiment.mat', 'tomo_align_no_dist');
load('./mat/experiment_tomography.mat', 'tomo_align_no_dist');
t = tomo_align_no_dist.t;
MTr = tomo_align_no_dist.MTr;
#+end_src
@@ -206,7 +206,6 @@ And we save the obtained data.
[[file:figs/exp_tomo_without_dist_rot.png]]
** Conclusion
#+begin_important
When everything is aligned, the resulting error motion is very small (nm range) and is quite negligible with respect to the error when disturbances are included.
This residual error motion probably comes from a small misalignment somewhere.
@@ -237,12 +236,12 @@ We simulate the model.
And we save the obtained data.
#+begin_src matlab
tomo_align_dist = struct('t', t, 'MTr', MTr);
save('experiment_tomography/mat/experiment.mat', 'tomo_align_dist', '-append');
save('./mat/experiment_tomography.mat', 'tomo_align_dist', '-append');
#+end_src
** Analysis
#+begin_src matlab
load('experiment_tomography/mat/experiment.mat', 'tomo_align_dist');
load('./mat/experiment_tomography.mat', 'tomo_align_dist');
t = tomo_align_dist.t;
MTr = tomo_align_dist.MTr;
#+end_src
@@ -361,12 +360,12 @@ We simulate the model.
And we save the obtained data.
#+begin_src matlab
tomo_not_align = struct('t', t, 'MTr', MTr);
save('experiment_tomography/mat/experiment.mat', 'tomo_not_align', '-append');
save('./mat/experiment_tomography.mat', 'tomo_not_align', '-append');
#+end_src
** Analysis
#+begin_src matlab
load('experiment_tomography/mat/experiment.mat', 'tomo_not_align');
load('./mat/experiment_tomography.mat', 'tomo_not_align');
t = tomo_not_align.t;
MTr = tomo_not_align.MTr;
#+end_src
@@ -489,12 +488,12 @@ We simulate the model.
And we save the obtained data.
#+begin_src matlab
ty_scan = struct('t', t, 'MTr', MTr);
save('experiment_tomography/mat/experiment.mat', 'ty_scan', '-append');
save('./mat/experiment_tomography.mat', 'ty_scan', '-append');
#+end_src
** Analysis
#+begin_src matlab
load('experiment_tomography/mat/experiment.mat', 'ty_scan');
load('./mat/experiment_tomography.mat', 'ty_scan');
t = ty_scan.t;
MTr = ty_scan.MTr;
#+end_src

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -30,18 +30,471 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
#+PROPERTY: header-args:latex+ :results raw replace :buffer no
#+PROPERTY: header-args:latex+ :results file raw replace
#+PROPERTY: header-args:latex+ :buffer no
#+PROPERTY: header-args:latex+ :eval no-export
#+PROPERTY: header-args:latex+ :exports both
#+PROPERTY: header-args:latex+ :exports results
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
:END:
* Undamped System
* Introduction :ignore:
The position $\bm{\mathcal{X}}$ of the Sample with respect to the granite is measured.
It is then compare to the wanted position of the Sample $\bm{r}_\mathcal{X}$ in order to obtain the position error $\bm{\epsilon}_\mathcal{X}$ of the Sample with respect to a frame attached to the Stewart top platform.
#+begin_src latex :file hac_lac_control_schematic.pdf
\begin{tikzpicture}
\node[block={3.0cm}{3.0cm}] (G) {$G$};
% Input and outputs coordinates
\coordinate[] (outputX) at ($(G.south east)!0.25!(G.north east)$);
\coordinate[] (outputL) at ($(G.south east)!0.75!(G.north east)$);
\draw[->] (outputX) -- ++(1.8, 0) node[above left]{$\bm{\mathcal{X}}$};
\draw[->] (outputL) -- ++(1.8, 0) node[above left]{$\bm{\mathcal{L}}$};
% Blocs
\node[addb, left= of G] (addF) {};
\node[block, left=1.2 of addF] (Kx) {$\bm{K}_\mathcal{X}$};
\node[block={2cm}{2cm}, align=center, left=1.2 of Kx] (subx) {Computes\\Position\\Error};
\node[block, above= of addF] (Kl) {$\bm{K}_\mathcal{L}$};
\node[addb={+}{}{}{-}{}, above= of Kl] (subl) {};
\node[block, align=center, left=0.8 of subl] (invK) {Inverse\\Kinematics};
% Connections and labels
\draw[<-] (subx.west)node[above left]{$\bm{r}_{\mathcal{X}}$} -- ++(-0.8, 0);
\draw[->] ($(subx.east) + (0.2, 0)$)node[branch]{} |- (invK.west);
\draw[->] (invK.east) -- (subl.west) node[above left]{$\bm{r}_\mathcal{L}$};
\draw[->] (subl.south) -- (Kl.north) node[above right]{$\bm{\epsilon}_\mathcal{L}$};
\draw[->] (Kl.south) -- (addF.north);
\draw[->] (subx.east) -- (Kx.west) node[above left]{$\bm{\epsilon}_\mathcal{X}$};
\draw[->] (Kx.east) node[above right]{$\bm{\tau}_\mathcal{X}$} -- (addF.west);
\draw[->] (addF.east) -- (G.west) node[above left]{$\bm{\tau}$};
\draw[->] ($(outputL.east) + (0.4, 0)$)node[branch](L){} |- (subl.east);
\draw[->] ($(outputX.east) + (1.2, 0)$)node[branch]{} -- ++(0, -1.6) -| (subx.south);
\begin{scope}[on background layer]
\node[fit={(G.south-|Kl.west) (L|-subl.north)}, fill=black!20!white, draw, dashed, inner sep=8pt] (Ktot) {};
\end{scope}
\end{tikzpicture}
#+end_src
#+RESULTS:
[[file:figs/hac_lac_control_schematic.png]]
* Initialization
We initialize all the stages with the default parameters.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
#+end_src
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
#+begin_src matlab
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 1);
#+end_src
We set the references that corresponds to a tomography experiment.
#+begin_src matlab
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
#+end_src
#+begin_src matlab
initializeDisturbances();
#+end_src
Open Loop.
#+begin_src matlab
initializeController('type', 'open-loop');
#+end_src
And we put some gravity.
#+begin_src matlab
initializeSimscapeConfiguration('gravity', true);
#+end_src
We log the signals.
#+begin_src matlab
initializeLoggingConfiguration('log', 'all');
#+end_src
* Low Authority Control - Direct Velocity Feedback $\bm{K}_\mathcal{L}$
** Introduction :ignore:
The first loop closed corresponds to a direct velocity feedback loop.
The design of the associated decentralized controller is explained in [[file:active_damping.org][this]] file.
** Identification
#+begin_src matlab
%% Name of the Simulink File
mdl = 'nass_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs
io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1; % Relative Motion Outputs
%% Run the linearization
G_dvf = linearize(mdl, io, 0);
G_dvf.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G_dvf.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'};
#+end_src
** Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:6
plot(freqs, abs(squeeze(freqresp(G_dvf(i,i), 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:6
plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf(i,i), freqs, 'Hz'))));
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]);
linkaxes([ax1,ax2],'x');
#+end_src
** Root Locus
#+begin_src matlab :exports none
gains = logspace(0, 5, 500);
figure;
hold on;
plot(real(pole(G_dvf)), imag(pole(G_dvf)), 'x');
set(gca,'ColorOrderIndex',1);
plot(real(tzero(G_dvf)), imag(tzero(G_dvf)), 'o');
for i = 1:length(gains)
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G_dvf, (gains(i)*s)*eye(6)));
plot(real(cl_poles), imag(cl_poles), '.');
end
% ylim([0, 1.1*max(imag(pole(G_dvf)))]);
% xlim([-1.1*max(imag(pole(G_dvf))),0]);
xlabel('Real Part')
ylabel('Imaginary Part')
axis square
#+end_src
** Controller and Loop Gain
#+begin_src matlab
K_dvf = s*15000/(1 + s/2/pi/10000);
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:6
plot(freqs, abs(squeeze(freqresp(K_dvf*G_dvf(i,i), 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:6
plot(freqs, 180/pi*angle(squeeze(freqresp(K_dvf*G_dvf(i,i), freqs, 'Hz'))));
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]);
linkaxes([ax1,ax2],'x');
#+end_src
#+begin_src matlab
K_dvf = -K_dvf*eye(6);
#+end_src
* High Authority Control - $\bm{K}_\mathcal{X}$
** Identification of the damped plant
#+begin_src matlab
Kx = tf(zeros(6));
#+end_src
#+begin_src matlab
initializeController('type', 'hac-dvf');
#+end_src
#+begin_src matlab
%% Name of the Simulink File
mdl = 'nass_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'input'); io_i = io_i + 1; % Actuator Inputs
io(io_i) = linio([mdl, '/Tracking Error'], 1, 'output', [], 'En'); io_i = io_i + 1; % Position Errror
%% Run the linearization
G = linearize(mdl, io, 0);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
#+end_src
The minus sine is put here because there is already a minus sign included due to the computation of the position error.
#+begin_src matlab
load('mat/stages.mat', 'nano_hexapod');
Gx = -G*inv(nano_hexapod.J');
Gx.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
labels = {'$D_x/\mathcal{F}_x$', '$D_y/\mathcal{F}_y$', '$D_z/\mathcal{F}_z$', '$R_x/\mathcal{M}_x$', '$R_y/\mathcal{M}_y$', '$R_z/\mathcal{M}_z$'};
figure;
ax1 = subplot(2, 2, 1);
hold on;
for i = 1:6
plot(freqs, abs(squeeze(freqresp(Gx(i, i), freqs, 'Hz'))));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
title('Diagonal elements of the Plant');
ax2 = subplot(2, 2, 3);
hold on;
for i = 1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(i, i), freqs, 'Hz'))), 'DisplayName', labels{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();
ax3 = subplot(2, 2, 2);
hold on;
for i = 1:5
for j = i+1:6
plot(freqs, abs(squeeze(freqresp(Gx(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
end
end
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(Gx(1, 1), freqs, 'Hz'))));
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
title('Off-Diagonal elements of the Plant');
ax4 = subplot(2, 2, 4);
hold on;
for i = 1:5
for j = i+1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
end
end
set(gca,'ColorOrderIndex',1);
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(1, 1), freqs, 'Hz'))));
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]);
linkaxes([ax1,ax2,ax3,ax4],'x');
#+end_src
** Controller Design
The controller consists of:
- A pure integrator
- A Second integrator up to half the wanted bandwidth
- A Lead around the cross-over frequency
- A low pass filter with a cut-off equal to two times the wanted bandwidth
#+begin_src matlab
wc = 2*pi*15; % Bandwidth Bandwidth [rad/s]
h = 1.5; % Lead parameter
Kx = (1/h) * (1 + s/wc*h)/(1 + s/wc/h) * wc/s * ((s/wc*2 + 1)/(s/wc*2)) * (1/(1 + s/wc/2));
% Normalization of the gain of have a loop gain of 1 at frequency wc
Kx = Kx.*diag(1./diag(abs(freqresp(Gx*Kx, wc))));
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
labels = {'$D_x/\mathcal{F}_x$', '$D_y/\mathcal{F}_y$', '$D_z/\mathcal{F}_z$', '$R_x/\mathcal{M}_x$', '$R_y/\mathcal{M}_y$', '$R_z/\mathcal{M}_z$'};
figure;
ax1 = subplot(2, 2, 1);
hold on;
for i = 1:6
plot(freqs, abs(squeeze(freqresp(Gx(i, i)*Kx(i,i), freqs, 'Hz'))));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
title('Diagonal elements of the Plant');
ax2 = subplot(2, 2, 3);
hold on;
for i = 1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(i, i)*Kx(i,i), freqs, 'Hz'))), 'DisplayName', labels{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();
ax3 = subplot(2, 2, 2);
hold on;
for i = 1:5
for j = i+1:6
plot(freqs, abs(squeeze(freqresp(Gx(i, j)*Kx(i,j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
end
end
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(Gx(1, 1), freqs, 'Hz'))));
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
title('Off-Diagonal elements of the Plant');
ax4 = subplot(2, 2, 4);
hold on;
for i = 1:5
for j = i+1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
end
end
set(gca,'ColorOrderIndex',1);
plot(freqs, 180/pi*angle(squeeze(freqresp(Gx(1, 1), freqs, 'Hz'))));
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]);
linkaxes([ax1,ax2,ax3,ax4],'x');
#+end_src
#+begin_src matlab
isstable(feedback(Gx*Kx, eye(6), -1))
#+end_src
#+begin_src matlab
Kx = inv(nano_hexapod.J')*Kx;
#+end_src
#+begin_src matlab
isstable(feedback(G*Kx, eye(6), 1))
#+end_src
* Simulation
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '1.5');
#+end_src
And we simulate the system.
#+begin_src matlab
sim('nass_model');
#+end_src
#+begin_src matlab
save('./mat/tomo_exp_hac_lac.mat', 'simout');
#+end_src
* Results
#+begin_src matlab
load('./mat/tomo_exp_hac_lac.mat', 'simout');
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot(simout.Em.En.Data(:,1), simout.Em.En.Data(:,2), 'DisplayName', '$\epsilon_{x,y}$ - OL')
xlabel('X Motion [m]'); ylabel('Y Motion [m]');
legend();
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot3(simout.Em.En.Data(:,1), simout.Em.En.Data(:,2), simout.Em.En.Data(:,3))
xlabel('X Motion [m]'); ylabel('Y Motion [m]');
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot3(simout.Em.En.Data(:,4), simout.Em.En.Data(:,5), simout.Em.En.Data(:,3))
xlabel('X Motion [m]'); ylabel('Y Motion [m]');
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot(simout.Em.En.Time, simout.Em.En.Data(:,1), 'DisplayName', '$\epsilon_{x}$')
plot(simout.Em.En.Time, simout.Em.En.Data(:,2), 'DisplayName', '$\epsilon_{y}$')
plot(simout.Em.En.Time, simout.Em.En.Data(:,3), 'DisplayName', '$\epsilon_{z}$')
hold off;
legend();
xlabel('Time [s]'); ylabel('Position Error [m]');
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot(simout.Em.En.Time, simout.Em.En.Data(:,4), 'DisplayName', '$\epsilon_{R_x}$')
plot(simout.Em.En.Time, simout.Em.En.Data(:,5), 'DisplayName', '$\epsilon_{R_y}$')
plot(simout.Em.En.Time, simout.Em.En.Data(:,6), 'DisplayName', '$\epsilon_{R_z}$')
hold off;
legend();
xlabel('Time [s]'); ylabel('Orientation Error [rad]');
#+end_src
* Undamped System :noexport:
<<sec:undamped_system>>
** Introduction :ignore:
@@ -85,7 +538,7 @@ The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
No disturbances.
#+begin_src matlab
initializeDisturbances('enable', false);
initializeDisturbances();
#+end_src
We set the references to zero.
@@ -329,13 +782,13 @@ And we simulate the system.
Finally, we save the simulation results for further analysis
#+begin_src matlab
save('./active_damping/mat/tomo_exp.mat', 'En', 'Eg', '-append');
save('./mat/active_damping_tomo_exp.mat', 'En', 'Eg', '-append');
#+end_src
*** Results
We load the results of tomography experiments.
#+begin_src matlab
load('./active_damping/mat/tomo_exp.mat', 'En');
load('./mat/active_damping_tomo_exp.mat', 'En');
t = linspace(0, 3, length(En(:,1)));
#+end_src
@@ -447,11 +900,6 @@ First, we identify the dynamics of the system using the =linearize= function.
G_legs.OutputName = {'e1', 'e2', 'e3', 'e4', 'e5', 'e6'};
#+end_src
# And we save them for further analysis.
# #+begin_src matlab
# save('./hac_lac/mat/undamped_plant.mat', 'G');
# #+end_src
*** Display TF
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -50,195 +50,6 @@ We can then compare the measured Frequency Response Functions with the identifie
Finally, this should help to tune the parameters of the model such that the dynamics is closer to the measured FRF.
* Identification of the Micro-Station :noexport:
** 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)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
#+begin_src matlab :tangle no
simulinkproject('../');
#+end_src
** Simscape Model
The simulink file for the identification is =sim_micro_station_id.slx=.
#+begin_src matlab
open('identification/matlab/sim_micro_station_id.slx')
#+end_src
We load the configuration and we set a small =StopTime=.
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '0.5');
#+end_src
We initialize all the stages.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 50);
#+end_src
** Compute the transfer functions
We first define some parameters for the identification.
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_micro_station_id';
#+end_src
#+begin_src matlab
%% Micro-Hexapod
% Input/Output definition
io(1) = linio([mdl, '/Micro-Station/Fm_ext'],1,'openinput');
io(2) = linio([mdl, '/Micro-Station/Fg_ext'],1,'openinput');
io(3) = linio([mdl, '/Micro-Station/Dm_inertial'],1,'output');
io(4) = linio([mdl, '/Micro-Station/Ty_inertial'],1,'output');
io(5) = linio([mdl, '/Micro-Station/Ry_inertial'],1,'output');
io(6) = linio([mdl, '/Micro-Station/Dg_inertial'],1,'output');
#+end_src
#+begin_src matlab
% Run the linearization
G_ms = linearize(mdl, io, 0);
% Input/Output names
G_ms.InputName = {'Fmx', 'Fmy', 'Fmz',...
'Fgx', 'Fgy', 'Fgz'};
G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', ...
'Tyx', 'Tyy', 'Tyz', ...
'Ryx', 'Ryy', 'Ryz', ...
'Dgx', 'Dgy', 'Dgz'};
#+end_src
#+begin_src matlab
%% Save the obtained transfer functions
save('./mat/id_micro_station.mat', 'G_ms');
#+end_src
** Plots the transfer functions
** Compare with the measurements
* Modal Analysis of the Micro-Station :noexport:
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
#+begin_src matlab :tangle no
simulinkproject('../');
#+end_src
** Simscape Model
The simulink file for the analysis is =sim_micro_station_modal_analysis.slx=.
#+begin_src matlab
open('identification/matlab/sim_micro_station_modal_analysis.slx')
#+end_src
We load the configuration and we set a small =StopTime=.
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '0.5');
#+end_src
We initialize all the stages.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 50);
#+end_src
** Identification
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_micro_station_modal_analysis';
#+end_src
#+begin_src matlab
%% Micro-Hexapod
% Input/Output definition
io(1) = linio([mdl, '/Micro-Station/F_hammer'],1,'openinput');
io(2) = linio([mdl, '/Micro-Station/acc9'],1,'output');
io(3) = linio([mdl, '/Micro-Station/acc10'],1,'output');
io(4) = linio([mdl, '/Micro-Station/acc11'],1,'output');
io(5) = linio([mdl, '/Micro-Station/acc12'],1,'output');
#+end_src
#+begin_src matlab
% Run the linearization
G_ms = linearize(mdl, io, 0);
% Input/Output names
G_ms.InputName = {'Fx', 'Fy', 'Fz'};
G_ms.OutputName = {'x9', 'y9', 'z9', ...
'x10', 'y10', 'z10', ...
'x11', 'y11', 'z11', ...
'x12', 'y12', 'z12'};
#+end_src
** Plot Results
#+begin_src matlab
figure;
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms('x9', 'Fx'), freqs, 'Hz'))));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]');
hold off;
#+end_src
** Compare with measurements
#+begin_src matlab
load('../meas/modal-analysis/mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
#+end_src
#+begin_src matlab
dirs = {'x', 'y', 'z'};
n_acc = 9;
n_dir = 1; % x, y, z
n_exc = 1; % x, y, z
figure;
hold on;
plot(freqs, abs(squeeze(FRFs(3*(n_acc-1) + n_dir, n_exc, :)))./((2*pi*freqs).^2)');
plot(freqs, abs(squeeze(freqresp(G_ms([dirs{n_dir}, num2str(n_acc)], ['F', dirs{n_dir}]), freqs, 'Hz'))));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]');
hold off;
#+end_src
* Some notes about the Simscape Model
The Simscape Model of the micro-station consists of several solid bodies:
- Bottom Granite
@@ -255,9 +66,6 @@ Then, the solid bodies are connected with springs and dampers.
Some of the springs and dampers values can be estimated from the joints/stages specifications, however, we here prefer to tune these values based on the measurements.
* Compare with measurements at the CoM of each element
** Introduction :ignore:
[[file:../../meas/modal-analysis/index.org][here]]
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
@@ -393,7 +201,7 @@ We now same this for further use:
rz_com = rz_com.Data(end, :)';
hexa_com = hexa_com.Data(end, :)';
save('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com');
save('./mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com');
#+end_src
Then, we use the obtained results to add a =rigidTransform= block in order to create a new frame at the center of mass of each solid body.
@@ -433,7 +241,6 @@ We use the =linearize= function in order to estimate the dynamics from forces ap
G_ms = linearize(mdl, io, 0);
%% Input/Output definition
clear io; io_i = 1;
G_ms.InputName = {'Fx', 'Fy', 'Fz'};
G_ms.OutputName = {'gtop_x', 'gtop_y', 'gtop_z', 'gtop_rx', 'gtop_ry', 'gtop_rz', ...
'ty_x', 'ty_y', 'ty_z', 'ty_rx', 'ty_ry', 'ty_rz', ...

View File

@@ -27,7 +27,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -0,0 +1,81 @@
#+TITLE: Motion and Force Requirements for the Nano-Hexapod
* Soft Hexapod
As the nano-hexapod is in series with the other stages, it must apply all the force required to move the sample.
If the nano-hexapod is soft (voice coil), its actuator must apply all the force such that the sample has the wanted motion.
In some sense, it does not use the fact that the other stage are participating to the displacement of the sample.
Let's take two examples:
- Sinus Ty translation at 1Hz with an amplitude of 5mm
- Long stroke hexapod has an offset of 10mm in X and the spindle is rotating
Thus the wanted motion is a circle with a radius of 10mm
If the sample if light (30Kg) => 60rpm
If the sample if heavy (100Kg) => 1rpm
From the motion, we compute the required acceleration by derive the displacement two times.
Then from the Newton's second law: $m \vec{a} = \sum \vec{F}$ we can compute the required force.
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Example
The wanted motion is:
\begin{align*}
x &= d \cos(\omega t) \\
y &= d \sin(\omega t)
\end{align*}
The corresponding acceleration is thus:
\begin{align*}
\ddot{x} &= - d \omega^2 \cos(\omega t) \\
\ddot{y} &= - d \omega^2 \sin(\omega t)
\end{align*}
From the Newton's second law:
\begin{align*}
m \ddot{x} &= F_x \\
m \ddot{y} &= F_y
\end{align*}
Thus the applied forces should be:
\begin{align*}
F_x &= - m d \omega^2 \cos(\omega t) \\
F_y &= - m d \omega^2 \sin(\omega t)
\end{align*}
And the norm of the force is:
\[ |F| = \sqrt{F_x^2 + F_y^2} = m d \omega^2 \ [N] \]
For a Light sample:
#+begin_src matlab :results value replace
m = 30;
d = 10e-3;
w = 2*pi;
F = m*d*w^2;
ans = F
#+end_src
#+RESULTS:
: 11.844
For the Heavy sample:
#+begin_src matlab :results value replace
m = 80;
d = 10e-3;
w = 2*pi/60;
F = m*d*w^2
ans = F
#+end_src
#+RESULTS:
: 0.008773

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -213,7 +213,8 @@ The model of the Ground is composed of:
:END:
#+begin_src matlab
arguments
args.type char {mustBeMember(args.type,{'none', 'rigid'})} = 'rigid'
args.type char {mustBeMember(args.type,{'none', 'rigid'})} = 'rigid'
args.rot_point (3,1) double {mustBeNumeric} = zeros(3,1) % Rotation point for the ground motion [m]
end
#+end_src
@@ -249,6 +250,15 @@ We set the shape and density of the ground solid element.
ground.density = 2800; % [kg/m3]
#+end_src
** Rotation Point
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
ground.rot_point = args.rot_point;
#+end_src
** Save the Structure
:PROPERTIES:
:UNNUMBERED: t
@@ -1448,8 +1458,8 @@ The =sample= structure is saved.
:END:
#+begin_src matlab
arguments
args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf'})} = 'open-loop'
args.K (6,6) = ss(zeros(6, 6))
args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf', 'hac-dvf'})} = 'open-loop'
args.K (6,6) = ss(zeros(6, 6))
end
#+end_src
@@ -1474,6 +1484,8 @@ First, we initialize the =controller= structure.
controller.type = 2;
case 'iff'
controller.type = 3;
case 'hac-dvf'
controller.type = 4;
end
#+end_src
@@ -1778,7 +1790,7 @@ The =controller= structure is saved.
:END:
#+begin_src matlab
%% Save
save('mat/nass_references.mat', 'Dy', 'Ry', 'Rz', 'Dh', 'Dhl', 'Rm', 'Dn', 'Dnl', 'Ts');
save('./mat/nass_references.mat', 'Dy', 'Ry', 'Rz', 'Dh', 'Dhl', 'Rm', 'Dn', 'Dnl', 'Ts');
end
#+end_src
@@ -1834,7 +1846,7 @@ The =controller= structure is saved.
:UNNUMBERED: t
:END:
#+begin_src matlab
load('./disturbances/mat/dist_psd.mat', 'dist_f');
load('./mat/dist_psd.mat', 'dist_f');
#+end_src
We remove the first frequency point that usually is very large.
@@ -2001,7 +2013,7 @@ We define some parameters that will be used in the algorithm.
:UNNUMBERED: t
:END:
#+begin_src matlab
save('mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't');
save('./mat/nass_disturbances.mat', 'Dwx', 'Dwy', 'Dwz', 'Fty_x', 'Fty_z', 'Frz_z', 'Fd', 'Ts', 't');
#+end_src
* Initialize Position Errors
@@ -2076,7 +2088,7 @@ First, we initialize the =pos_error= structure.
:UNNUMBERED: t
:END:
#+begin_src matlab
save('mat/pos_error.mat', 'pos_error');
save('./mat/pos_error.mat', 'pos_error');
#+end_src
* Z-Axis Geophone

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100

View File

@@ -30,7 +30,7 @@
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@@ -666,13 +666,13 @@ The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
All the controllers are set to 0 (Open Loop).
#+begin_src matlab :exports none
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
** Identification
@@ -720,7 +720,7 @@ Finally, we use the =linearize= Matlab function to extract a state space model f
Finally, we save the identified system dynamics for further analysis.
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G');
save('./mat/uniaxial_plants.mat', 'G');
#+end_src
** Sensitivity to Disturbances
@@ -793,7 +793,7 @@ We show several plots representing the sensitivity to disturbances:
** Noise Budget
We first load the measured PSD of the disturbance.
#+begin_src matlab
load('./disturbances/mat/dist_psd.mat', 'dist_f');
load('./mat/disturbances_dist_psd.mat', 'dist_f');
#+end_src
The effect of these disturbances on the distance $D$ is computed below.
@@ -1080,7 +1080,7 @@ It corresponds to the plant to control.
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
load('./mat/uniaxial_plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor.
@@ -1166,13 +1166,13 @@ Let's initialize the system prior to identification.
All the controllers are set to 0.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = -K_iff;
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
@@ -1215,7 +1215,7 @@ All the controllers are set to 0.
#+end_src
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_iff', '-append');
save('./mat/uniaxial_plants.mat', 'G_iff', '-append');
#+end_src
** Sensitivity to Disturbance
@@ -1506,7 +1506,7 @@ In the Relative Motion Control (RMC), a derivative feedback is applied between t
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
load('./mat/uniaxial_plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor.
@@ -1593,13 +1593,13 @@ Let's initialize the system prior to identification.
And initialize the controllers.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = -K_rmc;
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
@@ -1642,7 +1642,7 @@ And initialize the controllers.
#+end_src
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_rmc', '-append');
save('./mat/uniaxial_plants.mat', 'G_rmc', '-append');
#+end_src
@@ -1941,7 +1941,7 @@ In the Relative Motion Control (RMC), a feedback is applied between the measured
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
load('./mat/uniaxial_plants.mat', 'G');
#+end_src
#+begin_src matlab :exports none
@@ -2024,13 +2024,13 @@ Let's initialize the system prior to identification.
And initialize the controllers.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = -K_dvf;
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
@@ -2073,7 +2073,7 @@ And initialize the controllers.
#+end_src
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_dvf', '-append');
save('./mat/uniaxial_plants.mat', 'G_dvf', '-append');
#+end_src
** Sensitivity to Disturbance
@@ -2258,13 +2258,13 @@ Let's initialize the system prior to identification.
And initialize the controllers.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
We identify the dynamics of the system.
@@ -2394,13 +2394,13 @@ Let's initialize the system prior to identification.
All the controllers are set to 0.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = -K_cedrat;
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
@@ -2443,7 +2443,7 @@ All the controllers are set to 0.
#+end_src
#+begin_src matlab
% save('./uniaxial/mat/plants.mat', 'G_cedrat', '-append');
% save('./mat/uniaxial_plants.mat', 'G_cedrat', '-append');
#+end_src
** Sensitivity to Disturbance
@@ -2578,7 +2578,7 @@ All the controllers are set to 0.
** Load the plants
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
load('./mat/uniaxial_plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
#+end_src
** Sensitivity to Disturbance
@@ -2689,7 +2689,7 @@ All the controllers are set to 0.
** Noise Budget
We first load the measured PSD of the disturbance.
#+begin_src matlab
load('./disturbances/mat/dist_psd.mat', 'dist_f');
load('./mat/disturbances_dist_psd.mat', 'dist_f');
#+end_src
The effect of these disturbances on the distance $D$ is computed for all active damping techniques.
@@ -2854,13 +2854,13 @@ The nano-hexapod is an hexapod with voice coils and the sample has a mass of 50k
All the controllers are set to 0 (Open Loop).
#+begin_src matlab :exports none
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
** Identification
@@ -2908,13 +2908,13 @@ Finally, we use the =linearize= Matlab function to extract a state space model f
Finally, we save the identified system dynamics for further analysis.
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_vc', '-append');
save('./mat/uniaxial_plants.mat', 'G_vc', '-append');
#+end_src
** Sensitivity to Disturbances
We load the dynamics when using a piezo-electric nano hexapod to compare the results.
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
load('./mat/uniaxial_plants.mat', 'G');
#+end_src
We show several plots representing the sensitivity to disturbances:
@@ -2990,7 +2990,7 @@ We show several plots representing the sensitivity to disturbances:
** Noise Budget
We first load the measured PSD of the disturbance.
#+begin_src matlab
load('./disturbances/mat/dist_psd.mat', 'dist_f');
load('./mat/disturbances_dist_psd.mat', 'dist_f');
#+end_src
The effect of these disturbances on the distance $D$ is computed below.
@@ -3125,13 +3125,13 @@ Let's initialize the system prior to identification.
All the controllers are set to 0.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
save('./mat/controllers_uniaxial.mat', 'K', '-append');
K_iff = -K_iff;
save('./mat/controllers.mat', 'K_iff', '-append');
save('./mat/controllers_uniaxial.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
save('./mat/controllers_uniaxial.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
save('./mat/controllers_uniaxial.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab