Add rotational stiffness to the sample
This commit is contained in:
parent
b9e900d410
commit
013cb67a26
Binary file not shown.
@ -1359,7 +1359,7 @@ The Simscape model of the sample environment is composed of:
|
|||||||
args.radius (1,1) double {mustBeNumeric, mustBePositive} = 0.1 % [m]
|
args.radius (1,1) double {mustBeNumeric, mustBePositive} = 0.1 % [m]
|
||||||
args.height (1,1) double {mustBeNumeric, mustBePositive} = 0.3 % [m]
|
args.height (1,1) double {mustBeNumeric, mustBePositive} = 0.3 % [m]
|
||||||
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
|
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
|
||||||
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 100 % [Hz]
|
args.freq (6,1) double {mustBeNumeric, mustBePositive} = 100*ones(6,1) % [Hz]
|
||||||
args.offset (1,1) double {mustBeNumeric} = 0 % [m]
|
args.offset (1,1) double {mustBeNumeric} = 0 % [m]
|
||||||
args.Foffset logical {mustBeNumericOrLogical} = false
|
args.Foffset logical {mustBeNumericOrLogical} = false
|
||||||
end
|
end
|
||||||
@ -1404,14 +1404,37 @@ We define the geometrical parameters of the sample as well as its mass and posit
|
|||||||
sample.offset = args.offset; % [m]
|
sample.offset = args.offset; % [m]
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Compute the Inertia
|
||||||
|
:PROPERTIES:
|
||||||
|
:UNNUMBERED: t
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
sample.inertia = [1/12 * sample.mass * (3*sample.radius^2 + sample.height^2); ...
|
||||||
|
1/12 * sample.mass * (3*sample.radius^2 + sample.height^2); ...
|
||||||
|
1/2 * sample.mass * sample.radius^2];
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Stiffness and Damping properties
|
** Stiffness and Damping properties
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:UNNUMBERED: t
|
:UNNUMBERED: t
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
sample.K = ones(3,1) * sample.mass * (2*pi * args.freq)^2; % [N/m]
|
sample.K = zeros(6, 1);
|
||||||
sample.C = 0.1 * sqrt(sample.K*sample.mass); % [N/(m/s)]
|
sample.C = zeros(6, 1);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Translation Stiffness and Damping:
|
||||||
|
#+begin_src matlab
|
||||||
|
sample.K(1:3) = sample.mass .* (2*pi * args.freq(1:3)).^2; % [N/m]
|
||||||
|
sample.C(1:3) = 0.1 * sqrt(sample.K(1:3)*sample.mass); % [N/(m/s)]
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Rotational Stiffness and Damping:
|
||||||
|
#+begin_src matlab
|
||||||
|
sample.K(4:6) = sample.inertia .* (2*pi * args.freq(4:6)).^2; % [N/m]
|
||||||
|
sample.C(4:6) = 0.1 * sqrt(sample.K(4:6).*sample.inertia); % [N/(m/s)]
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Equilibrium position of the each joint.
|
** Equilibrium position of the each joint.
|
||||||
@ -1424,7 +1447,7 @@ We define the geometrical parameters of the sample as well as its mass and posit
|
|||||||
load('mat/Foffset.mat', 'Fsm');
|
load('mat/Foffset.mat', 'Fsm');
|
||||||
sample.Deq = -Fsm'./sample.K;
|
sample.Deq = -Fsm'./sample.K;
|
||||||
else
|
else
|
||||||
sample.Deq = zeros(3,1);
|
sample.Deq = zeros(6,1);
|
||||||
end
|
end
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ arguments
|
|||||||
args.radius (1,1) double {mustBeNumeric, mustBePositive} = 0.1 % [m]
|
args.radius (1,1) double {mustBeNumeric, mustBePositive} = 0.1 % [m]
|
||||||
args.height (1,1) double {mustBeNumeric, mustBePositive} = 0.3 % [m]
|
args.height (1,1) double {mustBeNumeric, mustBePositive} = 0.3 % [m]
|
||||||
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
|
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 50 % [kg]
|
||||||
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 100 % [Hz]
|
args.freq (6,1) double {mustBeNumeric, mustBePositive} = 100*ones(6,1) % [Hz]
|
||||||
args.offset (1,1) double {mustBeNumeric} = 0 % [m]
|
args.offset (1,1) double {mustBeNumeric} = 0 % [m]
|
||||||
args.Foffset logical {mustBeNumericOrLogical} = false
|
args.Foffset logical {mustBeNumericOrLogical} = false
|
||||||
end
|
end
|
||||||
@ -28,14 +28,24 @@ sample.height = args.height; % [m]
|
|||||||
sample.mass = args.mass; % [kg]
|
sample.mass = args.mass; % [kg]
|
||||||
sample.offset = args.offset; % [m]
|
sample.offset = args.offset; % [m]
|
||||||
|
|
||||||
sample.K = ones(3,1) * sample.mass * (2*pi * args.freq)^2; % [N/m]
|
sample.inertia = [1/12 * sample.mass * (3*sample.radius^2 + sample.height^2); ...
|
||||||
sample.C = 0.1 * sqrt(sample.K*sample.mass); % [N/(m/s)]
|
1/12 * sample.mass * (3*sample.radius^2 + sample.height^2); ...
|
||||||
|
1/2 * sample.mass * sample.radius^2];
|
||||||
|
|
||||||
|
sample.K = zeros(6, 1);
|
||||||
|
sample.C = zeros(6, 1);
|
||||||
|
|
||||||
|
sample.K(1:3) = sample.mass .* (2*pi * args.freq(1:3)).^2; % [N/m]
|
||||||
|
sample.C(1:3) = 0.1 * sqrt(sample.K(1:3)*sample.mass); % [N/(m/s)]
|
||||||
|
|
||||||
|
sample.K(4:6) = sample.inertia .* (2*pi * args.freq(4:6)).^2; % [N/m]
|
||||||
|
sample.C(4:6) = 0.1 * sqrt(sample.K(4:6).*sample.inertia); % [N/(m/s)]
|
||||||
|
|
||||||
if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
|
if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
|
||||||
load('mat/Foffset.mat', 'Fsm');
|
load('mat/Foffset.mat', 'Fsm');
|
||||||
sample.Deq = -Fsm'./sample.K;
|
sample.Deq = -Fsm'./sample.K;
|
||||||
else
|
else
|
||||||
sample.Deq = zeros(3,1);
|
sample.Deq = zeros(6,1);
|
||||||
end
|
end
|
||||||
|
|
||||||
save('./mat/stages.mat', 'sample', '-append');
|
save('./mat/stages.mat', 'sample', '-append');
|
||||||
|
Loading…
Reference in New Issue
Block a user