# Reconstruction Optimization Algorithm of 3D Temperature Distribution Based on Tucker Decomposition
## 2 Fundamental Measurement Principles
### Missing Datasets Reconstruction Algorithm  
The actual measurement results in industry often have data missing or data distortion, so the measured dataset is generally incomplete and cannot directly use the above reconstruction algorithm. Therefore, one must use the optimization algorithm to repair the missing dataset and then extract the core tensor from the completed prior dataset to realize the 3D temperature distribution reconstruction.  
The steps of the 3D temperature optimization reconstruction algorithm for prior datasets with missing data are as follows.  
1. A prior dataset \(\mathbf{G}_{n_{1}\times n_{2}\times n_{3}\times n_{4}}\Big{(}\mathbf{g}_{1},\mathbf{g}_{2}, \cdots,\mathbf{g}_{i^{\prime}},\cdots,\mathbf{g}_{n_{1}}\Big{)}\) with temperature loss is obtained, where \(\mathbf{g}_{i}(1\leq i\leq n_{1})\) represents a three-dimensional temperature distribution with missing data at different locations under various operating conditions;
2. Average the temperature of \(\mathbf{G}_{n_{1}\times n_{2}\times n_{3}\times n_{4}}\Big{(}\mathbf{g}_{1},\mathbf{g}_{2},\cdots,\mathbf{g}_{i^{\prime}},\cdots,\mathbf{g}_{n_{1}}\Big{)}\) in the 1-mode direction, and use the average to complete the missing temperature data in the 1-mode direction vector;
3. The dataset after completion is denoted as \(\mathbf{G}^{0}\), and the core tensor \(\mathbf{C}^{0}_{t}\) and the corresponding reconstruction coefficient tensor \(\mathbf{A}^{0}_{\text{unfold}}\) along the 1-mode direction are calculated by Tucker decomposition. The \(\mathbf{A}^{0}_{\text{unfold}}\) and the original actual measurement data are substituted into the reconstruction algorithm to calculate the coefficient 1-mode decomposition factor vector \(\mathbf{f}^{0}_{1x}\). The temperature field in the missing dataset is reconstructed by using \(\mathbf{A}^{0}_{\text{unfold}}\) and \(\mathbf{f}^{0}_{1x}\) to complete the missing data in \(\mathbf{G}\) with the calculated results;
4. The dataset completed by step 3 is denoted as \(\mathbf{G}^{1}\), and the tucker algorithm is used to calculate the core tensor \(\mathbf{C}^{1}_{t}\) and the corresponding reconstruction coefficient tensor \(\mathbf{A}^{1}_{\text{unfold}}\) expanded along the 1-mode direction. If \(\|\mathbf{C}^{1}_{t}-\mathbf{C}^{0}_{t}\|_{\infty}\leq 10^{-3}\), the iterative convergence is determined. If it does not converge, continue to put \(\mathbf{A}^{1}_{\text{unfold}}\) and the actual measurement data before the completion into the reconstruction algorithm to calculate the coefficient 1-modulus decomposition factor vector \(\mathbf{f}^{1}_{1x}\), and use \(\mathbf{A}^{1}_{\text{unfold}}\) and \(\mathbf{f}^{1}_{1x}\) to reconstruct the temperature field distribution in the missing dataset. The missing data in \(\mathbf{G}\) are completed by the calculated values, and the completed dataset is recorded as \(\mathbf{G}^{2}\);
5. Repeat calculation in step 4 until the convergence conditions are met;
6. Taking the m\({}^{\text{th}}\) iteration dataset \(\mathbf{G}^{m}\), which satisfies the convergence condition as the final complement prior dataset, the three-dimensional temperature field is reconstructed by \(\mathbf{G}^{m}\). The flow diagram of prior dataset completion is shown in the Figure 1.