PSD Computing
PSD Computing
PSD Computing
net/publication/296962602
CITATIONS READS
2 8,814
2 authors:
All content following this page was uploaded by Luciano Caldas on 24 October 2016.
Introduction
Spectral estimation is an important and useful tool for signal analysis. It, however,
has several practical limitations according to signal characteristics that demand the use of
several different approaches to minimize some of the problems like power leakage, spectra
blurring, bias, etc. [10, 9, 11]
For the current purposes, spectral estimation is used for acoustic signals analysis in
aeroacoustic [8] and beamforming applications [1, 2, 3, 6, 5, 7]. These signals can be seen as
having continuous spectra derived from their nature as regular stochastic processes with
no strictly sinusoidal tones. This is contrast to problems relating the electrical power
network whose signals are comprised of 60 Hz and its odd harmonics.
Our acoustic data acquisition experiments usually consist of 30 sec of acquired data
allowing the comfortable use of the well known Welch spectral estimation method [10],
in which, as is customary in the literature [9], we adopt 50% of overlap between signal
segments before averaging the absolute squared value of segments to obtain the spectral
density estimate. The Hanning window [10, 8] is the most popular one due to its good
trade-off between main-lobe aperture and reduced side-lobe levels.
On applying windows in the case of continuous spectra, careful normalization is
required to ensure that the power computed over time is the same as the one that would
be obtained integrating the spectrum. This was the main motivation of this study: How
to compute correctly the lose of energy caused by the windowing, in terms of signal’s
i
energy conservation. On the other hand, if the spectrum contains pure sinusoids the
normalization that needs to be applied is different from that of a continuous spectrum
leading to some prevailing confusion [4].
The following sections describe the method used for the spectral estimation of signals
with continuous spectra together with a numerical test for code validation. Finally, two
algorithms written in MATLAB are shown: one for cross-spectra computation and a
second one for testing the proposed code.
Let two the data records of two signals x and y of length comprising N samples, be
broken into blocks x(k) and y(k) of size L . In this way, the equivalent block of cross-
(k)
spectrum Ŝxy is estimated by means of
2 · F(x(k) · w) · conj(F(y(k) · w))
Ŝ(k)
xy (f ) = (1)
fs · wi2
P
Test methodology
Theoretical response
ii
and its transfer function H(z) is given by
1
H(z) =
1 − 1.82z −1 + 3.14z −2 − 3.8z −3 + 4.53z −4 − 4.35z −5 + 4.17z −6 − 3.19z −7 + 2.48z −8 − 1.31z −9 + 0.74z −10
1
0.8
0.6
Imaginary Part 0.4
0.2
10
0
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.5 0 0.5 1
Real Part
Results
The results of applying the data generated according to the previously sections can be
appreciated in Figs 2 and 3. Different L values are used to compare window effects on
spectral estimation. To help in the comparison, the theoretical spectral density obtained
using the filter transfer-function (20 × log10 H(f )) is also shown, proving goodness of fit.
Another parameter used to check the results is the signal power. The variance of the
data record (total power) must be equal to the integral of the PSD (Parseval’s theorem),
i.e,
Z +∞
2
σx = Rxx (0) = Sxx (f )df (3)
−∞
which can be computed by the sum of all its terms times the frequency step size, or
L/2−1
fs X
Pxy = · Ŝxy (fi ) (4)
L i=0
where fs is the sampling frequency.
The variance is close to the summed PSD results up-to small numerical computation
differences as seen next:
iii
Power spectra test
30
theoretical spec
Window 1024
Window 512
20 Window 256
Window 128
10
PSD [dB]
-10
-20
-30
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
Normalized frequency
20
PSD [dB]
15
10
Experimental data
Experimental data from NASA-Glenn [6, 7] was used to validate the code and test
the effects of different windows and length. The data was acquired by an array of 90
microphones flush mounted in a duct. An aeroengine fan is placed downstream close to
this array. This setup is largely used for aeroacoustic purpose and the development of
duct-acoustics, beamforming and modal analysis techniques based on microphone signal
processing.
iv
The spectrum shape is expected to have broadband (like a low-pass frequency response
filter) and harmonic tones, called BPF (blade passing frequency). As the fan blades rotate,
the interaction of their periodic wakes with the flow generate pure tones with frequency
given by f = B.Ω, where B is the number of blades in the fan and Ω is the fan speed.
In order to compare the effect of different window length and type, two different results
are portrayed as follows.
105 Kaiser(4096,6)
Kaiser(2048,6)
Kaiser(1024,6)
Kaiser(512,6)
100 Hanning(2048)
95
SPL/ dB
90
85
80
75
70
539 1078 1617 2156 2695 3773 4851
f/ Hz
Figure 4: PSD estimated with different window length. Bellow : Zoom-in the
first tone.
Fig. 4 shows a typical PSD for the noise generated by a turbomachinery. We can see
v
a broadband decaying with frequency and the typical harmonic tones. The bottom plot
shows a closer look to the first tone (or BPF) and the difference in the results is clearly
seen. A bigger window shows a much better capability to represent small tones and tones
appear “narrower” comparing to smaller windows. In fact tones are ideally given by an
impulse function, δ(x), however, due to practical limitations (shuch as sampling frequency,
number of samples, etc) the representation of this function is seen as a “sinc” function
(sin(x)/x). In other words, a bigger window leads to a better approximation of the sinc
function.
This leads to a trivial problem: The estimation of tone amplitudes, as their values
change depending on the window length.
Kaiser(4096,6)
105 hanning(4096)
blackman(4096)
flattopwin(4096)
100 rectwin(4096)
95
SPL/ dB
90
85
80
75
Figure 5: PSD estimated with 5 different data taper. Bellow : Zoom-in the first
tone.
Indeed the result obtained with Kaiser (β = 6) and Hanning window is the same. The
vi
green curve (rectangular window, i.e., no window) shows a great capability to find the
tone, however, a huge amount of leakage (highlighted in the plot). On the other hand,
the flat-top (purple) showed great amount of smearing in the tone.
In this example, the Hanning and Kaiser window were the best choice in terms of
spectrum leakage and smearing effect.
Variance
Finally, we can again compare the PSD integration (Eq. 4) and the signal variance (Eq.
3), as previously. It is worth to remember that the data base comprises 90 microphones,
so, now we are able to compare 90 signal variances. This result is shown in Fig. 6. For all
channels, red crosses match with the blue circle, which means that the power spectrum has
no bias in the sense of power conservation and the energy loss caused by the windowing
is correctly compensated.
127
126
SPL/ dB
125
124
123
122
121
120
0 10 20 30 40 50 60 70 80 90
microphone index #
Conclusions
The quite simple PSD estimation proposed in this work showed good agreement when
compared to a known power spectra. The main motivation for that was compute correctly
the energy loss due to the windowing on the signal segments. As seen, the PSD estimated
preserves the energy of the signal (variance) independently of the data tapper type and
length used.
In this second version, experimental data was added in order to evaluate the effect of
window type and length. Kaiser and Hanning window showed in this experiment a great
choice with respect to power leakage and smearing. Results obtained are in agreement as
observed in literature.
Finally, the MATLAB code attached in annex section allows to compute the cross-
spectra matrix of all cross-spectral combinations with high performance.
vii
Annex
Matlab codes for spectra estimation and validation. It is necessary the ‘Signal Processing’
toolbox.
>>welch estimator.m
signal_samples = size(signals,1);
number_of_signals = size(signals,2);
back_shift = block_samples./2;
number_of_blocks = floor((2*signal_samples)./block_samples) -1;
data_taper = window;
data_taper = repmat(data_taper,1,number_of_signals);
viii
Data_Block = Data_Block(1:block_samples/2,:);
ix
end
References
[1] Caldas, L.C., et al., In-duct Beamforming Noise Source Estimation and Mode Detec-
tion University of São Paulo Fan Rig, 21st AIAA/CEAS Aeroacoustics Conference.
June, 2015.
[2] Caldas, L. C., et al. In-duct Rotating Beamforming and Mode Detection of Fan Noise
Sources. 22nd AIAA/CEAS Aeroacoustics Conference. 2016.
[3] Amaral, F.R., Souza, D.S., Pagani, C.C, Medeiros, M.F. Experimental study of the
effect of a small 2D excrescence placed on the slat cove surface of an airfoil on its
acoustic noise, 21st AIAA/CEAS Aeroacoustics Conference. June, 2015.
[4] Tröbs, M. and Heinzel, G., Improved spectrum estimation from digitized time series
on a logarithmic frequency axis, Measurement 39 (2006) 120-129.
[5] Lowis, Christopher R., In-duct measurement techniques for the characterisation of
broadband aeroengine noise, University of Southampton, 2007.
[6] Dougherty, R.P. and Walker, B.E. , Virtual Rotating Microphone Imaging of Broad-
band Fan Noise, AIAA-2009-3121, 2009.
[7] Sutliff, D.L., A Mode Propagation Database Suitable for Code Validation Utilizing the
NASA Glenn Advanced Noise Control Fan and Artificial Sources, AIAA 2014-0719.
[9] Percival, B.D. and Walden, A.T., Spectral Analysis for Physical Applications, Cam-
bridge University Press, 1993.
[10] Kay, Steven M. Modern Spectral Estimation: Theory & Application , Prentice-Hall,
1987.
[11] Stoica, P., Moses, Randolph L. Introduction to spectral analysis, Prentice Hall, 1997.