nass-simscape/Identification/identification_Gd.m

27 lines
618 B
Mathematica
Raw Normal View History

2018-06-16 22:57:54 +02:00
%% Script Description
% Identification of the transfer function
% from Ground Motion to sample displacement.
%%
clear; close all; clc;
2018-06-21 11:43:46 +02:00
%%
initializeSample(struct('mass', 20));
initializeSimConf(struct('cl_time', 0));
2018-06-16 22:57:54 +02:00
2018-06-21 11:43:46 +02:00
%% Open Loop
[Gd_ol_20, Gd_ol_20_raw] = identifyGd(struct('cl', false));
2018-06-16 22:57:54 +02:00
2018-06-21 11:43:46 +02:00
%% Close Loop
[Gd_cl_20, Gd_cl_20_raw] = identifyGd(struct('cl', true));
2018-06-16 22:57:54 +02:00
2018-06-21 11:43:46 +02:00
%%
freqs = logspace(0, 3, 1000);
bodeFig({Gd_ol_20(1, 1), Gd_cl_20(1, 1)}, freqs, struct('ylabel', 'Amplitude [m/m]'))
legend({'OL', 'CL'});
2018-06-16 22:57:54 +02:00
2018-06-21 11:43:46 +02:00
exportFig('transmissibility_ol_cl', 'half-normal');
2018-06-16 22:57:54 +02:00
%%
2018-06-21 11:43:46 +02:00
save('./mat/Gd_ol_cl.mat', 'Gd_ol_20', 'Gd_cl_20');