# Smart Handoff Technique for Internet of Vehicles Communication using Dynamic Edge-Backup Node
## 3 Proposed Methodology
\[\Delta V_{N,Q}=V_{N}-V_{Q}\] (2)
* The probability of the vehicle being the cluster head: \[Probability=(E+2*densityofthenode+V)/P_{max}\] (3) where \(E\) is the energy intake of the node for sending/receiving a packet, (here, energy refers to the power that a node consumes for the transmission process) and \(V\) is the speed of vehicle. Probability value will be between 0 and 1. We have normalized the range of \(E\), _vehicle density, and velocity_ within the range of (0-1). All captured values will be divided by the maximum value of the obtained probability. In each iteration, the maximum obtained probability--by setting the maximum values of all mentioned metrics, \(Pmax\)--can be defined. Example, \(P_{max}=E_{max}+2*Density_{max}+V_{max}\)\(\approx\)\(P_{max}=1+2\times 1+1=4\); hence, each time, calculating the probability of having a vehicle as the cluster head will be divided by the value 4 (\(P_{max}\)); hence the range value of probability will end up with the scale of 0-1. Bear in mind that when the value gets close to 1, it indicates a poor candidate; while when it is closer to 0 it is considered the best candidate, as it would be a minimization problem; the minimum is the best. Obviously this value is highly dependent on the energy consumption of vehicles, density of the node, and speed of the vehicles. Cluster heads are selected according to the probability of optimal cluster heads being decided by the this equation, taking into account the metrics of each network's cluster. After the selection of cluster heads, the clusters are constructed, and the cluster heads start communicating. The cluster head which would consume the least energy during its communication would have a greater chance of becoming the cluster head. Here, energy means the power that a node consumes for transmission. \[E=K*E_{con} \tag{4}\]  
where \(E_{con}\) describes the energy intake of the wireless send/receive circuit. * The \(S_{N,Q}\) stability factor computed for all neighbor vehicles Q in the transmission chain: \[\begin{array}{l}S_{N,Q}\ =\ \ a_{1}+\ a_{2}\ *\ Distance_{N,Q}+\ a_{3}\ *\ P+\ a_{4}\ *\ P+\ a_{5}\ *\ Distance_{N,Q}\ *\ \Delta V_{N,Q}+\ a_{6}\ *\ Distance_{N,Q}\ *\ P\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
where: \(\alpha_{1},\alpha_{2},\alpha_{3},\alpha_{4},\alpha_{5},\alpha_{6},\alpha_{7}\) and \(\alpha_{8}\) are called real coefficients of the model._  
\[\left|\alpha_{1}\ldots\alpha_{8}\right|=(X^{t}*X)^{-1}*(S*X)^{t} \tag{6}\]  
where \(S\), output, and \(X\) are the impacts of matrix. \(S\) is the stability of cluster. Cluster stability is an important goal that clustering algorithms try to achieve, and it is to be considered a measure of performance of a clustering algorithm. Cluster stability can be explained using multiple methods; our procedure computes the stability from the distance, variation in speed, and probability arguments. Cluster head is selected with keen value stability [33]. Results of the experimentation used to change all the three components (the difference in speed between the vehicle, the distance \(\Delta V\) and probability) in the following limits: \begin{tabular}{c c c} \hline \hline  & low degree: \(-1\) & high degree: +1 \\ \hline Distance & near & far \\ \hline speed & low & high \\ \hline Probability & low & high \\ \hline \hline \end{tabular}   
* The component of stability S: All vehicles exchanges measures of stability with neighbor vehicles in its cluster. Cluster head is the vehicle with the larger value of stability. \[S=\sum S_{N,Q}\] (7)