nass-simscape/init_inputs.m
Thomas Dehaeze 5587309cfa [major changes] Add some control on the system
Add many scripts to:
- define all the inputs for various experiments
- plot the time and frequency data
- identify the plant
2018-06-07 18:27:02 +02:00

42 lines
1.2 KiB
Matlab

%%
time_vector = 0:Ts:Tsim;
%% Ground motion
r_Gm = timeseries(zeros(length(time_vector), 3), time_vector);
% Wxg = 1e-5*(s/(2e2)^(1/3) + 2*pi*0.1)^3/(s + 2*pi*0.1)^3;
% Wxg = Wxg*(s/(0.5e6)^(1/3) + 2*pi*10)^3/(s + 2*pi*10)^3;
% Wxg = Wxg/(1+s/(2*pi*2000));
%
% xg = 1/sqrt(2)*100*random('norm', 0, 1, length(time_vector), 3);
% xg(:, 1) = lsim(Wxg, xg(:, 1), time_vector);
% xg(:, 2) = lsim(Wxg, xg(:, 2), time_vector);
% xg(:, 3) = lsim(Wxg, xg(:, 3), time_vector);
%
% r_Gm = timeseries(xg, time_vector);
%
% figure;
% plot(r_Gm)
%% Translation stage
r_Ty = timeseries(zeros(length(time_vector), 1), time_vector);
%% Tilt Stage
r_My = timeseries(zeros(length(time_vector), 1), time_vector);
%% Spindle
% r_Mz = timeseries(zeros(length(time_vector), 1), time_vector);
r_Mz = timeseries(360*time_vector*rz.k.rot', time_vector);
%% Micro Hexapod
r_u_hexa = timeseries(zeros(length(time_vector), 6), time_vector);
%% Center of gravity compensation
r_mass = timeseries(zeros(length(time_vector), 2), time_vector);
%% Nano Hexapod
r_n_hexa = timeseries(zeros(length(time_vector), 6), time_vector);
%%
save('./mat/inputs_spindle.mat', 'r_Gm', 'r_Ty', 'r_My', 'r_u_hexa', 'r_mass', 'r_n_hexa');