nass-simscape/Identification/identification_G.m
2018-06-16 22:57:54 +02:00

57 lines
1.7 KiB
Matlab

%% Script Description
% Identification of a force injected into the NASS (in cartesian
% coordinates) to the relative displacement of the sample
% and granite.
%%
clear; close all; clc;
%%
initializeSample(struct('mass', 1));
[G_1, G_1_raw] = identifyG();
%%
initializeSample(struct('mass', 20));
[G_20, G_20_raw] = identifyG();
%%
initializeSample(struct('mass', 50));
[G_50, G_50_raw] = identifyG();
%%
freqs = logspace(1, 4, 1000);
bodeFig({G_1(1, 1), G_1(2, 2), G_1(3, 3)}, 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', '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', 'normal-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')
%%
save('./mat/G_f_to_d.mat', 'G_1', 'G_20', 'G_50');