1. Introduction
As a result of the rapid increases in scale, heterogeneity and complexity of the Internet of Things, in addition to the demand for cloud computing and big data, the performance of many network latency analysis methods is unsatisfactory, and the previous single-factor methods can no longer meet the needs of large and complex networks. However, the emergence of digital twins and the rapid development of neural network technology provide new approaches for modeling and forecasting the latency of vehicular networks.
Due to the development of Internet infrastructure and Internet of vehicles technology, the massive quantity of real-time information generated by vehicles can be shared with different participants. The digital twin n concept can be used to build models of vehicles from different angles based on historical data, update the parameters of the model according to new data, and provide a more real-time and intuitive representation of the state of vehicles.
In a digital twin, physical entities are mapped in a virtual space by a series of scientific and technological means. By digitizing all elements of the modern physical world, such as people, machines and things, a cyberspace representation can completely correspond to the physical world. By collecting the characteristic data of physical entities and reconstructing the data in the virtual platform, a digital virtual body can be constructed that is exactly the same as the physical entity, and the physical entity can be analyzed by observing the digital virtual body.
As a key to realizing two-way mapping, dynamic interaction and real-time connection, digital twins can be used to undertake dynamic multi-dimensional, multi-scale, and multi-physical quantity observation, cognition, control, and transformation with high fidelity to the physical world [
1]. In recent years, the digital twin technique has been in a stage of constant exploration. In the field of advanced manufacturing, digital twins are used to construct industrial Internet architectures [
2] and cyber-physical systems [
3], The concept of the digital twinning workshop was proposed [
4] and its evolution mechanism is elaborated upon in [
5]. In terms of product equipment operation and maintenance, digital twins are used for online monitoring, life prediction, and maintenance optimization [
6,
7,
8,
9], In the medical field, digital twins can be employed to build a virtual drug quality control laboratory, thus enabling the optimization of equipment and personnel benefits and reduce costs [
10].
In recent years, both academia and industry have attached great importance to the realization of road communications and the improvement in traffic efficiency and safety through vehicular networks. These are open mobile networks composed of communications between vehicles on the road, and between vehicles and fixed roadside infrastructure. A vehicular network is a self-organized communications network between vehicles having an open structure, and plays a very important role in ITS.
The development of vehicular networks is an inevitable trend in the advance of modern automotive electronic technology. The on-board network structure includes two main parts: communication and network management. According to the scale of the automobile network, the on-board network should have a LAN and mesh structure. Because the information frames to be transmitted are short, strong real-time performance and high reliability are required; in turn, this requires a small network structure, which is conducive to improving real-time performance and reducing the probability of interference.
Mesh networks are used in vehicle networks because they effectively combine the advantages of fixed mesh networks and mobile dynamic ad hoc networks, and are suitable for voice, data, and video applications. They provide a mesh network layer, which can automatically adapt to changing network conditions, client mobility, and related wireless environment conditions, packet by packet, thereby creating a powerful, self-organizing, self-healing, and virtual infrastructure. These functions and highly effective bandwidth allocation methods enable the true mesh network to be deployed and run with high performance and low cost, thus providing a highly stable network for each device.
The main contributions of this study are:
Based on digital twin technology, aiming at the problems of performance degradation and instability in vehicular networks due to time delays during driving, a new vehicular network time delay prediction algorithm is proposed.
The time delay autocorrelation of the physical field information of the vehicular network model was verified, and the ARMA time series model was used to analyze and verify that the collected time delay data are autocorrelated and meet the prediction conditions.
Through the above verification, a delay prediction model was constructed based on the radial basis function (RBF) and Elman neural network to predict the vehicular network delay. The results show that, compared with the Elman neural network, the RBF network has a good prediction performance and offers a better real-time performance.
To summarize, this paper proposes an on-board network latency prediction algorithm based on digital twin technology, which provides a certain reference value for the practical application of a digital twin for the future optimization of on-board network performance.
2. Related Work
As a result of the continuous development of social informatization, the explosive growth in the number of vehicles, and the ubiquitous demand for information, communications networks have been increasingly combined with vehicles. Demand for communication services during vehicle movement has increased, and the research on vehicular networks has become a focus of global attention. This research has also promoted the development of vehicles towards intelligence and networking.
The performance evaluation and optimization of vehicular networking has traditionally been a popular topic in academic research. The performance of vehicular ad-hoc networks is affected by network protocols and vehicular mobility. Killat M evaluated network performance under the 802.11p standard [
11]. However, the nodes in this experiment are not mobile, and are thus not suitable for the high-speed mobility of vehicular ad-hoc networks. In research on packet-loss characteristics, Michele Zorzi [
12] and others studied packet-dropping statistics for three data link retransmission schemes, but the traffic factors were seldom considered in their experiments.
Many researchers have also undertaken a large amount of related research on the analysis of packet-loss characteristics of vehicular networks. Lai W et al. considered three factors, i.e., vehicular mobility, wireless channel conditions, and media access control, and studied the influence of the average packet-loss rate under the distributed relay selection of multi-hop broadcasts in vehicular networks [
13]. According to the mobile model and the fault characteristics of ad hoc networks, Y. Fu et al. established a delay model of network service [
14].
In [
15], the packet-loss performance of vehicular ad-hoc networks was analyzed and optimized. The authors of [
16] examined various problems existing in the evaluation of current subway train performance. The study proposed a reference framework for a subway train performance evaluation system based on digital twinning, in order to provide a reference for the popularization of digital twinning in subways.
The vehicular network is a type of ad hoc network [
17]. Vehicular nodes having both terminal and routing functions form a centerless, multi-hop, and temporary self-made system through wireless links. Therefore, as a result of the advent of the era of vehicular networking, intelligent networked vehicle technology plays an increasingly important strategic role in national social development [
18,
19], and penetrates into all fields of society. Following the development trend in “cloud-management-end” architecture, as a terminal node [
20], vehicular networking shows the characteristics of intelligence, electrification, sharing, and networking. In addition, the intelligent networked vehicular electronic system has gradually evolved into an automatic cyber-physical system (ACPS) that integrates perception, computation, networking, and control, in which the vehicular network is as important as perception, computation, and control [
21]. Lv Yong, Zhai Yahong et al. established a low-latency optimization mechanism with the aim of addressing the existing network latency problem under the new type of IVN architecture [
22].
Many researchers have studied Ethernet, particularly traditional Ethernet, and the models used for this analysis are very mature [
23,
24,
25,
26,
27,
28,
29]. Among these researchers, Chen Xi and others believe that Ethernet data transmission follows the law of queuing theory [
30]. Lu, T et al. proposed a clustering routing algorithm based on a genetic algorithm to optimize service nodes [
31]. On this basis, Jin Haibo optimized the buffer queue and verified the accuracy of the model [
32]. In addition, Niu Zengxin proposed a method to compensate for the latency of Ethernet frame transmission according to the characteristics of data transmission [
33].
Regarding vehicular Ethernet, L. Huang explored its development trend and provided a reference for the application of vehicle Ethernet technology [
34]. Y. Hao et al. summarized the time-sensitive network in vehicle, and found that it had the advantages of high bandwidth and low cost in vehicular multi-media, and could be applied in the vehicular network system [
35]. Researchers from domestic enterprise research institutes also examined the application of on-board Ethernet in automobiles, in order to provide a reference for the design and research and development of on-board network architecture of automobiles [
36,
37].
The above literature search shows that vehicular networking technology is an indispensable part of national social and economic development. However, there are still many deficiencies in the current research relating to the time delay of the in-vehicle network. At present, no relevant literature exists on this topic. The digital twin concept has been applied to the in-vehicle network. Therefore, in the present study, we mainly carried out research on the latency prediction of the in-vehicular network based on the digital twin.
5. Latency Prediction Algorithm Based on Neural Networks
Artificial neural networks have strong advantages in tackling the problem of latency prediction. Data transmission delays in vehicular networks are neither random in nature, or unpredictable. Within a certain range of time, from the above research and analysis, it can be found that the transmission delay of the network has strong autocorrelation, and there is a certain nonlinear relationship between the network latency at the next time-step and that of the preceding time-step. Furthermore, the latency in the whole local range fluctuates with in an interval, showing the characteristics of nonlinear change; that is, the network latency is characterized by locality, nonlinearity, and autocorrelation.
5.1. Composition Method of Training Samples and Samples to Be Predicted
Through the previous analysis, it can be found that the latency variation in vehicular networks has certain regularity, and the latency can be predicted by summarizing its regularity. Therefore, according to the latency data obtained from network latency measurement, the collected latency data are divided into several time segments in sequence. One of the points
T is selected, and the
N number
x values (latency) obtained before this timestep are used to estimate the x value of the
T + d time point, thus realizing the prediction of time series, namely:
where
d is usually one, so that the value of
x in the time-step after following
T can be predicted according to function
f().
In this paper, the 1st to 8th latency values are taken as input sample 1, and the 9th latency value is taken as output sample 1, forming a sample pair. Then, the 2nd to 9th latency values constitute input sample 2, and the 10th latency value constitues output sample 2, totaling 90 samples.
5.2. Data Preprocessing
After determining the training samples and the samples to be predicted, the mapminmax function of MATLAB was invoked to normalize the data. This is because normalization can prevent the overflow of computation in the training process and accelerate the convergence speed in the learning and training processes.
5.3. Latency Prediction Based on RBF
5.3.1. RBF Network
The RBF network has a fast training speed and a strong nonlinear mapping function. The hidden layer uses a Gaussian radial basis function as the excitation function, as shown in
Figure 14.
Figure 15 shows the RBF neural network model structure.
The activation function of the hidden layer node produces a localized response to the input excitation. The output response of each hidden layer node is
In Equation (11),where
x is the
m-dimensional input vector;
is the center of the
i-th basis function;
is a freely selectable parameter that determines the width of the basis function;
l is the number of hidden layer nodes;
is the norm of vector
, which represents the distance between
x and
; and
Ri(x) is the response of the
i-th basis function to the input vector. There is a unique maximum value at
, and, as
increases,
decays quickly to zero. The input layer realizes the nonlinear mapping from x to
, and the output layer realizes the linear mapping from
to
, namely:
In Equation (12), where is the response level; is the weight; and n is the number of output layer nodes, and n = 1.
The output layer is used to generate the final model prediction result according to the weight matrix.
The RBF parameters are determined as follows:
Radial basis function center: the main methods used are the self-organized selection center method and the orthogonal least square method.
Determine the width of the neurons in the hidden layer of RBF. This is determined by the KNN algorithm, as follows:
where
k is a constant, and
vj (
j = 1,2,…,
k) represents the center closest to the
i-th center
vi.
- 3.
Determine the weight of the output layer.
The approximation function of the RBF is:
where
vi is the clustering center,
G(
x) is the Gaussian function, and
is the Euclidean norm. We have the following cost function:
where
is the standard error and
is the regularization, which includes the requirements for smoothness and continuity.
Minimize
to obtain:
The iterative process is:
5.3.2. Vehicular Network Latency Prediction
We used the newrb function in MATLAB to generate an RBF neural network, as follows:
where
are the normalized input and output samples, respectively; ‘
goal’ is the mean square error;
mn is the largest number of neurons in the hidden layer; ‘
spread’ is the distribution of the function; and
df is the number of neurons added to the display.
Figure 16 depicts the flow chart of RBF neural network prediction.
When using the RBF network to approximate the function, The network output at this time is:
The output value needs to be denormalized to obtain the predicted actual value.
Figure 17 shows the prediction confidence interval graph. Where the x-axis is the time and the y-axis is the delay. The red line is the 95% confidence interval. For comparison,
Figure 18 shows the prediction and actual latency of the RBF neural network. where the x-axis is the running time and the y-axis is the corresponding time delay.
Figure 19 shows the errors between the actual and predicted values. where the x-axis is the running time and the y-axis is the corresponding time delay. When the network latency is relatively stable, using the RBF neural network to predict the latency can achieve a higher prediction accuracy. More than 95% of the prediction values have an error within 5%.
5.4. Latency Prediction Based on Elman
5.4.1. Elman Network
The main structure of the Elman neural network comprises feedforward connections.
Figure 20 shows the Elman network structure.
The input layer has r nodes, the hidden layer and correlation layer have
n nodes, and the output layer has m nodes; the mathematical model of the network can then be given by:
where them:
is the sigmoid function as follows:
The Elman learning algorithm can be derived from
as follows:
where
are the learning step lengths of
, respectively.
5.4.2. Vehicular Networking Latency Prediction
First, the network is initialized, including the number of neurons in each layer, learning efficiency, and training error, Second, the sample value of the experiment is used to calculate the output value and training error of each layer, It can and then be decided whether the training error meets the requirements or reaches the maximum number of training steps. If so, the training is over. Otherwise, the training is continued, and the network parameters are continuously updated until the conditions are met. The Elman training process is shown in
Figure 21.
Using experimental data,
Figure 22 compares the actual and predicted values, and
Figure 23 shows the discrepancy between the two.
As can be seen from
Figure 23, most of the actual values are quite different from their, predicted counterparts, and only a few of the predicted values are close to the true values. Therefore, the performance of the prediction model based upon the Elman neural network is poor.
5.5. Complexity Analysis of RBF and Elman Models
The RBF neural network is a type of local approximation network, that can accurately approximate any continuous function. It has a fast training speed and a strong nonlinear mapping function. It is a three-layer feedforward network having a single hidden layer. The model is composed of three parts, namely, an input layer, a hidden layer and an output layer. The hidden layer uses a Gaussian radial basis function as the excitation function; The hidden layer is to maps the vector from the low dimension to the high dimension, so that low-dimension linear separability becomes high-dimension linear separability. The output layer is used to calculate their linear combination. Therefore, the complexity of the RBF network model is Q(n2).
The Elman neural network is a typical dynamic recurrent neural network. Its main structure comprises is feedforward connections, including an input layer, hidden layer(s), and an output layer. Its connection weights can be learned and modified. The feedback connection is composed of a group of structural units to remember the output value of the previous time period. In this network, in addition to the ordinary hidden layer, there is a special hidden layer, which is called the association layer (or association unit layer), This layer receives the feedback signal from the hidden layer, and each hidden layer node is connected with a corresponding association layer node. The function of the correlation layer is to take the hidden layer state of the previous time period together with the network input of the current period time as the input of the hidden layer through the connection memory, which is equivalent to state feedback. The transfer function of the hidden layer is still a nonlinear function, (generally, a sigmoid function), and the output layer and the correlation layers are also linear functions. Therefore, the complexity of the Elman network model is Q(nlogn).
Compared with the Elman network complexity of O(nlogn), the complexity of the RBF network O(n2) is larger. The smaller the network complexity is, the shorter the execution time and frequency of the algorithm is, and the better the algorithm is. Therefore, the Elman network is considered to be superior to its RBF counterpart.
5.6. Comparative Analysis of Model Results
As can be seen from
Figure 24, Through analysis and calculation, it was found that the average latency of the actual vehicular network is 0.00897, the RBF prediction is 0.00839, the average error rate is 0.00069, and the average relative error rate is 7.6%; the average prediction latency using the Elman network is 0.00906 s, the average error rate is 0.00128, and the average relative error rate is 14.2%. Therefore, in terms of the latency prediction for the vehicular network, the RBF network outperforms its Elman peer. According to the RMS calculation equation, it was found that the actual vehicle network delay RSM is 0.00901, the RBF neural network prediction delay RSM is 0.00897, and the Elman neural network prediction delay RSM is 0.00962 as shown in
Table 1.