Skip to content

Measure spectral peakedness

What it does

Computes two percentages around a fixed reference frequency or each spectrum's maximum. PKL measures concentration in a narrow band relative to a wider band; AKL compares the wide-band maximum with the global maximum.

When to use it

Use it to assess whether a spectrum concentrates power around an expected oscillation or its strongest component. Supply a nonnegative, finite PSD and its increasing frequency grid.

Canonical ID: tools.peakedness

Inputs

Name Meaning Type Unit Requirements
pxx Nonnegative, finite PSD vector or matrix with spectra in columns. real vector or matrix caller-defined power/Hz minimum: 0; minimum length: 1; no NaN; finite
f Strictly increasing finite frequency grid shared by all spectra. real vector Hz minimum length: 1; no NaN; finite

Parameters

Name Meaning Type Unit Default Requirements
reference_freq Band center in Hz; omitted or null selects each global maximum. real scalar Hz not applicable not specified
window Wide-band width in Hz; the narrow-band width is 40 percent of this. real scalar Hz 0.125 greater than: 0

Outputs

Name Meaning Type Unit
pkl Narrow-band to wide-band spectral sum, in percent. real vector %
akl Wide-band to global maximum, in percent. real vector %

How it works

The default wide band is 0.125 Hz; the narrow band has 40 percent of that width. Both are centered on the reference and include their endpoints. Automatic mode uses the first global maximum, without imposing a physiological frequency interval. Each matrix column is assessed independently.

The concentration measure follows the reference-centered formulation of Kontaxis et al., with the earlier peak-conditioned approach of Lázaro et al. as scientific context. The method applies to spectra independently of signal modality.

Interpretation and limitations

PKL and AKL range from zero to 100 percent. In automatic mode AKL is always 100 for nonzero spectra, so it provides extra discrimination when a fixed reference is used. Zero spectra and bands without samples return zero for the corresponding measure. A uniform frequency grid is assumed. The band integrals are approximated by equal-width rectangular sums, so the common frequency spacing cancels in PKL. No interpolation is performed. Resolution and bandwidth therefore affect the result. NaN and infinite spectral values are rejected.

References

  • Jesús Lázaro et al. (2014). Electrocardiogram derived respiratory rate from QRS slopes and R-wave angle. Annals of Biomedical Engineering. doi:10.1007/s10439-014-1073-x
  • Spyridon Kontaxis et al. (2020). ECG-derived Respiratory Rate in Atrial Fibrillation. IEEE Transactions on Biomedical Engineering. doi:10.1109/TBME.2019.2923587

Implementations and technical resources

Python source | MATLAB source

Normative JSON | Validation cases