MATLAB Answers

How can I plot a trendline that follows the peaks a time-history data set (accelerogram)?

1 view (last 30 days)
Joshua Castellanos
Joshua Castellanos on 22 Jul 2021
Commented: Star Strider on 23 Jul 2021
Hello all,
I'd like to calculate the damping ratio of a structure based on acceleration data.
To do so I usually take the logarithmic decrement of a nice sinusoidal wave. However, in certain cases I obtain waves that do not allow me to do so easily thus I would like to create a trend line that follows the peaks as shown in the PDF attached. With this curve I could estimate the overall damping of the structure.
The image below shows graphically what I would like to do.
Thank you in advance

Answers (1)

Star Strider
Star Strider on 22 Jul 2021
The envelope function could do what you want.
Another option is findpeaks, with the appropriate name-value pair arguments.
Both are Signal Processing Toolbox functions.
.
  2 Comments
Star Strider
Star Strider on 23 Jul 2021
My pleasure!
If I had the signal itself, I could provide actual code. It might be necessary to use a lowpass filter first to eliminate the high-frequency parts of the signal. Determine the best cutoff ffrequency by first performing a Fourier transform of the signal with the fft function.
.

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by