Smoothing Power Spectral Density

Matlab. Having influenced by signal smoothing algorithms like moving average algorithm, I experimentally developed a smoothing algorithm for total of power spectral density. My purpose was to smooth delusive sharp variations in the graph so that I can do some calculations better. It balances between sharp peaks and falls. My first aim is to see the attack points better by this algorithm.

It takes the total of power spectral density to keep all frequencies in the instant time. First step takes average value of the previous and next points. Then, it adds this value as current and next values. Second step does the same calculation, however it takes the average value of the previous and next two jump points of first smoothed graph. Both steps have the a length correction calculation. I used two piano segments for the demonstration: piano1 and piano2. Please see the graphs for two segments below.


[1] Power Spectral Density, Matlab Documentation

[2] Signal Smoothing Algorithms