I wish I could help but I don't see the relationship between the consensus algorith and the PSD. For stochastic processes, the power spectral density function is the Fourier Transform (FFT) of the Autocorrelation Function (covariance). Can you this processing to get your spectrum?