# Robust Transceiver Design for IRS-Assisted Cascaded MIMO Communication Systems
## 3 Achievable Rate (Full-Duplex Relay)
### Algorithm Description
Notice that for the case in which IRS is assisting the source-relay link, the term \(T_{1}P_{s}\) in (27) should be replaced with \((T_{1}+T_{S1}T_{IR})P_{s}\), and for the case where IRS helps the relay-destination link, the term \(T_{2}P_{s}\) in (28) should be replaced with \((T_{2}+T_{RI}T_{ID})P_{r}\). The pseudo code for these scenarios is given in Algorithm 3. ```
1: Find power allocation \(\mathbf{P}^{0}\) using water-filling algorithm
2:while\(|\mathbf{P}^{(q)}-\mathbf{P}^{(q-1)}|\) is large do
3: Define \(\text{temp}=0\)
4:for\(i\)do
5: Calculate \(\text{cap}_{i}=\min_{1\leq l^{\prime}\leq l-1}\{\sigma_{1_{r}}^{2}\,\gamma_{s_ {p(i^{\prime})}}\}/\sigma_{1_{i}}^{2}\)
6:if\(P_{i}>\text{cap}_{i}\)then
7:\(P_{i}=\text{cap}_{i}\)
8:\(\text{temp}=\text{temp}+P_{i}-\text{cap}_{i}\)
9:endif
10:endfor
11:\(\mathbf{P}=\mathbf{P}+\frac{\text{temp}}{\text{number of channels}}\)
12:endwhile
```  
**Algorithm 1** The optimal \(\gamma_{s}\)  
```
1: Define \(U=P_{r}\), \(L=0\), \(\bar{P}_{1}^{(1)}=\frac{P_{r}}{2}\)
2:while\(|U-L|\) is large do
3: Determine \(\gamma_{r}=[\tau_{r}-\frac{1}{\sigma_{2}^{2}}]\), s.t. \(\|\gamma_{r}\|_{1}=\bar{P}_{r}\)
4: Define \(\mathbf{\sigma}_{r}^{(0)^{2}}=\mathbf{0}\) and \(\mathbf{\sigma}_{r}^{(1)^{2}}=\mathbf{1}\) and \(q=0\)
5: Set \(T^{\prime}=\left(\sqrt{T_{r}}-\sigma_{\text{min}}(\mathbf{H}_{IR}*\mathbf{H}_{ RI}^{\text{T}})\right)^{2}\)
6:while\(\|\mathbf{\sigma}_{r}^{(q)^{2}}-\mathbf{\sigma}_{r}^{(q-1)^{2}}\|_{1}\) is large do
7: Obtain \(\sigma_{r}^{(q)^{2}}\), using Equation (39)
8: Obtain \(\gamma_{s}^{(q)}\), using Algorithm 1
9:\(q=q+1\)
10:endwhile
11: Calculate \(R_{\text{sr}}\) and \(R_{\text{rd}}\)
12:if\(R_{\text{sr}}>R_{\text{rd}}\)then
13:\(U=\bar{P}_{r}\)
14:elseif\(R_{\text{sr}}<R_{\text{rd}}\)then
15:\(L=\bar{P}_{r}\)
16:endif
17:\(\bar{P}_{r}=\frac{U+L}{2}\)
18:endwhile
```  
**Algorithm 2** Robust Transceiver Design for FD scenario, the first case ```
1: Define \(U=P_{r}\), \(L=0\), \(\tilde{P}_{r}^{(1)}=\frac{P_{r}}{2}\)
2: Define \(Case=1\) if the IRS is being used help the source-relay link or \(Case=0\) if IRS is being used to help the relay-destination link
3:while\(|U-L|\) is large do
4: Determine \(\gamma_{r}=[\tau_{r}-\frac{1}{\sigma_{r}^{2}}]^{+}\), s.t. \(\|\gamma_{r}\|_{1}=\tilde{P}_{r}\)
5: Define \(\mathbf{\sigma}_{r}^{(0)^{2}}=\mathbf{0}\) and \(\mathbf{\sigma}_{r}^{(1)^{2}}=\mathbf{1}\) and \(q=0\)
6:if\(Case=1\)then
7:\(\tilde{\mathbf{H}}_{tot_{2}}=(\tilde{\mathbf{H}}_{1}+\tilde{\mathbf{H}}_{RI} \mathbf{\Theta}\tilde{\mathbf{H}}_{IR})\)
8: Find the optimum \(\mathbf{\Theta}\), using Algorithm 1 in [8]
9:elseif\(Case=0\)then
10:\(\tilde{\mathbf{H}}_{tot_{3}}=(\tilde{\mathbf{H}}_{2}+\tilde{\mathbf{H}}_{RI} \mathbf{\Theta}\tilde{\mathbf{H}}_{IR})\)
11: Find the optimum \(\mathbf{\Theta}\), using Algorithm 1 in [8]
12:endif
13: Obtain \(\gamma_{s}^{(q)}\), using Algorithm 1
14:\(q=q+1\)
15:endwhile
16: Calculate \(R_{\text{sr}}\) and \(R_{\text{rd}}\)
17:if\(R_{\text{sr}}>R_{\text{rd}}\)then
18:\(U=\tilde{P}_{r}\)
19:elseif\(R_{\text{sr}}<R_{\text{rd}}\)then
20:\(L=\tilde{P}_{r}\)
21:endif
22:\(\tilde{P}_{r}=\frac{U+L}{2}\)
```

**Algorithm 3** Robust Transceiver Design for FD scenario, the second and third case

### Discussion

In this part, we evaluate the various aspects of our method. First, we examine the complexity of our algorithm and compare it with the state of the art. Algorithms 1 and 2 are the main solutions provided in this paper. Algorithm 1 is a multi-level water-filling, and as a result, it has the complexity of \(\mathcal{O}(l_{w}\min(N_{t},K_{r}))\), where \(l_{w}\) is a constant that is independent of system parameters and is only related to the accuracy of the multi-level water-filling algorithm.