# Analysis and Design of Functional Device for Vehicular Cloud Computing
## 3 System Model
### V2V Communication
#### 3.2.2 Indirect Communication  
For the case of indirect communication, the candidate vehicle set \(R_{i}\) is adopted in this case, and the \(R_{i}\) which occurs between vehicle \(S\) and vehicle \(D\) is essential. The vehicle \(S\) transmits a signal \(x(t)\) to vehicle \(D\), which is beyond the communication range, with the help of one assisted vehicle belonging to \(R_{i}\). Suppose the established links are independent of each other. Similarly, we assume that vehicle \(S\) is transmitting a signal \(x(t)\) to vehicle \(D\) via one relay-assisted vehicle that is within the \(R_{i}\) set. The received signal \(y_{r}(t)\) by one relay vehicle which is in \(R_{i}\) is given by  
\[y_{r}(t)=\sqrt{P_{s}}h_{1}x(t)+n_{1}(t), \tag{4}\]  
where \(h_{1}\) is an \(S\to R_{i}\) channel coefficient and \(n_{1}(t)\) is an AWGN term with a one-sided PSD \(N_{0}\). The term \(n_{1}\) exists in the first hop channel. When the signal is received by one relay vehicle, which is in \(R_{i}\), it will be processed (Obeying Amplify-and-Forward (AF) protocol) by gaining modulation \(A\). Then, the processed signal is transmitted to the destination vehicle via a relay channel that is between \(R_{i}\) and \(D\). The received signal at terminal \(D\) can be expressed as  
\[y_{d}(t)=\sqrt{P_{s}}h_{1}h_{2}Ax(t)+Ah_{2}n_{1}(t)+n_{2}(t). \tag{5}\]  
where \(h_{2}\) is an \(R_{i}\to D\) channel coefficients and \(n_{2}(t)\) is an AWGN with a one-sided PSD \(N_{0}\). The term \(n_{2}\) is in the second-hop channel. According to Equation (5), the overall SNR at the receiving terminal can be written as  
\[ \begin{split}\gamma_{AF}&=\frac{P_{s}\left|Ah_{1}h_ {2}\right|^{2}}{\left|Ah_{2}n_{1}(t)\right|^{2}+\left|n_{2}(t)\right|^{2}}\\ &=\frac{P_{s}\frac{\left|h_{1}\right|^{2}}{N_{0}}\frac{\left|h_{ 2}\right|^{2}}{N_{0}}}{\frac{h_{2}^{2}}{N_{0}}+\frac{1}{A^{2}N_{0}}}.\end{split}  \tag{6}\]  
Under certain environmental or channel correlation coefficients, we can infer from Equation (6) that the choice of AF relay gain \(A\) is equivalent to the SNR for two-hop channels. The AF relay gain \(A\) is thus given by Reference [33]  
\[A=\sqrt{\frac{P_{i}}{P_{s}h_{1}^{2}+N_{0}}}. \tag{7}\]where \(P_{i}\) is the power of the relay node, and we assume all vehicles have the same power in this paper, that is \(P_{i}=P_{s}\). As a short hand notation, we use the notations \(\gamma_{1}=\sqrt{P_{s}}h_{1}^{2}/N_{0}\) and \(\gamma_{2}=\sqrt{P_{s}}h_{2}^{2}/N_{0}\) to denote the SNRs of the per hop channel. The instantaneous SNR of a two-hop channel is  
\[\left\{ \begin{array}{l}\gamma_{1}\sim\xi(1/\overline{\gamma}_{1}),\\ \gamma_{2}\sim\xi(1/\overline{\gamma}_{2}),\end{array} \right. \tag{8}\]  
where \(\overline{\gamma}_{1}\) and \(\overline{\gamma}_{2}\) are the average SNRs of the two channels respectively. The notation \(y\sim\xi(x)\) denotes that \(y\) is exponentially distributed with parameter \(x\). In this case, by substituting Equation (7) into Equation (6) and by assuming \(P_{s}=P_{i}=1\), we obtain \(\gamma_{AF}\) as follows  
\[\gamma_{AF}=\frac{\gamma_{1}\gamma_{2}}{\gamma_{1}+\gamma_{2}+1}. \tag{9}\]  
The form of the equivalent SNR in Equation (9) is not easily tractable with our approach. This is due to the complexity in finding the statistics (i.e., the Probability Density Function (PDF), Cumulative Distribution Function (CDF), and Moment Generation Function (MGF)) associated with it. The fading parameter of the first link \(h_{1}\) is low. The choice of the above gain aims to limit the output power of the vehicle (relay) \(R_{i},i\in\{1,2,\ldots,N\}\). At a higher SNR, the constant \(1\) in the denominator of Equation (9) can be omitted. Fortunately, this treatment can be tightly bounded. As a result, Equation (9) can be approximated by  
\[ \begin{split}\gamma_{AF}&\approx\frac{\gamma_{1} \gamma_{2}}{\gamma_{1}+\gamma_{2}}\\ &=\left(\frac{1}{\gamma_{1}}+\frac{1}{\gamma_{2}}\right)^{-1}. \end{split}  \tag{10}\]  
In Equation (10), the fading parameter of the \(S\to R_{i}\) channel, \(\gamma_{1}\), is high.