## 2 Problem Formulation and Preliminaries
### Auto-Covariance Least-Squares (ALS) Method  
The auto-covariance least-squares (ALS) method is introduced to estimate the unknown noise covariance in a linear state-space model in model-based estimation and control, which is crucial for improving the performance of a visual object tracking task. The ALS method is based on the innovation sequence, denoted as \(e_{k}\), which is defined as the difference between the observed measurement and the estimated measurement based on the predicted state in the prediction step:  
\[e_{k}=z_{k}-H\hat{x}_{k|k-1},\forall k. \tag{5}\]  
Denote the residual, which is the difference between the actual state and the predicted state as \(\varepsilon_{k}=x_{k}-\hat{x}_{k|k-1}\). Then the residual and the innovation follow \(e_{k}=He_{k}+v_{k}\), and\[\epsilon_{k+1}=\underbrace{(F-FKH)}_{F}\epsilon_{k}+\underbrace{[I_{n_{x}},-FK]}_{G} \underbrace{\left[ \begin{array}{c}w_{k}\\ v_{k}\end{array} \right]}_{\triangleq_{k}}. \tag{6}\]  
In the steady state, the Kalman gain converges to a constant value, which can be computed offline. The steady-state residual covariance matrix, denoted by \(P_{e}\), can be solved via the following Lyapunov equation:  
\[P_{e}=F\!P_{e}F^{\mathrm{T}}+G\Sigma G^{\mathrm{T}} \tag{7}\]  
where \(\Sigma=\left[ \begin{array}{cc}Q&0_{n_{x}\times n_{x}}\\ 0_{n_{x}\times n_{x}}&R\end{array} \right]\). Then the auto-covariance of the innovation sequence is:  
\[ \begin{split} C_{e,0}&\triangleq\mathbb{E}[\epsilon_{k} \epsilon_{k}^{\mathrm{T}}]=HP_{e}H^{\mathrm{T}}+R\\ C_{e,j}&\triangleq\mathbb{E}[\epsilon_{k+j}\sigma_{k}^{\mathrm{T}}]=H \bar{F}^{j}P_{e}H^{\mathrm{T}}-H\bar{F}^{j-1}FKR\end{split}  \tag{8}\]  
where \(j=1,2,\ldots,N-1\), and \(N\) is a user-defined parameter defining the window size. Substitute the solution to (7) into (8), and the noise covariance matrix is derived as a linear matrix equation by using the least-squares method:  
\[\mathcal{A}\theta=b \tag{9}\]  
where the matrix \(\mathcal{A}\) is defined as  
\[ \begin{split}\mathcal{A}&=\left[D,D(FK\otimes FK)+ \left(I_{n_{x}}\otimes\Gamma\right)\right]\\ D&=\left(H\otimes\mathcal{O}\right)\left(I_{n_{x} ^{2}}-\bar{F}\otimes\bar{F}\right)^{-1}\\ \mathcal{O}&=\left[H^{\mathrm{T}},(H\bar{F})^{ \mathrm{T}},\ldots,(H\bar{F}^{N-1})\right]^{\mathrm{T}}\\ \Gamma&=\left[I_{n_{x}},-(HFK)^{\mathrm{T}},\ldots,-(H \bar{F}^{N-2}FK)^{\mathrm{T}}\right]^{\mathrm{T}}\end{split}  \tag{10}\]  
where the symbol \(\otimes\) stands for the Kronecker product. Denote the dependent variables as \(\theta=[Q_{s}^{\mathrm{T}},R_{s}^{\mathrm{T}}]^{\mathrm{T}}\) and \(b=(C_{e}(N))_{s}\) with \(C_{e}(N)=[C_{e,0},C_{e,1}^{\mathrm{T}},\ldots,C_{e,N-1}^{\mathrm{T}}]^{\mathrm{ T}}\). \(Q_{s}\) means the column-wise stacking of the matrix \(Q\) into a vector. The ALS method estimates the covariance matrices by minimizing the difference between the sample and theoretical innovations' autocovariance by minimizing the following cost function:  
\[ \begin{split}\hat{\theta}&=\arg\min_{\theta}\|A \theta-b\|_{2}^{2}\\ s.t.,&\quad Q,R_{i}\geq 0.\end{split}  \tag{11}\]  
Then the parameter \(\theta\) is estimated by solving the semi-definite constrained least squares problem. The optimal solution can be found by setting the derivative of the cost function to zero when the matrix inequality holds:  
\[\hat{\theta}=(\mathcal{A}^{\mathrm{T}}\mathcal{A})^{-1}\mathcal{A}^{\mathrm{T} }\hat{b}=\mathcal{A}^{\mathrm{T}}\hat{b} \tag{12}\]  
where \(\hat{b}\) denotes the unbiased estimate of the vector \(b\), and is computed by using the ergodic property of the \(N\)-innovations to estimate the auto-covariance matrix \(\hat{C}_{e}(N)\):  
\[ \begin{split}\hat{b}&=\left(\hat{C}_{e}(N)\right)_{s }\\ \hat{C}_{e}(N)&=[C_{e,0}^{\mathrm{T}},C_{e,1}^{ \mathrm{T}},\ldots,C_{e,N-1}^{\mathrm{T}}]^{\mathrm{T}}\\ \hat{C}_{e,j}&=\frac{1}{\tau-j}\sum_{k=1}^{\tau-j} \epsilon_{k+j}\epsilon_{k}^{\mathrm{T}},\quad j=0,1,\ldots,N-1\end{split}  \tag{13}\]where \(\tau\) is denoted as the window size of the auto-covariances.