File Exchange

image thumbnail

Pseudo spectral acceleration, velocity and displacement spectra

version (98.4 KB) by Dr. Erol Kalkan, P.E.
This is a MatLAB function to compute linear-elastic damped response spectrum of time series


Updated 28 Mar 2017

View License

The function generates pseudo-spectral acceleration (PSA), pseudo-spectral velocity (PSV) and spectral displacement (SD) spectra for given damping ratio (e.g., 5% of critical). Spectral ordinates are for linear-elastic single-degree-of-freedom system with unit mass. A clear example is provided in demo.m file in zipped folder. Also provided is a plotting function for PSA, PSV and SD spectra.

Comments and Ratings (19)

Please review the code for very short periods (or large frequencies) i.e.<0.05 sec there are discrepancies when compared to solutions using the Newmark method, or when compared with software as seismosignal.

It shouldn't give any such errors; what version of MatLAB are you using?

Error using matlab.ui.Figure/set
Handles of type Legend cannot be made the current Axes.

Error in subplot1 (line 133)

Error in plotSpectra (line 21)
subplot1(2); hold;

It uses time-domain solution to solve the second-order differential equation of motion.

thanks mr kalkan, a fast algorithm to estimate the spectral accrelation, you mentioned spectral solititon in the code, i wonder is it a SDOF frequnecy domain method or a numerical integration time domain method?

Thans Dr. Erol

The code has the proper citation to a solver used.

jim junker

This file is copied from a Caltech report. Plagiarism!

Thanks a lot for your prompt answer Dr Kalkan!

That's correct. For example, xi = 0.05 for 5% of critical damping.

Hello Dr. Kalkan, just a question on the parameter xi (mentioned as "critical damping" in your comment): is this the fraction with respect to the critical damping ? i.e. 0.01 = 1% of critical damping (zero overshoot) ?

Thanks a lot for your useful function and Best Regards.

If you call the function as [PSA, PSV, SD] = responseSpectra(xi, sPeriod, gacc, dt), It will produce PSA, PSV and SD as separate arrays.

Thanks Mimo, I will make the changes per your suggestion. I do have MatLAB code to generate inelastic spectrum as well. I will post that one as well.


Thanks for this code Dr Kalkan. I am just curios if you have also developed any code for inelastic response?
Also the current code prints the ans (which is PSA) after running the it doesn't crate any vector for plotting. Is it possible for you to modify it to produce PSA, PSV and SD vectors separately?

First time, I haven't seen this error. The function has been fully tested in MatLAB version 2013a. Were you able to generate get the results? If you e-mail me your input waveform, I can check it.

Thanks for the function. I receive the following warning though:
Warning: Matrix is singular to working precision

Have you seen this before?


An example is added in demo.m file
A new plotting function is added

Description updated.

Note section has been revised.

Picture added

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: An improved subplot function