# Dynamic Tensor Modeling for Missing Data Completion in Electronic Toll Collection Gantry Systems
## 3 Materials and Methods
### ETC Gantry Data Completion Method Based on Improved Tensor Decomposition
#### 3.2.3 Calculation of the Incremental Approximate Decomposition of the Tensor Block
\begin{table}
\begin{tabular}{c c} \hline
**Input:**\(\mathcal{X}_{1}\), \(L_{(m)}|_{m=1}^{M}\in\mathbb{R}^{n_{m}\times n_{m}}\) \\
**Output:**\(Y_{1}\), \(U_{1}^{m\dagger}|_{m=1}^{M}\), \(\lambda\overset{m}{\underset{1}{\Lambda}}\overset{M}{\underset{m=1}{\Lambda}} \overset{M}{\underset{1}{\underset{m=1}{\Lambda}}}\) \\ \hline
**Begin** \\
**1** & for \(m=1:M\) \\
**2** & \(C_{1}^{m}u_{1;i}^{m}=\lambda_{1,i}^{m}u_{1;i}^{m}\) \\  & \# Calculate the first \(r_{m}\) eigenvalues, \(\lambda_{1,i}^{m}\), with eigenvector \(u_{1,i}^{m}\) of \(C_{1}^{m}\). \\
**3** & \(U_{1}^{(m)}=diag\Big{(}u_{1,1}^{m},\ldots,u_{1,m}^{m}\Big{)}\) \\
**4** & end for \\
**5** & Return \(Y_{1}\), \(U_{1}^{m\dagger}|_{m=1}^{M}\), \(\lambda\overset{m}{\underset{1}{\Lambda}}\overset{M}{\underset{m=1}{\Lambda}} \overset{M}{\underset{1}{\underset{m=1}{\Lambda}}}\) \\ \hline \end{tabular}
\end{table} 
Table 2: Initial core tensor and factor matrix calculation process. The orthogonality of eigenvectors permits the characterization of the changes in \(\Delta u_{i}^{m}\) using the current eigenvectors:  
\[\Delta u_{i}^{m}\approx\sum_{j=1}^{r_{m}}\alpha_{ij}u_{j}^{m} \tag{15}\]  
where \(\left\{\alpha_{ij}\right\}\) is the constant to be calculated and substituted to obtain:  
\[ \begin{split}(\mathcal{X}^{(m)}\mathcal{X}^{(m)T}&+ \mu_{(m)}L_{(m)})\sum_{j=1}^{r_{m}}\alpha_{ij}u_{j}^{m}+\left(\mathcal{X}^{(m) }\Delta\mathcal{X}^{(m)T}+\Delta\mathcal{X}^{(m)}\mathcal{X}^{(m)T}\right)u_{ i}^{m}\\ &=\lambda_{i}^{m}\sum_{j=1}^{r_{m}}\alpha_{ij}u_{j}^{m}+\Delta \lambda_{i}^{m}u_{i}^{m}\end{split}  \tag{16}\]  
The above equation can be further simplified by multiplying the left-hand side of the equation by \(\left(u_{k}^{m}\right)^{T}\), and the above equation can be further simplified:  
\[\lambda_{k}^{m}\alpha_{ik}+\left(u_{k}^{m}\right)^{T} \Big{(}\mathcal{X}^{(m)}\Delta\mathcal{X}^{(m)T}+\Delta\mathcal{X}^{(m)} \mathcal{X}^{(m)T}\Big{)}u_{i}^{m} \tag{17}\] \[=\lambda_{i}^{m}\alpha_{ik}\] \[\alpha_{ik}=\frac{\left(u_{k}^{m}\right)^{T}\Big{(}\mathcal{X}^{(m)} \Delta\mathcal{X}^{(m)T}+\Delta\mathcal{X}^{(m)}\mathcal{X}^{(m)T}\Big{)}u_{ i}^{m}}{\lambda_{i}^{m}-\lambda_{k}^{m}} \tag{18}\]  
The eigenvectors satisfy orthogonal unitization, which yields the following:  
\[(u_{i}^{m}+\Delta u_{i}^{m})^{T}(u_{i}^{m}+\Delta u_{i}^{m})=1 \Leftrightarrow 1+2(u_{i}^{m})^{T}\Delta u_{i}^{m}+o(||\Delta u_{i}^{m}||^{2})=1 \tag{19}\]  
Eliminating the higher-order regression term leads to \(\alpha_{ii}=0\). \[\Delta u_{i}^{m}=\sum_{j\
eq i}\frac{\left(u_{j}^{m}\right)^{T} \Big{(}\mathcal{X}^{(m)}\Delta\mathcal{X}^{(m)T}+\Delta\mathcal{X}^{(m)} \mathcal{X}^{(m)T}\Big{)}u_{i}^{m}}{\lambda_{i}^{m}-\lambda_{j}^{m}}\,u_{j}^{ m} \tag{20}\]
5. Updating the Core Tensor, \(Y_{t+1}\in\mathbb{R}^{r_{1}\times\ldots\times r_{M}}\)  
The core tensor can be updated according to the updating of the factor matrix, \(U_{t+1}^{(m)}\in\mathbb{R}^{n_{m}\times r_{m}}\), and the calculation process for the core tensor \(Y_{t+1}\in\mathbb{R}^{r_{1}\times\ldots\times r_{M}}\) is summarized in Table 3. \begin{table}
\begin{tabular}{c c} \hline
**Input:**\(\mathcal{X}_{t}\), \(\Delta\mathcal{X}_{t}\), \(U_{t}^{(m)}\)\(\lambda_{t}^{m}\) \\
**Output:**\(Y_{t+1},U_{t+1}^{(m)}|_{m=1}^{M},\lambda_{t+1}^{m}|_{m=1}^{M}\) \\ \hline
**Begin** & \\
**1** & for \(m=1:\,M\) \\
**2** & for \(i=1:\,m^{m}\) \\
**3** & \(\lambda_{t+1,i}^{m}=\lambda_{t,i}^{m}+\Delta\lambda_{t,i}^{m}\) \\
**4** & \(u_{t+1,i}^{m}=u_{t,i}^{m}+\Delta u_{t,i}^{m}\) \\
**5** & \(U_{t+1}^{(m)}=diag\Big{(}u_{t+1,i}^{m},\ldots,u_{t+1,m}^{m}\Big{)}\) \\
**6** & end for \\
**7** & end for \\
**8** & \(Y_{t+1}=(\mathcal{X}_{t}+\Delta\mathcal{X}_{t})\prod_{m=1}^{M}\times_{(m)}U_{t +1}^{(m)T}\) \\
**9** & Return \(Y_{t+1},U_{t+1}^{(m)}|_{m=1}^{M},\lambda_{t+1}^{m}|_{m=1}^{M}\) \\
**End** & \\ \hline \end{tabular}
\end{table} 
Table 3: Calculation flow for updating the core tensor.