New simulations with Ty scans and Dh offset

This commit is contained in:
Thomas Dehaeze 2020-04-30 11:53:39 +02:00
parent 00452e0a49
commit b4805268a4
19 changed files with 315 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

View File

@ -2,7 +2,6 @@
#+SETUPFILE: ./setup/org-setup-file.org #+SETUPFILE: ./setup/org-setup-file.org
* Introduction :ignore: * Introduction :ignore:
* Low Authority Control - Decentralized Direct Velocity Feedback * Low Authority Control - Decentralized Direct Velocity Feedback
<<sec:lac_dvf>> <<sec:lac_dvf>>
** Introduction :ignore: ** Introduction :ignore:
@ -1037,7 +1036,7 @@ exportFig('figs/opt_stiff_primary_control_L_cas_tot.pdf', 'width', 'full', 'heig
#+RESULTS: #+RESULTS:
[[file:figs/opt_stiff_primary_control_L_cas_tot.png]] [[file:figs/opt_stiff_primary_control_L_cas_tot.png]]
** Simulations ** Simulations of Tomography Experiment
Let's now simulate a tomography experiment. Let's now simulate a tomography experiment.
To do so, we include all disturbances except vibrations of the translation stage. To do so, we include all disturbances except vibrations of the translation stage.
#+begin_src matlab #+begin_src matlab
@ -1365,11 +1364,325 @@ exportFig('figs/opt_stiff_hac_dvf_L_pos_error.pdf', 'width', 'full', 'height', '
#+RESULTS: #+RESULTS:
[[file:figs/opt_stiff_hac_dvf_L_pos_error.png]] [[file:figs/opt_stiff_hac_dvf_L_pos_error.png]]
** Actuator Stroke and Forces
#+begin_src matlab :exports none
load('./mat/tomo_exp_hac_dvf.mat', 'hac_dvf_L', 'Ms');
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:length(Ms)
set(gca,'ColorOrderIndex',i);
plot(hac_dvf_L{i}.u.Time, hac_dvf_L{i}.u.Data(:,1), ...
'DisplayName', sprintf('$m = %.0f kg$', Ms(i)));
for j = 2:6
set(gca,'ColorOrderIndex',i);
plot(hac_dvf_L{i}.u.Time, hac_dvf_L{i}.u.Data(:,j), ...
'HandleVisibility', 'off');
end
end
xlim([0.5, inf]);
xlabel('Time [s]'); ylabel('Actuator Force [N]');
legend('location', 'northeast');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_L_act_force.pdf', 'width', 'full', 'height', 'tall')
#+end_src
#+name: fig:opt_stiff_hac_dvf_L_act_force
#+caption: Force applied by the actuator during the simulation
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_L_act_force.png]]
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:length(Ms)
set(gca,'ColorOrderIndex',i);
plot(hac_dvf_L{i}.yn.Dnlm.Time, hac_dvf_L{i}.yn.Dnlm.Data(:,1), ...
'DisplayName', sprintf('$m = %.0f kg$', Ms(i)));
for j = 2:6
set(gca,'ColorOrderIndex',i);
plot(hac_dvf_L{i}.yn.Dnlm.Time, hac_dvf_L{i}.yn.Dnlm.Data(:,j), ...
'HandleVisibility', 'off');
end
end
xlim([0.5, inf]);
xlabel('Time [s]'); ylabel('Actuator Stroke [m]');
legend('location', 'northeast');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_L_act_stroke.pdf', 'width', 'full', 'height', 'tall')
#+end_src
#+name: fig:opt_stiff_hac_dvf_L_act_stroke
#+caption: Leg's stroke during the simulation
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_L_act_stroke.png]]
** Conclusion ** Conclusion
#+begin_important #+begin_important
#+end_important #+end_important
* Further More complex simulations
** Simulation with Micro-Hexapod Offset
*** Simulation
The micro-hexapod is inducing a 10mm offset of the sample center of mass with the rotation axis.
A tomography experiment is then simulated.
#+begin_src matlab
initializeDisturbances();
initializeSimscapeConfiguration('gravity', false);
initializeLoggingConfiguration('log', 'all');
initializeSample('mass', 1, 'freq', 200);
initializeMicroHexapod('AP', [10e-3 0 0]);
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1, ...
'Dh_pos', [10e-3; 0; 0; 0; 0; 0]);
#+end_src
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '3');
sim('nass_model');
#+end_src
#+begin_src matlab :exports none
hac_dvf_L_Dh = simout;
save('./mat/tomo_exp_hac_dvf.mat', 'hac_dvf_L_Dh', '-append');
#+end_src
*** Results
#+begin_src matlab :exports none
load('./mat/tomo_exp_hac_dvf.mat', 'hac_dvf_L_Dh');
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 3, 1);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 1), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dx [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 2), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dy [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 3), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dz [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 4), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Rx [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 5), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Ry [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(hac_dvf_L_Dh.Em.En.Time, hac_dvf_L_Dh.Em.En.Data(:, 6), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Rz [rad]');
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([1, inf]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dh_offset_disp_error.pdf', 'width', 'full', 'height', 'full')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dh_offset_disp_error
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dh_offset_disp_error.png]]
#+begin_src matlab :exports none
figure;
hold on;
for j = 1:6
plot(hac_dvf_L_Dh.u.Time, hac_dvf_L_Dh.u.Data(:,j), 'k-');
end
xlim([1, inf]);
xlabel('Time [s]'); ylabel('Actuator Force [N]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dh_offset_F.pdf', 'width', 'normal', 'height', 'normal')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dh_offset_F
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dh_offset_F.png]]
#+begin_src matlab :exports none
figure;
hold on;
for j = 1:6
plot(hac_dvf_L_Dh.yn.Dnlm.Time, hac_dvf_L_Dh.yn.Dnlm.Data(:,j), 'k-');
end
xlim([1, inf]);
xlabel('Time [s]'); ylabel('Actuator Stroke [m]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dh_offset_dL.pdf', 'width', 'normal', 'height', 'normal')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dh_offset_dL
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dh_offset_dL.png]]
** Simultaneous Translation scans and Spindle's rotation
*** Simulation
A simulation is now performed with translation scans and spindle rotation at the same time.
The sample has a mass one 1kg, the spindle rotation speed is 60rpm and the translation scans have a period of 4s and a triangular shape.
#+begin_src matlab
initializeDisturbances();
initializeSimscapeConfiguration('gravity', false);
initializeLoggingConfiguration('log', 'all');
initializeSample('mass', 1, 'freq', 200);
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1, ...
'Dy_type', 'triangular', 'Dy_amplitude', 5e-3, 'Dy_period', 4);
#+end_src
#+begin_src matlab :exports none
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '9');
sim('nass_model');
#+end_src
#+begin_src matlab :exports none
hac_dvf_L_Dy = simout;
save('./mat/tomo_exp_hac_dvf.mat', 'hac_dvf_L_Dy', '-append');
#+end_src
*** Results
#+begin_src matlab :exports none
load('./mat/tomo_exp_hac_dvf.mat', 'hac_dvf_L_Dy');
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 3, 1);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 1), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dx [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 2), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dy [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 3), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Dz [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 4), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Rx [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 5), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Ry [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(hac_dvf_L_Dy.Em.En.Time, hac_dvf_L_Dy.Em.En.Data(:, 6), 'k-');
hold off;
xlabel('Time [s]');
ylabel('Rz [rad]');
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([1, inf]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dy_scans_disp_error.pdf', 'width', 'full', 'height', 'full')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dy_scans_disp_error
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dy_scans_disp_error.png]]
#+begin_src matlab :exports none
figure;
hold on;
for j = 1:6
plot(hac_dvf_L_Dy.u.Time, hac_dvf_L_Dy.u.Data(:,j), 'k-');
end
xlim([1, inf]);
xlabel('Time [s]'); ylabel('Actuator Force [N]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dy_scans_F.pdf', 'width', 'normal', 'height', 'normal')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dy_scans_F
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dy_scans_F.png]]
#+begin_src matlab :exports none
figure;
hold on;
for j = 1:6
plot(hac_dvf_L_Dy.yn.Dnlm.Time, hac_dvf_L_Dy.yn.Dnlm.Data(:,j), 'k-');
end
xlim([1, inf]);
xlabel('Time [s]'); ylabel('Actuator Stroke [m]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/opt_stiff_hac_dvf_Dy_scans_dL.pdf', 'width', 'normal', 'height', 'normal')
#+end_src
#+name: fig:opt_stiff_hac_dvf_Dy_scans_dL
#+caption:
#+RESULTS:
[[file:figs/opt_stiff_hac_dvf_Dy_scans_dL.png]]
* Primary Control in the task space * Primary Control in the task space
<<sec:primary_control_X>> <<sec:primary_control_X>>
** Introduction :ignore: ** Introduction :ignore: