The Evolutionary Power Spectral Density (EPSD)  is compared to the well-known spectrogram implemented in Matlab. The EPSD produces a smoother signal, especially if the amount of data point is low. In the following, I am using the example from  where the spectrogram applies well. For other application, e.g. civil engineering, the spectrogram method may provide a too low frequency or time resolution. The use of the EPSD is therefore more common in this field, see e.g.  for an application of the EPSD to compute the bridge response to non-stationary wind load.
The submission contains:
• An example file
• The function EPSD.m
Any comment, question or suggestion to improve the submission is warmly welcomed. Shiyu Zhao is gratefully acknowledged for the suggestion regarding the definition of the lower-boundary of the frequency vector.
 Priestley, M. B. (1965). Evolutionary spectra and non-stationary processes. Journal of the Royal Statistical Society. Series B (Methodological), 204-237.
 Hu, L., Xu, Y. L., & Huang, W. F. (2013). Typhoon-induced non-stationary buffeting response of long-span bridges in complex terrain. Engineering Structures, 57, 406-415.
Cheynet, E. Evolutionary Power Spectral Density (EPSD). Zenodo, 2020, doi:10.5281/ZENODO.4110451.
Thank a lot for the help. In the updated version, I scale the EPSD with respect to the variance of the original signal. Apparently, this work reasonably well for both the moving variance and the PSD (with pwelch). Note that I did not scale the spectrogram.
Hi, Dr Cheynet!
Sorry to interrupt but when I tried to compare the EPSD with spectrogram, I found that the energy in EPSD is three times smaller than spectrogram for the quadratic chirp signal.
I also integrate the energy along the frequency S(f)df at each time instant then compare with the moving variance of the time series, where spectrogram fit well with the time varying variance but the result from EPSD deviates a lot.
Are there any transform factors that should be taken into consideration? Looking forward to your reply.
You're welcome. Thanks for sharing!
Thanks for the clarification! you are right that the lowest frequency should depend on H. In my case, the length of the window is actually 2H, which means that the lowest frequency recorded is 1/(2H). I'm going to update the function as soon as possible.
Thanks for the response.
EPSD is similar to STFT with a moving overlapped window of length H. The corresponding code is
U0 = conv(g,x.*exp(-1i*2*pi.*freq(ii)*t0),'same'); % g is a uniform window with length H
which is same as
U0 = conv(exp(-1i*2*pi.*freq(ii)*t0),x.*g,'same');
For a signal with a length H, the minimum frequency should not be smaller than 1/H. So I'm wondering if the lowest frequency should be chosen independent on H.
Thank a lot for the feedback, and sorry for the late reply. I have not used this function in four years, so it took me a while to come back to it. I am not sure I understood properly your question. The frequency vector is here defined independently on H. Does it raise an issue?
Thanks for the code!
I have a question regarding to the relationship between the weighted function (H and T) and the frequency resolution of the EPSD. As H will determine the window length where FFT is applied, the frequency resolution of the EPSD should not be smaller than 1/H. Am I right about this relationship? Looking forward to your reply.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!