## 4 Hybrid Beamforming and RIS Phase Shift Matrix Design  
### Hybrid Beamforming and RIS Phase Shift Matrix Design Based on Tensor-Train Decomposition  
Define \(\sqrt{\frac{\mathbb{T}\,N_{R}}{\mathbb{C}_{\hat{M}_{k}}}}\) and \(\sqrt{\frac{\mathbb{T}\,N_{T}}{\mathbb{C}_{\hat{R}}}}\) as constants and set them to 1. The millimeter-wave massive channel from the RIS to the user side \(\bar{M}_{k}\) and the millimeter wave massive channel from the UAV side to the RIS \(\bar{R}\) can be written with Tensor-train decomposition form as follows, respectively. \[ \begin{split}\breve{\mathcal{M}}_{k}=\sum\limits_{q=1}^{Q_{\breve{N}_{k} }}\mathcal{T}\widetilde{\kappa}_{km,q}\cdot\widetilde{\alpha}_{R}\Big{(}\varphi _{km,q}{}^{R}(t)\Big{)}\cdot\widetilde{a}_{P_{1}}^{H}\Big{(}\varphi_{km,q}{}^ {T}(t),\eta_{km,q}{}^{T}(t)\Big{)}\\ =\mathcal{T};\widetilde{A}_{R,km},\widetilde{\Lambda}_{km,q}, \widetilde{A}_{P_{1},km}^{H}\\ =\widetilde{\mathfrak{F}}_{R,km}^{(1)}\circ\widetilde{\mathfrak{F }}_{km,q}^{(2)}\circ\widetilde{\mathfrak{F}}_{P_{1},km}^{H(3)}\\ \breve{\mathcal{R}}=\sum\limits_{q=1}^{Q_{\breve{R}}}\mathcal{T }\widetilde{\kappa}_{r,q}(t)\cdot\widetilde{a}_{P_{2}}\big{(}\varphi_{r,q}{}^ {R}(t),\eta_{r,q}{}^{R}(t)\big{)}\cdot\widetilde{\mathfrak{F}}_{T}^{H}\big{(} \
u_{r,q}{}^{T}(t)\big{)}\\ =\mathcal{T};\widetilde{A}_{P_{2},r},\widetilde{\Lambda}_{r,q}, \widetilde{A}_{T,r}^{H}\\ =\widetilde{\mathfrak{F}}_{P_{2},r}^{(1)}\circ\widetilde{\mathfrak{F }}_{r,q}^{(2)}\circ\widetilde{\mathfrak{F}}_{T,r}^{H(3)}\end{split}  \tag{54}\]  
where \(\widetilde{\kappa}_{km,q}(t)=\Big{[}\kappa_{km,q}(1),\cdots,\kappa_{km,q}(T) \Big{]}^{T}e\mathbb{C}^{T\times 1}\), \(\widetilde{\kappa}_{r,q}(t)=\big{[}\kappa_{r,q}(1),\cdots,\kappa_{r,q}(T) \big{]}^{T}e\mathbb{C}^{T\times 1}\). The three factor matrices obtained by tensor decomposition of \(\breve{M}_{k}\) are the receive antenna array response matrix \(\breve{A}_{R,km}\), the path gain factor matrix \(\Lambda_{km,q}\), the RIS reflector antenna array response matrix \(\breve{A}_{P_{1},km}^{H}\). The three factor matrices are defined as follows, respectively. \[ \begin{split}\vec{A}_{R,km}=\widetilde{\mathfrak{F}}_{R,km}^{(1) }\Big{(}1_{R_{>(2)}}^{T}\bigotimes I_{R_{1}}R_{R,km}\bigotimes I_{R_{1}}^{T} \Big{)}\\ =\bigg{[}\widetilde{\mathfrak{F}}_{R}\big{(}\varphi_{km,1}{}^{R} (t)\big{)},\cdots,\widetilde{\mathfrak{F}}_{R}\big{(}\varphi_{km,Q_{\breve{M }_{k}}}{}^{R}(t)\big{)}\bigg{]}e\mathbb{C}^{N_{R}\times Q_{\breve{M}_{k}}}\\ \Lambda_{km,q}=\widetilde{\mathfrak{F}}_{km,q}^{(2)}\Big{(}1_{R _{>(2)}}^{T}\bigotimes I_{R_{1}}R_{km,q}\bigotimes I_{R_{1}}^{T}\Big{)}\\ =\bigg{[}\widetilde{\mathfrak{F}}_{km,1}(t),\cdots,\widetilde{ \mathfrak{F}}_{km,Q_{\breve{M}_{k}}}(t)\bigg{]}e\mathbb{C}^{T\times Q_{ \breve{M}_{k}}}\end{split}  \tag{57}\]  
\[ \begin{split}\vec{A}_{P_{1},km}^{H}=\widetilde{\mathfrak{F}}_{P_{1 },km}^{H(3)}\Big{(}1_{R_{>(2)}}^{T}\bigotimes I_{R_{1}}R_{km,q}\bigotimes I_{ R_{1}}^{T}\Big{)}\\ =\bigg{[}\widetilde{\mathfrak{F}}_{P_{1}}\big{(}\varphi_{km,1}{} ^{T}(t),\eta_{km,1}{}^{T}(t)\big{)},\cdots,\widetilde{\mathfrak{F}}_{P_{1}} \bigg{(}\varphi_{km,Q_{\breve{M}_{k}}}{}^{T}(t),\eta_{km,Q_{\breve{M}_{k}}}{ }^{T}(t)\bigg{)}\bigg{]}e\mathbb{C}^{T\times Q_{\breve{M}_{k}}}\end{split}  \tag{58}\]  
where \(\breve{R}_{k}\) is also obtained by tensor decomposition to obtain the RIS receive antenna array response factor matrix \(\breve{A}_{P,r}\), the fast-fading factor matrix \(\breve{\Lambda}_{r,q}\), and UAV end transmit antenna factor matrix \(\breve{A}_{T,r}^{H}\). The three factor matrices are defined, respectively, as follows:  
\[ \begin{split}\vec{A}_{P,r}=\widetilde{\mathfrak{F}}_{P,r}^{(1) }\Big{(}1_{R_{>(2)}}^{T}\bigotimes I_{R_{1}}R_{P,r}\bigotimes I_{R_{1}}^{T} \Big{)}\\ =\Big{[}\widetilde{\mathfrak{F}}_{P}\big{(}\varphi_{r,1}{}^{R}(t), \eta_{r,1}{}^{R}(t)\big{)},\cdots,\widetilde{\mathfrak{F}}_{P}\Big{(} \varphi_{r,Q_{\breve{R}}}{}^{R}(t),\eta_{r,Q_{\breve{R}}}{}^{R}(t)\Big{)} \Big{]}e\mathbb{C}^{T\times Q_{\breve{R}}}\end{split}  \tag{59}\]  
\[