MATLAB Examples

# Harmonic excitation Response spectrum

## Initial definitions

The following initial definitions are made (in the order presented below):

Set the time step of the input acceleration time history.

dt=0.01; 

Set the input acceleration time history (). A sinusoidal acceleration time history is defined with maximum input acceleration equal to and period .

t=(0:dt:100)'; xgtt=3*sin(2*t); 

Set the eigenperiod range for which the response spectra will be calculated.

T=(0.01:0.01:10)'; 

Set the critical damping ratio () of the response spectra to be calculated.

ksi=0.05; 

Set the minimum absolute value of the eigenvalues of the amplification matrix.

rinf=1; 

Set the algorithm to be used for the integration.

AlgID='U0-V0-Opt'; 

Set the initial displacement of all SDOF oscillators analysed.

u0=0; 

Set the initial velocity of all SDOF oscillators analysed.

ut0=0; 

Plot the input harmonic excitation.

figure('Name','Harmonic excitation','NumberTitle','off') plot(t,xgtt,'LineWidth',1.) xlabel('t','FontSize',13); ylabel('a_g','FontSize',13); title('Harmonic excitation','FontSize',13) 

## Processing

Find the spectral displacement of a SDOF system with eigenperiod equal to 2 and critical damping ratio equal to 5% using default parameters.

[~,~,Sd,~,~]=LERS(dt,xgtt,2,0.05) 
Sd = 0.7163 

Calculation of elastic response spectra and pseudospectra using nondefault parameters.

[PSa,PSv,Sd,Sv,Sa]=LERS(dt,xgtt,T,ksi); 

## Post processing

Plot displacement spectrum.

figure('Name','Spectral Displacement','NumberTitle','off') plot(T,Sd,'LineWidth',2.) grid on xlabel('T_n','FontSize',13); ylabel('S_D','FontSize',13); title('Displacement Spectrum','FontSize',13) 

Plot velocity spectrum.

figure('Name','Spectral Velocity','NumberTitle','off') plot(T,Sv,'LineWidth',2.) grid on xlabel('T_n','FontSize',13); ylabel('S_V','FontSize',13); title('Velocity Spectrum','FontSize',13) 

Plot acceleration spectrum.

figure('Name','Spectral Acceleration','NumberTitle','off') plot(T,Sa,'LineWidth',2.) grid on xlabel('T_n','FontSize',13); ylabel('S_A','FontSize',13); title('Acceleration Spectrum','FontSize',13) 

Plot pseudo-velocity spectrum.

figure('Name','Pseudo Velocity Spectrum','NumberTitle','off') plot(T,PSv,'LineWidth',2.) grid on xlabel('T_n','FontSize',13); ylabel('PS_V','FontSize',13); title('Pseudo Velocity Spectrum','FontSize',13) 

Plot pseudo-acceleration spectrum.

figure('Name','Pseudo Acceleration Spectrum','NumberTitle','off') plot(T,PSa,'LineWidth',2.) grid on xlabel('T_n','FontSize',13); ylabel('PS_A','FontSize',13); title('Pseudo Acceleration Spectrum','FontSize',13) 

## Validation

• Spectral Displacement:
1. It is zero for rigid structures ( for )
2. For it is equal to
• Spectral Velocity
1. It is zero for rigid structures ( for )
2. For it is equal to
• Spectral Acceleration
1. For rigid structures for
2. For it is equal to
• Pseudo Velocity Spectrum
1. For rigid structures for
2. For it is equal to
• Pseudo Acceleration Spectrum
1. For rigid structures for
2. For it is equal to