## 2 Overview of AC Analysis Methods
### Discrete Fourier-Transform-Based Methods
#### 2.1.3 Spectral Leakage Correction  
An essential property of the DFT is the discretization of the frequency vector. Assuming a large number of samples \(N\) and a sufficient resolution frequency \(F_{s}\), the frequency resolution \(f_{res}=\frac{F_{s}}{N}\) can provide a frequency bin \(f_{bin}[k]=k\cdot f_{res}\) that is equal or close to the desired frequency in which the AC signal analysis is desired. However, if this is not the case, a spectral leakage will occur (see Figure 1). Here both the amplitude and the frequency values split into two or more adjacent frequency bins.  
Spectral leakage means that the assumed periodic signal in the time domain does not complete an exact integer period and loses its original periodicity. It can be approximated as the distance ratio to the closest frequency bin according to (4)  
\[sl=2\times(0.5-|0.5-\left(t_{meas}\cdot f-\lfloor t_{meas}\cdot f\rfloor \right)|) \tag{4}\]  
where \(\lfloor.\rfloor\) is the floor function and \(t_{meas}\) is the total measurement time or signal duration. \(f\) is the frequency of the signal. Mathematically described, a truncated signal is a signal multiplied by a rectangular window [28], which is leaky if the periods are not complete (See Section 3.3.1). Therefore, at the frequency domain, a convolution of the results to a sinc is expected. By choosing two direct neighbor frequencies \(f_{bin}[k]\) and \(f_{bin}[k+1]\)with respective spectrum amplitude \(y[k]\) and \(y[k+1]\), the corrected frequency can be calculated via the barycenter method can be obtained using Equation (5) [28], which corresponds to the virtual non-integer frequency index \(q\) shown in (6):  
\[f_{corr}=\frac{f_{bin}[k]\cdot y[k]+f_{bin}[k+1]\cdot y[k+1]}{y[k]+y[k+1]} \tag{5}\]  
\[q=\frac{k\cdot y[k]+(k+1)\cdot y[  
DTFT can be explained as follows: Given a signal \(x[k]=A\cdot sin(2\pi fk\delta t+\varphi)\) whose AC signal analysis, i.e., amplitude \(A\) and phase \(\varphi\), is desired is multiplied by 2 signals. The first is a cosine (quadrature-phase) signal with the same frequency \(c=cos(2\pi fk\delta t)\), and the second is a sine signal (in-phase) \(s=sin(2\pi fk\delta t)\). Alternatively, DTFT could be considered as a complex multiplication with the twiddle factor \(exp(2i\pi fk\delta t)\). Averaging the output yields the real-part \(\Re(Y)\) and imaginary-part \(\Im(Y)\) as shown in (10) and (11), respectively:  
\[\Im(Y) = A\frac{cos(\varphi)}{2} \tag{10}\] \[- \underbrace{A\frac{sin(2\pi Nf\delta t)}{2 Nsin(2\pi f\delta t)} cos(2\pi f(N-1)\delta t+\varphi)}_{\text{nullified when N}\to\infty\text{ or when an integer period is fulfilled}}\] \[\Re(Y) = A\frac{sin(\varphi)}{2}\] (11) \[+ \underbrace{A\frac{sin(2\pi Nf\delta t)}{2 Nsin(2\pi f\delta t)} sin(2\pi f(N-1)\delta t+\varphi)}_{\text{nullified when N}\to\infty\text{ or when an integer period is fulfilled}}\]  
Here \(\delta t=1/F\)s is the sampling period. In fact, by giving a very high number of samples, or by calculating the DTFT when the signal fulfills an integer number of periods, the real and imaginary parts will have the least influence from the spectral leakage as shown in Section 2.1.3.