# Demystifying DFT-Based Harmonic Phase Estimation, Transformation, and Synthesis
## 1 Introduction
### Problem Statement  
This paper focuses on practical methods for representing quasi-periodic signals through the concepts of structure and parametric modeling. By'structure', we mean an identifiable form or organization, and by 'parametric modeling', we mean a simple mathematical formulation that captures and models the organization using a limited number of controllable parameters. We acknowledge in this paper that the signals discussed are quasi-periodic and locally stationary. Quasi-periodicity means that the waveform shape in a periodic signal varies slowly among at least three adjacent periods, even though the period length may vary. Local stationarity means that harmonic parameters, such as sinusoidal magnitude and frequency, vary slowly over time, allowing them to be considered approximately constant within a short, windowed region of the observed signal.  
In this paper, we focus on phase representation, estimation, and parametric modeling. We first address the concept of structure based on the three aspects that define a stationary periodic signal: (i) frequency, (ii) magnitude, and (iii) phase.  
Let us consider a real-valued signal \(x(t)\) that consists of \(L\) sinusoids, as follows:  
\[x(t)=\sum_{\ell=0}^{L-1}A_{\ell}\sin(\Omega_{\ell}t+\phi_{\ell})+s(t)\, \tag{1}\]  
where \(A_{\ell}\) and \(\Omega_{\ell}\) represent, respectively, the magnitude and frequency of the \(\ell^{\text{th}}\) sinusoid, \(\phi_{\ell}\) represents the starting phase of the \(\ell^{\text{th}}\) sinusoid, and \(s(t)\) represents a random signal without any relevant phase structure. It is well known from the basic Fourier theory that the sinusoids in a periodic signal are harmonically related [14]. Hence, in our context, we have the following:  
\[\Omega_{\ell}=(\ell+1)\Omega_{0}\, \tag{2}\]  
i.e., the frequency of each sinusoid is a multiple integer of a fundamental frequency represented by \(\Omega_{0}\). Thus, this frequency organization represents a frequency-related feature that is intrinsic and, therefore, structural, to any periodic signal. This means that the only information in the frequency structure that is truly unique is the fundamental frequency.  
A second structural aspect that defines a periodic signal consists of the organization of the magnitudes of the different harmonics and can be given by the ratio between  
related feature vector, is independent of time and the fundamental frequency. This paper aims to show that such a time-shift invariant phase-related feature exists and that it can be extracted using fairly conventional spectrum analysis. Moreover, it can be modeled in simple and insightful ways.  
To this end, two problems need to be addressed. The first one involves estimating the harmonic starting phase values, \(\phi_{t}\), from a short segment of \(x(t)\) that is representative of the periodic signal. By'representative', we mean that the short segment contains a few periods with a similar waveform shape, but its duration is not related to the period of the periodic signal. The second aspect involves establishing a model based on the estimated harmonic starting phases, which, when combined with harmonic magnitude information, helps to fully explain a given waveform shape in a way that is time-shift invariant and independent of \(\Omega_{0}\). The next section further discusses these challenges from a practical perspective and motivates a paradigm in harmonic signal processing oriented toward the harmonic magnitude and phase structure, greatly facilitating signal modeling, transformation, and synthesis.