nass-simscape/src/initializeRy.m

59 lines
2.0 KiB
Matlab

function [ry] = initializeRy(opts_param)
%% Default values for opts
opts = struct('rigid', false);
%% Populate opts with input parameters
if exist('opts_param','var')
for opt = fieldnames(opts_param)'
opts.(opt{1}) = opts_param.(opt{1});
end
end
%%
ry = struct();
%% Tilt Stage - Static Properties
% Ry - Guide for the tilt stage
ry.guide.density = 7800; % [kg/m3]
ry.guide.color = [0.792 0.820 0.933];
ry.guide.STEP = './STEPS/ry/Tilt_Guide.STEP';
% Ry - Rotor of the motor
ry.rotor.density = 2400; % [kg/m3]
ry.rotor.color = [0.792 0.820 0.933];
ry.rotor.STEP = './STEPS/ry/Tilt_Motor_Axis.STEP';
% Ry - Motor
ry.motor.density = 3200; % [kg/m3]
ry.motor.color = [0.792 0.820 0.933];
ry.motor.STEP = './STEPS/ry/Tilt_Motor.STEP';
% Ry - Plateau Tilt
ry.stage.density = 7800; % [kg/m3]
ry.stage.color = [0.792 0.820 0.933];
ry.stage.STEP = './STEPS/ry/Tilt_Stage.STEP';
ry.m = 800; % TODO [kg]
%% Tilt Stage - Dynamical Properties
if opts.rigid
ry.k.tilt = 1e10; % Rotation stiffness around y [N*m/deg]
ry.k.h = 1e12; % Stiffness in the direction of the guidance [N/m]
ry.k.rad = 1e12; % Stiffness in the top direction [N/m]
ry.k.rrad = 1e12; % Stiffness in the side direction [N/m]
else
ry.k.tilt = 1e4; % Rotation stiffness around y [N*m/deg]
ry.k.h = 1e8; % Stiffness in the direction of the guidance [N/m]
ry.k.rad = 1e8; % Stiffness in the top direction [N/m]
ry.k.rrad = 1e8; % Stiffness in the side direction [N/m]
end
ry.c.h = 0.1*sqrt(ry.k.h*ry.m);
ry.c.rad = 0.1*sqrt(ry.k.rad*ry.m);
ry.c.rrad = 0.1*sqrt(ry.k.rrad*ry.m);
ry.c.tilt = 0.1*sqrt(ry.k.tilt*ry.m);
%% Positioning parameters
ry.z_offset = 0.58178; % Z-Offset so that the center of rotation matches the sample center [m]
%% Save
save('./mat/stages.mat', 'ry', '-append');
end