## 3 Wireless Sensor Network Model for the Internet of Things
### The LE-RLPCCA Improved Positioning Algorithm Model Based on the Sensor Grid  
In a complex or untrustworthy IoT environment, affected by network attacks, sensor hardware errors, environmental obstacles, and other factors, IoT data are prone to distortion or errors in the transmission or positioning process, which is different from the simple errors easily generated in ordinary networks [22]. The LE-RLPCCA localization algorithm optimizes the topology of the wireless sensor networks to a certain extent, so that the DKFCM-FSVM wireless sensor algorithm model proposed in this paper shows a high degree of data fusion and detection accuracy. By characterizing the location algorithm LE-LPCCA of the wireless sensor networks, we can characterize the density based on the topology of the wireless sensor nodes:  
\[\mathbf{M}_{i}^{X}=\frac{\mathbf{D}_{i}^{X}}{\sum_{j=1}^{n}\mathbf{D}_{j}^{X}};\;\mathbf{M}_{ i}^{Y}=\frac{\mathbf{D}_{i}^{Y}}{\sum_{j=1}^{n}\mathbf{D}_{j}^{Y}}, \tag{10}\]  
where \(D_{i}^{X}\) describes the area density of node \(i\) in the signal space. The node density reflects the distribution of the wireless sensor nodes in the signal space and is usually expressed by the density matrix. If \(D_{i}^{X}\) (\(D_{i}^{Y}\)) is larger, it means that the area density of node \(i\) is higher. Obviously, the larger the \(M_{i}^{X}\) (\(M_{i}^{Y}\)), the greater the density of the wireless sensor network node \(i\) in the signal (physical) space. From this, we can obtain the density matrix of the signal space \(M_{x}=\text{diag}\) [\(M_{1}^{X}\), \(M_{2}^{X}\), \(\ldots\), \(M_{n}^{X}\)] and the density matrix of the physical space \(M_{Y}=\text{diag}\) [\(M_{1}^{Y}\), \(M_{2}^{Y}\), \(\ldots\), \(M_{n}^{Y}\)]. Substituting \(M_{i}^{X}\) and \(M_{i}^{Y}\) into Equation (10) to replace \(S_{ij}^{X}\) and \(S_{ij}^{Y}\), respectively, we can obtain the following optimization problems:  
\[\max_{\mathbf{w}_{x},\mathbf{w}_{y}}\mathbf{w}_{x}^{\text{T}}\sum_{i=1}^{n}\sum_{j=1}^{n} \mathbf{M}_{i}^{X}\big{(}\mathbf{x}_{i}-\mathbf{x}_{j}\big{)}\mathbf{M}_{i}^{Y}\Big{(}\mathbf{y}_{ i}-\mathbf{y}_{j}\Big{)}^{\text{T}}\mathbf{w}_{\mathbf{y}} \tag{11}\]  
\[s\cdot t\cdot\mathbf{w}_{x}^{\text{T}}\sum_{i=1}^{n}\sum_{j=1}^{n}\mathbf{M}_{i}^{X^{2} }\big{(}\mathbf{x}_{i}-\mathbf{x}_{j}\big{)}\big{(}\mathbf{x}_{i}-\mathbf{x}_{j}\big{)}^{\text{ T}}\mathbf{w}_{\mathbf{x}}=1 \tag{12}\]  
\[\mathbf{w}_{\mathbf{y}}^{\text{T}}\sum_{i=1}^{n}\sum_{j=1}^{n}M_{i}^{Y^{2}}\Big{(}\mathbf{y }_{i}-\mathbf{y}_{j}\Big{)}\Big{(}\mathbf{y}_{i}-\mathbf{y}_{j}\Big{)}^{\text{T}}\mathbf{w}_{\mathbf{y }}=1. \tag{13}\]Through further development and the combination of Equations (11)-(13), we have  
\[ \begin{split}\max_{\mathbf{w}_{x},\mathbf{x}_{y}}\mathbf{w}_{x}^{\mathrm{T}}\mathbf{X} \mathbf{M}_{\mathbf{XY}}\mathbf{Y}^{\mathrm{T}}\mathbf{w}_{\mathbf{y}}\\ s\cdot t\cdot\mathbf{w}_{x}^{\mathrm{T}}\mathbf{X}\mathbf{M}_{\mathbf{XX}}\mathbf{X}^{ \mathrm{T}}\mathbf{w}_{\mathbf{x}}=1\\ \mathbf{w}_{y}^{\mathrm{T}}\mathbf{Y}\mathbf{M}_{\mathbf{YY}}\mathbf{Y}^{\mathrm{T}} \mathbf{w}_{\mathbf{y}}=1\end{split}  \tag{14}\]  
By using the Lagrange multiplier method to solve the optimization problem (14), it is easy to obtain the following generalized eigenvalue equation of the RLPCCA:  
\[ \begin{pmatrix}0&\mathbf{X}\mathbf{M}_{\mathbf{XY}}\mathbf{Y}^{\mathrm{T}}\\ \mathbf{Y}\mathbf{M}_{\mathbf{XX}}\mathbf{X}^{\mathrm{T}}&0\\ \end{pmatrix}\begin{pmatrix}\mathbf{w}_{x}\\ \mathbf{w}_{y}\\ \end{pmatrix} =\lambda \begin{pmatrix}\mathbf{X}\mathbf{M}_{\mathbf{XX}}\mathbf{X}^{\mathrm{T}} \\ \mathbf{Y}\mathbf{M}_{\mathbf{YY}}\mathbf{Y}^{\mathrm{T}}\\ \end{pmatrix}\begin{pmatrix}\mathbf{w}_{x}\\ \mathbf{w}_{y}\\ \end{pmatrix} .