Add mask to specify stewart object. Add script to identify transfer functions
This commit is contained in:
parent
17c9de54fb
commit
6fe96032fd
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@ octave-workspace
|
|||||||
|
|
||||||
# Custom
|
# Custom
|
||||||
stewart_displacement_grt_rtw/
|
stewart_displacement_grt_rtw/
|
||||||
|
Figures/
|
||||||
|
77
identification_control.m
Normal file
77
identification_control.m
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
%% Script Description
|
||||||
|
% Script used to identify the transfer functions of the
|
||||||
|
% Stewart platform (from actuator to displacement)
|
||||||
|
|
||||||
|
%%
|
||||||
|
clear;
|
||||||
|
close all;
|
||||||
|
clc
|
||||||
|
|
||||||
|
%% Define options for bode plots
|
||||||
|
bode_opts = bodeoptions;
|
||||||
|
|
||||||
|
bode_opts.Title.FontSize = 12;
|
||||||
|
bode_opts.XLabel.FontSize = 12;
|
||||||
|
bode_opts.YLabel.FontSize = 12;
|
||||||
|
bode_opts.FreqUnits = 'Hz';
|
||||||
|
bode_opts.MagUnits = 'abs';
|
||||||
|
bode_opts.MagScale = 'log';
|
||||||
|
bode_opts.PhaseWrapping = 'on';
|
||||||
|
bode_opts.PhaseVisible = 'on';
|
||||||
|
|
||||||
|
%% Options for Linearized
|
||||||
|
options = linearizeOptions;
|
||||||
|
options.SampleTime = 0;
|
||||||
|
|
||||||
|
%% Name of the Simulink File
|
||||||
|
mdl = 'stewart_simscape';
|
||||||
|
|
||||||
|
%% Centralized control (Cartesian coordinates)
|
||||||
|
% Input/Output definition
|
||||||
|
io(1) = linio([mdl, '/F_cart'],1,'input');
|
||||||
|
io(2) = linio([mdl, '/Stewart_Platform'],1,'output');
|
||||||
|
|
||||||
|
% Run the linearization
|
||||||
|
G_cart = linearize(mdl,io, 0);
|
||||||
|
|
||||||
|
% Input/Output names
|
||||||
|
G_cart.InputName = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
|
||||||
|
G_cart.OutputName = {'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'};
|
||||||
|
|
||||||
|
% Bode Plot of the linearized function
|
||||||
|
freqs = logspace(2, 4, 1000);
|
||||||
|
|
||||||
|
bodeFig({G_cart(1, 1), G_cart(2, 2), G_cart(3, 3)}, freqs, struct('phase', true))
|
||||||
|
legend({'$F_x \rightarrow D_x$', '$F_y \rightarrow D_y$', '$F_z \rightarrow D_z$'})
|
||||||
|
exportFig('hexapod_cart_trans', 'normal-normal')
|
||||||
|
|
||||||
|
bodeFig({G_cart(4, 4), G_cart(5, 5), G_cart(6, 6)}, freqs, struct('phase', true))
|
||||||
|
legend({'$M_x \rightarrow R_x$', '$M_y \rightarrow R_y$', '$M_z \rightarrow R_z$'})
|
||||||
|
exportFig('hexapod_cart_rot', 'normal-normal')
|
||||||
|
|
||||||
|
bodeFig({G_cart(1, 1), G_cart(2, 1), G_cart(3, 1)}, freqs, struct('phase', true))
|
||||||
|
legend({'$F_x \rightarrow D_x$', '$F_x \rightarrow D_y$', '$F_x \rightarrow D_z$'})
|
||||||
|
exportFig('hexapod_cart_coupling', 'normal-normal')
|
||||||
|
|
||||||
|
%% Centralized control (Cartesian coordinates)
|
||||||
|
% Input/Output definition
|
||||||
|
io(1) = linio([mdl, '/F_legs'],1,'input');
|
||||||
|
io(2) = linio([mdl, '/Stewart_Platform'],2,'output');
|
||||||
|
|
||||||
|
% Run the linearization
|
||||||
|
G_legs = linearize(mdl,io, 0);
|
||||||
|
|
||||||
|
% Input/Output names
|
||||||
|
G_legs.InputName = {'F1', 'F2', 'F3', 'M4', 'M5', 'M6'};
|
||||||
|
G_legs.OutputName = {'D1', 'D2', 'D3', 'R4', 'R5', 'R6'};
|
||||||
|
|
||||||
|
% Bode Plot of the linearized function
|
||||||
|
freqs = logspace(2, 4, 1000);
|
||||||
|
|
||||||
|
bodeFig({G_legs(1, 1)}, freqs, struct('phase', true))
|
||||||
|
legend({'$F_i \rightarrow D_i$'})
|
||||||
|
exportFig('hexapod_legs', 'normal-normal')
|
||||||
|
|
||||||
|
bodeFig({G_legs(1, 1), G_legs(2, 1)}, freqs, struct('phase', true))
|
||||||
|
legend({'$F_i \rightarrow D_i$', '$F_i \rightarrow D_j$'})
|
||||||
|
exportFig('hexapod_legs_coupling', 'normal-normal')
|
7
init_simulink.m
Normal file
7
init_simulink.m
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
params_micro_hexapod;
|
||||||
|
micro_hexapod = stewart;
|
||||||
|
|
||||||
|
params_nano_hexapod;
|
||||||
|
nano_hexapod = stewart;
|
||||||
|
|
||||||
|
clear stewart;
|
@ -32,7 +32,7 @@ Leg = struct();
|
|||||||
|
|
||||||
Leg.stroke = 10e-3; % Maximum Stroke of each leg [m]
|
Leg.stroke = 10e-3; % Maximum Stroke of each leg [m]
|
||||||
Leg.k.ax = 5e7; % Stiffness of each leg [N/m]
|
Leg.k.ax = 5e7; % Stiffness of each leg [N/m]
|
||||||
Leg.ksi.ax = 10; % Maximum amplification at resonance []
|
Leg.ksi.ax = 3; % Maximum amplification at resonance []
|
||||||
Leg.rad.bottom = 25; % Radius of the cylinder of the bottom part [mm]
|
Leg.rad.bottom = 25; % Radius of the cylinder of the bottom part [mm]
|
||||||
Leg.rad.top = 17; % Radius of the cylinder of the top part [mm]
|
Leg.rad.top = 17; % Radius of the cylinder of the top part [mm]
|
||||||
Leg.density = 8000; % Density of the material [kg/m^3]
|
Leg.density = 8000; % Density of the material [kg/m^3]
|
||||||
|
@ -55,7 +55,7 @@ SP.density.top = 8000; % [kg/m^3]
|
|||||||
SP.color.bottom = [0.7 0.7 0.7]; % [rgb]
|
SP.color.bottom = [0.7 0.7 0.7]; % [rgb]
|
||||||
SP.color.top = [0.7 0.7 0.7]; % [rgb]
|
SP.color.top = [0.7 0.7 0.7]; % [rgb]
|
||||||
SP.k.ax = 0; % [N*m/deg]
|
SP.k.ax = 0; % [N*m/deg]
|
||||||
SP.ksi.ax = 10;
|
SP.ksi.ax = 3;
|
||||||
|
|
||||||
SP.thickness.bottom = SP.height.bottom-Leg.sphere.bottom; % [mm]
|
SP.thickness.bottom = SP.height.bottom-Leg.sphere.bottom; % [mm]
|
||||||
SP.thickness.top = SP.height.top-Leg.sphere.top; % [mm]
|
SP.thickness.top = SP.height.top-Leg.sphere.top; % [mm]
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user