## 4 General Method of Wavelet Moments  
[PERSON]'s graphical analysis of variance method allows estimation of the parameters of basic stochastic processes by determining linear fragments of the logarithmic AV characteristic with appropriate slopes. In the case of this method, standards and algorithms of conduct have been developed, enabling the separation of individual basic processes [41]. Although this method is widely used, in many cases it turns out to be computationally ineffective [24] and may generate incorrect results [25]. In search of better calculation algorithms and statistical analysis methods, the generalized method of wavelet moments was developed. This technique was developed in 2013 by a team of scientists dealing with the analysis and modeling of complex stochastic processes [24]. It uses a quantity called the wavelet variance (WV), which is the variance of the wavelet coefficients derived from the decomposition of the time series [26]. WV is used for time series analysis in many fields. It enables the decomposition and interpretation of time series variances for different scale values. Papers [24; 41] present decomposition algorithms using the Haar wavelet, which acts as a low-pass filter. The wavelet variance is determined using the DWT or MODWT (overlap discrete wavelet transform) algorithms. The estimator of the wavelet variance determined by the MODWT method specifies the relationship  
\[\hat{v}_{j}^{2}=\frac{1}{T-L_{j}+1}\sum_{t=L_{j}}^{T}W_{j,t}{}^{2} \tag{28}\]  
where \(T\)--length of the signal, \(L_{j}\)--length of the Haar filter for the \(j\) scale, \(W_{j,t}\)--wavelet coefficients for the \(j\) scale, and \(t\)--time. When the wavelet variance estimator for the \(F_{\theta}\), the process is available, then it can be associated with the model expressed by the power spectral density [24]:  
\[v_{j}^{2}(\theta)=\int_{-1/2}^{1/2}\bigl{|}H_{j}(f)\bigr{|}^{2}S_{F_{\theta}}( f)df \tag{29}\]  
where \(\theta\)--time series modeling the process, \(S_{F\theta}\)--power spectral density of the process \(F_{\theta}\), and \(H_{j}\)--spectral transfer function of the filter (wavelet) for the \(j\) scale. Relationships (28) and (29) allow the determination of the difference between the estimated WV value and the value resulting from the adopted model. The GMWM method, described in detail in [24], is based on the inverse relationship between wavelet variance and process parameters \(\theta(\hat{v})\). The estimation of the process parameters in the GMWM method is carried out according to the following formula:  
\[\hat{\theta}=\underset{\theta\in\Theta}{\operatorname{argmin}}(\hat{v}-\
u( \theta))^{T}\boldsymbol{\Omega}(\hat{v}-\
u(\theta)) \tag{30}\]where \(\hat{v}=\left[v_{j}^{2}\right]_{j=1,...,J}\)--the vector of estimated WV, \(v(\theta)=\left[v_{j}^{2}(\theta)\right]_{j=1,...,J}\)--WV resulting from the model, and \(\Omega\)--positively defined weighting matrix. Equation (30) enables minimization of the difference between the estimated and modeled wavelet variance of the process due to the appropriate selection of the value of the weighting matrix \(\Omega\) (e.g., by the least squares method). The main goal of the GMWM method, however, is to properly match the WV of the process and its model. Figure 18 shows the results of the auto.imu function (R2 environment, GMWM library [24]), which enabled the determination of WV and the automatic selection of parameters for the models of inertial sensors of the PCIM-01 IMU. The function was called with the parameter model = AR1(0 + WN(0 + RW(0) + DR(), indicating the modeled stochastic processes: first order autoregressive process (AR1), white noise (WN), sensor drift (DR), and noise gyroscopes/accelerometers (RW). The wavelet variance based on the Haar function becomes equivalent to the Allan variance (\(\sigma=2v\)) when its value is doubled.