# Performance Analysis of Soft-Switching FSO/THz-RF Dual-Hop AF-NOMA Link Based on Cognitive Radio
## 2 System and Channel Models
### Soft-Switching FSO/THz Link  
The complementary characteristics of FSO and THz in coping with atmospheric conditions lead us to build hybrid FSO/THz links. Compared with hard-switching, soft-switching between FSO and THz links is used to avoid frequent switching and improve the lifetime of the links, and a more practical approach is to use two FSO thresholds and  
Figure 1: Soft-switching FSO/THz-RF dual-hop AF-NOMA link with CR.  
a single THz threshold for soft-switching between the links. Therefore, in this section, we utilize the complementary characteristics of FSO and THz in different atmospheric environments to build a soft-switching FSO/THz scheme in the SR link. The exponential Weibull model is a commonly used model to characterize the atmospheric turbulence of FSO links in recent years, which not only can accurately simulate the optical irradiance under weak turbulence and strong turbulence, but also more importantly, the derivation of the exponential Weibull model is relatively simple, which makes it very suitable for the soft-switching case. Therefore, the exponential Weibull model is chosen in this paper, and the channel gain \(x_{F}\) of the PDF is [27]:  
\[f_{|h_{F}|^{2}}(x_{F})=\frac{\alpha_{F}\beta_{F}}{\eta}\bigg{(}\frac{x_{F}}{ \eta^{2}}\bigg{)}^{\frac{\beta_{F}-1}{2}}\exp\left[-\bigg{(}\frac{x_{F}}{\eta^{ 2}}\bigg{)}^{\frac{\beta_{F}}{2}}\right]\Bigg{\{}1-\exp\left[-\bigg{(}\frac{x_{ F}}{\eta^{2}}\bigg{)}^{\frac{\beta_{F}}{2}}\right]\Bigg{\}}^{\alpha_{F}-1}. \tag{1}\]  
Subsequently, integrating (1) yields the CDF of the exponential Weibull model as  
\[F_{|h_{F}|^{2}}(x_{F})=\left\{1-\exp\left[-\bigg{(}\frac{x_{F}}{\eta^{2}}\bigg{)} ^{\frac{\beta_{F}}{2}}\right]\right\}^{\alpha_{F}}, \tag{2}\]  
where \(\alpha_{F}\) and \(\beta_{F}\) are the shape parameter, and \(\eta\) is the scale parameter.  
For THz, channel fading is appropriately modeled as the \(\alpha-\mu\) distribution, which is a generalized model that can be simplified to numerous important distributions such as Gamma, Nakagami-\(m\), etc. [28]. THz link channel gain \(x_{T}\) is affected by pointing errors; it follows \(\alpha-\mu\) distribution as its PDF [29]:  
\[\begin{split} f_{|h_{T}|^{2}}(\lambda_{T})&=\frac{g _{T}^{2}\mu_{T}^{2}\lambda_{T}^{\frac{\beta_{T}^{2}}{2}-1}}{2\Big{(}A_{0,T}h_{ l,T}\hat{h}_{f,T}\Big{)}^{\delta_{T}^{2}}\Gamma(\mu_{T})}\times\\ &\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad \quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad  
* If \(x_{th,L}^{F}>x_{F}>x_{th,L\prime}^{F}\) and given \(x_{F}<x_{th,L}^{F}\) previously, if \(x_{T}>x_{th}^{T}\), the THz link is activated; if \(x_{T}<x_{th}^{T}\), the hybrid link is outage.
* If \(x_{F}<x_{th,L\prime}^{F}\), if \(x_{T}>x_{th}^{T}\), the THz link is activated; if \(x_{T}<x_{th}^{T}\), the hybrid link is outage.  
For ease of calculation, we introduce an offset \(\Delta\), which is used to describe the offset of the two thresholds for the FSO link and the single threshold for the THz link from the center threshold such that \(x_{th,L}^{F}=(1+\Delta)x_{th}\), \(x_{th,L}^{F}=(1-\Delta)x_{th}\), and \(x_{th}^{T}=x_{th}\). According to the specific operation of soft-switching, the OP of the FSO link in the soft-switching system can be expressed as  
\[F_{|h_{F}|^{2}}^{Soft}(x_{th})=P_{low}^{F}+P_{med}^{F}\Bigg{(}\frac{P_{low}^{F} }{P_{low}^{F}+P_{hig}^{F}}\Bigg{)}, \tag{5}\]  
where, \(P_{low}^{F}=F_{|h_{F}|^{2}}((1-\Delta)x_{th})\), \(P_{med}^{F}=F_{|h_{F}|^{2}}((1+\Delta)x_{th})-F_{|h_{F}|^{2}}((1-\Delta)x_{th})\), and \(P_{hig}^{F}=1-F_{|h_{F}|^{2}}((1+\Delta)x_{th})\).  
Because THz has only a single threshold, the OP of the THz link in the soft-switching system can be expressed as  
\[F_{|h_{T}|^{2}}^{Soft}(x_{th})=F_{|h_{T}|^{2}}(x_{th}). \tag{6}\]  
Therefore, in the case of soft-switching, the OP of the hybrid FSO/THz link can be expressed as  
\[F_{|h_{\text{FSO}}|^{2}}(x_{th})=F_{|h_{F}|^{2}}^{Soft}(x_{th})\times F_{|h_{T }|^{2}}^{Soft}(x_{th}). \tag{7}\]