## 4 Simulation Verification of the Method
### Comprehensive Verification of the Effectiveness of the Method  
The previous experiments allowed for the evaluation of the effectiveness of the proposed method in various conditions. The final measurement experiment presents a complex case in which the analyzed measurement chain processes a polyharmonic input signal \(s(t)\) given by the following equation:  
\[s(t)=e_{s,r}(t)+E_{s,0}+\sum_{k=1}^{K-1}E_{s,k}\sin\Big{(}\omega_{s,k}t+\varphi _{s,k}\Big{)}, \tag{45}\]  
where for each iteration of the experiment, the parameters of this waveform were randomly selected. The value of the constant component was \(E_{s,0}\sim\mathcal{U}[-1;1]\) V; the amplitudes of the subsequent harmonics were \(E_{s,k}\sim\mathcal{U}[0.25;1]\) V; the angular frequencies were \(\omega_{s,k}\sim\mathcal{U}[2\pi 3000;2\pi 21000]\) rad; the phase values were \(\varphi_{s,k}\sim\mathcal{U}[0;2\pi]\) rad; and the variance of the white noise signal was \(\sigma_{s,r}^{2}\sim\mathcal{U}[0.001;0.1]\) V\({}^{2}\) (therefore, according to Equation (40), \(SNR\in[7;27]\) dB). Symbol \(\mathcal{U}[a;b]\) denotes uniform distribution [44]. During the experiment, the contribution of the A/D converter to the uncertainty budget of the quantity \(x(i)\) was additionally taken into account. Therefore, for the discussed case, in accordance with (14), this quantity is described by the following equation:  
\[x(i)=q\left\lfloor\frac{1}{q}y(t_{i})+0.5\right\rfloor, \tag{46}\]  
where the quantity \(y(t)\), which depends on \(s(t)\) described by Equation (45), is defined by Equations (1) and (2). The value of the quantum is \(q=2.34\cdot 10^{-2}\). The experiment was carried out for a variable length \(N\) of the input quantity sample vector \(x(i)\) and for a varying number \(K\) of harmonic components of the signal \(s(t)\). During the experiment, the method used the \"Hamming\" window and the algorithm for reducing the impact of the noise signal on the effectiveness of the proposed method, as described by Equation (32). Due to the large variability in the parameters of the dynamic error signal, Equation (27) was used to estimate its variance, without any simplifications. Selected results from the experiment are shown in Figure 6. The experiment can be reproduced by running the script in the file case_4_mix.m located in the repository [47]. By analyzing the presented histograms, it can be observed that the expected value of the relative error in estimating the variance of the dynamic error signal is close to zero, while the spread of this value is noticeable. However, it should be noted that a significant portion of the parameter combinations of the processed signal \(s(t)\) exhibited very unfavorable conditions for the applied algorithm. These cases include the presence of several signals with very similar frequencies, which intensified the phenomenon of spectral leakage, the presence of multiple low-frequency signals, and a large share of noise compared to the useful part of the processed signal. By examining the results, it can be seen that the effectiveness of the proposed method increases as the length of the input quantity vector increases, which directly improves the frequency resolution of the DFT algorithm. However, within the context of this research, the proposed method can be considered suitable for measurement practice [17], provided it is applied using parameters that are appropriate for the characteristics of the error signal, the variance of which is being estimated. It should be further emphasized that the ultimate goal of this method is to estimate the uncertainty value, which is proportional to the square root of the variance. Therefore, the discrepancy in estimating this parameter will be considerably smaller. Figure 6: Histograms of the obtained values of the realization of the relative error in the estimation of the variance of the dynamic error signal (34) for the input signal (45), depending on the adopted experiment parameters (selected cases using the “Hamming” window function, with expanded uncertainty at a 95% confidence level).