# Normalize harmonics to the same fundamental frequency in a time series using MATLAB

I'm a bit new to DSP (so apologies if I get the terminology incorrect) and was wondering if the problem I have is standard. I have measured a time series of a fan and noticed that the my spectrogram contains harmonics. I haven't got a picture to hand but this picture I found demonstrates exactly what I'm seeing:

(First 2.0 seconds)

• What I would like to do is normalize my data so that all the harmonics line up on the same respective frequencies: I want to enforce the same fundamental frequency on all my data.

• This would tell me that the shifts in frequency are harmonically related (and therefore, can be linearly scaled) or that they're not harmonically related.

Is there such a filter / technique / methodology which does such a thing?

• If there isn't then the solution I propose is to perform a peak detection on each slice of the spectrogram, and then calculate the linear coefficients from the peak positions.

Hopefully I've explained my problem succinctly.

• Have you looked at "harmonic product spectrum" methods? – hotpaw2 Jan 18 '17 at 14:37
• Hello, no I haven't! I'll look into it now. Thank you – user1147964 Jan 18 '17 at 15:02
• in music synthesis, this would be "wavetable synthesis" in which a pitch detector would determine the period of the periodic waveform and then that waveform would be resampled to have exactly $N$ samples per period, no matter what the period length (or pitch) is. – robert bristow-johnson Jan 24 at 0:19