# Analysis and Design of Functional Device for Vehicular Cloud Computing
## 5 Design of Relay-Assisted Scheme for Vehicular Application
### Optimal Path Selection Algorithm  
With topological changes and high speed vehicles joining vehicular networks, especially on freeways, vehicular networks have many additional technical challenges, such as great channel fading and poorly received signal quality. Cooperation-based communication technologies can take advantage of wireless terminal devices to establish multiple communication links when sending and receiving information that can overcome fading radio channels via conventional multi-antenna spatial diversity techniques and by improving wireless network system performance and robustness. This way of  
Figure 2: Vehicle device overall function framework. selecting relay-assisted vehicles could achieve a higher functionality when communication links are dynamically selected. Furthermore, the vehicular network communication efficiency can be improved by this process. Here, one vehicle communicates with another vehicle via a relay-assisted vehicle when zero-forcing (ZF) detectors [33] are employed to receive the messages and suppress interference. This type of relay technique is leveraged in this paper, which is an industrial communication solution for long-distance, cooperative connectivity [13]. For high-speed vehicular networks, Reference [39] proposed a scheme to provide a full-duplex relaying connectivity for an unstable direct link and imprecise channel state information (CSI). Reference [40] also cites out the effect of outdated channel state information on the outage and error rate performance of AF relay selection, where only one out of the set of available relays is selected. Relay techniques are further exploited in this paper. These techniques have been an industrial communication solution for long-distance transmission. The basic system model is illustrated in Figure 1.  
From Equation (10), we need to know \(\gamma_{AF}\) at the \(i\)th path. Apparently, this random formula accounts for the channel gain of both \(S\to R_{i}\) and \(R_{i}\to D\) links. The total SNR set via the \(i\)th path is defined as  
\[U_{i}=\gamma_{AF}(i),i=1,2,\ldots,N. \tag{25}\]  
Theoretically, we know that the designed device can be theoretically put into any device in the vehicular networks, as described in Section 5.1. In this paper, we assume that the designed device is embedded in the source vehicle. On the other hand, we assume that the source vehicle could get all outdated CSI from the set of relays. When the source vehicle receives packets, which include \(U_{i}\), the destination will analyze this set and select the \"best\" relay-assisted vehicle \(n^{*}\), expressed as  
\[n^{*}=arg\ max_{i\in 1,2,\ldots,N}U_{i}. \tag{26}\]  
The presence of an optimal path selection operation within a vehicle device in two-hop vehicular networks is identified by Algorithm 1. This algorithm is executed in the VC, and the execution results are notified by the VC to all vehicles in the vehicular networks via an RSU. All vehicles transmit their own information and related channel information to the cloud. After a series of processing as in Section 5.1, the cloud feeds the final result back to all vehicles in vehicular networks to help the source vehicle discover the assisted vehicle. When the source vehicle \(S\) requires the assisted vehicle to relay information to the destination vehicle \(D\), it is easy to see from Algorithm 1 that all vehicles upload their own information and channel information to the VC. The VC uses its computing power to compute the SNR of each link between vehicles according to our analysis in Section 4. Then, the VC downloads the final results to all vehicles in the vehicular networks. The source vehicle \(S\) could select an optimal vehicle as an assisted vehicle to transmit information to the destination vehicle \(D\) according the received information from the VC.