A Real-Time Channel Prediction Model Based on Neural Networks for Dedicated Short-Range Communications

Based on a multiple layer perceptron neural networks, this paper presents a real-time channel prediction model, which could predict channel parameters such as path loss (PL) and packet drop (PD), for dedicated short-range communications (DSRC). The dataset used for training, validating, and testing was extracted from experiments under several different road scenarios including highways, local areas, residential areas, state parks, and rural areas. The study shows that the proposed PL prediction model outperforms conventional empirical models. Meanwhile, the proposed PD prediction model achieves higher prediction accuracy than the statistical one. Moreover, the prediction model can operate in real-time, through updating its training set, to predict channel parameters. Such a model can be easily extended to the applications of autonomous driving, the Internet of Things (IoT), 5th generation cellular network technology (5G) and many others.


Background and Motivation
Channel modeling is essential for the design and evaluation of the protocols adopted in vehicular communication and networks [1]. For vehicular wireless communication, if the sensitivity of the receiver is constant, the state of the transmitter and the path loss (PL) will become the main factors affecting the communication transmission quality [2]. In reality the road environment is complex: Conditions such as occlusion, reflection, multi-path so on and so forth, can have a negative impact on PL. Therefore, predicting PL in time and then making corresponding compensation adjustments at the transmitter can effectively guarantee the link quality. In addition, in some cases the transmission environment is too complicated. This leads to the fact that, based on the prediction of the PL, even if the transmitter operates in the limit state the communication may still be unstable. In this case, it is necessary to effectively predict the packet drop rate (PDR) and then adjust the transmission strategy. According to the prediction result of the PDR, before the environment further deteriorates the data with a low packet loss rate are preferentially transmitted.
Vehicle-to-vehicle channels differ significantly from those of cellular systems due to time varying environments that consist of roads, surrounding vehicles, and objects [3]. There are two main types of channel prediction models: • Theoretical model: Theoretical models mainly include ray optical prediction models such as ray-tracing models [4,5] kinds of empirical models are no longer valid. An Alpha-Beta-Gamma (ABG) model and a Close-In (CI) free-space reference distance model was introduced to predict PL through a measured dataset [27]; these are also empirical models but can adapt to changes in the environment. In addition, there are many NN-based PL methods in wireless communications [28][29][30][31]. They are very valuable and useful in static PL prediction. However, in real-time PL prediction, we need to predict the real-time PL in a short time. That is, these methods face the drawback of sacrificing local information or over-fitting when predicting real-time PL in wireless communication. In contrast, the proposed NN-based PL model can overcome these deficiencies and show more accurate results in real-time PL prediction. In wireless communication, the performance of the system will be affected when the PDR or round-trip latency increase [32]. The packet with excessive delay is usually discarded to achieve the minimum and balanced PDR for wireless traffic [33]. The research included a PD algorithm for various packet loss rates [34], improved algorithm for latency and PD [35], and PDR optimization algorithm [36]. Regarding PD, most of the related research is focused on controlling unreliable communication channels caused by known PDs without any predicted information to enhance the system performance [37][38][39]. This paper presents a solution to predict PD which can be utilized to improve system reliability.
In the field of vehicular communications, there is scant relevant research on a unified or a general channel prediction model, of which the NN structure to predict PL and PD are similar. The prediction model updates its training set with most recent measurements in real-time. However, the proposed NN based model takes multiple factors into account. Thus, it could model local situations in a higher granularity than traditional ones.

Contributions and Innovations
The main contributions of this paper are summarized as follows: • The proposed NN model can be used for predicting PL. The PL prediction model shows better performance compared to that of commonly used empirical models, such as the dual-slope distance-breakpoint PL model, polynomial fitting model, and GG shadowed fading model.

•
The proposed NN model can be used to predict PL in real-time and it can be updated in real-time. Therefore, the model not only guarantees the real-time performance, but also updates the PL prediction locally according to the actual environment with higher accuracy.

•
The proposed NN model can be used for predicting PD. The model predicts the PDR in the future period by the PD situation in the current time slot. And, with the acquisition of new data, the PD prediction model is updated in real-time. This model provides a higher prediction accuracy than the statistics-based model.
The innovations of this paper are reflected in the following two aspects.
• In the theoretical aspect, the paper introduces the ANN algorithm into the field of vehicular communication. Although artificial neural algorithms are making rapid progress, this is an innovative application for vehicular communication, in terms of channel modeling and prediction.

•
In the semi-physical simulation, this paper proposes a prediction model based on ANN. The model can predict channel parameters, including PL and PDR, based on the measured dataset. The simulation results show that: (1) in the PL offline prediction part, the ANN model is more accurate than the traditional model; (2) in the PL online prediction part, the ANN model has a better ability to fit the dataset than the traditional model, and is more capable of reflecting the details of different time steps; and (3) in the PDR online prediction part, the ANN model has a better trade-off between precision and accuracy than the traditional model.
The remainder of this paper is organized as follows. The second section presents how to obtain data from dedicated short-range communications (DSRC) on-board units (OBUs) such as global positioning system (GPS), speed, and received signal strength indicator (RSSI). Section 3 introduces a proposed model to predict PL in real-time. This NN-based model has a better ability to predict the channel PL distribution than the three current empirical models. Moreover, this model can update the channel predictions in real-time. In Section 4, we use the same model for real-time PD prediction. The proposed NN-based PD prediction model provides lower mean square error (MSE) and higher accuracy than the statistics-based model.

DSRC Network Sniffer and Data Connection
The experiments were carried out by two midsize vehicles, and each roof mounts a DSRC OBU at an approximate height of 1.48 meters. The OBUs were outside of the vehicles for most of the tests. However, some tests were performed with OBUs placed inside the vehicles due to heavy rain to prevent the electronics getting wet. The GPS antennas had to be mounted outside of the vehicles in all weather conditions; otherwise, the GPS position would stop updating. An additional micro-controller (Raspberry Pi) was connected with each of the DSRC OBUs via a RS-232 serial interface for data exchange. A diagram of the DSRC network sniffer and data connection is shown in Figure 1. The remainder of this paper is organized as follows. The second section presents how to obtain data from dedicated short-range communications (DSRC) on-board units (OBUs) such as global positioning system (GPS), speed, and received signal strength indicator (RSSI). Section 3 introduces a proposed model to predict PL in real-time. This NN-based model has a better ability to predict the channel PL distribution than the three current empirical models. Moreover, this model can update the channel predictions in real-time. In Section 4, we use the same model for real-time PD prediction. The proposed NN-based PD prediction model provides lower mean square error (MSE) and higher accuracy than the statistics-based model.

DSRC Network Sniffer and Data Connection
The experiments were carried out by two midsize vehicles, and each roof mounts a DSRC OBU at an approximate height of 1.48 meters. The OBUs were outside of the vehicles for most of the tests. However, some tests were performed with OBUs placed inside the vehicles due to heavy rain to prevent the electronics getting wet. The GPS antennas had to be mounted outside of the vehicles in all weather conditions; otherwise, the GPS position would stop updating. An additional microcontroller (Raspberry Pi) was connected with each of the DSRC OBUs via a RS-232 serial interface for data exchange. A diagram of the DSRC network sniffer and data connection is shown in Figure 1. We developed the software by using Autotalks SDK (Software Development Kit) for device configuration and data generation running on the DSRC OBUs. The data include the current longitude, latitude, altitude, heading angle and ground speed from the GPS sensor, as well as the timestamps, packet counters, and RSSI of each packet. The timestamps are inserted before each packet has been sent and after it has been received on both OBUs. Packet counters were used for PD rate calculation. On the micro-controllers, we developed a GUI (graphical user interface) based on Linux OS to collect data from the OBUs as well as to send the configuration parameters to control them. The collected data can be stored locally or sent to our private server for real-time display. The custom parameters include data rate, packet rate, packet size, transmit power, channel number, priority, etc. A DSRC OBU, GPS antenna, and an additional micro-controller for the DSRC network vehicle experiments, are shown in Figure 2. We developed the software by using Autotalks SDK (Software Development Kit) for device configuration and data generation running on the DSRC OBUs. The data include the current longitude, latitude, altitude, heading angle and ground speed from the GPS sensor, as well as the timestamps, packet counters, and RSSI of each packet. The timestamps are inserted before each packet has been sent and after it has been received on both OBUs. Packet counters were used for PD rate calculation. On the micro-controllers, we developed a GUI (graphical user interface) based on Linux OS to collect data from the OBUs as well as to send the configuration parameters to control them. The collected data can be stored locally or sent to our private server for real-time display. The custom parameters include data rate, packet rate, packet size, transmit power, channel number, priority, etc. A DSRC OBU, GPS antenna, and an additional micro-controller for the DSRC network vehicle experiments, are shown in Figure 2.
All experimental data were collected with the same device configurations. We set the transmit power at 23 dBm, the data rate at 6 Mbps, 1000 bytes packet size, and 10 Hz packet rate. Channel 172 and 174 were used for the bidirectional communication. The band of the DSRC was allocated at 75 MHz of spectrum in 5.9 GHz. There are 7 channels in total, each occupying 10 MHz of bandwidth. The center frequencies of channel 172 and channel 174 were 5.86 GHz and 5.87 GHz, respectively.
Parameter pc Tt is the packet counter of the current packet and pc Tt−1 is the packet counter of the previous packet. If pc Tt − pc Tt−1 > 1, we call it a PD event, and the count of lost packets is recorded as c t = pc Tt − pc Tt−1 − 1. The round-trip PDR can be expressed by the total number of packets drop per M packets. Round-trip PDR can be easily calculated through The distance d between two vehicles can be calculated by GPS information: where ϕ is latitude, λ is longitude, and R is earth's radius (mean radius = 6371 km). All experimental data were collected with the same device configurations. We set the transmit power at 23 dBm, the data rate at 6 Mbps, 1000 bytes packet size, and 10 Hz packet rate. Channel 172 and 174 were used for the bidirectional communication. The band of the DSRC was allocated at 75 MHz of spectrum in 5.9 GHz. There are 7 channels in total, each occupying 10 MHz of bandwidth. The center frequencies of channel 172 and channel 174 were 5.86 GHz and 5.87 GHz, respectively. Parameter Tt pc is the packet counter of the current packet and The distance d between two vehicles can be calculated by GPS information: where ϕ is latitude, λ is longitude, and R is earth's radius (mean radius = 6371 km).
The measurements were conducted in Mcity Ann Arbor, UM-D Campus, and cities such as Ann Arbor, Dearborn, and Detroit. Weather conditions included rain, sun and showers. Most common road scenarios were covered, including the following:  Highways  Local areas  Residential areas  State Park and rural areas In order to simulate all the common traffic scenarios, two testing vehicles were driven in various In order to simulate all the common traffic scenarios, two testing vehicles were driven in various patterns throughout the experiments. These included following, overtaking, lane changing, opposite driving, intersection scenarios with traffic lights, and stop signs. Multiple experiments were conducted during both peak and off-peak hours with a maximum driving speed of 40 km/h in residential areas, 70 km/h in Mcity and local areas, and 120 km/h on highways. The distance between the two vehicles was relatively close, ranging from 3 to 120 m. Apart from the speed differences, there were some unique characteristics that came from those different environments. For instance, campus provided the driving scenarios with pedestrians, state park and rural areas provided an open field environment, and Detroit downtown represented the urban scenario with crowded traffic. Figure 3 shows one of our experiments in Ann Arbor. The relative distance was calculated using the GPS data for the two vehicles and the relative speed is the difference between two speed vectors. In the following sections, we will use the dataset obtained from the experiments to build empirical models and an NN model to predict channel parameters such as PL and PDR.
Sensors 2019, July 23 FOR PEER REVIEW 6 of 22 In the following sections, we will use the dataset obtained from the experiments to build empirical models and an NN model to predict channel parameters such as PL and PDR.

A Novel Path Loss Prediction Model
This section proposes an NN-based PL prediction model trained by a BP algorithm, which corresponds to our first contribution. In the second subsection, this paper expands the offline prediction model to a real-time NN-based PL prediction model, which is our second contribution.
For wireless communications systems, PL prediction is fundamental for system planning and optimization. A general PL model is usually specified to categorized environments, such as highways, local areas, residential areas and rural areas, by assigning the maximum, minimum, median, mean and standard deviation of PL, which are shown in Table1. DSRC channels are time-varying and highly environment independent, resulting in a great number of channel parameters listed above. The NN-based PL model presented in this paper is general and applicable to diverse scenarios without changing the configuration and weights of NN. Moreover, simulation results indicate that it has lower root mean square error (RMSE) and higher accuracy than conventional models, as shown in Figure 4.

Typical Empirical Models for Path Loss Prediction
Compared to theoretical modes, empirical models are built upon measured data featuring

A Novel Path Loss Prediction Model
This section proposes an NN-based PL prediction model trained by a BP algorithm, which corresponds to our first contribution. In the second subsection, this paper expands the offline prediction model to a real-time NN-based PL prediction model, which is our second contribution.
For wireless communications systems, PL prediction is fundamental for system planning and optimization. A general PL model is usually specified to categorized environments, such as highways, local areas, residential areas and rural areas, by assigning the maximum, minimum, median, mean and standard deviation of PL, which are shown in Table 1. DSRC channels are time-varying and highly environment independent, resulting in a great number of channel parameters listed above. The NN-based PL model presented in this paper is general and applicable to diverse scenarios without changing the configuration and weights of NN. Moreover, simulation results indicate that it has lower root mean square error (RMSE) and higher accuracy than conventional models, as shown in Figure 4.

Typical Empirical Models for Path Loss Prediction
Compared to theoretical modes, empirical models are built upon measured data featuring flexible and accurate prediction performance without requiring prior knowledge. Three empirical models are discussed for comparison purposes in the following: (1) Dual-slope distance-breakpoint PL model; (2) polynomial fitting model, and (3) GG shadowed fading model.

Dual-Slope Distance-Breakpoint Path Loss Model
In a large-scale propagation model, PL is only related to the distance between the transmitter and receiver for a given frequency. Two PL indexes, n 1 and n 2 , are adopted to described the fading slopes in two distinguished regions separated by Fresnel distance. PL index and the variance of slow fading or shadowing can be calculated from measured data using the MMSE criterion. The PL at d, the distance between the Tx and Rx, can be expressed as where X σ1 and X σ2 are the variances of slow fading, and PL(d 0 ) the PL at the reference distance d 0 .
Among them, d 0 and f are normalized in km and MHz, respectively. In conventional Line of sight (LoS) models, d b is the Fresnel distance to the point where the first Fresnel zone touches the ground, which can be calculated by where h T and h R are antenna heights of the transmitter and receiver, respectively, and λ is the wavelength [9]. The PL model is built up through the steps described below.
(i) The relative distances in the training set are rounded to the nearest meter, denoted as d k , to calculate the optimal n opt1 and X σ1 , which leads to the minimum RMSE of to calculate the optimal n opt2 and X σ2 , which leads to the minimum RMSE of E PL(d k ) and PL DS (d k ).
In the PL prediction simulation using the FSPL-based model, six reference values d 0 = {5, 6, · · · , 10}m and corresponding PL indexes of n 1 and n 2 were calculated. The predicted MSE of the prediction models using a training set, validation set, and test set were calculated. Simulation results show that, regardless of the reference distance, the NN-based model outperforms the FSPL-based model in terms of prediction accuracy.

Polynomial Fitting Model
Polynomial fitting model (PFM) is another commonly used model based on measured data through the least-squares polynomial curve fitting. An approximate curve described by the function of y = f (x) is drawn from the experimental data where the curve does not need to pass through modeling data exactly. The expression of the approximate curve is where k is the order of fitting curve, which is selected according to the loss function of the sum of the squares of the errors. It is then adapted to the above polynomial equation. The sum of the distances from each sample point to the fitted curve, representing the sum of squared deviation, is calculated by The value of a j that minimizes E satisfies the condition that ∂E/∂a j = 0. After simplifying and using the matrix representation, one can have Equation (7) can be further abbreviated as XA = Y and the fitting curve can be acquired by The polynomial model was established through the following steps.
(i) The relative distances in the training set are rounded to the nearest meter, denoted as d k , k = {5, 6, · · · , 199}, while corresponding PLs are denoted as (ii) Calculate the average of PLs at each relative distance d k , denoted as E PL(d k ) . (iii) Take k = {k 1 , k 2 , · · · } into Equation (5) to calculate the approximate curve for order k p .
(iv) Calculate the coefficient matrix of A p = X −1 Y using Equation (7) according to the order of k p .
(v) For each order k p , take A p into Equation (5) to calculate the optimal k opt , which generates the minimum RMSE of E PL(d k ) and PL PF (d k ).
In the simulation of the PFM, fitting orders of k = {1, 2, · · · , 24} were picked, where 24 was selected by Monte Carlo simulation. The predicted MSE of the PFM and NN models based on a training set, validation set, and test set was then calculated. Simulation results validate that for all orders tested, the NN-based model has lower MSE, that is, more accuracy of prediction when compared with the PFM-based model.
where m is the fading parameter, s the shape parameter (typically restricted to 0 < s ≤ 1), and Γ(·) the gamma function. The average power of GG channel, P g , is expressed as where ω is the time average of received power. A measurement study shows that m and s vary with distance [3]. The GG PL model is built up through the steps described below.
(i) The relative distances in the training set are rounded to the nearest 5 m, denoted as d k , k = {5, 10, · · · , 195}. The corresponding PLs are denoted as p r (d k ) = p r (d k ) 1 , p r (d k ) 2 , · · · .
(ii) Calculate PDF f (p r ) at the relative distance d k of the received signal power.
(iii) Take m = {0.5, 0.6, · · · , 20} and s = {0.1, 0.2, · · · , 1} into Equation (8) to calculate the optimal m opt (d k ) and s opt (d k ), which lead to the minimum RMSE of f (p r ) and f GG (p r : m, s). (iv) Putting m opt (d k ) and s opt (d k ) into Equation (8), we get the estimated PDF and CDF of the received signal power at the relative distance d k , denoted asf GG (p r : m opt (d k )) andF GG (p r : m opt (d k )), respectively. (v) The estimated received signal power at the relative distance d k isp r GG (d k ) = p r (d k ) ·F GG (p r : m opt (d k ), s opt (d k )).

A Novel Neural Network-Based Path Loss Prediction Model
In this subsection, an NN-based PL prediction model is discussed. The input of the NN is the distance between Tx and Rx, gained from onboard GPS sensors, while the PL was calculated from RSSI at Rx. All measurement data came from the above experiments.
The weight of the path from the i th input layer to the j th hidden layer is denoted as w ij and the weight from the j th hidden layer to the k th output layer is w jk . The number of nodes in the input layer, hidden layer, and output layer were N 1 , N 2 , and N 3 , respectively. Thus, we have i = {1, 2, . . . , N 1 }, j = {1, 2, . . . , N 2 }, and k = {1, 2, . . . , N 3 }. The weight vectors of each perceptron were optimized using the back-propagation algorithm. We used the accumulated error BP algorithm and adjusted w ij and w jk to minimize the global error E. NN computations, starting from input data and going on to the hidden/output layer weights computations, are shown in Table 2.

Input Data
Hidden Layer Output Layer With the NN developed in Algorithm 1, the prediction model is built up through the steps described below. (ii) Randomly divide the dataset into training set, validation set, and test set in proportions of 60%, 15%, and 25%, respectively. (iii) Set NN parameters: number of nodes in each layer N 1 = 1, N 2 = 24, N 3 = 1, activation function tanh, learning rate η = 0.05, maximum number of epochs to train epochs = 60, sum-squared error goal goal = 0.001, back-propagation weight/bias learning function learngdm, etc. (iv) Train the NN model with the training set, and then tune the model's hyper-parameters with the validation set to reduce overfitting. (v) Predict PL NN (d k ) at each relative distance d k with the NN model from (iv) and then calculate the RMSE of PL(d k ) and PL NN (d k ). (vi) Repeat step (iii)-(v) when the scenario changes to obtain the optimal combination of parameters.

Squared Error Function Hidden Layer Weights Hidden Layer Weights
In the same scenario, the NN parameters are fixed after the optimal parameters are obtained.
(vii) Estimate PL NN (d k ) at each relative distance d k with The NN model from (vi) and then calculate the RMSE of PL(d k ) and PL NN (d k ).
It can be seen clearly from Figure 4 that the NN model has the lowest MSE, that is, the best accuracy among models. Simulations covered four road scenarios including rural areas, residential areas, local areas, and highways.
The error bars in Figure 4 show the relationship between distance and PL, where distances were rounded appropriately depending on the measured dataset. Figure 4 also illustrates the mean of µ and the standard deviation of σ of PL at each distance. Tables 3-6 indicate statistical characteristics, such as maximum, minimum, mean, and standard deviation, of the measurement data, that is, the dataset used for PL prediction.
The orange dashed line was calculated from the dual-slope model. The breakpoint was set as d b = 171.4353 m. The minimum reference distance was set as d 0min and d 0 = {d 0min , d 0min + 1, · · · , d 0min + 6}. Among them, the smallest RMSE, distances and PL indexes are all shown in Figure 4. As one can see from Figure 4, the prediction curve of the dual-slope model fits the average of the dataset and is always located The yellow dash-dot line is gained from the PFM. Cases where the order was k = {1, 2 · · · , 24} are simulated. Simulation results in Figure 3 show that, generally speaking, PFM performs better when k = 1 or k = 2. The prediction curves were mostly distributed within the range of [µ + σ, µ + 2σ], which is not centered around µ and is not able to predict the PL accurately.
The purple dotted line was calculated from the GG model. The prediction curve fluctuates, reflecting the trend of PL but in smaller prediction values.  The blue line labelled with triangles was gained from the NN prediction model. The results from the NN model outperform those from the other three models. The prediction curve fits the average of the dataset and always remains within in [µ − σ, µ + σ]. For all road scenarios, it shows both the trend and the details of PL. The peaks, such as at 80-90 m in the rural case and at 90-100 m in the local case, etc., were likely caused by up fading, that is, multi-path conditions causing constructive summation of several multi-path components.
For the four scenarios, the corresponding modeling parameters vary.

•
In the Local case, the optimal parameters of the dual-slope model are d 0 = 15 m, n 1 = 1.34, n 2 = 1.36, and that of the PF model is order = 1.

•
In the Residence case, the optimal parameters of the dual-slope model are d 0 = 10 m, n 1 = 1.22, n 2 = 1.48, and that of the PF model is order = 1.

•
In the Rural case, the optimal parameters of the dual-slope model are d 0 = 12 m, n 1 = 1.64, n 2 = 2, and that of the PF model is order = 2.

•
In the Highway case, the optimal parameters of the dual-slope model are d 0 = 54 m, n 1 = 1.88, n 2 = 2.07, and that of the PF model is order = 1.
As shown above, the NN PL model achieves the best performance because the NN line is closer to the real data than the other estimations.
The DS breakpoint model is limited by using log(·) to approximate the trend. High-order PFM has an accuracy problem at the extremes of the range which results in reduced accuracy. The PF-based model sacrifices accuracy slightly due to the continuity and smoothness of the mathematical model adopted. Moreover, the PF-based model degraded extremely at the edge of the data range. The GG model has more accurate predictions than those from the PF model based on a large dataset, which is not suitable for the proposed real-time PL prediction. In addition, to find the optimal values of m and s, all training sets are iterated repeatedly. The number of iterations is positively correlated with the accuracies of m and s. Such processing takes time, which is not acceptable for real-time operation.
However, the NN-based PL prediction model uses a new way to explain relationships within the dataset, which is more in line with the actual channel distribution. It can predict channel parameters for hardware-in-the-loop simulations and modeling for vehicle networks, autonomous driving and networked controlled robotics.

A Novel Real-Time Neural Network-Based Path Loss Prediction Model
For the applications of vehicle communications and autonomous driving, the channel is time-varying. During the training phase, outdated data will be dropped as appropriate while updating the data.
The foremost task is to identify the number of packets to be used for a training set in a real-time model. Simulation results showed that the number of packets is suggested to be no less than 900. In each prediction period, 900 packets were therefore divided into training set, validation set, and test set in proportions of 60%, 15%, and 25%, respectively.
Window factor, noted by s, is the percentage of the dataset that is updated. Datasets were updated chronologically while the window factor was selected as s = 5%. The time window, noted by t s , is given by where, l data is the number of packets of the dataset and t packet the duration of the packet. The time window can be reduced by shortening the time duration of the packet if necessary. Figure 5 compares the offline and real-time PL prediction model based on the NN. In the offline model, the whole dataset is used, while the real-time model only uses data that is within the coherent window described above.
The coverage areas are different in each slot. The PL prediction for both offline (orange *) and real-time models (colored lines) generated similar results. Figure 6 shows the correlation coefficients of 6 real-time PL prediction curves. The dataset adopted is from the rural areas, but can be applicable to others as well. Different areas lead to individual PL curves, but all function well. For simplicity, the following results are based on rural areas only.
The real-time PL prediction curves are defined asP L i andP L j in different slots, where i = {1, 2, . . . , 6} and j = {1, 2, . . . , 6} in this case. The correlations of PL curves are meaningful and defined asP L i andP L j . The correlation coefficient is used as a measure of the linear dependence between them. If a variable has N ij scalar observations, then the Pearson correlation coefficient is defined as where µ i and σ i are the means and standard deviations ofP L i , respectively, and µ j and σ j the means and standard deviations ofP L j . The time window can be reduced by shortening the time duration of the packet if necessary. Figure 5 compares the offline and real-time PL prediction model based on the NN. In the offline model, the whole dataset is used, while the real-time model only uses data that is within the coherent window described above. The coverage areas are different in each slot. The PL prediction for both offline (orange *) and real-time models (colored lines) generated similar results. Figure 6 shows the correlation coefficients of 6 real-time PL prediction curves. The dataset adopted is from the rural areas, but can be applicable to others as well. Different areas lead to individual PL curves, but all function well. For simplicity, the following results are based on rural areas only.  model, the whole dataset is used, while the real-time model only uses data that is within the coherent window described above. The coverage areas are different in each slot. The PL prediction for both offline (orange *) and real-time models (colored lines) generated similar results. Figure 6 shows the correlation coefficients of 6 real-time PL prediction curves. The dataset adopted is from the rural areas, but can be applicable to others as well. Different areas lead to individual PL curves, but all function well. For simplicity, the following results are based on rural areas only.  The cross-correlation matrix can be expressed as ρ(P L 1 ,P L 1 ) ρ(P L 1 ,P L 2 ) · · · ρ(P L 1 ,P L 6 ) ρ(P L 2 ,P L 1 ) ρ(P L 2 ,P L 2 ) · · · ρ(P L 2 ,P L 6 ) . . . . . . . . . . . . ρ(P L 6 ,P L 1 ) ρ(P L 6 ,P L 2 ) · · · ρ(P L 6 ,P L 6 ) The theory of strict frames (rules) for correlation may be presented as follows: • 0 ≤ ρ ≤ 0.20 : the correlation is non-important; • 0.20 < ρ ≤ 0.60 : the correlation is weak; • 0.60 < ρ ≤ 0.90 : the correlation is strong; • 0.90 < ρ ≤ 1.00 : the correlation is very strong.
The correlation coefficients of two consecutive slots are close to one. This result is in line with expectations: • The updated dataset can effectively predict the trend of PL. The PL prediction curves at different slots have coherent shapes and trends at the same distance.

•
It also varies practically as the environment changes. In some cases, even though Tx and Rx take the same distance, the PL shape predicted demonstrated variations. This is due to changes in the environment where the two vehicles are located, such as obstacles and occlusion.
The real-time PL prediction model was proven to be able to predict not only the trend, but also the local variations in real time.

A Real-Time Packet Drop Prediction Model
This section proposes a real-time NN based PDR prediction model which corresponds to our third contribution. Besides PL, there is another parameter in wireless communication, that is, PD. The proposed NN model for predicting channel parameters is applicable not only to PL but also to other parameters. Therefore, in this section, we will present the performance of the proposed NN prediction model for the channel parameters, that is, PD. It has been found that PD is partially relevant to relative distance, relative speed, PL, and frequency. Many causes are hard to describe with a mathematic model, let alone the real-time implementations. To this end, this section proposes a real-time prediction model of PD probability based on NNs.
Packet drop series could be regarded as time series, which could be predicted by both the NN-based method and statistical average method. The proposed model takes n 1 packets to predict PDR in following n 2 packets. The model updates itself in every n 3 packets. Usually, n 3 < n 2 ; thus, the prediction window is able to cover transmission times of interest. The framework of the PDR prediction is shown in Figure 7. In the simulation, the dataset is randomly selected from the above experiments. The dataset is divided into training, validation and test sets according to the proportions of 60%, 15%, and 25%, respectively. The input is either 0 or 1, representing whether the packet is received (input = 0) or dropped (input = 1). The label is the round-trip PDR in the next 2 n packets. The structure of the PRD prediction neural network is shown in Figure 8.   In the simulation, the dataset is randomly selected from the above experiments. The dataset is divided into training, validation and test sets according to the proportions of 60%, 15%, and 25%, respectively. The input is either 0 or 1, representing whether the packet is received (input = 0) or dropped (input = 1). The label is the round-trip PDR in the next n 2 packets. The structure of the PRD prediction neural network is shown in Figure 8. The activation function is f (·) = tanh(·) and the learning rate is η = 0.05. The number of neurons in the hidden layers are N (1) (1) (2) (1)

H
(1) Simulations were performed to validate the effectiveness of the real-time PD prediction model under different values of n 1 , n 2 , and n 3 , with the criteria described as below: • The value of n 1 should be carefully chosen to balance between past data and prediction data. In the model, n 1 = {100, 120, · · · , 500}. • The value of n 2 should be selected in such a way that corresponding prediction time should be within the channel coherent time. In the model, n 2 = {2, 4, · · · , 30}. • n 3 is selected as to be equal or less than v resulting in a prediction window covering transmission times of interest. In the model, n 3 = 0.5 · n 2 , i.e. n 3 = {1, 2, · · · , 15}. • Several combinations of n 1 , n 2 , and n 3 were adopted in the simulation to get a good prediction accuracy. A comparison factor is defined as, α = accuracy/MSE 2 . The set of n 1 , n 2 , and n 3 resulting in the largest α is optimized.
The simulation results are shown in Figure 9. It shows the values of MSE during the training, validation, test, and overall set. MSE roughly reduces with the decrease of n 1 or the increase of n 2 . The set of n 1 = 180, n 2 = 20, and n 3 = 10 achieve the maximum value of α.
Next, the performance of the proposed NN based model was compared with that of the statistical average based model. The statistics-based model averages the values of PD in n 1 data to predict the probability of PD in the following n 2 data. Predictions are updated with every n 3 new data gained. Similarly, the NN-based model is constantly trained by the dataset, consisting of the inputs n 1 data, and outputs probability of PD in next n 2 data. With every n 3 new data gained, the prediction updates. The simulation results are shown in Figure 9. It shows the values of MSE during the training, validation, test, and overall set. MSE roughly reduces with the decrease of 1 n or the increase of 2 n .
The set of 1 n = 180, 2 n = 20, and 3 n = 10 achieve the maximum value of α .     According to the measured data, the probability of PD in 20 packages is P PD = {0, 0.05, · · · , 0.6}. In Tables 7-9, each column lists a slot and the number of slots is determined by the length of dataset. Ten slots were selected to illustrate the results and principles of the PD prediction model. The probability corresponding to the maximum value of PDF in each slot is the output of the prediction model.
A comparison of the real-time prediction performance of the two models is shown in Figure 10. The prediction results are divided into four types: A indicates that the NN based model can predict the probability of PD, while a statistics-based model does not; B indicates that both models can predict; C implies that the statistics-based model can predict the probability of PD while the NN based model fails; and D shows that neither model can predict it. The RMSE and accuracy of real-time prediction models using the two methods is shown in Table 10. The accuracy of the NN-based model consists of case A and case B and the accuracy of a statisticsbased model contains case B and case C.  The RMSE and accuracy of real-time prediction models using the two methods is shown in Table 10. The accuracy of the NN-based model consists of case A and case B and the accuracy of a statistics-based model contains case B and case C.
Simulation results show that the NN-based PD prediction model has a lower RMSE and higher accuracy than those of a statistics-based model. RMSE was reduced by 18.73% while the accuracy was increased by 85.19%. See Table 10 for more numerical comparisons. The performance of the statistics-based model was not as good as the NN-based model because the dataset is not large enough. There are two contradictory conditions that limit the performance of the statistics-based model: • Increasing the size of the dataset enhances the prediction accuracy of the statistics-based model.

•
Adding more datasets requires more previous time data, which are less relevant to the present and future slots. Furthermore, it reduces the accuracy of PD prediction.
The statistics-based model is, therefore, not applicable for wireless communications. In summary, the NN-based PD prediction model outperforms the statistics-based model and can be used to provide a good reference for the link status for wireless communications.

Conclusions
This paper proposes an NN-based PL and PD prediction model, working in either offline mode or online mode. The functionality has been well addressed and validated through extensive simulations. The NN-based channel prediction model is regarded as a new approach able to learn and predict both long-term and short-term variations of PL, PD and latencies.
The proposed PL prediction model was carefully studied and compared with three typical PL prediction models, namely, dual-slope distance-breakpoint PL model, polynomial fitting model, and GG shadowed fading model. The study concludes that the proposed NN-based prediction model is has better performance when balancing between large-scale averaging and small-scale fitting.
Moreover, the proposed model features real-time implementation through updating its training dataset with the most recent measurements, while its transitional counterpart is incapable of doing this.
Furthermore, under the same conditions, the NN PD prediction model demonstrates better prediction capability if the appropriate time window is selected with enough coherent training sets.
The next step of this effort is to present a novel channel prediction models based on long-short term memory (LSTM) to addresses the impact of various environmental parameters on channel parameters. LSTM could show more details among time series, compared with the BP algorithm utilized in this paper, through capturing both long term memory to reflect categories of environment adaptively, and short-term memory varying with consecutive channel prediction windows.