FlexRay Vehicle Network Predictive Control Based on Neural Network

. We propose a design method of FlexRay vehicle network forecasting control based on the neural network to solve the security and reliability of FlexRay network control system, where the control performance and stability of the system are reduced when transmiting data under heavy load, by sampling the working state of the vehicle network at the present time to predict the next-time network state, and adapting to the dynamic load in the vehicular network system by on-line adaptive workload adjustment. The method used the nonlinear neural network model to predict the performance of the future model. The controller calculated the control input and optimized the performance of the next-time network model. The simulation results from the Matlab/Simulink showed that the neural network predictive control had good learning ability and adaptability. It could improve the performance of FlexRay vehicle network control system.


Introduction
FlexRay is a bus technology based on the time-trigger type, FlexRay has an advantage in terms of high bandwidth, real-time, reliability, and system compatibility. It is recognized as the next generation of automotive bus standards.
The next generation of high-speed data transmission bus FlexRay network control system is composed of many controllers, actuators, sensors and some electrical equipment, constituting a complex distributed control system [1][2][3]. Complex and changeable control tasks share network resources in a time-dependent manner. It leads to the uncertainty and delay of data transmission on account of the irregularity of data flow in the network and the limited nature of the network bandwidth resources. The uncertainty and delay of the data transmission cannot be ensured, and the security and reliability of the control system cannot be guaranteed. The irregular change in data traffic and the limited bandwidth resources, cannot guarantee the security and reliability of the control system. So this study proposes a design method of FlexRay vehicle network forecasting control based on the neural network.
The FlexRay bus is the next generation of automotive bus network after the CAN bus and LIN bus and MOST bus. In recent years, many scholars at home and abroad have explored the FlexRay bus vehicle network technology [4][5][6][7]. Although these scholars investigated the vehicle network system from different angles. Some important basic theoretical issues still remain unresolved. The fuzzy control has no self-learning ability, the adaptability is poor, and the control precision is not high in the existing control method. Also, the PID control signal processing is too simple to fully realize its advantages. Neural networks have been successful in system identification and dynamic system control [8,9] and have approximation capability for the whole situation. The neural network has a great advantage in modeling nonlinear systems and realizing the general nonlinear controller.

Communication Mechanism of Flexray Vehicle Network
Nowadays, the FlexRay vehicle network is focused on some of the core needs in automotive industry. The core requirements include faster data transfer rate, more flexible data communications, more comprehensive topology selection and fault tolerance. As a new generation of high-performance automotive network, FlexRay has the following advantages [10-14]: ( FlexRay communicates information through the communication cycle. The FlexRay communication cycle is the basic unit of media access scheduling in the FlexRay protocol. When the network design is complete, the length of the cycle is a fixed value, usually 1-5ms. The cycle has four time levels, as shown in Figure 1.

Figure 1. FlexRay time stratification
Each FlexRay communication cycle consists of four parts: static segment, dynamic segment, symbol window, and network idle segment. The static segment consists of several fixed-size time slots, which consist of several variable time slots. These timeslots are made up of FlexRay frames. The frame format of FlexRay bus is shown in Figure 2. A data frame includes header, data segment, and frame tail. The frame header consists of one reserved bit, four frame indicator bits, frame ID (11 bits), payload data length (7 bits), frame header CRC (11 bits), and periodic count (6 bits). The data segment represents the data actually transmitted by the frame, and the length of the FlexRay data segment is 254 bits. The end of the frame contains 8 bits of CRC used to detect errors.

Flexray Vehicle Network Predictive Control Principle
The principle of FlexRay vehicle network predictive control to sample the current time car vehicle network working status(S), and use access to the monitoring information to calculate the utilization(U) of network resources, data transmission time(C), control system sampling period(T), and other parameters. It also involves predicting the operating state of the network at the next moment, and adaptively adjusting the workload of the task dynamically to the load in the , it shows that the network is overloaded, the load of the system should be reduced by increasing the sampling period, and some of the bandwidth is released to the higher-priority task.
The specific control process for the network utilization of the estimated value is shown in Figure 3. If the maximum FlexRay network resource utilization is required, the resources that are not effectively utilized in the FlexRay vehicle network are minimized. The bandwidth resources that are not effectively utilized in the FlexRay ivehicle network can be divided into two categories. The first class is the number of bits added during the frame encoding process. The second class is the number of invalid bits in the payload segment in the static frame. These two types of frames can be represented by the following equation [15]: In equations (2) and (3) The maximum value of network utilization is represented by equation (5). ,min Where W is the number of bits for the entire static segment.

Neural Network Predictive Control
The neural network predictive controller used a nonlinear neural network model to predict the performance of future models. The controller controlled the input by calculation and optimized the performance of network model over a specified period by controlling the input.
(1)System Identification The first step in model prediction was to train the neural network to represent the dynamic mechanism of network. The prediction error between the model output and the neural network output is used as the training signal of neural network. The process is shown in  The training neural network model prediction method was based on the method of horizontal regression, and the neural network model predicted the model output at a given time. The optimal performance criterion for predicting the use of numerical optimization procedures to determine the control signal was as follows. The process of model predictive control is shown in Figure 5. The controller consisted of a neural network model and an optimization module. The optimization module determined u (through minimizing J) and the optimal u value was used as an input to the neural network model. The controller part could be realized by Simulink.

Simulation Research
The Matlab neural network toolbox provided a neural network model predictive controller module that could be used for Simulink simulation, and it applied by the predictive control of any complex system. The first step of the model prediction was system identification. First, the training data were generated. The random reference signal was set at the input of neural network prediction controller, and then the structure of neural network was set. The specific scope of the input signal is shown in Table 1. The second step was to train the network model. The training was related to the training algorithm, Figure 6 is shows the training data, and Figure 7 shows the legal data after training.  Figure  8, the control parameters of the controller were as follows: the predicted time domain length, 9; the control time domain length, 2; the control weighting coefficient, 0.05; and the linear search parameter, 0.001. The effect of neural network model predictive control was found to be better. It could realize the predictive control of FlexRay vehicle network, and improve the security and reliability of FlexRay network control system.

Conclusions
In this study, the neural network predictive control model was used to predict and control the network resource utilization of the control system, and the workload of the system was adaptively adjusted to the dynamic load in the system. The simulation results showed that the neural network predictive control had good learning ability and adaptability, and could improve the performance of FlexRay vehicle network control system.