# Joint Beam-Forming Optimization for Active-RIS-Assisted Internet-of-Things Networks with SWIPT
## 3 Proposed Algorithm
### Optimizing \(P\),\(\Theta\) Given \(w_{k},\rho_{k},t_{k}\)
\tag{30}\]  
For (17), it can be rewritten by the following process:  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{ i=1}^{K}\Big{(}p_{1}e^{i\theta_{1}},\cdots,p_{N}e^{i\theta_{N}}\Big{)}\mathrm{ diag}(\mathrm{Gw}_{i})(\mathrm{diag}(\mathrm{Gw}_{i}))^{H}\Big{(}p_{1}e^{i \theta_{1}},\cdots,p_{N}e^{i\theta_{N}}\Big{)}^{H},\]  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]  
\[\sigma_{v}^{2}\|\mathrm{P\[PERSON]}\|^{2}=\sigma_{v}^{2}\Big{(}p_{1}e^{i\theta_{ 1}},\cdots,p_{N}e^{i\theta_{N}}\Big{)}\Big{(}p_{1}e^{i\theta_{1}},\cdots,p_{N }e^{i\theta_{N}}\Big{)}^{H},\]  
\[\sigma_{v}^{2}\|\mathrm{[PERSON]\[PERSON]}\|^{2}=\sigma_{v}^{2}\theta^{H}\theta,\]  
\[\sum\limits_{i=1}^{K}\theta^{H}Q_{i}\theta+\sigma_{v}^{2}\theta^{H}\theta \leqslant p_{\max}. \tag{31}\]  
For (27), since \(\mathrm{h}_{k}^{H}=\mathrm{h}_{r,k}^{H}\mathrm{P\Theta G}+\mathrm{h}_{b,k}^{H}\), it can be rewritten by the following process:  
\[\sum\limits_{j=1}^{K}\Big{|}\mathrm{h}_{k}^{H}\mathrm{w}_{j}\Big{|}^{2}=\sum \limits_{j=1}^{K}\Big{|}\mathrm{h}_{r,k}^{H}\mathrm{YGw}_{j}+\mathrm{h}_{b,k} ^{H}\mathrm{w}_{j}\Big{|}^{2}\]  
\[\sum\limits_{j=1}^{K}\Big{|}\mathrm{h}_{k}^{H}\mathrm{w}_{j}\Big{|}^{2}=\sum \limits_{j=1}^{K}\Big{|}\theta^{H}b_{k,j}+a_{k,j}\Big{|}^{2}\]  
\[\sigma_{v}^{2}\|\mathrm{h}_{r,k}^{H}\mathrm{P\Theta}\|^{2}=\sigma_{v}^{2} \Big{(}p_{1}e^{i\theta_{1}},\cdots,p_{N}e^{i\theta_{N}}\Big{)}\mathrm{diag} \Big{(}\mathrm{h}_{r,k}^{H}\Big{)}\mathrm{diag}(\mathrm{h}_{r,k})\Big{(}p_{1} e^{i\theta_{1}},\cdots,p_{N}e^{i\theta_{N}}\Big{)}^{H},\]  
\[\sigma_{v}^{2}\|\mathrm{h}_{r,k}^{H}\mathrm{P\Theta}\|^{2}=\sigma_{v}^{2} \theta^{H}Z_{k}\theta\]  
\[\sum\limits_{j=1}^{K}\Big{|}\theta^{H}b_{k,j}+a_{k,j}\Big{|}^{2}+\sigma_{v}^{2 }\theta^{H}Z_{k}\theta\geqslant\frac{i_{k}^{2}}{1-\rho_{k}}, \tag{32}\]  
Thus, (P3) is transformed into (P4) as follows:  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]0  
(P4) is not a convex problem because it contains quadratic inequality constraints, and to turn it into a solvable convex problem, the SDR technique is used. Introducing variables \(\widetilde{\theta}=\big{[}\theta^{T}\,1\big{]}^{T}\in\mathbb{C}^{(N+1)\times 1}\) and \(\mathrm{S}_{k,j}=\big{[}b_{k,j}b_{k,j}^{H},\,b_{k,j}^{H}a_{k,j}^{H},\,b_{k,j}^{H }a_{k,j},\,0\big{]},\forall i\in\mathcal{K}\), \(\mathrm{T}=\widetilde{\theta}\widetilde{\theta}^{H}\in\mathbb{C}^{(N+1)\times (N+1)}\) can be defined, which requires \(\mathrm{T}\succeq 0\) and \(\mathrm{T}\) to satisfy the rank one constraint. After relaxing the rank one constraints, (P5) can be obtained by rewriting it in this way:  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]1  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]2  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]3  
\[\sum\limits_{i=1}^{K}\|\mathrm{P\Theta Gw}_{i}\|^{2}=\sum\limits_{i=1}^{K} \theta^{H}Q_{i}\theta,\]4\[\frac{\mathrm{Tr}(\mathrm{S}_{k,k}\mathrm{T})+\left|a_{k,k}\right|^{2}}{\gamma_{k}}- \sum_{ \begin{subarray}{c}j=1\\ j\
eq k\end{subarray}