Wednesday 14 November 2018

MATLAB program for Ground response analysis or FreeField acceleration response of Gilroy soil site

Ground response analysis or FreeField acceleration response of Gilroy soil site
(soil layer with H = 540 ft, weight density = 125 lb/ft^3, 5% damping, V_s = 1500 ft/ sec, resting on rigid bed-rock)
Ref: Kramer 1996, Example 7.2 in page 262
Fig. 1. Soil layer resting on rigid bed-rock

Gilroy Ground motion (Gilroy# 1, Rock) - Acceleration time history data

Steps in the MATLAB program for free-field analysis
1.      The acceleration time history given in the above table is saved as MATLAB data file Gilroy1_ATH.mat. This is the acceleration at the bed-rock below the soil laer.
2.      It is padded with zeros for end-correction in DFT
3.      Fft() function is used to split the time history into harmonics
4.      Also, the transfer function (F2) is generated for each frequency
5.      Product of fft() and transfer function gives the frequency response of acceleration at the top of the soil site
6.      To get the time response of acceleration at the top of the soil, ifft() function is used

MATLAB Program
% Importing the ground motion time history
clear;clc;
load ('Gilroy1_ATH.mat');dt=0.02;H=540;ro=125/32.2;G=(ro)*1500^2;zi=0.05;
N=length(data);N=2^(ceil(log2(N)));data=[data;zeros(N-length(data),1)];
t=dt*(1:N)';freq=(1:N)'/dt/N;
figure;subplot(3,2,1);plot(t,data);
FAmp=fft(data);absFAmp=abs(FAmp(1:N/2));
subplot(3,2,3);plot(freq(1:N/2),absFAmp);
subplot(3,2,5);plot(1./freq( 1:N/2),absFAmp);
w=2*pi*freq;vs_=sqrt(G*(1+2*1i*zi)/ro);
F2=1./cos(w*H/vs_);absF2=abs(F2);
subplot(3,2,2);plot(freq(1:N/2),absF2(1:N/2));
Afw=F2.*FAmp;%Afw=abs(F2).*abs(FAmp);%
subplot(3,2,4);plot(freq(1:N/2),abs(Afw(1:N/2)));
Aft=ifft(Afw);
subplot(3,2,6);plot(t,Aft);

Results