Add custom stiffness and damping to the n-hexapod
This commit is contained in:
parent
8fdb9f86c7
commit
295ba8bca1
BIN
mat/optimal_stiffness_Gk_wz.mat
Normal file
BIN
mat/optimal_stiffness_Gk_wz.mat
Normal file
Binary file not shown.
BIN
mat/optimal_stiffness_Gm_Gf.mat
Normal file
BIN
mat/optimal_stiffness_Gm_Gf.mat
Normal file
Binary file not shown.
@ -1242,6 +1242,8 @@ 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)
|
args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180)
|
||||||
% initializeStrutDynamics
|
% initializeStrutDynamics
|
||||||
args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo'
|
args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo'
|
||||||
|
args.k (1,1) double {mustBeNumeric} = -1
|
||||||
|
args.c (1,1) double {mustBeNumeric} = -1
|
||||||
% initializeCylindricalPlatforms
|
% initializeCylindricalPlatforms
|
||||||
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
||||||
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e-3
|
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e-3
|
||||||
@ -1274,13 +1276,23 @@ The =mirror= structure is saved.
|
|||||||
nano_hexapod = initializeFramesPositions('H', args.H, 'MO_B', args.MO_B);
|
nano_hexapod = initializeFramesPositions('H', args.H, 'MO_B', args.MO_B);
|
||||||
nano_hexapod = generateGeneralConfiguration(nano_hexapod, 'FH', args.FH, 'FR', args.FR, 'FTh', args.FTh, 'MH', args.MH, 'MR', args.MR, 'MTh', args.MTh);
|
nano_hexapod = generateGeneralConfiguration(nano_hexapod, 'FH', args.FH, 'FR', args.FR, 'FTh', args.FTh, 'MH', args.MH, 'MR', args.MR, 'MTh', args.MTh);
|
||||||
nano_hexapod = computeJointsPose(nano_hexapod);
|
nano_hexapod = computeJointsPose(nano_hexapod);
|
||||||
if strcmp(args.actuator, 'piezo')
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
if args.k > 0 && args.c > 0
|
||||||
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', args.k*ones(6,1), 'Ci', args.c*ones(6,1));
|
||||||
|
elseif args.k > 0
|
||||||
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', args.k*ones(6,1), 'Ci', 1.5*sqrt(args.k)*ones(6,1));
|
||||||
|
elseif strcmp(args.actuator, 'piezo')
|
||||||
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e7*ones(6,1), 'Ci', 1e2*ones(6,1));
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e7*ones(6,1), 'Ci', 1e2*ones(6,1));
|
||||||
elseif strcmp(args.actuator, 'lorentz')
|
elseif strcmp(args.actuator, 'lorentz')
|
||||||
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e4*ones(6,1), 'Ci', 1e2*ones(6,1));
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e4*ones(6,1), 'Ci', 1e2*ones(6,1));
|
||||||
else
|
else
|
||||||
error('args.actuator should be piezo or lorentz');
|
error('args.actuator should be piezo or lorentz');
|
||||||
end
|
end
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
nano_hexapod = initializeCylindricalPlatforms(nano_hexapod, 'Fpm', args.Fpm, 'Fph', args.Fph, 'Fpr', args.Fpr, 'Mpm', args.Mpm, 'Mph', args.Mph, 'Mpr', args.Mpr);
|
nano_hexapod = initializeCylindricalPlatforms(nano_hexapod, 'Fpm', args.Fpm, 'Fph', args.Fph, 'Fpr', args.Fpr, 'Mpm', args.Mpm, 'Mph', args.Mph, 'Mpr', args.Mpr);
|
||||||
nano_hexapod = initializeCylindricalStruts(nano_hexapod, 'Fsm', args.Fsm, 'Fsh', args.Fsh, 'Fsr', args.Fsr, 'Msm', args.Msm, 'Msh', args.Msh, 'Msr', args.Msr);
|
nano_hexapod = initializeCylindricalStruts(nano_hexapod, 'Fsm', args.Fsm, 'Fsh', args.Fsh, 'Fsr', args.Fsr, 'Msm', args.Msm, 'Msh', args.Msh, 'Msr', args.Msr);
|
||||||
nano_hexapod = computeJacobian(nano_hexapod);
|
nano_hexapod = computeJacobian(nano_hexapod);
|
||||||
@ -1494,7 +1506,7 @@ The =sample= structure is saved.
|
|||||||
:END:
|
:END:
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
arguments
|
arguments
|
||||||
args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf', 'hac-dvf', 'ref-track-L', 'ref-track-iff-L', 'cascade-hac-lac', 'hac-iff'})} = 'open-loop'
|
args.type char {mustBeMember(args.type,{'open-loop', 'iff', 'dvf', 'hac-dvf', 'ref-track-L', 'ref-track-iff-L', 'cascade-hac-lac', 'hac-iff', 'stabilizing'})} = 'open-loop'
|
||||||
end
|
end
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -1529,6 +1541,8 @@ First, we initialize the =controller= structure.
|
|||||||
controller.type = 7;
|
controller.type = 7;
|
||||||
case 'hac-iff'
|
case 'hac-iff'
|
||||||
controller.type = 8;
|
controller.type = 8;
|
||||||
|
case 'stabilizing'
|
||||||
|
controller.type = 9;
|
||||||
end
|
end
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ arguments
|
|||||||
args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180)
|
args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180)
|
||||||
% initializeStrutDynamics
|
% initializeStrutDynamics
|
||||||
args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo'
|
args.actuator char {mustBeMember(args.actuator,{'piezo', 'lorentz'})} = 'piezo'
|
||||||
|
args.k (1,1) double {mustBeNumeric} = -1
|
||||||
|
args.c (1,1) double {mustBeNumeric} = -1
|
||||||
% initializeCylindricalPlatforms
|
% initializeCylindricalPlatforms
|
||||||
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
||||||
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e-3
|
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e-3
|
||||||
@ -40,13 +42,19 @@ end
|
|||||||
nano_hexapod = initializeFramesPositions('H', args.H, 'MO_B', args.MO_B);
|
nano_hexapod = initializeFramesPositions('H', args.H, 'MO_B', args.MO_B);
|
||||||
nano_hexapod = generateGeneralConfiguration(nano_hexapod, 'FH', args.FH, 'FR', args.FR, 'FTh', args.FTh, 'MH', args.MH, 'MR', args.MR, 'MTh', args.MTh);
|
nano_hexapod = generateGeneralConfiguration(nano_hexapod, 'FH', args.FH, 'FR', args.FR, 'FTh', args.FTh, 'MH', args.MH, 'MR', args.MR, 'MTh', args.MTh);
|
||||||
nano_hexapod = computeJointsPose(nano_hexapod);
|
nano_hexapod = computeJointsPose(nano_hexapod);
|
||||||
if strcmp(args.actuator, 'piezo')
|
|
||||||
|
if args.k > 0 && args.c > 0
|
||||||
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', args.k*ones(6,1), 'Ci', args.c*ones(6,1));
|
||||||
|
elseif args.k > 0
|
||||||
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', args.k*ones(6,1), 'Ci', 1.5*sqrt(args.k)*ones(6,1));
|
||||||
|
elseif strcmp(args.actuator, 'piezo')
|
||||||
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e7*ones(6,1), 'Ci', 1e2*ones(6,1));
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e7*ones(6,1), 'Ci', 1e2*ones(6,1));
|
||||||
elseif strcmp(args.actuator, 'lorentz')
|
elseif strcmp(args.actuator, 'lorentz')
|
||||||
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e4*ones(6,1), 'Ci', 1e2*ones(6,1));
|
nano_hexapod = initializeStrutDynamics(nano_hexapod, 'Ki', 1e4*ones(6,1), 'Ci', 1e2*ones(6,1));
|
||||||
else
|
else
|
||||||
error('args.actuator should be piezo or lorentz');
|
error('args.actuator should be piezo or lorentz');
|
||||||
end
|
end
|
||||||
|
|
||||||
nano_hexapod = initializeCylindricalPlatforms(nano_hexapod, 'Fpm', args.Fpm, 'Fph', args.Fph, 'Fpr', args.Fpr, 'Mpm', args.Mpm, 'Mph', args.Mph, 'Mpr', args.Mpr);
|
nano_hexapod = initializeCylindricalPlatforms(nano_hexapod, 'Fpm', args.Fpm, 'Fph', args.Fph, 'Fpr', args.Fpr, 'Mpm', args.Mpm, 'Mph', args.Mph, 'Mpr', args.Mpr);
|
||||||
nano_hexapod = initializeCylindricalStruts(nano_hexapod, 'Fsm', args.Fsm, 'Fsh', args.Fsh, 'Fsr', args.Fsr, 'Msm', args.Msm, 'Msh', args.Msh, 'Msr', args.Msr);
|
nano_hexapod = initializeCylindricalStruts(nano_hexapod, 'Fsm', args.Fsm, 'Fsh', args.Fsh, 'Fsr', args.Fsr, 'Msm', args.Msm, 'Msh', args.Msh, 'Msr', args.Msr);
|
||||||
nano_hexapod = computeJacobian(nano_hexapod);
|
nano_hexapod = computeJacobian(nano_hexapod);
|
||||||
|
Loading…
Reference in New Issue
Block a user