# Multi-Point Time-Synchronized Waveform Recording for the Analysis of Wide-Area Harmonic Propagation
## 3 Measurement Campaign
### Harmonic Phasor Estimation  
The measurement system provides multi-point, synchronously sampled signals. Due to the presence of time-varying harmonics in the grid, the measured signals are non-stationary in nature. To analyze such non-stationary signals, discrete-time Short-Time Fourier Transform (STFT) is used to perform a joint time-frequency analysis. For discrete-time STFT, the signals \(x[n]\) are multiplied by a window \(\mathrm{w}[n]\) (rectangular/Hann/Hamming, etc.) and Fourier transform (FT) is computed for the resulting signal  
\[x_{\mathrm{w}}[n]=x[n]\mathrm{w}[n]. \tag{1}\]  
If \(m\) is the center of the window, then time-frequency representation of the measured signal using STFT is written as [16]:  
\[X_{\mathrm{STFT}}(\mathrm{e}^{\mathrm{j}\omega},m)=\sum_{n=-\infty}^{\infty}x [n]\mathrm{w}[n-m]\mathrm{e}^{-\mathrm{j}\omega n}. \tag{2}\]  
The window is then shifted by a fixed amount in time depending on the desired overlap length. The Discrete Fourier Transform (DFT) of the windowed signal \(x_{\mathrm{w}}[n]\) is obtained by the convolution of their FTs (windowing theorem) [16]. For a multi-tone windowed signal consisting several harmonics (\(\omega_{h}\)) of the fundamental frequency (\(\omega_{0}\))  
\[x_{\mathrm{w}}[n]=\bigg{(}\sum_{h}A_{h}cos(\omega_{h}\frac{n}{F_{s}})\bigg{)} \mathrm{w}[n], \tag{3}\]where \(A_{h}\) and \(\phi_{h}\) are the respective magnitude and phase of the constituent harmonics at frequencies (\(\omega_{h}=h\omega_{0}\)), its DFT is given as:  
\[ \begin{split} X_{\mathrm{w}}(\mathrm{e}^{\mathrm{i}\omega})& =X(\mathrm{e}^{\mathrm{i}\omega})*W(\mathrm{e}^{\mathrm{i}\omega}) \\ &=\sum_{h}\bigg{(}X(\mathrm{e}^{\mathrm{i}\omega_{h}})W(\mathrm{e }^{\mathrm{j}(\omega+\omega_{h})})+X(\mathrm{e}^{\mathrm{i}\omega_{h}})W( \mathrm{e}^{\mathrm{j}(\omega-\omega_{h})})\bigg{)}.\end{split}  \tag{4}\]  
where \(X(\mathrm{e}^{\mathrm{i}\omega})\) and \(W(\mathrm{e}^{\mathrm{i}\omega})\) are the FTs of \(x[n]\) and \(\mathrm{w}[n]\), respectively. Thus, the FT of the windowed signal consists of the FT of the window replicated at frequencies \(\pm\omega_{h}\)[17]. Since DFT is obtained at discrete frequencies, the result for frequency \(\omega_{k}\) can be written as:  
\[ \begin{split} X_{\mathrm{w}}(\mathrm{e}^{\mathrm{i}\omega})|_{ \omega_{k}}&=\sum_{h}\bigg{(}X(\mathrm{e}^{\mathrm{i}\omega_{h}}) W(\mathrm{e}^{\mathrm{j}(\omega+\omega_{h})})+X(\mathrm{e}^{\mathrm{i}\omega_{h}})W( \mathrm{e}^{\mathrm{j}(\omega-\omega_{h})})\bigg{)}|_{\omega=\omega_{k}}\\ X_{\mathrm{w}}(\mathrm{e}^{\mathrm{i}\omega_{k}})& =\sum_{h}\bigg{(}\frac{A_{h}}{2}\mathrm{e}^{\mathrm{i}\phi_{h}}W( \mathrm{e}^{\mathrm{j}(\omega_{k}+\omega_{h})})+\frac{A_{h}}{2}\mathrm{e}^{ \mathrm{i}\phi_{h}}W(\mathrm{e}^{\mathrm{j}(\omega_{k}-\omega_{h})})\bigg{)}, \end{split}  \tag{5}\]  
where the frequency of the bins for \(N\) samples are  
\[\omega_{k}=2\pi k/N\quad\text{for}\;k=0,\;1,\;2,\;...,\;N-1. \tag{6}\]  
The positive half of the spectrum can be written as:  
\[X_{\mathrm{w}}^{+}(\mathrm{e}^{\mathrm{i}\omega_{k}})=\sum_{h}\bigg{(}\frac{A_ {h}}{2}\mathrm{e}^{\mathrm{i}\phi_{h}}W(\mathrm{e}^{\mathrm{j}(\omega_{k}- \omega_{h})})\bigg{)} \tag{7}\]  
Equation (7) can be interpreted as a filter tuned for favorable response at desired harmonic frequencies (\(\omega_{h}\)). Thus, the harmonic phasors could be calculated using Equation (7) for \(\omega_{k}=\omega_{h}\). For this measurement campaign, the focused frequencies were the fundamental (50 Hz) and the odd harmonics up to thirteenth harmonic. However, the fundamental grid frequency and thus the harmonic frequencies could vary in real time making \(\omega_{h}\) unknown while the sampling frequency of the measurement set-up remains constant. This lack of coherency between sampling frequency and frequencies \(\omega_{h}\) in the grid measurement data affects the performance of the filters leading to spectral leakage [16]. This causes errors in the magnitude and phase of the estimated harmonic phasors.