Implemented amplified actuators
This commit is contained in:
@@ -449,3 +449,423 @@ Identification
|
||||
#+begin_src matlab
|
||||
open('nass_model.slx')
|
||||
#+end_src
|
||||
|
||||
|
||||
** Initialization
|
||||
#+begin_src matlab
|
||||
initializeGround();
|
||||
initializeGranite();
|
||||
initializeTy();
|
||||
initializeRy();
|
||||
initializeRz();
|
||||
initializeMicroHexapod();
|
||||
initializeAxisc();
|
||||
initializeMirror();
|
||||
|
||||
initializeSimscapeConfiguration();
|
||||
initializeDisturbances('enable', false);
|
||||
initializeLoggingConfiguration('log', 'none');
|
||||
|
||||
initializeController('type', 'hac-iff');
|
||||
#+end_src
|
||||
|
||||
We set the stiffness of the payload fixation:
|
||||
#+begin_src matlab
|
||||
Kp = 1e8; % [N/m]
|
||||
#+end_src
|
||||
|
||||
** Identification
|
||||
#+begin_src matlab
|
||||
K = tf(zeros(6));
|
||||
Kiff = tf(zeros(6));
|
||||
#+end_src
|
||||
|
||||
We identify the system for the following payload masses:
|
||||
#+begin_src matlab
|
||||
Ms = [1, 10, 50];
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
Gm_iff = {zeros(length(Ms), 1)};
|
||||
#+end_src
|
||||
|
||||
The nano-hexapod has the following leg's stiffness and damping.
|
||||
#+begin_src matlab
|
||||
initializeNanoHexapod('actuator', 'amplified');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
%% 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', [], 'Fnlm'); io_i = io_i + 1; % Force Sensors
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
for i = 1:length(Ms)
|
||||
initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1));
|
||||
initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i));
|
||||
|
||||
%% Run the linearization
|
||||
G_iff = linearize(mdl, io);
|
||||
G_iff.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
|
||||
G_iff.OutputName = {'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', 'Fnlm5', 'Fnlm6'};
|
||||
Gm_iff(i) = {G_iff};
|
||||
end
|
||||
#+end_src
|
||||
|
||||
** Controller Design
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(-1, 3, 1000);
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_iff{i}(1, 1), freqs, 'Hz'))));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_iff{i}(1, 1), freqs, 'Hz')))), ...
|
||||
'DisplayName', sprintf('$m_p = %.0f$ [kg]', Ms(i)));
|
||||
end
|
||||
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');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/amplified_piezo_iff_loop_gain.pdf', 'width', 'full', 'height', 'full');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:amplified_piezo_iff_loop_gain
|
||||
#+caption: Dynamics for the Integral Force Feedback for three payload masses
|
||||
#+RESULTS:
|
||||
[[file:figs/amplified_piezo_iff_loop_gain.png]]
|
||||
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
gains = logspace(2, 5, 300);
|
||||
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(real(pole(Gm_iff{i})), imag(pole(Gm_iff{i})), 'x', ...
|
||||
'DisplayName', sprintf('$m_p = %.0f$ [kg]', Ms(i)));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(real(tzero(Gm_iff{i})), imag(tzero(Gm_iff{i})), 'o', ...
|
||||
'HandleVisibility', 'off');
|
||||
for k = 1:length(gains)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
cl_poles = pole(feedback(Gm_iff{i}, -(gains(k)/s)*eye(6)));
|
||||
plot(real(cl_poles), imag(cl_poles), '.', ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
end
|
||||
hold off;
|
||||
axis square;
|
||||
xlim([-400, 10]); ylim([0, 500]);
|
||||
|
||||
xlabel('Real Part'); ylabel('Imaginary Part');
|
||||
legend('location', 'northwest');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/amplified_piezo_iff_root_locus.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:amplified_piezo_iff_root_locus
|
||||
#+caption: Root Locus for the IFF control for three payload masses
|
||||
#+RESULTS:
|
||||
[[file:figs/amplified_piezo_iff_root_locus.png]]
|
||||
|
||||
Damping as function of the gain
|
||||
#+begin_src matlab :exports none
|
||||
c1 = [ 0 0.4470 0.7410]; % Blue
|
||||
c2 = [0.8500 0.3250 0.0980]; % Orange
|
||||
c3 = [0.9290 0.6940 0.1250]; % Yellow
|
||||
c4 = [0.4940 0.1840 0.5560]; % Purple
|
||||
c5 = [0.4660 0.6740 0.1880]; % Green
|
||||
c6 = [0.3010 0.7450 0.9330]; % Light Blue
|
||||
c7 = [0.6350 0.0780 0.1840]; % Red
|
||||
colors = [c1; c2; c3; c4; c5; c6; c7];
|
||||
|
||||
figure;
|
||||
|
||||
gains = logspace(2, 5, 100);
|
||||
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
for k = 1:length(gains)
|
||||
cl_poles = pole(feedback(Gm_iff{i}, -(gains(k)/s)*eye(6)));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(gains(k), sin(-pi/2 + angle(cl_poles)), '.', 'color', colors(i, :));
|
||||
end
|
||||
end
|
||||
hold off;
|
||||
xlabel('IFF Gain'); ylabel('Modal Damping');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||
ylim([0, 1]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/amplified_piezo_iff_damping_gain.pdf', 'width', 'full', 'height', 'full');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:amplified_piezo_iff_damping_gain
|
||||
#+caption: Damping ratio of the poles as a function of the IFF gain
|
||||
#+RESULTS:
|
||||
[[file:figs/amplified_piezo_iff_damping_gain.png]]
|
||||
|
||||
Finally, we use the following controller for the Decentralized Direct Velocity Feedback:
|
||||
#+begin_src matlab
|
||||
Kiff = -1e4/s*eye(6);
|
||||
#+end_src
|
||||
|
||||
** Effect of the Low Authority Control on the Primary Plant
|
||||
*** Introduction :ignore:
|
||||
#+begin_src matlab :exports none
|
||||
%% 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
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
load('mat/stages.mat', 'nano_hexapod');
|
||||
#+end_src
|
||||
|
||||
*** Identification of the undamped plant :ignore:
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf_backup = Kdvf;
|
||||
Kdvf = tf(zeros(6));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
G_x = {zeros(length(Ms), 1)};
|
||||
G_l = {zeros(length(Ms), 1)};
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
for i = 1:length(Ms)
|
||||
initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1));
|
||||
initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i));
|
||||
|
||||
%% Run the linearization
|
||||
G = linearize(mdl, io);
|
||||
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'};
|
||||
G_x(i) = {Gx};
|
||||
|
||||
Gl = -nano_hexapod.kinematics.J*G;
|
||||
Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
|
||||
G_l(i) = {Gl};
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
Kdvf = Kdvf_backup;
|
||||
#+end_src
|
||||
|
||||
*** Identification of the damped plant :ignore:
|
||||
#+begin_src matlab :exports none
|
||||
Gm_x = {zeros(length(Ms), 1)};
|
||||
Gm_l = {zeros(length(Ms), 1)};
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
for i = 1:length(Ms)
|
||||
initializeSample('mass', Ms(i), 'freq', sqrt(Kp/Ms(i))/2/pi*ones(6,1));
|
||||
initializeReferences('Rz_type', 'rotating-not-filtered', 'Rz_period', Ms(i));
|
||||
|
||||
%% Run the linearization
|
||||
G = linearize(mdl, io);
|
||||
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'};
|
||||
Gm_x(i) = {Gx};
|
||||
|
||||
Gl = -nano_hexapod.kinematics.J*G;
|
||||
Gl.OutputName = {'E1', 'E2', 'E3', 'E4', 'E5', 'E6'};
|
||||
Gm_l(i) = {Gl};
|
||||
end
|
||||
#+end_src
|
||||
|
||||
*** Effect of the Damping on the plant diagonal dynamics :ignore:
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(0, 3, 5000);
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 2, 1);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(G_x{i}(1, 1), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(G_x{i}(2, 2), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_x{i}(1, 1), freqs, 'Hz'))), '--');
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_x{i}(2, 2), freqs, 'Hz'))), '--');
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
|
||||
title('$\mathcal{X}_x/\mathcal{F}_x$, $\mathcal{X}_y/\mathcal{F}_y$')
|
||||
|
||||
ax2 = subplot(2, 2, 2);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(G_x{i}(3, 3), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_x{i}(3, 3), freqs, 'Hz'))), '--');
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
|
||||
title('$\mathcal{X}_z/\mathcal{F}_z$')
|
||||
|
||||
ax3 = subplot(2, 2, 3);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(1, 1), freqs, 'Hz')))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(2, 2), freqs, 'Hz')))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(1, 1), freqs, 'Hz')))), '--');
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(2, 2), freqs, 'Hz')))), '--');
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
|
||||
ylim([-270, 90]);
|
||||
yticks([-360:90:360]);
|
||||
|
||||
ax4 = subplot(2, 2, 4);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_x{i}(3, 3), freqs, 'Hz')))), ...
|
||||
'DisplayName', sprintf('$m_p = %.0f [kg]$', Ms(i)));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_x{i}(3, 3), freqs, 'Hz')))), '--', ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
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', 'southwest');
|
||||
|
||||
linkaxes([ax1,ax2,ax3,ax4],'x');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(0, 3, 5000);
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(G_l{i}(1, 1), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_l{i}(1, 1), freqs, 'Hz'))), '--');
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
for i = 1:length(Ms)
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G_l{i}(1, 1), freqs, 'Hz')))), ...
|
||||
'DisplayName', sprintf('$m_p = %.0f [kg]$', Ms(i)));
|
||||
set(gca,'ColorOrderIndex',i);
|
||||
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gm_l{i}(1, 1), freqs, 'Hz')))), '--', ...
|
||||
'HandleVisibility', 'off');
|
||||
end
|
||||
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', 'southwest');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
#+end_src
|
||||
|
||||
*** Effect of the Damping on the coupling dynamics :ignore:
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(0, 3, 1000);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:5
|
||||
for j = i+1:6
|
||||
plot(freqs, abs(squeeze(freqresp(G_x{1}(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_x{1}(i, j), freqs, 'Hz'))), '--', 'color', [0, 0, 0, 0.2]);
|
||||
end
|
||||
end
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_x{1}(1, 1), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_x{1}(1, 1), freqs, 'Hz'))), '--');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
|
||||
ylim([1e-12, inf]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(0, 3, 1000);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:5
|
||||
for j = i+1:6
|
||||
plot(freqs, abs(squeeze(freqresp(G_l{1}(i, j), freqs, 'Hz'))), 'color', [0, 0, 0, 0.2]);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_l{1}(i, j), freqs, 'Hz'))), '--', 'color', [0, 0, 0, 0.2]);
|
||||
end
|
||||
end
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_l{1}(1, 1), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(Gm_l{1}(1, 1), freqs, 'Hz'))), '--');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
|
||||
ylim([1e-9, inf]);
|
||||
#+end_src
|
||||
|
||||
@@ -174,7 +174,7 @@ exportFig('figs/opt_stiff_dvf_plant.pdf', 'width', 'full', 'height', 'full')
|
||||
#+end_src
|
||||
|
||||
#+name: fig:opt_stiff_dvf_root_locus
|
||||
#+caption: Root Locus for the DVF controll for three payload masses
|
||||
#+caption: Root Locus for the DVF control for three payload masses
|
||||
#+RESULTS:
|
||||
[[file:figs/opt_stiff_dvf_root_locus.png]]
|
||||
|
||||
|
||||
+19
-11
@@ -1280,12 +1280,12 @@ The =mirror= structure is saved.
|
||||
args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180)
|
||||
% initializeStrutDynamics
|
||||
args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz', 'amplified'})} = 'piezo'
|
||||
args.ki (1,1) double {mustBeNumeric} = -1
|
||||
args.ke (1,1) double {mustBeNumeric} = -1
|
||||
args.ka (1,1) double {mustBeNumeric} = -1
|
||||
args.ci (1,1) double {mustBeNumeric} = -1
|
||||
args.ce (1,1) double {mustBeNumeric} = -1
|
||||
args.ca (1,1) double {mustBeNumeric} = -1
|
||||
args.k1 (1,1) double {mustBeNumeric} = 1e6
|
||||
args.ke (1,1) double {mustBeNumeric} = 5e6
|
||||
args.ka (1,1) double {mustBeNumeric} = 60e6
|
||||
args.c1 (1,1) double {mustBeNumeric} = 10
|
||||
args.ce (1,1) double {mustBeNumeric} = 10
|
||||
args.ca (1,1) double {mustBeNumeric} = 10
|
||||
args.k (1,1) double {mustBeNumeric} = -1
|
||||
args.c (1,1) double {mustBeNumeric} = -1
|
||||
% initializeJointDynamics
|
||||
@@ -1343,15 +1343,23 @@ The =mirror= structure is saved.
|
||||
|
||||
#+begin_src matlab
|
||||
if args.k > 0 && args.c > 0
|
||||
stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', args.c*ones(6,1));
|
||||
stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', args.c*ones(6,1));
|
||||
elseif args.k > 0
|
||||
stewart = initializeStrutDynamics(stewart, 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1));
|
||||
stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', args.k*ones(6,1), 'C', 1.5*sqrt(args.k)*ones(6,1));
|
||||
elseif strcmp(args.actuator, 'piezo')
|
||||
stewart = initializeStrutDynamics(stewart, 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1));
|
||||
stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e7*ones(6,1), 'C', 1e2*ones(6,1));
|
||||
elseif strcmp(args.actuator, 'lorentz')
|
||||
stewart = initializeStrutDynamics(stewart, 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1));
|
||||
stewart = initializeStrutDynamics(stewart, 'type', 'classical', 'K', 1e4*ones(6,1), 'C', 1e2*ones(6,1));
|
||||
elseif strcmp(args.actuator, 'amplified')
|
||||
stewart = initializeStrutDynamics(stewart, 'type', 'amplified', ...
|
||||
'k1', args.k1*ones(6,1), ...
|
||||
'c1', args.c1*ones(6,1), ...
|
||||
'ka', args.ka*ones(6,1), ...
|
||||
'ca', args.ca*ones(6,1), ...
|
||||
'ke', args.ke*ones(6,1), ...
|
||||
'ce', args.ce*ones(6,1));
|
||||
else
|
||||
error('args.actuator should be piezo or lorentz');
|
||||
error('args.actuator should be piezo, lorentz or amplified');
|
||||
end
|
||||
#+end_src
|
||||
|
||||
|
||||
@@ -798,8 +798,17 @@ A simplistic model of such amplified actuator is shown in Figure [[fig:actuator_
|
||||
#+begin_src matlab
|
||||
arguments
|
||||
stewart
|
||||
args.type char {mustBeMember(args.type,{'classical', 'amplified'})} = 'classical'
|
||||
args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6*ones(6,1)
|
||||
args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1*ones(6,1)
|
||||
args.k1 (6,1) double {mustBeNumeric} = 1e6
|
||||
args.ke (6,1) double {mustBeNumeric} = 5e6
|
||||
args.ka (6,1) double {mustBeNumeric} = 60e6
|
||||
args.c1 (6,1) double {mustBeNumeric} = 10
|
||||
args.ce (6,1) double {mustBeNumeric} = 10
|
||||
args.ca (6,1) double {mustBeNumeric} = 10
|
||||
args.me (6,1) double {mustBeNumeric} = 0.05
|
||||
args.ma (6,1) double {mustBeNumeric} = 0.05
|
||||
end
|
||||
#+end_src
|
||||
|
||||
@@ -808,10 +817,26 @@ A simplistic model of such amplified actuator is shown in Figure [[fig:actuator_
|
||||
:UNNUMBERED: t
|
||||
:END:
|
||||
#+begin_src matlab
|
||||
stewart.actuators.type = 1;
|
||||
if strcmp(args.type, 'classical')
|
||||
stewart.actuators.type = 1;
|
||||
elseif strcmp(args.type, 'amplified')
|
||||
stewart.actuators.type = 2;
|
||||
end
|
||||
|
||||
stewart.actuators.K = args.K;
|
||||
stewart.actuators.C = args.C;
|
||||
|
||||
stewart.actuators.k1 = args.k1;
|
||||
stewart.actuators.c1 = args.c1;
|
||||
|
||||
stewart.actuators.ka = args.ka;
|
||||
stewart.actuators.ca = args.ca;
|
||||
|
||||
stewart.actuators.ke = args.ke;
|
||||
stewart.actuators.ce = args.ce;
|
||||
|
||||
stewart.actuators.ma = args.ma;
|
||||
stewart.actuators.me = args.me;
|
||||
#+end_src
|
||||
|
||||
* =initializeAmplifiedStrutDynamics=: Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator
|
||||
|
||||
Reference in New Issue
Block a user