The estimation of a fundamental frequency in monophonic signals is a straight-forward (but still error-prone) procedure that can be done in multiple ways.
Methods in the time domain:
- Zero-Crossing Rate
- Autocorrelation Method
Methods in the frequency domain:
- Harmonic Product Spectrum
- Cepstral Analysis
Autocorrelation methodΒΆ
The autocorrelation is a simple time-domain approach that is robust enough for high-SNR signals with a clear, stationary fundamental frequency. The following example shows how the autocorrelation method works for a block of 2048 samples from a violin sound, recorded at $48$ kHz.
We look for a peak in the autocorrelation signal $R_{XX}[n]$ and define a search range with:
$$ $f_{min}$ = 50 \mathrm{Hz} $$
$$ $f_{max}$ = 1000 \mathrm{Hz} $$
In the search domain, the autocorrelation fuction has the highest significant peak at:
$$ \mathrm{Lag}_{max}=243 $$
The fundamental frequency in Hz can be obtained by the following equation:
$$ f_0 = \frac{f_s}{\mathrm{Lag}_{max}} = 197.53 \mathrm{Hz} $$