39 lines
1.0 KiB
Mathematica
39 lines
1.0 KiB
Mathematica
|
%% Script Description
|
||
|
% Identification of the transfer function
|
||
|
% from Ground Motion to sample displacement.
|
||
|
|
||
|
%%
|
||
|
clear; close all; clc;
|
||
|
|
||
|
%% Options for preprocessing the identified transfer functions
|
||
|
f_low = 10;
|
||
|
f_high = 10000;
|
||
|
|
||
|
%% Options for Linearized
|
||
|
options = linearizeOptions;
|
||
|
options.SampleTime = 0;
|
||
|
|
||
|
%% Name of the Simulink File
|
||
|
mdl = 'Assemblage';
|
||
|
|
||
|
%% NASS
|
||
|
% Input/Output definition
|
||
|
io(1) = linio([mdl, '/Micro-Station/Gm'],1,'input');
|
||
|
io(2) = linio([mdl, '/Micro-Station/Sample'],1,'output');
|
||
|
|
||
|
% Run the linearization
|
||
|
Gd_xg_to_d_raw = linearize(mdl,io, 0);
|
||
|
|
||
|
Gd_xg_to_d = preprocessIdTf(Gd_xg_to_d_raw, f_low, f_high);
|
||
|
|
||
|
% Input/Output names
|
||
|
Gd_xg_to_d.InputName = {'Dgx', 'Dgy', 'Dgz'};
|
||
|
Gd_xg_to_d.OutputName = {'Dx', 'Dy', 'Dz', 'Rx', 'Ry', 'Rz'};
|
||
|
|
||
|
% Bode Plot of the linearized function
|
||
|
bodeFig({Gd_xg_to_d(1, 1), Gd_xg_to_d(2, 2), Gd_xg_to_d(3, 3)}, struct('phase', true))
|
||
|
legend({'$Dg_{x} \rightarrow D_{x}$', '$Dg_{y} \rightarrow D_{y}$', '$Dg_{z} \rightarrow D_{z}$'})
|
||
|
|
||
|
%%
|
||
|
save('./mat/Gd_xg_to_d.mat', 'Gd_xg_to_d');
|