Is there a code to get power spectrum corresponding to a velocity/acceleration time history?
9 次查看(过去 30 天)
显示 更早的评论
I am working on generating seimic noise numerically. I have a velocity/acceleration time history. I want to generate power spectrum (power spectral density) compatible to the time history. Is there any code for that?
2 个评论
Sam Chak
2022-3-28
Best if you provide the noise data and the equation for the power spectrum, so that we can investigate and analyze it.
Else, please check if the following article is helpful:
回答(1 个)
William Rose
2022-3-28
编辑:William Rose
2022-3-29
[edited: corrected spelling errors]
Yes it is possible. Estimate the spectrum of the original signal by taking the FFT or by other standard methods, such as those described in the link provided by @Sam Chak, or see the attached notes. Note that the Welch periodogram method, which is usually my first choice, would not be my first choice for a seismogram, because Welch's method chops up the signal into segments that are presumed to be similar random samples of the signal. But for a seismogram, they are not random samples of the signal, because one chunk will have the peak, and other chunks will have very little activity, and so on. Therefore I would just use the fft to estimate the amplitude spectrum.
Then create a frequency domain representation of your signal, with the ampltudes you got above, and random phases. But the phases for the "negative" frequencies must be the negative of the phases at the corresponding positive frequencies, otherwise the inverse FFT will be complex, and you want it to be real. Then take the inverse FFT of the frequency-domain version of the signal which you have cretaed. This is the output you desire. I willl provide an example of all this, in case it is not clear.
5 个评论
William Rose
2022-3-30
I modified the script so that it reads in your file and uses the time vector in your file. I also modified the code so it works with an even or odd number of points - since your file has an odd number of points. As before, the script synthesizes three signals with the same power spectrum as the original signal, but with random phases. If you wish, adjust the script to save the signals to disk, or change the number of signals. Here is the graphical output, using your data file.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!