Spectrum: Get centre of gravity...

A command to query the selected Spectrum object.

If the complex spectrum is given by S(f), where f is the frequency, the centre of gravity is given by

0 f |S(f)|p df

divided by the "energy"

0 |S(f)|p df

Thus, the centre of gravity is the average of f over the entire frequency domain, weighted by |S(f)|p. For p = 2, the weighting is done by the power spectrum, and for p = 1, the weighting is done by the absolute spectrum. A value of p = 2/3 has been seen as well.

Setting

Power
the quantity p in the formulas above. Common values are 2, 1, or 2/3.

Interpretation

The spectral centre of gravity is a measure for how high the frequencies in a spectrum are on average. For a sine wave with a frequency of 377 Hz, the centre of gravity is 377 Hz. You can easily check this in Praat by creating such a sine wave (Create Sound from formula...), then converting it to a Spectrum (Sound: To Spectrum...), then querying the mean frequency. For a white noise sampled at 22050 Hz, the centre of gravity is 5512.5 Hz, i.e. one half of the Nyquist frequency.

Related measures

The centre of gravity is used in the computation of spectral moments:


© ppgb, February 25, 2007