[major-changes] use of referenced model, use of variable step solver
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
%% Load open loop data
|
||||
% gm_ol = load('../data/ground_motion_001.mat');
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%%
|
||||
sim Assemblage;
|
||||
|
||||
%%
|
||||
Dsample.Data = Dsample.Data - Dsample.Data(1, :);
|
||||
|
||||
%% Time domain X-Y-Z
|
||||
figure;
|
||||
hold on;
|
||||
plot(Dsample.Time, Dsample.Data(:, 1));
|
||||
plot(Dsample.Time, Dsample.Data(:, 2));
|
||||
plot(Dsample.Time, Dsample.Data(:, 3));
|
||||
legend({'x', 'y', 'z'})
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Displacement [m]');
|
||||
|
||||
exportFig('tomo_time_translations', 'normal-normal')
|
||||
|
||||
%% Time domain angles
|
||||
figure;
|
||||
hold on;
|
||||
plot(Dsample.Time, Dsample.Data(:, 4));
|
||||
plot(Dsample.Time, Dsample.Data(:, 5));
|
||||
plot(Dsample.Time, Dsample.Data(:, 6));
|
||||
legend({'$\theta_x$', '$\theta_y$', '$\theta_z$'})
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Angle [rad]');
|
||||
|
||||
exportFig('tomo_time_rotations', 'normal-normal')
|
||||
|
||||
%% PSD X-Y-Z
|
||||
han_windows = hanning(ceil(length(Dsample.Time)/10));
|
||||
|
||||
[psd_x, freqs_x] = pwelch(Dsample.Data(:, 1), han_windows, 0, [], 1/Ts);
|
||||
[psd_y, freqs_y] = pwelch(Dsample.Data(:, 2), han_windows, 0, [], 1/Ts);
|
||||
[psd_z, freqs_z] = pwelch(Dsample.Data(:, 3), han_windows, 0, [], 1/Ts);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs_x, sqrt(psd_x));
|
||||
plot(freqs_y, sqrt(psd_y));
|
||||
plot(freqs_z, sqrt(psd_z));
|
||||
set(gca,'xscale','log'); set(gca,'yscale','log');
|
||||
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
|
||||
legend({'x', 'y', 'z'})
|
||||
hold off;
|
||||
|
||||
exportFig('tomo_psd_translations', 'normal-normal')
|
||||
|
||||
%% PSD
|
||||
han_windows = hanning(ceil(length(Dsample.Time)/10));
|
||||
|
||||
[psd_x, freqs_x] = pwelch(Dsample.Data(:, 4), han_windows, 0, [], 1/Ts);
|
||||
[psd_y, freqs_y] = pwelch(Dsample.Data(:, 5), han_windows, 0, [], 1/Ts);
|
||||
[psd_z, freqs_z] = pwelch(Dsample.Data(:, 6), han_windows, 0, [], 1/Ts);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs_x, sqrt(psd_x));
|
||||
plot(freqs_y, sqrt(psd_y));
|
||||
plot(freqs_z, sqrt(psd_z));
|
||||
set(gca,'xscale','log'); set(gca,'yscale','log');
|
||||
xlabel('Frequency [Hz]'); ylabel('PSD [$rad/s/\sqrt{Hz}$]');
|
||||
legend({'$\theta_x$', '$\theta_y$', '$\theta_z$'})
|
||||
hold off;
|
||||
|
||||
exportFig('tomo_psd_rotations', 'normal-normal')
|
||||
|
||||
%%
|
||||
save('./data/ground_motion.mat', 'Dsample')
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,4 +2,4 @@
|
||||
clear; close all; clc;
|
||||
|
||||
%%
|
||||
sim('Micro_Station_Displacement.slx');
|
||||
sim('sim_nano_station_disp.slx');
|
||||
|
||||
@@ -3,7 +3,7 @@ clear; close all; clc;
|
||||
|
||||
%% Initialize simulation configuration
|
||||
opts_sim = struct(...
|
||||
'Tsim', 1 ...
|
||||
'Tsim', 0.1 ...
|
||||
);
|
||||
|
||||
initializeSimConf(opts_sim);
|
||||
@@ -14,36 +14,33 @@ load('./mat/sim_conf.mat', 'sim_conf')
|
||||
time_vector = 0:sim_conf.Ts:sim_conf.Tsim;
|
||||
|
||||
% Translation Stage
|
||||
ty = 0*ones(length(time_vector), 1);
|
||||
Ty = 0.20*ones(length(time_vector), 1);
|
||||
|
||||
% Tilt Stage
|
||||
ry = 2*pi*(0/360)*ones(length(time_vector), 1);
|
||||
% ry = 2*pi*(3/360)*sin(2*pi*time_vector);
|
||||
Ry = 2*pi*(3/360)*ones(length(time_vector), 1);
|
||||
% Ry = 2*pi*(3/360)*sin(2*pi*time_vector);
|
||||
|
||||
% Spindle
|
||||
rz = 2*pi*1*(time_vector);
|
||||
% rz = 2*pi*(190/360)*ones(length(time_vector), 1);
|
||||
Rz = 2*pi*3*(time_vector);
|
||||
% Rz = 2*pi*(190/360)*ones(length(time_vector), 1);
|
||||
|
||||
% Micro Hexapod
|
||||
u_hexa = zeros(length(time_vector), 6);
|
||||
Dh = zeros(length(time_vector), 6);
|
||||
|
||||
% Gravity Compensator system
|
||||
mass = zeros(length(time_vector), 2);
|
||||
mass(:, 2) = pi;
|
||||
Dm = zeros(length(time_vector), 2);
|
||||
Dm(:, 2) = pi;
|
||||
|
||||
opts_inputs = struct(...
|
||||
'ty', ty, ...
|
||||
'ry', ry, ...
|
||||
'rz', rz, ...
|
||||
'u_hexa', u_hexa, ...
|
||||
'mass', mass ...
|
||||
'Ty', Ty, ...
|
||||
'Ry', Ry, ...
|
||||
'Rz', Rz, ...
|
||||
'Dh', Dh, ...
|
||||
'Dm', Dm ...
|
||||
);
|
||||
|
||||
initializeInputs(opts_inputs);
|
||||
|
||||
%% Initialize SolidWorks Data
|
||||
initializeSolids();
|
||||
|
||||
%% Initialize Ground
|
||||
initializeGround();
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
clear; close all; clc;
|
||||
|
||||
%%
|
||||
sim('Micro_Station_Displacement.slx');
|
||||
sim('sim_nano_station_disp.slx');
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,7 @@ options = linearizeOptions;
|
||||
options.SampleTime = 0;
|
||||
|
||||
%% Name of the Simulink File
|
||||
mdl = 'sim_micro_station';
|
||||
mdl = 'sim_micro_station_id';
|
||||
|
||||
%% Micro-Hexapod
|
||||
% Input/Output definition
|
||||
|
||||
@@ -11,7 +11,7 @@ options = linearizeOptions;
|
||||
options.SampleTime = 0;
|
||||
|
||||
%% Name of the Simulink File
|
||||
mdl = 'sim_micro_station';
|
||||
mdl = 'sim_micro_station_id';
|
||||
|
||||
%% Micro-Hexapod
|
||||
% Input/Output definition
|
||||
|
||||
@@ -13,7 +13,7 @@ options = linearizeOptions;
|
||||
options.SampleTime = 0;
|
||||
|
||||
%% Name of the Simulink File
|
||||
mdl = 'sim_nano_station';
|
||||
mdl = 'sim_nano_station_id';
|
||||
|
||||
%% Y-Translation Stage
|
||||
% Input/Output definition
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-4
@@ -11,15 +11,12 @@ initializeSimConf(opts_sim);
|
||||
%% Initialize Inputs
|
||||
opts_inputs = struct(...
|
||||
'Dw', true, ...
|
||||
'ry', false, ...
|
||||
'Ry', false, ...
|
||||
'Rz', true ...
|
||||
);
|
||||
|
||||
initializeInputs(opts_inputs);
|
||||
|
||||
%% Initialize Solids
|
||||
initializeSolids();
|
||||
|
||||
%% Initialize Ground
|
||||
initializeGround();
|
||||
|
||||
|
||||
+5
-3
@@ -5,13 +5,15 @@
|
||||
load('./mat/sim_conf.mat');
|
||||
|
||||
%% Load SolidWorks Data
|
||||
load('./mat/solids.mat');
|
||||
% load('./mat/solids.mat');
|
||||
|
||||
%% Load data of each stage
|
||||
load('./mat/stages.mat');
|
||||
% TODO - This is now loaded by mask of each stage
|
||||
% load('./mat/stages.mat');
|
||||
|
||||
%% Load Signals Applied to the system
|
||||
load('./mat/inputs.mat');
|
||||
% TODO - This is now loaded by the input referenced system
|
||||
% load('./mat/inputs.mat');
|
||||
|
||||
%% Load Controller
|
||||
load('./mat/controllers.mat');
|
||||
|
||||
@@ -2,7 +2,27 @@ function [axisc] = initializeAxisc()
|
||||
%%
|
||||
axisc = struct();
|
||||
|
||||
axisc.m = 40; % [kg]
|
||||
%% Axis Compensator - Static Properties
|
||||
% Structure
|
||||
axisc.structure.density = 3400; % [kg/m3]
|
||||
axisc.structure.color = [0.792 0.820 0.933];
|
||||
axisc.structure.STEP = './STEPS/axisc/axisc_structure.STEP';
|
||||
% Wheel
|
||||
axisc.wheel.density = 2700; % [kg/m3]
|
||||
axisc.wheel.color = [0.753 0.753 0.753];
|
||||
axisc.wheel.STEP = './STEPS/axisc/axisc_wheel.STEP';
|
||||
% Mass
|
||||
axisc.mass.density = 7800; % [kg/m3]
|
||||
axisc.mass.color = [0.792 0.820 0.933];
|
||||
axisc.mass.STEP = './STEPS/axisc/axisc_mass.STEP';
|
||||
% Gear
|
||||
axisc.gear.density = 7800; % [kg/m3]
|
||||
axisc.gear.color = [0.792 0.820 0.933];
|
||||
axisc.gear.STEP = './STEPS/axisc/axisc_gear.STEP';
|
||||
|
||||
axisc.m = 40; % TODO [kg]
|
||||
|
||||
%% Axis Compensator - Dynamical Properties
|
||||
axisc.k.ax = 1; % TODO [N*m/deg)]
|
||||
axisc.c.ax = (1/1)*sqrt(axisc.k.ax/axisc.m);
|
||||
|
||||
|
||||
@@ -2,8 +2,14 @@ function [granite] = initializeGranite()
|
||||
%%
|
||||
granite = struct();
|
||||
|
||||
granite.m = 2000; % [kg]
|
||||
%% Static Properties
|
||||
granite.density = 2800; % [kg/m3]
|
||||
granite.volume = 0.72; % [m3] TODO - should
|
||||
granite.mass = granite.density*granite.volume; % [kg]
|
||||
granite.color = [1 1 1];
|
||||
granite.STEP = './STEPS/granite/granite.STEP';
|
||||
|
||||
%% Dynamical Properties
|
||||
granite.k.x = 1e8; % [N/m]
|
||||
granite.c.x = 1e4; % [N/(m/s)]
|
||||
|
||||
|
||||
@@ -101,10 +101,11 @@ function [inputs] = initializeInputs(opts_param)
|
||||
Fg = zeros(length(t), 3);
|
||||
|
||||
%% External Forces applied on the Sample
|
||||
Fs = zeros(length(t), 3);
|
||||
Fs = zeros(length(t), 6);
|
||||
|
||||
%% Create the input Structure that will contain all the inputs
|
||||
inputs = struct( ...
|
||||
'Ts', sim_conf.Ts, ...
|
||||
'Dw', timeseries(Dw, t), ...
|
||||
'Dy', timeseries(Dy, t), ...
|
||||
'Ry', timeseries(Ry, t), ...
|
||||
|
||||
@@ -22,6 +22,7 @@ function [] = initializeMirror(opts_param)
|
||||
mirror.rad = 180; % radius of the mirror (at the bottom surface) [mm]
|
||||
|
||||
mirror.density = 2400; % Density of the mirror [kg/m3]
|
||||
mirror.color = [0.4 1.0 1.0]; % Color of the mirror
|
||||
|
||||
mirror.cone_length = mirror.rad*tand(opts.angle)+mirror.h+mirror.jacobian; % Distance from Apex point of the cone to jacobian point
|
||||
|
||||
|
||||
@@ -12,8 +12,27 @@ function [ry] = initializeRy(opts_param)
|
||||
%%
|
||||
ry = struct();
|
||||
|
||||
ry.m = 200; % [kg]
|
||||
%% 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 = 200; % TODO [kg]
|
||||
|
||||
%% Tilt Stage - Dynamical Properties
|
||||
if opts.rigid
|
||||
ry.k.tilt = 1e10; % Rotation stiffness around y [N*m/deg]
|
||||
else
|
||||
|
||||
@@ -12,9 +12,24 @@ function [rz] = initializeRz(opts_param)
|
||||
%%
|
||||
rz = struct();
|
||||
|
||||
%% Spindle - Static Properties
|
||||
% Spindle - Slip Ring
|
||||
rz.slipring.density = 7800; % [kg/m3]
|
||||
rz.slipring.color = [0.792 0.820 0.933];
|
||||
rz.slipring.STEP = './STEPS/rz/Spindle_Slip_Ring.STEP';
|
||||
% Spindle - Rotor
|
||||
rz.rotor.density = 7800; % [kg/m3]
|
||||
rz.rotor.color = [0.792 0.820 0.933];
|
||||
rz.rotor.STEP = './STEPS/rz/Spindle_Rotor.STEP';
|
||||
% Spindle - Stator
|
||||
rz.stator.density = 7800; % [kg/m3]
|
||||
rz.stator.color = [0.792 0.820 0.933];
|
||||
rz.stator.STEP = './STEPS/rz/Spindle_Stator.STEP';
|
||||
|
||||
% Estimated mass of the mooving part
|
||||
rz.m = 250; % [kg]
|
||||
|
||||
%% Spindle - Dynamical Properties
|
||||
% Estimated stiffnesses
|
||||
rz.k.ax = 2e9; % Axial Stiffness [N/m]
|
||||
rz.k.rad = 7e8; % Radial Stiffness [N/m]
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
function [solids] = initializeSolids()
|
||||
%% Granite
|
||||
solids.granite.density = 2800; % [kg/m3]
|
||||
solids.granite.color = [1 1 1];
|
||||
solids.granite.STEP = './STEPS/granite/granite.STEP';
|
||||
|
||||
%% Y-Translation
|
||||
% Ty Granite frame
|
||||
solids.ty.granite_frame.density = 7800; % [kg/m3]
|
||||
solids.ty.granite_frame.color = [0.753 1 0.753];
|
||||
solids.ty.granite_frame.STEP = './STEPS/Ty/Ty_Granite_Frame.STEP';
|
||||
% Guide Translation Ty
|
||||
solids.ty.guide.density = 7800; % [kg/m3]
|
||||
solids.ty.guide.color = [0.792 0.820 0.933];
|
||||
solids.ty.guide.STEP = './STEPS/ty/Ty_Guide.STEP';
|
||||
% Ty - Guide_Translation12
|
||||
solids.ty.guide12.density = 7800; % [kg/m3]
|
||||
solids.ty.guide12.color = [0.792 0.820 0.933];
|
||||
solids.ty.guide12.STEP = './STEPS/Ty/Ty_Guide_12.STEP';
|
||||
% Ty - Guide_Translation11
|
||||
solids.ty.guide11.density = 7800; % [kg/m3]
|
||||
solids.ty.guide11.color = [0.792 0.820 0.933];
|
||||
solids.ty.guide11.STEP = './STEPS/ty/Ty_Guide_11.STEP';
|
||||
% Ty - Guide_Translation22
|
||||
solids.ty.guide22.density = 7800; % [kg/m3]
|
||||
solids.ty.guide22.color = [0.792 0.820 0.933];
|
||||
solids.ty.guide22.STEP = './STEPS/ty/Ty_Guide_22.STEP';
|
||||
% Ty - Guide_Translation21
|
||||
solids.ty.guide21.density = 7800; % [kg/m3]
|
||||
solids.ty.guide21.color = [0.792 0.820 0.933];
|
||||
solids.ty.guide21.STEP = './STEPS/Ty/Ty_Guide_21.STEP';
|
||||
% Ty - Plateau translation
|
||||
solids.ty.frame.density = 7800; % [kg/m3]
|
||||
solids.ty.frame.color = [0.792 0.820 0.933];
|
||||
solids.ty.frame.STEP = './STEPS/ty/Ty_Stage.STEP';
|
||||
% Ty Stator Part
|
||||
solids.ty.stator.density = 5400; % [kg/m3]
|
||||
solids.ty.stator.color = [0.792 0.820 0.933];
|
||||
solids.ty.stator.STEP = './STEPS/ty/Ty_Motor_Stator.STEP';
|
||||
% Ty Rotor Part
|
||||
solids.ty.rotor.density = 5400; % [kg/m3]
|
||||
solids.ty.rotor.color = [0.792 0.820 0.933];
|
||||
solids.ty.rotor.STEP = './STEPS/ty/Ty_Motor_Rotor.STEP';
|
||||
|
||||
%% Tilt Stage
|
||||
% Ry - Guide for the tilt stage
|
||||
solids.ry.guide.density = 7800; % [kg/m3]
|
||||
solids.ry.guide.color = [0.792 0.820 0.933];
|
||||
solids.ry.guide.STEP = './STEPS/ry/Tilt_Guide.STEP';
|
||||
% Ry - Rotor of the motor
|
||||
solids.ry.rotor.density = 2400; % [kg/m3]
|
||||
solids.ry.rotor.color = [0.792 0.820 0.933];
|
||||
solids.ry.rotor.STEP = './STEPS/ry/Tilt_Motor_Axis.STEP';
|
||||
% Ry - Motor
|
||||
solids.ry.motor.density = 3200; % [kg/m3]
|
||||
solids.ry.motor.color = [0.792 0.820 0.933];
|
||||
solids.ry.motor.STEP = './STEPS/ry/Tilt_Motor.STEP';
|
||||
% Ry - Plateau Tilt
|
||||
solids.ry.stage.density = 7800; % [kg/m3]
|
||||
solids.ry.stage.color = [0.792 0.820 0.933];
|
||||
solids.ry.stage.STEP = './STEPS/ry/Tilt_Stage.STEP';
|
||||
|
||||
%% Spindle
|
||||
% Spindle - Slip Ring
|
||||
solids.rz.slipring.density = 7800; % [kg/m3]
|
||||
solids.rz.slipring.color = [0.792 0.820 0.933];
|
||||
solids.rz.slipring.STEP = './STEPS/rz/Spindle_Slip_Ring.STEP';
|
||||
% Spindle - Rotor
|
||||
solids.rz.rotor.density = 7800; % [kg/m3]
|
||||
solids.rz.rotor.color = [0.792 0.820 0.933];
|
||||
solids.rz.rotor.STEP = './STEPS/rz/Spindle_Rotor.STEP';
|
||||
% Spindle - Stator
|
||||
solids.rz.stator.density = 7800; % [kg/m3]
|
||||
solids.rz.stator.color = [0.792 0.820 0.933];
|
||||
solids.rz.stator.STEP = './STEPS/rz/Spindle_Stator.STEP';
|
||||
|
||||
%% Axis Compensator
|
||||
% Structure
|
||||
solids.axisc.structure.density = 3400; % [kg/m3]
|
||||
solids.axisc.structure.color = [0.792 0.820 0.933];
|
||||
solids.axisc.structure.STEP = './STEPS/axisc/axisc_structure.STEP';
|
||||
% Wheel
|
||||
solids.axisc.wheel.density = 2700; % [kg/m3]
|
||||
solids.axisc.wheel.color = [0.753 0.753 0.753];
|
||||
solids.axisc.wheel.STEP = './STEPS/axisc/axisc_wheel.STEP';
|
||||
% Mass
|
||||
solids.axisc.mass.density = 7800; % [kg/m3]
|
||||
solids.axisc.mass.color = [0.792 0.820 0.933];
|
||||
solids.axisc.mass.STEP = './STEPS/axisc/axisc_mass.STEP';
|
||||
% Gear
|
||||
solids.axisc.gear.density = 7800; % [kg/m3]
|
||||
solids.axisc.gear.color = [0.792 0.820 0.933];
|
||||
solids.axisc.gear.STEP = './STEPS/axisc/axisc_gear.STEP';
|
||||
|
||||
%% Save
|
||||
save('./mat/solids.mat', 'solids')
|
||||
end
|
||||
@@ -12,8 +12,47 @@ function [ty] = initializeTy(opts_param)
|
||||
%%
|
||||
ty = struct();
|
||||
|
||||
ty.m = 250; % [kg]
|
||||
%% Y-Translation - Static Properties
|
||||
% Ty Granite frame
|
||||
ty.granite_frame.density = 7800; % [kg/m3]
|
||||
ty.granite_frame.color = [0.753 1 0.753];
|
||||
ty.granite_frame.STEP = './STEPS/Ty/Ty_Granite_Frame.STEP';
|
||||
% Guide Translation Ty
|
||||
ty.guide.density = 7800; % [kg/m3]
|
||||
ty.guide.color = [0.792 0.820 0.933];
|
||||
ty.guide.STEP = './STEPS/ty/Ty_Guide.STEP';
|
||||
% Ty - Guide_Translation12
|
||||
ty.guide12.density = 7800; % [kg/m3]
|
||||
ty.guide12.color = [0.792 0.820 0.933];
|
||||
ty.guide12.STEP = './STEPS/Ty/Ty_Guide_12.STEP';
|
||||
% Ty - Guide_Translation11
|
||||
ty.guide11.density = 7800; % [kg/m3]
|
||||
ty.guide11.color = [0.792 0.820 0.933];
|
||||
ty.guide11.STEP = './STEPS/ty/Ty_Guide_11.STEP';
|
||||
% Ty - Guide_Translation22
|
||||
ty.guide22.density = 7800; % [kg/m3]
|
||||
ty.guide22.color = [0.792 0.820 0.933];
|
||||
ty.guide22.STEP = './STEPS/ty/Ty_Guide_22.STEP';
|
||||
% Ty - Guide_Translation21
|
||||
ty.guide21.density = 7800; % [kg/m3]
|
||||
ty.guide21.color = [0.792 0.820 0.933];
|
||||
ty.guide21.STEP = './STEPS/Ty/Ty_Guide_21.STEP';
|
||||
% Ty - Plateau translation
|
||||
ty.frame.density = 7800; % [kg/m3]
|
||||
ty.frame.color = [0.792 0.820 0.933];
|
||||
ty.frame.STEP = './STEPS/ty/Ty_Stage.STEP';
|
||||
% Ty Stator Part
|
||||
ty.stator.density = 5400; % [kg/m3]
|
||||
ty.stator.color = [0.792 0.820 0.933];
|
||||
ty.stator.STEP = './STEPS/ty/Ty_Motor_Stator.STEP';
|
||||
% Ty Rotor Part
|
||||
ty.rotor.density = 5400; % [kg/m3]
|
||||
ty.rotor.color = [0.792 0.820 0.933];
|
||||
ty.rotor.STEP = './STEPS/ty/Ty_Motor_Rotor.STEP';
|
||||
|
||||
ty.m = 250; % TODO [kg]
|
||||
|
||||
%% Y-Translation - Dynamicals Properties
|
||||
if opts.rigid
|
||||
ty.k.ax = 1e10; % Axial Stiffness for each of the 4 guidance (y) [N/m]
|
||||
else
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6
-6
@@ -3,17 +3,17 @@ steady_time = 10;
|
||||
|
||||
initializeSimConf(struct('Tsim', steady_time, 'cl_time', steady_time));
|
||||
|
||||
set_param('Assemblage',...
|
||||
set_param('sim_nano_station_ctrl',...
|
||||
'SaveFinalState','on',...
|
||||
'FinalStateName','myOperPoint',...
|
||||
'SaveCompleteFinalSimState','on'...
|
||||
);
|
||||
|
||||
sim('Assemblage');
|
||||
sim('sim_nano_station_ctrl');
|
||||
|
||||
save('./data/myOperPoint.mat', 'myOperPoint');
|
||||
|
||||
set_param('Assemblage',...
|
||||
set_param('sim_nano_station_ctrl',...
|
||||
'SaveFinalState','off',...
|
||||
'SaveCompleteFinalSimState','off'...
|
||||
);
|
||||
@@ -27,14 +27,14 @@ initializeSimConf(struct('Tsim', steady_time+sim_time, 'cl_time', steady_time));
|
||||
|
||||
load('./data/myOperPoint.mat', 'myOperPoint');
|
||||
|
||||
set_param('Assemblage',...
|
||||
set_param('sim_nano_station_ctrl',...
|
||||
'LoadInitialState','on',...
|
||||
'InitialState','myOperPoint'...
|
||||
);
|
||||
|
||||
sim('Assemblage');
|
||||
sim('sim_nano_station_ctrl');
|
||||
|
||||
set_param('Assemblage',...
|
||||
set_param('sim_nano_station_ctrl',...
|
||||
'LoadInitialState','off' ...
|
||||
);
|
||||
|
||||
|
||||
Binary file not shown.
+18
-11
@@ -14,29 +14,36 @@ function [sys] = identifyPlant(opts_param)
|
||||
options.SampleTime = 0;
|
||||
|
||||
%% Name of the Simulink File
|
||||
mdl = 'sim_nano_station';
|
||||
mdl = 'sim_nano_station_id';
|
||||
|
||||
%% Input/Output definition
|
||||
io(1) = linio([mdl, '/Fn'], 1, 'input');
|
||||
io(2) = linio([mdl, '/Gm'], 1, 'input');
|
||||
io(3) = linio([mdl, '/Fs_ext'], 1, 'input');
|
||||
io(4) = linio([mdl, '/F_legs'], 1, 'input');
|
||||
io(5) = linio([mdl, '/Dsample_meas'], 1, 'output');
|
||||
io(6) = linio([mdl, '/F_meas'], 1, 'output');
|
||||
io(1) = linio([mdl, '/Fn'], 1, 'input'); % Cartesian forces applied by NASS
|
||||
io(2) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
|
||||
io(3) = linio([mdl, '/Fs'], 1, 'input'); % External forces on the sample
|
||||
io(4) = linio([mdl, '/Fnl'], 1, 'input'); % Forces applied on the NASS's legs
|
||||
io(5) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
|
||||
io(6) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
|
||||
io(7) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
|
||||
|
||||
%% Run the linearization
|
||||
G = linearize(mdl, io, 0);
|
||||
G.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz', ...
|
||||
'Dgx', 'Dgy', 'Dgz', ...
|
||||
'Fsx', 'Fsy', 'Fsz', ...
|
||||
'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz', ...
|
||||
'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
|
||||
G.OutputName = {'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz', ...
|
||||
'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'};
|
||||
'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6', ...
|
||||
'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'};
|
||||
|
||||
%% Create the sub transfer functions
|
||||
% From forces applied in the cartesian frame to displacement of the sample in the cartesian frame
|
||||
sys.G_cart = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'}));
|
||||
% From ground motion to Sample displacement
|
||||
sys.G_gm = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Dgx', 'Dgy', 'Dgz'}));
|
||||
sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz'}));
|
||||
% From direct forces applied on the sample to displacement of the sample
|
||||
sys.G_fs = minreal(G({'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'}, {'Fsx', 'Fsy', 'Fsz', 'Msx', 'Msy', 'Msz'}));
|
||||
% From forces applied on NASS's legs to force sensor in each leg
|
||||
sys.G_iff = minreal(G({'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}));
|
||||
% From forces applied on NASS's legs to displacement of each leg
|
||||
sys.G_dleg = minreal(G({'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6'}, {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'}));
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
|
||||
end
|
||||
|
||||
%% Run the simulation
|
||||
sim('Assemblage.slx');
|
||||
sim('sim_nano_station_ctrl.slx');
|
||||
|
||||
%% Split the Dsample matrix into vectors
|
||||
[Dx, Dy, Dz, Rx, Ry, Rz] = matSplit(Dsample.Data, 1); %#ok
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user