diff --git a/docs/control_active_damping.html b/docs/control_active_damping.html index a4aa035..59928fa 100644 --- a/docs/control_active_damping.html +++ b/docs/control_active_damping.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +
We initialize all the stages with the default parameters.
@@ -228,26 +228,26 @@ We initialize all the stages with the default parameters.
We identify the dynamics of the system using the linearize
function.
%% Options for Linearized +%% Options for Linearized options = linearizeOptions; options.SampleTime = 0; -%% Name of the Simulink File -mdl = 'nass_model'; +%% Name of the Simulink File +mdl = 'nass_model'; -%% Input/Output definition +%% Input/Output definition clear io; io_i = 1; -io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs -io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1; % Relative Motion Outputs -io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1; % Force Sensors -io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1; % Absolute Velocity Outputs +io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs +io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Dnlm'); io_i = io_i + 1; % Relative Motion Outputs +io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Fnlm'); io_i = io_i + 1; % Force Sensors +io(io_i) = linio([mdl, '/Micro-Station'], 3, 'openoutput', [], 'Vlm'); io_i = io_i + 1; % Absolute Velocity Outputs -%% Run the linearization +%% Run the linearization G = linearize(mdl, io, 0.5, options); -G.InputName = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'}; -G.OutputName = {'Dnlm1', 'Dnlm2', 'Dnlm3', 'Dnlm4', 'Dnlm5', 'Dnlm6', ... - 'Fnlm1', 'Fnlm2', 'Fnlm3', 'Fnlm4', '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_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine'); +save('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine'); +load('./mat/active_damping_undamped_plants.mat', 'G_iff', 'G_dvf', 'G_ine');
We initialize all the stages with the default parameters.
@@ -322,22 +322,22 @@ We initialize all the stages with the default parameters.
We identify the dynamics of the system using the linearize
function.
%% Options for Linearized +%% Options for Linearized options = linearizeOptions; options.SampleTime = 0; -%% Name of the Simulink File -mdl = 'nass_model'; +%% Name of the Simulink File +mdl = 'nass_model'; -%% Input/Output definition +%% Input/Output definition clear io; io_i = 1; -io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs -io(io_i) = linio([mdl, '/Tracking Error'], 1, 'openoutput', [], 'En'); io_i = io_i + 1; % Metrology Outputs +io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs +io(io_i) = linio([mdl, '/Tracking Error'], 1, 'openoutput', [], 'En'); io_i = io_i + 1; % Metrology Outputs
masses = [1, 10, 50]; % [kg] +masses = [1, 10, 50]; % [kg]
save('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses'); +save('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses');
load('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses'); +load('./mat/active_damping_cart_plants.mat', 'G_cart', 'masses');
load('mat/conf_simulink.mat'); -set_param(conf_simulink, 'StopTime', '4.5'); +load('mat/conf_simulink.mat'); +set_param(conf_simulink, 'StopTime', '4.5');
sim('nass_model'); +sim('nass_model');
save('./mat/active_damping_tomo_exp.mat', 'En', 'Eg', '-append'); +save('./mat/active_damping_tomo_exp.mat', 'En', 'Eg', '-append');
load('./mat/active_damping_tomo_exp.mat', 'En'); -Fs = 1e3; % Sampling Frequency of the Data -t = (1/Fs)*[0:length(En(:,1))-1]; +load('./mat/active_damping_tomo_exp.mat', 'En'); +Fs = 1e3; % Sampling Frequency of the Data +t = (1/Fs)*[0:length(En(:,1))-1];
masses = [1, 10, 50]; % [kg] +masses = [1, 10, 50]; % [kg]
Rz_amplitudes = [0, pi/4, pi/2, pi]; % [rad] +Rz_amplitudes = [0, pi/4, pi/2, pi]; % [rad]
Rz_periods = [60, 6, 2, 1]; % [s] +Rz_periods = [60, 6, 2, 1]; % [s]
Ry_amplitudes = [-3*pi/180, 3*pi/180]; % [rad] +Ry_amplitudes = [-3*pi/180, 3*pi/180]; % [rad]
initializeReferences('Dy_type', 'sinusoidal', ... - 'Dy_amplitude', 5e-3, ... % [m] - 'Dy_period', 1); % [s] +initializeReferences('Dy_type', 'sinusoidal', ... + 'Dy_amplitude', 5e-3, ... % [m] + 'Dy_period', 1); % [s]