## 2 System Model and Problem Formulation
\begin{cases}\frac{\sqrt{\tau_{p}\rho_{D}}\Gamma_{kD _{i}}^{2}}{\tau_{p}\rho_{D}\Gamma_{kD_{i}}+1}\mathbf{z}_{p,kD_{i}},&i\
eq i^{ \prime}\\ \frac{\sqrt{\tau_{p}\rho_{D}}\Gamma_{kD_{i}}+\tau_{p}\rho_{E}\sum_{j=1}^{J} \Gamma_{kE_{j}}+1}\mathbf{z}_{p,kD_{i}},&i=i^{\prime}\end{cases}  \tag{6}\]  
For notation simplicity, let \(\lambda_{kD_{i}}\) represent the mean-square value of the estimated channel coefficient:  
\[\lambda_{kD_{i}}= \begin{cases}\frac{\tau_{p}\rho_{D}\Gamma_{kD_{i}}^{2}}{\tau_ {p}\rho_{D}\Gamma_{kD_{i}}+1},&i\
eq i^{\prime}\\ \frac{\tau_{p}\rho_{D}\Gamma_{kD_{i}}^{2}}{\tau_{p}\rho_{D}\Gamma_{kD_{i}}+ \tau_{p}\rho_{E}\sum_{j=1}^{J}\Gamma_{kE_{j}}+1},&i=i^{\prime}\end{cases}  \tag{7}\]  
By the properties of the LMMSE estimator, the estimation error is given by:  
\[\mathbf{\hat{H}}_{kD_{i}}=\mathbf{H}_{kD_{i}}-\mathbf{\hat{H}}_{kD_{i}}, \tag{8}\]  
where \(\mathbf{\hat{H}}_{kD_{i}}\) follows the independent Gaussian distribution \(\mathcal{CN}(0,\Gamma_{kD_{i}}-\lambda_{kD_{i}})\). Similarly, the estimated channel from AP \(A_{k}\) to eavesdropper \(E_{j}\) is expressed as:  
\[\mathbf{\hat{H}}_{kE_{j}}=\frac{\sqrt{\rho_{E}}\Gamma_{kE_{j}}}{\sqrt{\rho_{D} \Gamma_{kD_{i}}}}\mathbf{\hat{H}}_{kD_{i}}. \tag{9}\]  
The corresponding mean-square value for the estimated eavesdropper channel is given by:  
\[\lambda_{kE_{j}}=\mathbb{E}\Big{\{}|\mathbf{\hat{H}}_{kE_{j}}|^{2}\Big{\}}= \frac{\rho_{E}\Gamma_{kE_{j}}^{2}}{\rho_{p}\Gamma_{kD_{i}}^{2}}\lambda_{kD_{i}}. \tag{10}\]  
The estimation error from AP \(A_{k}\) to eavesdropper \(E_{j}\) is defined as:  
\[\mathbf{\hat{H}}_{kE_{j}}=\mathbf{H}_{kE_{j}}-\mathbf{\hat{H}}_{kE_{j}}. \tag{11}\]Following the properties of LMMSE estimation, \(\tilde{\mathbf{H}}_{kE_{j}}\) follows an independent Gaussian distribution \(\mathcal{CN}(0,\Gamma_{kE_{j}}-\lambda_{kE_{j}})\). For downlink data transmission, the transmitted signal from the \(k\)th AP is given by:  
\[\mathbf{Q}_{k}=\sqrt{\xi}\sum_{i=1}^{I}\sqrt{\theta_{ki}}\mathbf{V}_{ki}r_{i}, \tag{12}\]  
where \(\zeta=\frac{\mathcal{P}_{\text{max}}}{\xi_{0}}\) represents the maximum normalized transmit signal-to-noise ratio (SNR) at each AP. Here, \(\mathcal{P}_{\text{max}}\) is the maximum allowable transmit power per AP, \(\xi_{0}\) is the noise power, and \(r_{i}\) represents the transmitted symbol for device \(D_{i}\), with \(\mathbb{E}\{|r_{i}|^{2}\}=1\). The power control factor between AP \(A_{k}\) and device \(D_{i}\) is denoted as \(\theta_{ki}\), and \(\mathbf{V}_{ki}\in\mathbb{C}^{N\times 1}\) is the precoding matrix designed for the signals sent from AP \(A_{k}\) to device \(D_{i}\). The normalized beamforming vector is computed as follows:  
\[\mathbf{V}_{ki}=\frac{\tilde{\mathbf{H}}_{kD_{i}}^{*}}{\|\tilde{\mathbf{H}}_{ kD_{i}}^{*}\|}=\frac{\tilde{\mathbf{H}}_{kD_{i}}^{*}}{\sqrt{N\sigma_{kD_{i}}}}. \tag{13}\]  
The total power used by AP \(A_{k}\) can be expressed as:  
\[\mathbb{E}\Big{\{}\|\mathbf{Q}_{k}\|^{2}\Big{\}}=\zeta\sum_{i=1}^{I}\theta_{ki}. \tag{14}\]  
Each AP transmits confidential messages to \(I\) IoT devices, while \(J\) eavesdroppers attempt to intercept the legitimate downlink signals. The received signal at device \(D_{i}\) is given by:  
\[u_{D_{i}}=\sum_{k=1}^{K}\mathbf{T}_{kD_{i}}^{T}\mathbf{Q}_{k}+e_{D_{i}}, \tag{15}\]  
\[u_{D_{i}}=\sqrt{\xi}\sum_{k=1}^{K}\sum_{i^{\prime}=I}^{I}\sqrt{\frac{\theta_{ ki^{\prime}}}{N\sigma_{kD_{i}^{\prime}}}}\mathbf{T}_{kD_{i}}^{T}\tilde{ \mathbf{H}}_{kD_{i}^{\prime}}^{*}r_{i^{\prime}}+e_{D_{i}}. \tag{16}\]  
where \(e_{D_{i}}\sim\mathcal{CN}(0,1)\) represents the AWGN noise at device \(D_{i}\). Similarly, the signal received by eavesdropper \(E_{j}\) while attempting to decode the transmission to device \(D_{i}\) is given by:  
\[u_{E_{j},i}=\sum_{k=1}^{K}\mathbf{T}_{kE_{j}}^{T}\mathbf{Q}_{k}+e_{E_{j},i}, \tag{17}\]  
\[\mathbf{\hat{H}}_{kE_{j}}=\frac{\sqrt{\rho_{E}}\Gamma_{kE_{j}}}{\sqrt{\rho_{D} \Gamma_{kD_{i}}}}\mathbf{\hat{H}}_{kD_{i}}. \tag{9}\]0  
where \(e_{E_{j},i}\sim\mathcal{CN}(0,1)\) represents the AWGN at eavesdropper \(E_{j}\).