Add script to identify tf from force to displacement of the legs
This commit is contained in:
@@ -6,6 +6,8 @@ K = tf(zeros(6));
|
||||
K_iff = tf(zeros(6));
|
||||
save('./mat/controllers.mat', 'K', 'K_iff', '-append');
|
||||
|
||||
initializeInputs();
|
||||
|
||||
%% Light Sample
|
||||
initializeSample(struct('mass', 1));
|
||||
|
||||
|
28
identification/id_plant_variation.m
Normal file
28
identification/id_plant_variation.m
Normal file
@@ -0,0 +1,28 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%%
|
||||
K = tf(zeros(6));
|
||||
K_iff = tf(zeros(6));
|
||||
save('./mat/controllers.mat', 'K', 'K_iff', '-append');
|
||||
|
||||
%% Light Sample
|
||||
initializeSample(struct('mass', 50));
|
||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||
|
||||
%% Vertical Configuration
|
||||
initializeInputs();
|
||||
G_vert_init = identifyPlant();
|
||||
|
||||
initializeInputs(struct('Rz', 90));
|
||||
G_vert_turn = identifyPlant();
|
||||
|
||||
%% Tilted configuration
|
||||
initializeInputs(struct('Ry', 3));
|
||||
G_tilt_init = identifyPlant();
|
||||
|
||||
initializeInputs(struct('Ry', 3, 'Rz', 90));
|
||||
G_tilt_turn = identifyPlant();
|
||||
|
||||
%% Save
|
||||
save('./mat/id_plant_variation.mat', 'G_vert_init', 'G_vert_turn', 'G_tilt_init', 'G_tilt_turn')
|
24
identification/id_plant_variation_plots.m
Normal file
24
identification/id_plant_variation_plots.m
Normal file
@@ -0,0 +1,24 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load
|
||||
load('./mat/id_plant_variation.mat', 'G_vert_init', 'G_vert_turn', 'G_tilt_init', 'G_tilt_turn')
|
||||
|
||||
%%
|
||||
bodeFig({G_vert_init.G_dleg(1, 1), ...
|
||||
G_vert_init.G_dleg(2, 2), ...
|
||||
G_vert_init.G_dleg(3, 3), ...
|
||||
G_vert_init.G_dleg(4, 4), ...
|
||||
G_vert_init.G_dleg(5, 5), ...
|
||||
G_vert_init.G_dleg(6, 6)}, struct('phase', true));
|
||||
xlim([1, 500]);
|
||||
|
||||
%%
|
||||
bodeFig({G_vert_init.G_dleg(1, 1), ...
|
||||
G_vert_turn.G_dleg(1, 1),}, struct('phase', true));
|
||||
xlim([1, 500]);
|
||||
|
||||
%%
|
||||
bodeFig({G_vert_init.G_dleg(1, 1), ...
|
||||
G_tilt_init.G_dleg(1, 1),}, struct('phase', true));
|
||||
xlim([1, 500]);
|
Binary file not shown.
Reference in New Issue
Block a user