nass-micro-station-measurem.../Ground Motion/analyze_ground_motion.m

32 lines
1012 B
Matlab

%%
clear; close all; clc;
%%
id31 = load('ground_motion_psd.mat');
id09 = load('id09_floor_september2018.mat');
cern = load('ground_motion_dist.mat');
%% ID09 Measurements - Time Domain
figure;
hold on;
plot(id09.time3, 1e-6*id09.x_y_z(:, 1), 'DisplayName', 'dx');
plot(id09.time3, 1e-6*id09.x_y_z(:, 2), 'DisplayName', 'dy');
plot(id09.time3, 1e-6*id09.x_y_z(:, 3), 'DisplayName', 'dz');
hold off;
xlabel('Time [s]'); ylabel('Velocity [$m/s$]');
legend();
% Compute PSD of ID09 ground motion
[id09_pxx, id09_f] = pwelch(1e-6*id09.x_y_z(:, 1), hanning(ceil(length(1e-6*id09.x_y_z(:, 1))/10)), 0, [], 1/(id09.time3(end)/(length(id09.time3) - 1)));
%% Compare PSD of Cern, ID09 and ID31
figure;
hold on;
plot(cern.gm.freq, cern.gm.psd, 'DisplayName', 'CERN');
plot(id31.freqs, id31.psd_dx, 'DisplayName', 'ID31');
plot(id09_f, id09_pxx, 'DisplayName', 'ID09');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m^2/Hz$]');
legend('Location', 'northeast');