## 4 Simulation Verification of the Method
### The Case of Random Error Signals  
According to the classification proposed in [16; 19; 48], the group of random error signals includes signals whose realization values vary within a single measurement window, and this variation is nondeterministic. The parameters of such signals can be described probabilistically by their variance and the probability density function representing the likelihood of obtaining a particular realization. An example of this type of signal is the quantization error, as defined by Equation (14). Another example is the presence of white noise in the measurement signal. To assess the influence of random error signals on the effectiveness of the proposed method, an experiment was carried out in which the signal \(s(t)\) was applied to the input of the measurement chain in the following form:  
\[s(t)=\sin\bigl{(}\omega_{o}t+\varphi_{o}\bigr{)}+e_{s,r}(t), \tag{39}\]  
where \(e_{s,r}(t)\) represents white noise with zero mean, constant power spectral density \(\sigma_{s,r}^{2}\), and normally distributed realizations [44; 45]. The experiment was conducted for a given signal-to-noise power ratio, defined for the experimental conditions by the following equation:  
\[SNR=10\log_{10}\left(\frac{P_{s,\rho}}{\sigma_{s,r}^{2}}\right)=10\log_{10} \left(\frac{0.5}{\sigma_{s,r}^{2}}\right), \tag{40}\]  
where \(P_{s,\rho}=\sigma_{s,\rho}^{2}=0.5\) V\({}^{2}\) results from the unit amplitude and zero mean of the fundamental harmonic of the signal \(s(t)\). The quantization error introduced by the A/D converter was not considered in this experiment. The experiment was performed using the following parameter combinations: \(\sigma_{s,r}^{2}\in[0.001;0.25]\) V\({}^{2}\), \(f_{n}\in\{3,9,\ldots,21\}\) kHz, \(N\in\{32,64,128\}\), and a signal frequency \(s(t)\) defined by Equation (38), where the multiplier \(f_{mul}\in\{-0.9,-0.8,\ldots,0,\ldots,0.8,0.9\}\). Selected results are presented in Table 3 and Figure 5. The experiment can be reproduced by running the script in the file case_3_noise.m located in the repository [47]. Figure 5: The values of the quantity \(\delta\) (34) for the input signal described by Equation (39) (selected cases where \(N=64\), using the “Hamming” window function and thresholding described by Equation (32), with expanded uncertainty at a 95% confidence level). \(\vartheta_{x,d,k}^{2}\) is the variance value estimated on the basis of inaccurately determined values of the parameters \(\hat{K}_{y}(\omega)\) and \(\phi_{y}(\omega)\). For the discussed case the relative error in estimating the variance value of the \(k\)th harmonic of the dynamic error signal with pulsation \(\omega_{k}\), presented earlier in Equation (34), takes the form  
\[\delta_{k}=\frac{\hat{\sigma}_{x,d,k}^{2}-\hat{\sigma}_{x,d,k}^{2}}{\hat{ \sigma}_{x,d,k}^{2}}\cdot 100\%, \tag{43}\]  
so after substituting Equations (41) and (42) into Equation (43), one can write  
\[\delta_{k}=\frac{\left(\frac{\hat{K}_{y}\big{(}\omega_{k}\big{)}}{\hat{K}_{y} \big{(}\omega_{k}\big{)}}\right)^{2}-\left(\frac{\hat{K}_{y}\big{(}\omega_{k} \big{)}}{\hat{K}_{y}\big{(}\omega_{k}\big{)}}\right)^{2}+2\bigg{(}\frac{\hat{K }_{y}\big{(}\omega_{k}\big{)}}{\hat{K}_{y}\big{(}\omega_{k}\big{)}}\cos\Big{(} \phi_{y}(\omega_{k})-\phi_{y}(\omega_{k})\Big{)}-\frac{\hat{K}_{y}\big{(} \omega_{k}\big{)}}{\hat{K}_{y}\big{(}\omega_{k}\big{)}}\cos\Big{(}\phi_{y}( \omega_{k})-\phi_{y}(\omega_{k})\Big{)}\bigg{)}}}{1+\bigg{(}\frac{\hat{K}_{y} \big{(}\omega_{k}\big{)}}{\hat{K}_{y}\big{(}\omega_{k}\big{)}}\bigg{)}^{2}-2 \frac{\hat{K}_{y}\big{(}\omega_{k}\big{)}}{\hat{K}_{y}\big{(}\omega_{k}\big{)} }\cos\Big{(}\phi_{y}(\omega_{k})-\phi_{y}(\omega_{k})\Big{)}}. \tag{44}\]  
For the rest of the experiments described in the paper, it is assumed that the parameters of the measurement chain error model were determined correctly, therefore \(\vartheta_{x,d,k}^{2}=\vartheta_{x,d,k}^{2}\) holds.