nass-simscape/hac_lac/index.org
2020-02-18 13:58:27 +01:00

20 KiB

HAC-LAC applied on the Simscape Model

Undamped System

<<sec:undamped_system>>

Introduction   ignore

Identification of the plant

Initialize the Simulation

We initialize all the stages with the default parameters.

  initializeGround();
  initializeGranite();
  initializeTy();
  initializeRy();
  initializeRz();
  initializeMicroHexapod();
  initializeAxisc();
  initializeMirror();

The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.

  initializeNanoHexapod('actuator', 'piezo');
  initializeSample('mass', 50);

No disturbances.

  initializeDisturbances('enable', false);

We set the references to zero.

  initializeReferences();

And all the controllers are set to 0.

  initializeController('type', 'open-loop');

Identification

First, we identify the dynamics of the system using the linearize function.

  %% Options for Linearized
  options = linearizeOptions;
  options.SampleTime = 0;

  %% Name of the Simulink File
  mdl = 'nass_model';

  %% 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

  %% Run the linearization
  G = linearize(mdl, io, options);
  G.InputName  = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
  G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
  load('mat/stages.mat', 'nano_hexapod');
  G_cart = minreal(G*inv(nano_hexapod.J'));
  G_cart.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
  G_legs = minreal(inv(nano_hexapod.J)*G);
  G_legs.OutputName = {'e1', 'e2', 'e3', 'e4', 'e5', 'e6'};

Display TF

  <<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/plant_G_cart.png
Transfer Function from forces applied by the nano-hexapod to position error (png, pdf)

Obtained Plants for Active Damping

<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_iff_plant.png
G_iff: IFF Plant (png, pdf)
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_ine_plant.png
G_dvf: Plant for Direct Velocity Feedback (png, pdf)
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_inertial_plant.png
Inertial Feedback Plant (png, pdf)

Tomography Experiment

Simulation

We initialize elements for the tomography experiment.

  prepareTomographyExperiment();

We change the simulation stop time.

  load('mat/conf_simulink.mat');
  set_param(conf_simulink, 'StopTime', '3');

And we simulate the system.

  sim('nass_model');

Finally, we save the simulation results for further analysis

  save('./active_damping/mat/tomo_exp.mat', 'En', 'Eg', '-append');

Results

We load the results of tomography experiments.

  load('./active_damping/mat/tomo_exp.mat', 'En');
  t = linspace(0, 3, length(En(:,1)));
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_act_damp_undamped_sim_tomo_trans.png
Position Error during tomography experiment - Translations (png, pdf)
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_act_damp_undamped_sim_tomo_rot.png
Position Error during tomography experiment - Rotations (png, pdf)

Verification of the transfer function from nano hexapod to metrology

Initialize the Simulation

We initialize all the stages with the default parameters.

  initializeGround();
  initializeGranite();
  initializeTy();
  initializeRy();
  initializeRz();
  initializeMicroHexapod();
  initializeAxisc();
  initializeMirror();

The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.

  initializeNanoHexapod('actuator', 'piezo');
  initializeSample('mass', 50);

No disturbances.

  initializeDisturbances('enable', false);

We set the references to zero.

  initializeReferences();

And all the controllers are set to 0.

  initializeController('type', 'open-loop');

Identification

First, we identify the dynamics of the system using the linearize function.

  %% Options for Linearized
  options = linearizeOptions;
  options.SampleTime = 0;

  %% Name of the Simulink File
  mdl = 'nass_model';

  %% 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

  %% Run the linearization
  G = linearize(mdl, io, options);
  G.InputName  = {'Fnl1', 'Fnl2', 'Fnl3', 'Fnl4', 'Fnl5', 'Fnl6'};
  G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
  load('mat/stages.mat', 'nano_hexapod');
  G_cart = minreal(G*inv(nano_hexapod.J'));
  G_cart.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
  G_legs = minreal(inv(nano_hexapod.J)*G);
  G_legs.OutputName = {'e1', 'e2', 'e3', 'e4', 'e5', 'e6'};

Display TF

  <<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/plant_G_cart.png
Transfer Function from forces applied by the nano-hexapod to position error (png, pdf)

Obtained Plants for Active Damping

<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_iff_plant.png
G_iff: IFF Plant (png, pdf)
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_ine_plant.png
G_dvf: Plant for Direct Velocity Feedback (png, pdf)
<<plt-matlab>>
/tdehaeze/nass-simscape/media/commit/abe29e9938adc69db9a89b9e8fbabb05d9576b6d/hac_lac/figs/nass_active_damping_inertial_plant.png
Inertial Feedback Plant (png, pdf)