# Demystifying DFT-Based Harmonic Phase Estimation, Transformation, and Synthesis
## 3 An Interpretable Time-Shift Invariant Harmonic Phase Model
### Demystifying the Phasegram  
DFT-based non-parametric spectrum estimation techniques are commonly used to analyze, represent, and interpret the spectral properties of a given signal for which no strong assumptions are made. Given that those spectral properties can be characterized in terms of magnitude and phase, typically, 2D plots and 3D plots can be used in each case, although only seldom in the case of phase representation. In the case of the magnitude spectrum, also known as a periodogram, a 2D plot is simply obtained by taking the absolute value of the short-time DFT of a windowed region of the signal as a function of frequency. This is illustrated, for example, in Figure 15. The graphical representation can be linear or logarithmic, either on the horizontal or vertical axis, or on both axes. When the goal is to observe how the magnitude spectrum evolves through time, a 3D representation is created by abutting several magnitude spectra, next to each other, and  
Figure 25: Example of a harmonic phase model (**a**) and harmonic magnitude model (**b**) pertaining to a male sustained vowel signal. where a colormap is used to represent power spectral density (PSD). A new magnitude spectrum is obtained by sliding the short-time DFT window over the signal by a certain hop size that, typically, is less than the window length. Such a 3D representation is known as a spectrogram. Usually, the horizontal axis represents time, the vertical axis represents frequency, and the third dimension, which is perpendicular to the time-frequency plane, is represented by a specific color of a colormap denoting a suitable PSD range. A simple example is illustrated in Figure 26a that corresponds to the first four harmonics of a sawtooth signal and whose fundamental frequency is \(F_{0}=187.34\) Hz. This particular example allows us to conclude that the signal is stationary because the PSD is steady through time. However, since spectrograms are blind to phase, the waveform could change its shape with time and may be quite different from the expected sawtooth waveform, albeit the magnitude spectrum remains exactly the same. In other words, the phase structure of the harmonics of the periodic wave may evolve with time. This can be detected by means of another three-dimensional representation called phasegram. The idea of the phasegram is the same as that of the spectrogram, except that the third dimension represents phase instead of power spectral density. Although colorful and interesting to look at due to the repetitive patterns at different scales, the phasegram is difficult to interpret and, therefore, is not very useful. Evidence of this is that common signal processing-related numerical and graphical environments offer a callable'spectrogram' function but do not offer a 'phasegram' function. Here, we want to demystify the phasegram in Figure 26b (and that is valid for a stationary harmonic signal that is not too contaminated by noise) by showing that it is simply an eye-catching representation of the result of phase interpolation at different scales, and where the unique information is just the starting phase of the fundamental frequency, and a shift-invariant phase structure such as NRD. In fact, the different scales are simply caused by the phase rotation of the different harmonics. As expected, the time evolution of the phase is periodic and, relative to the phase periodicity of the fundamental frequency, the time evolution for the second harmonic is two times as fast, three times as fast for the third harmonic, and so on. Thus, according to Equation (30), the phase evolution in time regarding the fundamental frequency is governed by \(\Omega_{0}(t+t_{0})\), and the phase evolution in time for any harmonic \(\ell\) is governed by \((\ell+1)\Omega_{0}(t+t_{0})+2\pi\text{NRD}_{\ell}\), which highlights that the only phase-related parameters that are unique are the starting phase of the fundamental frequency and the NRD coefficients.