## 3 Dynamic Error Parameter Estimation  
According to the diagram shown in Figure 1, subsequent samples of the output quantities \(x(i)\) of the A/D converter are processed by the D/D processing algorithm used in the measurement chain. For each run of the algorithm, \(N\) subsequent samples of the signal are collected, based on which the values of the output quantities of the measurement chain are determined. To estimate the parameters of the dynamic error signal in quantity \(x(i)\), a spectral analysis can be performed on the current vector of input samples. This analysis can be performed using the discrete Fourier transform (DFT) algorithm. Assuming that the samples \(x(i)\) are real numbers, the output quantities of the DFT algorithm are given by Equation [3,24]:  
\[X(k)=\sum_{n=0}^{N-1}x(n)\exp\left(-j\frac{2\pi kn}{N}\right), \tag{20}\]  
while the amplitude \(E_{k}\), phase \(\varphi_{k}\), and angular frequency \(\omega_{k}\) of the output quantities \(X(k)\) are determined as follows:  
\[E_{k}=\frac{2}{N}\left|X(k)\right|, \tag{21}\] \[\varphi_{k}=\arg\Bigl{(}X(k)\Bigr{)},\] (22) \[\omega_{k}=\frac{k}{N}2\pi f_{s}, \tag{23}\]  
for \(k\in[1;\frac{1}{2}N-1]\), where \(f_{s}\) is the sampling rate. By analyzing Equation (7) together with Equation (18), a single harmonic component of the dynamic error signal of quantity \(x(i)\) can be described as follows:  
\[e_{x,d,k}(i)=\hat{x}_{k}(i)-\hat{x}_{k}(i), \tag{24}\]where the estimated realization \(\hat{x}_{k}(i)\) can be approximated from the signal spectrum as follows:  
\[\hat{x}_{k}(i)=E_{k}\sin\bigl{(}\omega_{k}t_{i}+\varphi_{k}\bigr{)}. \tag{25}\]  
In the absence of dynamic error, the ideal harmonic \(\hat{x}_{k}(i)\), without additional phase shift or attenuation, is given by the following equation:  
\[\hat{x}_{k}(i)=E_{k}\frac{\hat{K}_{y}(\omega_{k})}{\hat{K}_{y}(\omega_{k})}\sin \Bigl{(}\omega_{k}t_{i}+\varphi_{k}-\hat{\varphi}_{y}(\omega_{k})+\phi_{y}( \omega_{k})\Bigr{)}. \tag{26}\]  
Based on Equations (7), (11), (19), and (24), the estimated variance of the \(k\)th harmonic component of the dynamic error signal \(e_{x,d}(i)\) can be described as follows:  
\[ \begin{split}\sigma_{x,d,k}^{2}=&\ \frac{1}{2}\Biggl{(}E_{k}\cos \bigl{(}\varphi_{k}\bigr{)}-E_{k}\frac{\hat{K}_{y}(\omega_{k})}{\hat{K}_{y}( \omega_{k})}\cos\Bigl{(}\varphi_{k}-\hat{\varphi}_{y}(\omega_{k})+\hat{ \varphi}_{y}(\omega_{k})\Bigr{)}\Biggr{)}^{2}+\\ &\ \frac{1}{2}\Biggl{(}E_{k}\sin\bigl{(}\varphi_{k}\bigr{)}-E_{k} \frac{\hat{K}_{y}(\omega_{k})}{\hat{K}_{y}(\omega_{k})}\sin\Bigl{(}\varphi_{k} -\hat{\varphi}_{y}(\omega_{k})+\hat{\varphi}_{y}(\omega_{k})\Bigr{)}\Biggr{)} ^{2}\end{split} , \tag{27}\]  
and the resultant variance of the dynamic error signal is described by the following equation:  
\[\sigma_{x,d}^{2}=\sum_{k=1}^{\frac{1}{2}N-1}\sigma_{x,d,k}^{2}. \tag{28}\]  
The method presented above requires knowledge of the dependence of the resultant phase shift \(\hat{\varphi}_{y}(\omega)\) and gain \(\hat{K}(\omega)\) introduced by the analog part of the measurement chain. The estimation of these parameters, based on measurement experiments and data from the catalog notes of the components used, is described in [16]. If, for the measurement chain part under discussion, the gain value for frequencies in the range \([0;\frac{1}{2}f_{s}]\) closely matches the expected value (i.e., when \(\tilde{K}(\omega)\cong\tilde{K}(\omega)\)) and the ideal phase shift is zero (i.e., when \(\phi(\omega)=0\) rad), then (27) simplifies to the following form:  
\[ \begin{split}\sigma_{x,d,k}^{2}=&\ \frac{1}{2}\biggl{(}E_{k}\cos \bigl{(}\varphi_{k}\bigr{)}-E_{k}\cos\Bigl{(}\varphi_{k}-\hat{\varphi}_{y}( \omega_{k})\Bigr{)}\Biggr{)}^{2}+\\ &\ \frac{1}{2}\biggl{(}E_{k}\sin\bigl{(}\varphi_{k}\bigr{)}-E_{k} \sin\Bigl{(}\varphi_{k}-\hat{\varphi}_{y}(\omega_{k})\Bigr{)}\Biggr{)}^{2}. \end{split}