Continue flexible joint study

This commit is contained in:
2020-05-05 10:34:45 +02:00
parent 4e531a6673
commit 9bc27e1f60
22 changed files with 5724 additions and 112 deletions

View File

@@ -75,17 +75,19 @@ Let's compare the ideal case (zero stiffness in rotation and infinite stiffness
#+begin_src matlab
Kf_M = 15*ones(6,1);
Kt_M = 20*ones(6,1);
Kf_F = 15*ones(6,1);
Kt_M = 20*ones(6,1);
Kt_F = 20*ones(6,1);
#+end_src
The stiffness and damping of the nano-hexapod's legs are:
#+begin_src matlab
k = 1e5; % [N/m]
c = 2e2; % [N/(m/s)]
k_opt = 1e5; % [N/m]
c_opt = 2e2; % [N/(m/s)]
#+end_src
This corresponds to the optimal identified stiffness.
*** Direct Velocity Feedback
We identify the dynamics from actuators force $\tau_i$ to relative motion sensors $d\mathcal{L}_i$ with and without considering the flexible joint stiffness.
@@ -103,7 +105,7 @@ It is shown that the adding of stiffness for the flexible joints does increase a
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_p', ...
'type_M', 'spherical_p');
@@ -113,7 +115,7 @@ It is shown that the adding of stiffness for the flexible joints does increase a
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical', ...
'Kf_M', Kf_M, ...
@@ -156,7 +158,7 @@ It is shown that the adding of stiffness for the flexible joints does increase a
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joint_rot_dvf.pdf', 'width', 'full', 'height', 'full')
exportFig('figs/flex_joint_rot_dvf.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joint_rot_dvf
@@ -187,23 +189,20 @@ The plant dynamics is not found to be changing significantly.
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_p', ...
'type_M', 'spherical_p');
G_p = linearize(mdl, io);
G_p.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G_p.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx_p = -G_p*inv(nano_hexapod.kinematics.J');
Gx_p.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gl_p = -nano_hexapod.kinematics.J*G_p;
Gl_p = -nano_hexapod.kinematics.J*G;
Gl_p.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical', ...
'Kf_M', Kf_M, ...
@@ -215,9 +214,6 @@ The plant dynamics is not found to be changing significantly.
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx = -G*inv(nano_hexapod.kinematics.J');
Gx.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gl = -nano_hexapod.kinematics.J*G;
Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
#+end_src
@@ -283,7 +279,7 @@ This will help to determine the requirements on the joint's stiffness.
Let's consider the following rotational stiffness of the flexible joints:
#+begin_src matlab
Ks = [1, 10, 100]; % [Nm/rad]
Ks = [1, 5, 10, 50, 100]; % [Nm/rad]
#+end_src
We also consider here a nano-hexapod with the identified optimal actuator stiffness.
@@ -307,28 +303,24 @@ It is shown that the rotational stiffness of the flexible joints does indeed cha
%% 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; % Force Sensors
io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1; % Relative Displacement Sensors
Gdvf_s = {zeros(length(Ks), 1)};
G_dvf_s = {zeros(length(Ks), 1)};
for i = 1:length(Ks)
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical', ...
'Kf_M', Ks(i), ...
'Kt_M', Ks(i), ...
'Kf_F', Ks(i), ...
'Kt_F', Ks(i), ...
'Cf_M', 0.2*sqrt(Ks(i)*1), ...
'Ct_M', 0.2*sqrt(Ks(i)*1), ...
'Cf_F', 0.2*sqrt(Ks(i)*1), ...
'Ct_F', 0.2*sqrt(Ks(i)*1));
'Kt_F', Ks(i));
Gdvf = linearize(mdl, io);
G_dvf.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G_dvf.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'};
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'};
Gdvf_s(i) = {Gdvf};
G_dvf_s(i) = {G};
end
#+end_src
@@ -340,7 +332,7 @@ It is shown that the rotational stiffness of the flexible joints does indeed cha
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:length(Ks)
plot(freqs, abs(squeeze(freqresp(Gdvf_s{i}(1, 1), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_dvf_s{i}(1, 1), freqs, 'Hz'))));
end
plot(freqs, abs(squeeze(freqresp(G_dvf_p(1, 1), freqs, 'Hz'))), 'k--');
hold off;
@@ -350,7 +342,7 @@ It is shown that the rotational stiffness of the flexible joints does indeed cha
ax2 = subplot(2, 1, 2);
hold on;
for i = 1:length(Ks)
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gdvf_s{i}(1, 1), freqs, 'Hz')))), ...
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_dvf_s{i}(1, 1), freqs, 'Hz')))), ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_dvf_p(1, 1), freqs, 'Hz')))), 'k--', ...
@@ -366,7 +358,7 @@ It is shown that the rotational stiffness of the flexible joints does indeed cha
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_rot_study_dvf.pdf', 'width', 'full', 'height', 'full')
exportFig('figs/flex_joints_rot_study_dvf.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joints_rot_study_dvf
@@ -382,14 +374,14 @@ exportFig('figs/flex_joints_rot_study_dvf.pdf', 'width', 'full', 'height', 'full
hold on;
for i = 1:length(Ks)
set(gca,'ColorOrderIndex',i);
plot(real(pole(Gdvf_s{i})), imag(pole(Gdvf_s{i})), 'x', ...
plot(real(pole(G_dvf_s{i})), imag(pole(G_dvf_s{i})), 'x', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
set(gca,'ColorOrderIndex',i);
plot(real(tzero(Gdvf_s{i})), imag(tzero(Gdvf_s{i})), 'o', ...
plot(real(tzero(G_dvf_s{i})), imag(tzero(G_dvf_s{i})), 'o', ...
'HandleVisibility', 'off');
for k = 1:length(gains)
set(gca,'ColorOrderIndex',i);
cl_poles = pole(feedback(Gdvf_s{i}, (gains(k)*s)*eye(6)));
cl_poles = pole(feedback(G_dvf_s{i}, (gains(k)*s)*eye(6)));
plot(real(cl_poles), imag(cl_poles), '.', ...
'HandleVisibility', 'off');
end
@@ -403,7 +395,7 @@ exportFig('figs/flex_joints_rot_study_dvf.pdf', 'width', 'full', 'height', 'full
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'height', 'tall')
exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:flex_joints_rot_study_dvf_root_locus
@@ -412,7 +404,11 @@ exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'hei
[[file:figs/flex_joints_rot_study_dvf_root_locus.png]]
*** Primary Control
#+begin_src matlab
The dynamics from $\bm{\tau}^\prime$ to $\bm{\epsilon}_{\mathcal{X}_n}$ (for the primary controller designed in the frame of the legs) is shown in Figure [[fig:flex_joints_rot_study_primary_plant]].
It is shown that the rotational stiffness of the flexible joints have very little impact on the dynamics.
#+begin_src matlab :exports none
Kdvf = 5e3*s/(1+s/2/pi/1e3)*eye(6);
#+end_src
@@ -427,33 +423,24 @@ exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'hei
load('mat/stages.mat', 'nano_hexapod');
Gx_3dof_s = {zeros(length(Ks), 1)};
Gl_3dof_s = {zeros(length(Ks), 1)};
Gl_s = {zeros(length(Ks), 1)};
for i = 1:length(Ks)
initializeNanoHexapod('k', k, 'c', c, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical', ...
'Kf_M', Ks(i), ...
'Kt_M', 20, ...
'Kt_M', Ks(i), ...
'Kf_F', Ks(i), ...
'Kt_F', 20, ...
'Cf_M', 0, ...
'Ct_M', 0, ...
'Cf_F', 0, ...
'Ct_F', 0);
'Kt_F', Ks(i));
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx_3dof = -G*inv(nano_hexapod.kinematics.J');
Gx_3dof.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gx_3dof_s(i) = {Gx_3dof};
Gl_3dof = -nano_hexapod.kinematics.J*G;
Gl_3dof.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
Gl_3dof_s(i) = {Gl_3dof};
Gl = -nano_hexapod.kinematics.J*G;
Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
Gl_s(i) = {Gl};
end
#+end_src
@@ -465,7 +452,7 @@ exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'hei
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:length(Ks)
plot(freqs, abs(squeeze(freqresp(Gl_3dof_s{i}(1, 1), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(Gl_s{i}(1, 1), freqs, 'Hz'))));
end
plot(freqs, abs(squeeze(freqresp(Gl_p(1, 1), freqs, 'Hz'))), 'k--');
hold off;
@@ -475,7 +462,7 @@ exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'hei
ax2 = subplot(2, 1, 2);
hold on;
for i = 1:length(Ks)
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gl_3dof_s{i}(1, 1), freqs, 'Hz')))), ...
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gl_s{i}(1, 1), freqs, 'Hz')))), ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gl_p(1, 1), freqs, 'Hz')))), 'k--', ...
@@ -501,14 +488,14 @@ exportFig('figs/flex_joints_rot_study_dvf_root_locus.pdf', 'width', 'wide', 'hei
*** Conclusion
#+begin_important
The rotational stiffness of the flexible joint does not significantly change the dynamics.
#+end_important
* Translation Stiffness
<<sec:trans_stiffness>>
** Introduction :ignore:
Let's know consider a flexibility in translation of the flexible joint.
Let's know consider a flexibility in translation of the flexible joint, in the axis of the legs.
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
@@ -528,7 +515,19 @@ Let's know consider a flexibility in translation of the flexible joint.
open('nass_model.slx')
#+end_src
** Initialization
** Realistic Translation Stiffness Values
*** Introduction :ignore:
We choose realistic values of the axial stiffness of the joints:
\[ K_a = 60\,[N/\mu m] \]
#+begin_src matlab
Kz_F = 60e6*ones(6,1); % [N/m]
Kz_M = 60e6*ones(6,1); % [N/m]
Cz_F = 1*ones(6,1); % [N/(m/s)]
Cz_M = 1*ones(6,1); % [N/(m/s)]
#+end_src
*** Initialization
Let's initialize all the stages with default parameters.
#+begin_src matlab
initializeGround();
@@ -560,13 +559,10 @@ Let's consider the heaviest mass which should we the most problematic with it co
Kdvf = tf(zeros(6));
#+end_src
** Direct Velocity Feedback
#+begin_src matlab
Kz_F = 60e6*ones(6,1); % [N/m]
Kz_M = 60e6*ones(6,1); % [N/m]
Cz_F = 1e2*ones(6,1); % [N/m]
Cz_M = 1e2*ones(6,1); % [N/m]
#+end_src
*** Direct Velocity Feedback
The dynamics from actuators force $\tau_i$ to relative motion sensors $d\mathcal{L}_i$ with and without considering the flexible joint stiffness are identified.
The obtained dynamics are shown in Figure [[fig:flex_joint_trans_dvf]].
#+begin_src matlab :exports none
%% Name of the Simulink File
@@ -579,7 +575,7 @@ Let's consider the heaviest mass which should we the most problematic with it co
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_3dof', ...
'type_M', 'spherical_3dof', ...
'Kz_F', Kz_F, ...
@@ -593,7 +589,7 @@ Let's consider the heaviest mass which should we the most problematic with it co
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical');
@@ -632,19 +628,23 @@ Let's consider the heaviest mass which should we the most problematic with it co
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joint_trans_dvf
#+caption:
#+caption: Dynamics from actuators force $\tau_i$ to relative motion sensors $d\mathcal{L}_i$ with (blue) and without (red) considering the flexible joint axis stiffness
#+RESULTS:
[[file:figs/flex_joint_trans_dvf.png]]
** Primary Plant
*** Primary Plant
#+begin_src matlab
Kdvf = 5e3*s/(1+s/2/pi/1e3)*eye(6);
#+end_src
Let's now identify the dynamics from $\bm{\tau}^\prime$ to $\bm{\epsilon}_{\mathcal{X}_n}$ (for the primary controller designed in the frame of the legs).
The dynamics is compare with and without the joint flexibility in Figure [[fig:flex_joints_trans_primary_plant_L]].
#+begin_src matlab :exports none
%% Name of the Simulink File
mdl = 'nass_model';
@@ -658,7 +658,7 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_3dof', ...
'type_M', 'spherical_3dof', ...
'Kz_F', Kz_F, ...
@@ -666,19 +666,16 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
'Cz_F', Cz_F, ...
'Cz_M', Cz_M);
G_3dof = linearize(mdl, io);
G_3dof.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G_3dof.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx_3dof = -G_3dof*inv(nano_hexapod.kinematics.J');
Gx_3dof.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gl_3dof = -nano_hexapod.kinematics.J*G_3dof;
Gl_3dof = -nano_hexapod.kinematics.J*G;
Gl_3dof.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
#+end_src
#+begin_src matlab :exports none
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal', ...
'type_M', 'spherical');
@@ -686,9 +683,6 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx = -G*inv(nano_hexapod.kinematics.J');
Gx.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gl = -nano_hexapod.kinematics.J*G;
Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
#+end_src
@@ -733,21 +727,40 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_trans_primary_plant_L.pdf', 'width', 'full', 'height', 'full')
exportFig('figs/flex_joints_trans_primary_plant_L.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joints_trans_primary_plant_L
#+caption:
#+caption: Dynamics from $\bm{\tau}^\prime_i$ to $\bm{\epsilon}_{\mathcal{X}_n,i}$ with infinite axis stiffnes (solid) and with realistic axial stiffness (dashed)
#+RESULTS:
[[file:figs/flex_joints_trans_primary_plant_L.png]]
** Parametric study
*** Introduction :ignore:
We wish now to see what is the impact of the *axial* stiffness of the flexible joints on the dynamics.
Let's consider the following values for the axial stiffness:
#+begin_src matlab
Kzs = [1e4, 1e5, 1e6, 1e7, 1e8, 1e9]; % [N/m]
#+end_src
We also consider here a nano-hexapod with the identified optimal actuator stiffness ($k = 10^5\,[N/m]$).
#+begin_src matlab :exports none
K = tf(zeros(6));
Kdvf = tf(zeros(6));
#+end_src
*** Direct Velocity Feedback
The dynamics from the actuators to the relative displacement sensor in each leg is identified and shown in Figure [[fig:flex_joints_trans_study_dvf]].
It is shown that the axial stiffness of the flexible joints does have a huge impact on the dynamics.
If the axial stiffness of the flexible joints is $K_a > 10^7\,[N/m]$ (here $100$ times higher than the actuator stiffness), then the change of dynamics stays reasonably small.
This is more clear by looking at the root locus (Figures [[fig:flex_joints_trans_study_dvf_root_locus]] and [[fig:flex_joints_trans_study_root_locus_unzoom]]).
It can be seen that very little active damping can be achieve for rotational joint axial stiffnesses below $10^7\,[N/m]$.
#+begin_src matlab :exports none
%% Name of the Simulink File
mdl = 'nass_model';
@@ -756,25 +769,23 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
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; % Force Sensors
#+end_src
#+begin_src matlab :exports none
Gdvf_3dof_s = {zeros(length(Kzs), 1)};
G_dvf_3dof_s = {zeros(length(Kzs), 1)};
for i = 1:length(Kzs)
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_3dof', ...
'type_M', 'spherical_3dof', ...
'Kz_F', Kzs(i), ...
'Kz_M', Kzs(i), ...
'Cz_F', 0.2*sqrt(Kzs(i)*10), ...
'Cz_M', 0.2*sqrt(Kzs(i)*10));
'Cz_F', 0.05*sqrt(Kzs(i)*10), ...
'Cz_M', 0.05*sqrt(Kzs(i)*10));
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6'};
Gdvf_3dof_s(i) = {G};
G_dvf_3dof_s(i) = {G};
end
#+end_src
@@ -786,9 +797,9 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:length(Kzs)
plot(freqs, abs(squeeze(freqresp(Gdvf_3dof_s{i}(1, 1), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_dvf_3dof_s{i}(1, 1), freqs, 'Hz'))));
end
plot(freqs, abs(squeeze(freqresp(Gdvf(1, 1), freqs, 'Hz'))), 'k--');
plot(freqs, abs(squeeze(freqresp(G_dvf(1, 1), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
@@ -796,23 +807,85 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
ax2 = subplot(2, 1, 2);
hold on;
for i = 1:length(Kzs)
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gdvf_3dof_s{i}(1, 1), freqs, 'Hz')))), ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Kzs(i)));
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gdvf(1, 1), freqs, 'Hz')))), 'k--', ...
'DisplayName', 'Perfect Joint');
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_dvf_3dof_s{i}(1, 1), freqs, 'Hz')))), ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Kzs(i)));
end
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_dvf(1, 1), freqs, 'Hz')))), 'k--', ...
'DisplayName', 'Perfect Joint');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-270, 90]);
yticks([-360:90:360]);
legend('location', 'northeast');
legend('location', 'southwest');
linkaxes([ax1,ax2],'x');
#+end_src
*** Primary Control
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_trans_study_dvf.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joints_trans_study_dvf
#+caption: Dynamics from $\tau_i$ to $d\mathcal{L}_i$ for all the considered axis Stiffnesses
#+RESULTS:
[[file:figs/flex_joints_trans_study_dvf.png]]
#+begin_src matlab :exports none
figure;
gains = logspace(2, 5, 300);
hold on;
for i = 1:length(Kzs)
set(gca,'ColorOrderIndex',i);
plot(real(pole(G_dvf_3dof_s{i})), imag(pole(G_dvf_3dof_s{i})), 'x', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Kzs(i)));
set(gca,'ColorOrderIndex',i);
plot(real(tzero(G_dvf_3dof_s{i})), imag(tzero(G_dvf_3dof_s{i})), 'o', ...
'HandleVisibility', 'off');
for k = 1:length(gains)
set(gca,'ColorOrderIndex',i);
cl_poles = pole(feedback(G_dvf_3dof_s{i}, (gains(k)*s)*eye(6)));
plot(real(cl_poles), imag(cl_poles), '.', ...
'HandleVisibility', 'off');
end
end
hold off;
axis square;
xlim([-140, 10]); ylim([0, 150]);
xlabel('Real Part'); ylabel('Imaginary Part');
legend('location', 'northwest');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_trans_study_dvf_root_locus.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:flex_joints_trans_study_dvf_root_locus
#+caption: Root Locus for all the considered axial Stiffnesses
#+RESULTS:
[[file:figs/flex_joints_trans_study_dvf_root_locus.png]]
#+begin_src matlab
xlim([-1e3, 0]);
ylim([0, 1e3]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_trans_study_root_locus_unzoom.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:flex_joints_trans_study_root_locus_unzoom
#+caption: Root Locus (unzoom) for all the considered axial Stiffnesses
#+RESULTS:
[[file:figs/flex_joints_trans_study_root_locus_unzoom.png]]
*** Primary Control
The dynamics from $\bm{\tau}^\prime$ to $\bm{\epsilon}_{\mathcal{X}_n}$ (for the primary controller designed in the frame of the legs) is shown in Figure [[fig:flex_joints_trans_study_primary_plant]].
#+begin_src matlab :exports none
Kdvf = 5e3*s/(1+s/2/pi/1e3)*eye(6);
#+end_src
@@ -826,29 +899,22 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
io(io_i) = linio([mdl, '/Tracking Error'], 1, 'output', [], 'En'); io_i = io_i + 1; % Position Errror
load('mat/stages.mat', 'nano_hexapod');
#+end_src
#+begin_src matlab :exports none
Gx_3dof_s = {zeros(length(Kzs), 1)};
Gl_3dof_s = {zeros(length(Kzs), 1)};
for i = 1:length(Kzs)
initializeNanoHexapod('k', 1e5, 'c', 2e2, ...
initializeNanoHexapod('k', k_opt, 'c', c_opt, ...
'type_F', 'universal_3dof', ...
'type_M', 'spherical_3dof', ...
'Kz_F', Kzs(i), ...
'Kz_M', Kzs(i), ...
'Cz_F', 0.2*sqrt(Kzs(i)*10), ...
'Cz_M', 0.2*sqrt(Kzs(i)*10));
'Cz_F', 0.05*sqrt(Kzs(i)*10), ...
'Cz_M', 0.05*sqrt(Kzs(i)*10));
G = linearize(mdl, io);
G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
G.OutputName = {'Ex', 'Ey', 'Ez', 'Erx', 'Ery', 'Erz'};
Gx_3dof = -G*inv(nano_hexapod.kinematics.J');
Gx_3dof.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
Gx_3dof_s(i) = {Gx_3dof};
Gl_3dof = -nano_hexapod.kinematics.J*G;
Gl_3dof.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
Gl_3dof_s(i) = {Gl_3dof};
@@ -885,7 +951,22 @@ exportFig('figs/flex_joint_trans_dvf.pdf', 'width', 'full', 'height', 'full')
linkaxes([ax1,ax2],'x');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/flex_joints_trans_study_primary_plant.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:flex_joints_trans_study_primary_plant
#+caption: Diagonal elements of the transfer function matrix from $\bm{\tau}^\prime$ to $\bm{\epsilon}_{\mathcal{X}_n}$ for the considered axial stiffnesses
#+RESULTS:
[[file:figs/flex_joints_trans_study_primary_plant.png]]
** Conclusion
#+begin_important
The axial stiffness of the flexible joints should be maximized.
For the considered actuator stiffness $k = 10^5\,[N/m]$, the axial stiffness of the rotational joints should ideally be above $10^7\,[N/m]$.
This is a reasonable stiffness value for such joints.
We may interpolate the results and say that the axial joint stiffness should be 100 times higher than the actuator stiffness, but this should be confirmed with further analysis.
#+end_important