## 4 The Proposed Model  
Many studies regarding IoT data corruption have not taken into account all the different types of corruption that can occur. In this proposed model, we use a combination of the WRTPCA and WTC. The input data for this method comprise a tensor that has been damaged with missing values, mixed noise, and outliers. We apply WTSVT (Algorithm 2) in both WTC and the WRTPCA. WTC (Algorithm 3) results in a new tensor that has no missing  
Figure 5: Missing and low-rank components of TC. values. This new tensor is then input into the WRTPCA (Algorithm 4). After applying this proposed model, we obtain a final tensor that has no missing values, mixture noise, or outliers. Figure 6 provides an overview of this proposed model. Before discussing the details of this method, we present the mathematical foundations of WTC and the WRTPCA. To recover the missing-value tensor, Equation (17) can be solved to extract the low-rank structure from the incomplete tensor data using the alternating direction method of multipliers (ADMMs) [24] as follows:  
\[\hat{\mathcal{V}}_{i+1}=\arg\min_{\hat{\mathcal{W}}}\left(||\hat{\mathcal{W}} ||_{*,\omega}-\frac{\beta_{i}}{2}\left\|\hat{\mathcal{W}}-\hat{\mathcal{A}}_{ i}-\frac{1}{\beta_{i}}\hat{\mathcal{U}}_{i}\right\|_{\text{F}}^{2}\right) \tag{18}\]  
\[ \begin{split}\mathcal{A}_{i+1}=\arg\min_{\mathcal{A}}\left( \delta_{\mathcal{Y}=\mathcal{P}_{\Omega}(\mathbf{X})}+\langle\mathcal{U}(:), \mathcal{A}(:)\rangle\\ +\frac{\beta_{i}}{2}\left\|\mathcal{A}-\mathcal{W}_{i+1}\right\|_ {\text{F}}^{2}\right)\end{split}  \tag{19}\]  
Figure 6: Flowchart of our model—WRTPCA integrated with WTC. \[\mathcal{U}_{i+1}=\mathcal{U}_{i}+\beta_{i}(\mathcal{A}_{i+1}-\mathcal{W}_{i+1}) \tag{20}\]  
The WRTPCA optimization model, depicted in Equation (13), is frequently resolved by employing the ADMM [33]. The solution to the low-rank optimization problem can be expressed as follows:  
\[\mathcal{L}_{i+1}=\arg\min_{\mathcal{L}}\left(||\mathcal{L}||_{*,\omega}+\frac {\mu_{i}}{2}\left\|\mathcal{L}-\mathcal{G}+\mathcal{C}_{i}-\frac{\mathcal{Y} _{i}}{\mu_{i}}\right\|_{\text{F}}^{2}\right) \tag{21}\]  
\[\mathcal{C}_{i+1}=\arg\min_{\mathcal{C}}\left(\lambda||\mathcal{C}||_{1}+\frac {\mu_{i}}{2}\left\|\mathcal{L}_{i+1}-\mathcal{G}+\mathcal{C}-\frac{\mathcal{Y} _{i}}{\mu_{i}}\right\|_{\text{F}}^{2}\right) \tag{22}\]  
\[\mathcal{Y}_{i+1}=\mathcal{Y}_{i}+\mu_{i}(\mathcal{L}_{i+1}+\mathcal{C}_{i+1}- \mathcal{G}) \tag{23}\]  
```
1:Input:\(\mathcal{M}\in\mathbb{R}^{n_{1}\times n_{2}\times n_{3}},\beta,\omega\)
2:\(\mathcal{F}=\text{fft}(\mathcal{M},[],3)\)
3:for\(i=1\) to \(n_{3}\)do
4:[I,D,V] = SVD(\(\mathcal{F}\)(:,:,i))
5:\(diagD=diag(\mathbf{D})-\frac{\omega}{\beta}\)
6:\(\textbf{diagD}=diag(diagD)\)
7:\(\hat{\mathcal{U}}(:,:,i)=\textbf{U}\)
8:\(\hat{\mathcal{D}}(:,:,i)=\textbf{diagD}\)
9:\(\hat{\mathcal{V}}(:,:,i)=\textbf{V}\)
10:endfor
11:\(U\)= \(iff(\hat{\mathcal{U}},[],3)\), \(D\)= \(iff(\hat{\mathcal{D}},[],3)\), \(V\)= \(iff(\hat{\mathcal{V}},[],3)\)
12:Output: orthogonal tensor \(\mathcal{U}\), \(\mathcal{D}\) and core tensor \(\mathcal{V}\)
```  
**Algorithm 2** Weighted tensor singular value thresholding method (**WTSVT**). Weighted tensor singular value thresholding (WTSVT), with a threshold based on the weighted tensor nuclear norm (WTNN), employs t-SVD [24], which solves the drawbacks of using a fixed threshold for each singular value. Equations (18) for TC and (21) in the TRPCA are solved using WTSVT. This method helps recover missing values in the TC and minimizes noise and outliers in the TRPCA [33]. To maintain essential data components, WTSVT is used to optimize the low-rank tensor \(\mathcal{L}\). WTSVT calculates the total weighted singular values over all the frontal slices of the tensor data, ensuring that greater singular values decrease less. In Algorithms 3 and 4, the WTSVT operator is used, and it is defined in Algorithm 2. The objective of Algorithm 2 is to break down the input tensor into three tensors, with the middle tensor being a low-rank tensor.