Improved S-AF and S-DF Relaying Schemes Using Machine Learning Based Power Allocation Over Cascaded Rayleigh Fading Channels

We investigate the performance of a dual-hop inter-vehicular communications (IVC) system with relay selection strategy. We assume a generalized fading channel model, known as cascaded Rayleigh (also called <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>*Rayleigh), which involves the product of <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula> independent Rayleigh random variables. This channel model provides a realistic description of IVC, in contrast to the conventional Rayleigh fading assumption, which is more suitable for cellular networks. Unlike existing works, which mainly consider double-Rayleigh fading channels (i.e, <inline-formula> <tex-math notation="LaTeX">$n=2$ </tex-math></inline-formula>); our system model considers the general cascading order <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>, for which we derive an approximate analytic solution for the outage probability under the considered scenario. Also, in this study we propose a machine learning-based power allocation scheme to improve the link reliability in IVC. The analytical and simulation results show that both selective decode-and-forward (S-DF) and amplify-and-forward (S-AF) relaying schemes have the same diversity order in the high signal-to-noise ratio regime. In addition, our results indicate that machine learning algorithms can play a central role in selecting the best relay and allocation of transmission power.


I. INTRODUCTION
he realization of inter-vehicular communications (IVC) is very challenging in practice and existing solutions, for example, from cellular and ad-hoc networks may not be applicable, which is mainly due to the dynamic nature of wireless links and the involved mobility patterns.In general, mobile-to-mobile (M2M) fading channels often exhibit greater dynamics and more severe fading than fixed-to-mobile (F2M) cellular radio channels, which are mostly limited to the classical Rayleigh or Nakagami- distribution (i.e.,  = 1), where the stationary base station has high elevation antennas and is relatively free from local scatterers [1].Therefore, it is important to utilize a realistic channel model that characterizes the statistical properties of M2M channels such as *Rayleigh distribution [2].In IVC, both transmitter and receiver are in motion, and typically have the same antenna height, resulting in two or more small-scale fading processes generated by independent groups of local scatterers around the two mobile terminals [3] (see for example Fig. 1, where multiple scattering is taken place between the transmitter and receiver, and all Fig. 1.Multiple-scattering model for M2M channels (where several factors can contribute to generate *Rayleigh fading channels between two vehicles, e.g., when i)  ≫ , ii) there are  AF relays between the transmitter and receiver (i.e.,  + 2 local groups of scatterers), or iii) NLOS propagation paths exist).
propagation paths travel through the same narrow pipe called keyhole channels).Such stochastic processes are widely encountered in dense urban and forest environments where local scattering objects such as buildings, street corners, road signs, tunnels, hallways, bridges, trees and mountains, obstruct a direct radio wave path between two vehicles leading to nonline-of-sight (NLOS) propagation paths [4].Depending on the type of an obstructing surface, the transmitted radio signal may undergo reflection, diffraction, or scattering, resulting in fast or slow fading, which in turn leads to deterioration of link reliability (e.g., high outage probability and low data rate), an increase in the number of connection drops, and a decrease in battery life.
However, there are other forms for the keyholes in a realistic environment that arise in multi-hop amplify-and-forward (AF) relay networks [5,6].The AF relaying system basically works as a keyhole when it amplifies the received signal; in a sense that the amplitude of the received signal is a product of  Rayleigh random variables (e.g., the double-Rayleigh signal amplitude in F2M scenarios [7]).A similar behaviour can also be found when two rings of local scatterers around a transmitter and a receiver are separated by a large distance and the radio wave passes through the keyhole channels [8].The *Rayleigh channel model is classified as a multi-scattering channel model, in which the "keyhole 1 " contributions are summed together to give a generalization of a single scattering (Rayleigh) model [3].
Related Work-In [9] and [10], M2M channel statistics were discussed, such as the probability density function (PDF) and the cumulative distribution function (CDF) of the product of  Rayleigh random variables.In [11], experimental results in different communication environments have shown that if several small-scale fading processes are multiplied together, the worse-than Rayleigh fading model is generated.In [12], multiple-input multiple-output (MIMO) antenna systems were investigated through *Rayleigh fading channels.The study concluded that when the distance separation between the transmitter and the receiver is much greater than the ring radii around the two terminals, a double-Rayleigh model ( = 2) is considered instead of a single-Rayleigh model.For M2M channel modelling, [13] characterized M2M channels in the 5-GHz band through measurement-calibrated ray-tracing models (e.g., the path loss, shadow fading, and delay spread of the channel) and showed agreement with measured results in the literature for all these channel characteristics.The ray-tracing approach is generally computationally intensive and sacrifices accuracy if computational complexity is reduced [14].In [15], channel statistics, such as the time-variant space correlation functions, and corresponding Doppler power spectral density, were studied for three-dimensional non-stationary geometric models for M2M communications.The study showed that the analytic results are consistent with measured data.Although the geometric models can be used to accurately simulate the M2M scattering channels, they are very complex and require numerous parameter selections for the specific environment of interest [16].Another recent study has been implemented in MIMO systems and antenna selection via *Rayleigh fading channels [17], where the IVC systems achieve good costperformance trade-off when the number of RF chains (e.g., digital-to-analog and analog-to-digital converters) is limited.[18] presented an information-theoretic analysis of a point-topoint MIMO link affected by Rayleigh fading and multiple scattering, under perfect channel state information (CSI) at the receiver.The study analysed the sum-rate performance when the zero-forcing and mean-squared error receivers are adopted and suggested that the linear receivers are not well-suited for multi-fold scattering.Several studies have reported that cooperative communications through multiple Rayleigh fading channels can improve the link reliability when traffic density is high [6,19].
Relay selection has been studied extensively in the literature, see, e.g., [20][21][22] and the references therein.However, current results are limited to Rayleigh fading channel assumption (i.e.,  = 1).A few studies have discussed cooperative communications with the relay selection strategy via double Rayleigh fading channels (i.e.,  = 2); see, e.g., [23] and [24], 1 Here we define the keyhole as a multiplier between two fading processes, resulting in a received signal amplitude that is a product of n Rayleigh random variables [5], e.g., double-Rayleigh fading [8].where the maximum achievable diversity order is equivalent to the number of relays.In order to understand the full potential of cooperative diversity in IVC, an in-depth analysis of the system performance under a realistic channel model is required.To this end, we investigate the IVC systems with several relay selection strategies, such as the selective decodeand-forward (S-DF) and amplify-and-forward (S-AF) relaying with the *Rayleigh distribution, which to the best of our knowledge, have not been studied before.Therefore, it is the aim of this work to fill this research gap.Specifically, our main contributions through this work can be summarized as follows: • We introduce new approximate analytical expressions but accurate for the outage probability for both S-AF and S-DF relaying schemes over cascaded Rayleigh fading channels.• We propose a machine learning-based power allocation scheme to optimize the transmit power between the source and the selected relay.• We demonstrate that the S-DF and S-AF relay schemes have the same maximum diversity order ( = /) in the high signal-to-noise ratio (SNR) regime, which degrades by increasing the cascading order () and improves by increasing the number of relays .

II. SYSTEM AND CHANNEL MODEL
Consider a dual-hop cooperative IVC network with multiple relays (as shown in Fig. 2), where a source (), relays   ( = 1, . . ., ) and a destination () are equipped with a single pair of transmit and receive antennas, and operate in half-duplex mode.For each time instant, only one vehicle acts as a source, while the other vehicles serve as relays that help forward the source's message to the destination.To simplify notation, in the sequel we use the subscript '1' to represent the source-relay link and the subscript '2' to represent the relay-destination link.Here, all underlying channels between  →   and   →  links are modeled by a product of  independent complex Gaussian random variables, each of which is defined by ℎ 1 ≜ ∏ ℎ 1,  1 =1 and ℎ 2 ≜ ∏ ℎ 2,  2 =1 .Hence, |ℎ 1 | and |ℎ 2 | follow an *Rayleigh distribution.In this system model, we assume that all underlying channels are quasi-static (i.e., slow fading) which can be justified for IVC scenarios in rush-hour traffic (e.g., urban environments where the average speed is low).We further assume that the additive white Gaussian noise (AWGN) at the relays and destination have zero mean and variance (  ).The instantaneous SNRs of the links  →   and   →  are given, respectively, by  1 = |ℎ 1 | 2    ⁄ and  2 = |ℎ 2 | 2    ⁄ , where  is the radio transmit power of the source signal, which we shall initially assume to be equal to that transmitted from the selected relay.The PDF of instantaneous SNRs is given by [5] where  , , (•) is the Meijer-G function which is defined in [25, eq.(9.301)], ̅  = λ     ⁄ and λ  = (|ℎ  | 2 ).

A) S-DF Relaying
In relay selection, two orthogonal time slots are utilized to perform the cooperative transmission.For example, in the S-DF relaying scheme, in the first time slot, the source transmits a message   (where the source symbol is generated from a unit-energy complex constellation, such as phase-shift keying (PSK) and quadrature amplitude modulation (QAM) schemes) to a set of relay nodes and the destination.In this stage, the S-DF relaying policy is applied to choose the most reliable path over  →   →  links.We define the decoding set () as the set of relays that decode the source symbol successfully; that occurs when the channel quality between the source and relay node is sufficiently good.Here, we assume that each relay can determine whether the source message is decoded correctly or not through a cyclic redundancy check (CRC).In the second time slot, only one relay from the decoding set, having the best link quality with the destination, will forward the estimate of the source symbol, denoted by   .Thus, the signal received by the relay node from the source is  1 = ℎ 1 √  +   , and that received by the destination node from the selected relay is  2 = ℎ 2 √  +  2 , where   and  2 are the AWGN at the relay and destination nodes respectively.
For purpose of analysis, we generate a set of  independent variates, each with CDF   ().Let the corresponding order statistics be denoted as   ≥ ⋯   ≥ ⋯ ≥  1 , where the relay selection process depends on the i-th order statistics  () in samples of size .Such a technique is useful in case that the best relay is connected by another source node or the SNR over   →  link suddenly deteriorates due to the impact of *Rayleigh channels.In this case, the underlying protocol has to choose another relay instead to implement the transmission process.However, for any selected relay, the CDF of the i-th order statistics  () is given by [26] where per() denotes the permanent of the  ×  matrix , which is defined in [26].The matrix  is obtained by taking  copies of the vector  1 , and  −  copies of the vector  2 , where  1 and  2 are the column vectors of .In order to derive the CDF of the received SNR at the destination via the  →   →  link,    (), we invoke the technique described in [27], thus, the conditional PDF of the received SNR indicating that   is idle when the instantaneous SNR of  →   link is below a threshold value (  = 2 2 − 1, where  is the target rate); is expressed as    |    () = (), where () is the Dirac delta function.Hence, the probability that the i-th relay will not be in the decoding set  can be found as Pr( 1 ≤   ) =   1 (  ).On the other hand, the probability that i-th relay is in the decoding set is (1 − Pr( 1 ≤   )), and the conditional PDF given   is active is    |    () =   2 ().Therefore, the CDF of the instantaneous end-to-end SNR via the i-th link is expressed as By replacing (3) in ( 2), we can calculate the CDF of the i-th order statistics  () .It is worth mentioning that ( 3) is complex due to the existence of Meijer G-function which requires high computational complexity; therefore, we adopt an approximate solution for the PDF in (1) to be expressed as [10] where   =   /  ,   =   /Ω   ̅  1/  , and *Rayleigh fading severity parameters are set as   = 0.6102  + 0.4263 and Ω  = 0.8808  −0.9661 + 1.12.Now based on (4), we will be able to analyze the performance of the underlying schemes; especially in terms of the diversity order and power control as we see in the following sections.In order to obtain the PDF for the SNR in (4), we used the change of variable   () , given in [28] with replacing the factor 2 2 by 2   2 , where is the standard deviation of the original complex Gaussian signal prior to envelop detection.Using the facts given in [25, eq.(3.381.1) and eq.(8.356.3)], the approximate CDF for (4) is found as where represents the upper incomplete gamma function [25].Similarly, using (5), (3), and (2), the CDF of  () is obtained.In addition, we can derive a closedform expression for the CDF of the largest of  random variables ( () ) distributed according to (4), to be expressed as , which is also obtained by using (3) and ( 5), as

B) S-AF Relaying
For the S-AF relaying scheme, particularly, in the second time slot, only the selected relay with the maximum effective SNR is chosen to forward the amplified received signal   to the destination with a channel gain  = √1 (|ℎ 1 | 2 +   ) ⁄ .In this case, the signal received by the destination is expressed as  2 = ℎ 2 √  +  2 , where   =  1 .Thus, the effective end-to-end SNR for the selected relay, can be upper-bounded as [29] where  1 =  2 =   .Since the AF relaying schemes consider the end-to-end SNR for each relay (  ) compared to the DF relaying, we can presume that both links of  →   and   →  have the same cascading order  to simplify the analysis.
Having said that, we are interested in knowing the total value of  generated between the source and the destination.Using the definition of the harmonic mean of two random variables [30], given as   ( 1 ,  2 ) = 2 1  2 /( 1 +  2 ), (7) can be rewritten as  (,) = max  { , }, where  , =   ( 1 1/  ,  2 1/  )/ 2. However, it is worthwhile to note that the derivation of the outage probability for the S-AF scheme which is based on ( 1) and ( 7) does not lend itself to a closed-form solution.Hence, to simplify the analysis, we use the approximate PDF given in (4).

III. DERIVATION OF PDF AND CDF FOR THE HARMONIC SNR
In order to find the PDF and CDF of the harmonic SNR_  , =  1 1/   2  (where the RV   =   has an *Rayleigh distribution,  = 1, 2 and  ∈ ℕ + ) with parameters  > 0 and  > 0 (i.e.,   ~(, )), the PDF and CDF of the harmonic mean of the two gamma RVs,  =   ( 1 ,  2 ), can be expressed as and respectively.

⁄
Replacing ( 15) in (2), we can calculate the CDF lower-bound of the i-th order statistics  () .As a special case of the general result for (2), the CDF of the largest order statistics of a random sample is also determined as .

Outage Probability
The outage probability of channel is defined as the probability that the received SNR ( () ) at the destination falls below a predetermined threshold value, namely   = Pr(( () ) ≤   ).

A) S-DF Relaying
The outage probability   ≜  () (  ) for the S-DF relaying scheme is expressed as (2).On the other hand, the probability can be defined as the probability that the maximum SNR,  () , at the destination node falls below the threshold value, as ( 6) Fig. 3 shows   for the S-DF relaying scheme over cascaded Rayleigh fading channels ( = 2, 3, 4, 5) at a fixed number of relays (e. g. ,  = 5).From Fig. 3, there is an excellent match between the approximate and exact results (e.g., based on ( 4) and ( 1)).So, if the double Rayleigh acts as a reference point, we observe that the outage probability degrades for larger cascading order .Specifically, at   = 10 −3 , a performance loss of 5.6, 10.6, 15 dB is observed for  = 3, 4, and 5, respectively.Based on these observations, it is important to take into account the dynamic range of measurement devices for detecting symbols over such severe fading channels.For instance, when the outage probability based on ( 6) is assumed at   = 10 −3 , the required minimum SNR (   ⁄ ) levels for receiving an undistorted signal are 22.6, 28.2, 33.2, and 37.6 dB for  = 2, 3, 4, and 5, respectively.A radio receiver with limited dynamic range will lead to amplitude distortion.
Asymptotic Analysis: In order to gain further insight into the performance over *Rayleigh fading channels, we present an asymptotic analysis for   over i.i.d random variables (i.e.,   1 (  ) =   2 (  )), which provides the maximum achievable diversity order () of the underlying scheme.By (3) we have    (  ) ≤ 2  2 (  ), and ( 17) is upper-bounded by where γ(., . ) is the lower incomplete gamma function defined in [25].Then, at high SNR (i.e., ̅ → ∞), with the help of the facts: γ(, ) =    (,  + 1, −) and (, , ) = 1 as || → 0, given by [33], where (., ., . ) is the Kummer's confluent hypergeometric function, (18) can be written as From ( 19), we can deduce that the maximum diversity order for the S-DF scheme over *Rayleigh fading channels is  =   ⁄ .This is because diversity order is defined as the slope of the   curve as a function of the average SNR in log-log scale, i.e., [34]  As we note, the result in ( 20) is novel and generalizes known results on the diversity order of these relaying schemes on Rayleigh fading channels to the cascaded Rayleigh fading scenario.Our analytical results show that the full diversity order ( ≈ ) can be obtained for classical Rayleigh fading channels (where the selected relay is fixed).In addition, the diversity order is inversely proportional to the cascading order  and improves as  increases.Fig. 4. depicts the diversity order over Rayleigh and cascaded Rayleigh fading channels, assuming  = 2 and 4. As can be observed, the full diversity order for the Rayleigh fading channel approaches  as SNR tends to infinity, while the diversity order for the cascaded Rayleigh fading channels decreases linearly with increasing  to reach an asymptotic value equivalent to   ⁄ , confirming our analytical results.Furthermore, it is noticed that the increase in the number of relays leads to improved system performance for both Rayleigh and cascaded Rayleigh fading channels, in which the diversity order can be maximized, resulting in lower outage probability.Therefore, cooperative diversity systems can allow accurate symbol detection even using measurement devices with a low dynamic range.From (19), we can also deduce that the effective coding gain (CG) is given by Note that the coding gain in ( 21) depends only on the fading severity parameters and channel variance which are assumed to be fixed during the entire transmission time, regardless the number of relays .

B) S-AF Relaying
In case of the S-AF relaying scheme, the approximate outage probability based on (15) is (22) In addition, at high SNR levels, we can apply (14) instead of (15) to simplify the analysis of the maximum diversity order achievable over *Rayleigh fading channels, using the facts that [33, eq.(13.5. Also, eq.( 23) can have another asymptotic expansion based on the facts [33, eq.(6.5.12) and (13.5.5)], as From ( 24), we can extract the maximum achievable diversity order for the *Rayleigh distribution as  =   ⁄ .As it is expected that both S-AF and S-DF relaying schemes have the same diversity order over an *Rayleigh fading channel.
Fig. 5 compares the outage performance of the S-DF and S-AF relaying schemes over *Rayleigh fading channels (i.e., ( 17) versus ( 22)).Since the exact expression for the outage probability for the S-AF relaying scheme is very challenging to calculate because of (1), we used the Mont-Carlo simulation against the approximate expression ( 22).From Fig. 5, there are key points could be extracted as follows: • There is an excellent agreement between the analytical results and Monte-Carlo simulation.This can clearly be noticed for the S-DF relaying scheme.• In comparison with the S-AF relaying scheme, the S-DF relaying improves the outage performance at low and high average SNR.• The tightness between the two schemes is gradually improved for small  values in the high-SNR regime, confirming our earlier observations that the maximum diversity order () is the same in both schemes at high SNR values.The major findings summarized above are important when we need to estimate cascaded Rayleigh fading channels associated with the S-AF relaying schemes (where high noise generated around the relays, resulting in harsh keyhole channels between the source and destination).Therefore, choosing the best relay (with high SNR and a low cascading order, e.g.,  = 2) which provides low outage performance is challenging, especially when thinking of a high-mobility vehicle, where the impulse response of an *Rayleigh channel changes rapidly during the symbol period (i.e., a fast-fading channel and a severe drop in SNR), resulting in the target localization problem.

Power Allocation Optimization
In the context of inter-vehicular communication, optimizing the power among the source and the relays is critical to reduce the total transmit energy.In practice, the cascaded Rayleigh channel coefficients (ℎ 1 , ℎ 2 ) can be estimated and then used to detect the signal at the destination.Relay nodes that operate in the DF mode also require channel knowledge in the sourcerelay link  →   to decode the source signal.For AF relaying, the knowledge of *Rayleigh fading channels at the relay nodes is required for appropriately scaling the received signal to satisfy relay power constraints; therefore, the quality of the channel estimation process can generally affect the overall performance of cooperative transmission and may become a performance limiting factor for the IVC systems.In general, the fading channel coefficients can be acquired by either blind techniques or through the use of pilot symbols methods [35].In practical terms, blind channel estimation techniques suffer from several disadvantages, such as the high computational complexity and slow convergence, which are prohibitive for high-mobility vehicle scenarios.
However, due to the complexity of power allocation (PA) for the S-AF relaying schemes as noted in (22), we analyze the optimal PA for the case of S-DF when only statistical CSI, (λ 1 , λ 2 ), is available at the source and relays rather than instantaneous CSI.By doing so, we reduce the outage probability under the total power constraint of  1 +  2 ≤   , where  1 is the radio transmit power of the source signal,  2 is the transmit power of the selected relay, and   is the total transmit power.Here, in this scenario, we assume that all relays use the same transmit power  2 ; hence, based on (6) the optimization problem can be formulated as follows where By applying the method of Lagrange multipliers, the PA for the source is derived as (26) where .
A similar equation can be derived for the selected relay,  2 .
Using (26) and setting  2 =   −  1 , the approximate power allocation for  1 can be written in the following form (27) where It should be noted that ( 27) is a transcendental function and it is challenging to find a closedform for the source power.Thus, we calculate it numerically using a root-finding algorithm such as Bisection, Newton or successive numerical approximation methods.
At this stage, given the total power constraint, the source and the selected relay power can be set to an output  1 =   and  2 = (1 − )  , where  is the PA ratio ( ∈ (0, 1)), which is calculated from (27) through the successive approximation algorithms [36, section 14.1].
Asymptotic Solution: a simple asymptotic solution for (27) can be determined by using the fact that    − = Γ( + 1, ) − Γ(, ) [25], and by noting that Γ( + 1, ) ≤ Γ(), where  is sufficiently small.In this case, the optimization problem can be rewritten in a simple compact form as From ( 28), it can be seen that the PA for the source depends on the fading severity parameters, regardless of the channel statistics (λ 1 , λ 2 ).Physically speaking, when the source and the best relay's power is high, the effect of path loss (i.e., λ  ∝   − , where  1 represents the distance between the source and the relay,  2 is the distance between the relay and destination, and  is the path loss exponent) is negligible, corresponding to the same scenario when the selected relay is located in the middle between the source and the destination, resulting in a similar path loss on both terminals.

Machine Learning-based PA
In order to classify the fading severity parameter  in IVC networks, we use a simple machine learning algorithm such as Naive Bayes; it's a simple probabilistic classifier that requires  , where we make the assumption that ℎ ,1 through ℎ , are conditionally independent given a class label    .Now using the maximum a posteriori (MAP) estimation, the Bayes classifier assigns a class label    for each *Rayleigh fading channel ℎ  , as where Pr(   ) is the prior probability of the class variable    , which can be identified through real-time data measurements for *Rayleigh channels [11].The probability density of the *Rayleigh distribution given a class    , is computed by (30) where   =     ,   =   Ω    −2/  .The maximum likelihood (ML) 2   estimator for the parameter   2 is given by (31) Therefore, if we suppose that the training fading data listed in Table I (where  experimental samples need to be collected from different environments (e.g., large cities, small cities, and highways [11,16,37]) contains a continuous attribute ℎ, then the probability distribution of ℎ given a class    , is calculated by (30), which in turn makes the Bayes classifier of (29) to assign a class label for the variable ℎ (where we can localize the best relay associated with the lowest cascading order , 2 We use the maximum likelihood method in finding the parameters   2 that maximize the likelihood of the observed data set, ℎ  , and make the Naïve Bayes model fits the *Rayleigh distribution (30).Table II Simulation Parameters e.g.,    for  = 1, 2) and perform an efficient PA scheme for the source- 1 and selected relay- 2 that can reduce the outage probability.In Fig. 6, we evaluate the impact of the S-DF relay systems (PA mode-based) on the cascaded Rayleigh fading channels.In this example, two main modes of transmission are compared: the PA mode under statistical CSI, and the equal power allocation (EPA) where the total transmitted power   is divided equally between the source and the selected relay (i.e,  1 =  2 =   /2).We assume that the channel quality between the selected relay and the destination is much better than that between the source and the selected relay (e.g., λ 1 = 1 and λ 2 = 10).As observed from the figure, the PA mode has an advantage over the EPA mode by reducing the outage probability.This is mainly because the PA mode devotes larger power to the weaker link to reduce the overall outage probability.In this case, the PA ratio  =  1   ⁄ is evaluated from (27)  which yields  = 0.757, 0.629, 0.534 and 0.462 for  = 1, 2, 3 and 4 respectively.It should be noted here that the PA ratio converges to 0.5 when  increases, which means that the EPA policy is near-optimal for  ≥ 3.In this case, we can use EPA instead of PA to get a lower outage probability.
Since the distance between the transmitter and the receiver is another important factor for keyhole channels, we investigate the EPA mode in terms of distance.Hence, we can redefine the instantaneous SNR as ⁄ .Fig. 7 shows the outage probability (based on ( 6)) versus distance between the source and the selected relay,  1 = 1 −  2 , with SNR = 20 dB and a path loss exponent of  = 3 (this could describe, for example, an urban scenario).As is obvious from the figure, the outage probability increases when the distance between the source and the selected relay  1 increases for both Rayleigh and n*Rayleigh fading channels, but the degree of concavity of the curves is gradually decreased by increasing the value of .Furthermore, Fig. 7 shows that the minimum outage probability occurs at distance  1 = 0.5.This is indeed expected because the system performance is limited to the channel quality over the source to relay links.

V. EXPERIMENTAL PERFORMANCE EVALUATION
In this section, we provide experimental and simulation results to show the average end-to-end delay and optimal relay selection time.We test the packet delivery ratio and outage probability for the considered scenario and use the network simulator 2 (NS-2) and simulation of urban mobility (SUMO) to simulate vehicular ad hoc networks (VANET).To make the evaluation realistic, we run a simulation using a map of Montreal which has a grid road topology with urban highways and bidirectional roads (e.g., map of the 3.16 km x 3.16 km area; see Fig. 8 and simulation parameters given in Table II).We set the speed of vehicles between 30 and 80 Km/h, which is common for the city environment.The road topology is obtained using OpenStreetMap and is filtered, formatted, and converted into a SUMO network file.Using SUMO, vehicular mobility traces are generated and used to populate the chosen simulated area (e.g., urban scenarios), where local scattering objects (e.g., buildings, road signs, bridges, street corners, trees, bridges, hallways, etc) are considered.In our simulation, we chose a moderately sparse network to have a moderate simulation processing time (e.g., we simulate 600 vehicles per 10 km², i.e., the vehicle 60 veh/km² with a radio range of 250 m), where each vehicle is equipped by a dedicated short-range communication (DSRC) transceiver to enable V2V communication.During simulation, in order to evaluate the efficiency of selected relay nodes, each vehicle sends packets using a user datagram protocol (UDP).Also, in this scenario, we implement both relay selection strategies; the S-DF and S-AF schemes over the n*Rayleigh distribution.Note that 600 vehicles are the number of vehicles simulated in the selected urban area and not the candidate vehicles (relays) used in our relay selection algorithms.In this setting, we generally seek to evaluate two things: 1) the performance of S-DF schemes over different metrics (outage probability and packet delivery ratio) and compare the simulation results with the analytical results.2) examine the processing time needed to select the optimal relay based on the training data of machine learning-based PA algorithms (where Monte-Carlo simulation is performed at  = 10 10 samples).
In Fig. 9, we evaluate the S-DF scheme over the PA and EPA modes in terms of packet delivery ratio and   .In Fig. 9 (a) and (b), we observe that PA outperforms EPA in terms of packet delivery ratio over different distances and packet generation rates via n*Rayleigh fading channels (e.g.,  = 1, 2, 3, 4), where not only the optimal channel is selected but also the optimal relay of each selected channel, even if the distance between the source and the destination increases.Also, we can show that the PA mode gives stable delivery ratio of packets around 85 % and 95 % compared with the EPA mode where the ratio is around 50 % only.In Fig. 9 (c), we show the outage probability of S-DF schemes and compare with direct transmission scenarios over n*Rayleigh fading channels (where the S-DF scheme can offer large power or energy savings compared to direct transmission [38]).We observe that when the distance between the source and the destination increases, the outage probability increases, and when the number of relays increases,   is reduced.This finding confirms our analytic results of the effect of PA algorithms on the outage probability of S-DF schemes.In Fig. 10 (a), we provide the processing time (convergence time) for the S-DF relay method with PA at traffic volume 150 veh/km², where we fix the candidate vehicles (relays)  to 4 and Monte-Carlo simulation is performed at  = 10 4 samples.Here, we can define the processing time of the proposed relay selection algorithm as the time to select the optimal relay between the candidate nodes that are in the radio range of the source node.The number of candidate nodes varies depending on vehicles density and radio range (e.g., between 0 to 150 veh/km² for a radio range of 250 m and 60 veh/km² on average).Although the S-DF relay algorithm works well at low cascading orders  ≤ 3, it should be noted that there are some limitations associated with the algorithm at the cascading order of  = 4.By increasing the cascading order n, the processing time of the S-DF relay algorithm becomes larger as the number of vehicles (between the source and destination) increases and the search for the optimal relay is longer than the case of  = 1, 2, and 3, which requires designing an advanced relay selection algorithm that can overcome these constraints and improve the performance of the proposed algorithm.
To take a closer look at the performance of S-DF relaying scheme, we compare the proposed S-DF method with other relay selection methods (such as S-AF) as shown in Fig. 10  (b).We observe that the S-DF scheme outperforms the S-AF scheme in terms of convergence time to select the best relay through n*Rayleigh fading channels.Given that the simulation was performed on a computer with a Corei7 CPU and 8GB RAM, and that this type of wireless physical layer algorithms is typically performed on an ASIC baseband processor, the processing delay can be reduced by a factor of 10 to 100 compared to general purpose processors (CPUs) [39], [40].Hence, based on our results shown in Fig. 9 and Table III, the delay can be reduced by at least a factor of 10 using ASIC, so that the processing delay for 60 vehicles is less than 50 ms for  = 1 , 75 ms for  = 2, 125 ms for  = 3, and 180 ms for  = 4.

TABLE III
Convergence time for both S-AF and S-DF schemes (where processing time is measured in seconds)

VI. CONCLUSION
In this work, we presented a comprehensive performance analysis for the selective DF and AF relaying schemes over *Rayleigh fading channels.The outage probability and diversity order have been analyzed for the considered schemes.Our analysis and simulation results have shown that the relay selection technique achieves a maximum diversity order of /, which can be considered valuable guidelines for engineers working on the design of measurement devices for cascaded Rayleigh fading channels.In other words, the dynamic range of the received signal affected by *Rayleigh fading channels can calibrate the static and dynamic characteristics of measuring instruments (for example, for slow and fast time-varying channels).The higher the dynamic range of the instrument, the better its achievable performance will be.In general, our statistical analysis showed that machine learning plays a key role in selecting the best relay and allocating energy.The results confirm that transmit power allocation optimization is required for IVC systems when the cascading order  ≤ 2. Plus, the time required to find the optimal relay is greatly reduced when the cascading order n decreases.Of course, this study will help automakers deploy a dynamic IVC network that can significantly improve safety and operational efficiency.

Fig. 2 .
Fig.2.Dual-hop cooperative IVC network in dense and high traffic scenarios, where the best relay is selected based on the channel propagation conditions (i.e., *Rayleigh fading channels) over the source-relay-destination links.

Fig. 4 .
Fig.4.Effective diversity order for the S-DF relying scheme over Rayleigh and *Rayleigh fading channels.

Fig. 5 .
Fig.5.Comparison of outage probability of the S-AF and the S-DF relaying schemes over *Rayleigh fading channels ( = 3).

Fig. 7 .
Fig.7.Outage performance of the S-DF-relaying scheme over Rayleigh and n*Rayleigh fading channels in term of the distance between the source and the selected relay.only a small number of training data  to estimate the required parameters for classification.Therefore, for each of  possible classes    , we need to calculate the conditional probability of Pr(   |ℎ ,1 , . ., ℎ , ) ∝ Pr(   ) ∏ Pr(ℎ , |   )  =1

Fig. 8 .
Fig.8.Traffic scenario in Montreal that includes a grid road topology (e.g., map of the 3.16 km x 3.16 km area) with urban highways and bidirectional roads, where the source is picked randomly and his message is sent to a set of relays (i.e., candidate vehicles) and the destination.Here, the S-DF relaying policy is applied to choose the most reliable path  →   →  over n*Rayleigh fading channels and forward the source message to the destination.

Fig. 9 .
Fig. 9. Evaluation of the S-DF scheme in terms of packet delivery ratio and   (where both PA and EPA modes are implemented over n*Rayleigh fading channels (e.g.,  = 1, 2, 3, 4))

Fig. 10 .
Fig. 10.(a): Convergence time of the S-DF relay algorithm over *Rayleigh fading channels.(b) Comparison of convergence time of the S-AF and the S-DF relaying schemes over *Rayleigh fading channels (where traffic volume is 150 veh/km² and candidate vehicles (relays),  = 4).
Suppose  1 and  2 are two i.i.d.gamma random variables, defined as  1 =  1 − , hence, the RV   follows a gamma distribution with parameters (, ).In order to calculate the PDF of the harmonic mean of  1 and  2 ,  = 2 1  2  1 +  2 ⁄

Table I A
set of labelled training data is used to estimate the *Rayleigh distribution, where   2 = 2 −  .Monte-Carlo simulation is performed at  = 10 6 samples.The table shows some estimated samples of the empirical PDFs.
using the successive approximation algorithm,