Renamed a few scripts
This commit is contained in:
parent
6161ff1ad3
commit
8cde1ba206
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,4 +28,4 @@ octave-workspace
|
||||
Assemblage_grt_rtw/
|
||||
Figures/
|
||||
data/
|
||||
Videos/
|
||||
movies/
|
||||
|
@ -21,64 +21,5 @@ initializeSample(struct('mass', 50));
|
||||
|
||||
[G_50, G_50_raw] = identifyG();
|
||||
|
||||
%%
|
||||
freqs = logspace(0, 3, 1000);
|
||||
|
||||
bodeFig({G_1(1, 1), G_1(2, 2), G_1(3, 3)}, freqs, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_xyz_1', 'normal-normal')
|
||||
|
||||
bodeFig({G_20(1, 1), G_20(2, 2), G_20(3, 3)}, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_xyz_20', 'normal-normal')
|
||||
|
||||
bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
|
||||
'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
|
||||
'$F_{n_x} \rightarrow D_{x}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_x_mass', 'normal-normal')
|
||||
|
||||
bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, struct('phase', true))
|
||||
legend({'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_y_mass', 'half-normal')
|
||||
|
||||
bodeFig({G_1(3, 3), G_20(3, 3), G_50(3, 3)}, struct('phase', true))
|
||||
legend({'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_z_mass', 'normal-normal')
|
||||
|
||||
|
||||
%%
|
||||
bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, freqs, struct('phase', true))
|
||||
legend({'$M = 1Kg$', ...
|
||||
'$M = 20Kg$', ...
|
||||
'$M = 50Kg$'})
|
||||
exportFig('G_y_mass_article', 'half-normal')
|
||||
|
||||
%%
|
||||
%% Save the obtained transfer functions
|
||||
save('./mat/G_f_to_d.mat', 'G_1', 'G_20', 'G_50');
|
||||
|
||||
|
||||
%%
|
||||
freqs = logspace(-1, 3, 1000);
|
||||
bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, freqs, struct('phase', true))
|
||||
ylabel('Amplitude [m/N]');
|
||||
legend({'$1Kg$', ...
|
||||
'$20Kg$', ...
|
||||
'$50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
set(gca,'YTick',[1e-8, 1e-6, 1e-4])
|
||||
ylim([1e-9, 1e-3])
|
||||
exportFig('G_x_mass', 'half-short', struct('tikz', true))
|
||||
|
63
identification/id_G_plots.m
Normal file
63
identification/id_G_plots.m
Normal file
@ -0,0 +1,63 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the transfer functions
|
||||
load('./mat/G_f_to_d.mat', 'G_1', 'G_20', 'G_50');
|
||||
|
||||
%%
|
||||
freqs = logspace(0, 3, 1000);
|
||||
|
||||
bodeFig({G_1(1, 1), G_1(2, 2), G_1(3, 3)}, freqs, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_xyz_1', 'normal-normal')
|
||||
|
||||
bodeFig({G_20(1, 1), G_20(2, 2), G_20(3, 3)}, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_xyz_20', 'normal-normal')
|
||||
|
||||
bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, struct('phase', true))
|
||||
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
|
||||
'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
|
||||
'$F_{n_x} \rightarrow D_{x}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_x_mass', 'normal-normal')
|
||||
|
||||
bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, struct('phase', true))
|
||||
legend({'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ...
|
||||
'$F_{n_y} \rightarrow D_{y}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_y_mass', 'half-normal')
|
||||
|
||||
bodeFig({G_1(3, 3), G_20(3, 3), G_50(3, 3)}, struct('phase', true))
|
||||
legend({'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$', ...
|
||||
'$F_{n_z} \rightarrow D_{z}$ - $M = 50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
exportFig('G_z_mass', 'normal-normal')
|
||||
|
||||
|
||||
%%
|
||||
bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, freqs, struct('phase', true))
|
||||
legend({'$M = 1Kg$', ...
|
||||
'$M = 20Kg$', ...
|
||||
'$M = 50Kg$'})
|
||||
exportFig('G_y_mass_article', 'half-normal')
|
||||
|
||||
%%
|
||||
freqs = logspace(-1, 3, 1000);
|
||||
bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, freqs, struct('phase', true))
|
||||
ylabel('Amplitude [m/N]');
|
||||
legend({'$1Kg$', ...
|
||||
'$20Kg$', ...
|
||||
'$50Kg$'})
|
||||
legend('location', 'southwest')
|
||||
set(gca,'YTick',[1e-8, 1e-6, 1e-4])
|
||||
ylim([1e-9, 1e-3])
|
||||
exportFig('G_x_mass', 'half-short')
|
@ -57,16 +57,15 @@ mass((T_mass_start+2)/sim_conf.Ts:(T_mass_start+3)/sim_conf.Ts, 2) = mass((T_mas
|
||||
mass((T_mass_start+3)/sim_conf.Ts:(T_mass_start+5)/sim_conf.Ts, 1) = mass((T_mass_start+2)/sim_conf.Ts, 1)-2*pi*( 20/360)*(time_vector((T_mass_start+3)/sim_conf.Ts:(T_mass_start+5)/sim_conf.Ts)-time_vector((T_mass_start+3)/sim_conf.Ts));
|
||||
mass((T_mass_start+3)/sim_conf.Ts:(T_mass_start+5)/sim_conf.Ts, 2) = mass((T_mass_start+2)/sim_conf.Ts, 2)-2*pi*(-10/360)*(time_vector((T_mass_start+3)/sim_conf.Ts:(T_mass_start+5)/sim_conf.Ts)-time_vector((T_mass_start+3)/sim_conf.Ts));
|
||||
|
||||
% opts_inputs = struct(...
|
||||
% 'ty', ty, ...
|
||||
% 'ry', ry, ...
|
||||
% 'rz', rz, ...
|
||||
% 'u_hexa', u_hexa, ...
|
||||
% 'mass', mass ...
|
||||
% );
|
||||
opts_inputs = struct(...
|
||||
'ty', ty, ...
|
||||
'ry', ry, ...
|
||||
'rz', rz, ...
|
||||
'u_hexa', u_hexa, ...
|
||||
'mass', mass ...
|
||||
);
|
||||
|
||||
% initializeInputs(opts_inputs);
|
||||
initializeInputs();
|
||||
initializeInputs(opts_inputs);
|
||||
|
||||
%% Initialize SolidWorks Data
|
||||
initializeSmiData();
|
Loading…
Reference in New Issue
Block a user