62 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Matlab
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Matlab
		
	
	
	
	
	
%%
 | 
						|
clear; close all; clc;
 | 
						|
 | 
						|
%% Initialize simulation configuration
 | 
						|
opts_sim = struct(...
 | 
						|
    'Tsim', 10 ...
 | 
						|
);
 | 
						|
 | 
						|
initializeSimConf(opts_sim);
 | 
						|
 | 
						|
%% Initialize Inputs
 | 
						|
opts_inputs = struct(...
 | 
						|
    'ground_motion', false, ...
 | 
						|
    'ry', false, ...
 | 
						|
    'rz', false ...
 | 
						|
);
 | 
						|
 | 
						|
initializeInputs(opts_inputs);
 | 
						|
 | 
						|
%% Initialize SolidWorks Data
 | 
						|
initializeSmiData();
 | 
						|
 | 
						|
%% Initialize Ground
 | 
						|
initializeGround();
 | 
						|
 | 
						|
%% Initialize Granite
 | 
						|
initializeGranite();
 | 
						|
 | 
						|
%% Initialize Translation stage
 | 
						|
initializeTy();
 | 
						|
 | 
						|
%% Initialize Tilt Stage
 | 
						|
initializeRy();
 | 
						|
 | 
						|
%% Initialize Spindle
 | 
						|
initializeRz();
 | 
						|
 | 
						|
%% Initialize Hexapod Symétrie
 | 
						|
initializeMicroHexapod();
 | 
						|
 | 
						|
%% Initialize Center of Gravity compensation
 | 
						|
initializeAxisc();
 | 
						|
 | 
						|
%% Initialize NASS
 | 
						|
initializeNanoHexapod(struct('actuator', 'lorentz'));
 | 
						|
 | 
						|
%% Initialize the Mirror
 | 
						|
initializeMirror(struct('shape', 'spherical'));
 | 
						|
 | 
						|
%% Initialize Sample
 | 
						|
initializeSample(struct('mass', 20));
 | 
						|
 | 
						|
%% Additionnal parameters
 | 
						|
d_granite_sample = 0.80073; % [m] Z-offset from the top of the granite to the point of interest
 | 
						|
 | 
						|
save('./mat/simscape_data.mat', 'd_granite_sample');
 | 
						|
 | 
						|
%% Controllers
 | 
						|
K = tf(zeros(6));
 | 
						|
save('./mat/controller.mat', 'K');
 | 
						|
K_iff = tf(zeros(6));
 | 
						|
save('./mat/K_iff.mat', 'K_iff'); |