Predictive control of FlexRay vehicle-mounted network based on neural network

Aiming at the problem that the control performance and stability of the system can not guarantee the security and reliability of FlexRay network control system when the FlexRay vehicle network control system transmits data under heavy load. So FlexRay vehicle network prediction controller based on neural network is proposed. By predicting the current state of the vehicle, and the running status of the network at the next moment, it can adapt the dynamic workload of the vehicle network system in a way of adjusting the workload autonomously. The method uses a nonlinear neural network model to predict future model capacity. The controller calculates the control input, and by controlling the input, it optimize the performance of the network model in a certain period of time. According to the square result obtained by Matlab/Simulink, the neural network predictive control has good learning ability and self-adaptability, which can improve the performance of the FlexRay vehicle-mounted network control system.


Introduction
The car's next-generation high-speed data transmission bus FlexRay network control system is a very complex distributed control system composed of many controllers, actuators, sensors and some electrical equipment [1][2].
Complex and changeable control tasks share network resources in a time-division multiplexing manner. Due to the irregularity of data traffic changes in the network and the limited network bandwidth resources, it will cause uncertainty and delay in data transmission, and control cannot be guaranteed. The safety and reliability of the system.
The FlexRay bus is a next-generation automotive vehicle-mounted bus network following CAN bus, LIN bus and MOST bus. In recent years, many scholars at home and abroad have conducted research on FlexRay bus vehicle network technology [3]. Although scholars at home and abroad have carried out research on the automotive FlexRay bus vehicle network control system from different angles and have achieved some scientific research results, there are still some Important basic theoretical issues need to be resolved.
Among modern control methods, the common ones are fuzzy control, PID control and neural network control. However, both fuzzy control and PID control are limited due to their shortcomings. For example, fuzzy control does not have the ability of self-learning, so it has poor adaptability and low control precision. Because the signal processing of PID control is too simple, its advantages cannot be fully utilized. The neural network has been widely used in system identification and control of dynamic systems, and has global approximation capabilities, making it useful for modeling nonlinear systems and for general nonlinear controllers It has great advantages in realization and so

Overview of FlexRay Network Communication Protocol
The FlexRay vehicle network focuses on some of the core requirements of today's automotive industry, including faster data rates, more flexible data communications, more comprehensive topology selection and fault-tolerant calculations. As a new generation of high-performance in-vehicle network, FlexRay has the advantages of greater communication bandwidth, distributed clock communication, flexibility and time certainty The highest performance limit for the previous generation of CAN bus is 1Mbps. As for the FlexRay bus, the maximum communication rate in a single channel can reach 10Mbps, and the dual-channel redundant communication mechanism is adopted, and the communication rate can reach 20Mps. FlexRay uses the access method based on the synchronization time base, and the synchronization time base is automatically established and synchronized through the protocol, and the accuracy of the time base has reached 1 us.
The time-division multiplexed data transmission method is adopted by the FlexRay bus. This method makes the data have a fixed position in the communication cycle on the basis of the cyclic communication cycle, so as to ensure the timeliness of the message. In addition, FlexRay can support a variety of topological structures, time triggering and event triggering, so it is highly flexible.
FlexRay is a kind of field bus based on time division multiple access and flexible time division multiple access, which carries out message transmission by means of cycle. FlexRay bus time level shown in Figure 1.

Figure 1 FlexRay bus time level
FlexRay data frame includes three parts [4]: the header, payload section, and the end of the frame. The header part consists of a 1-bit data retention bit, a 4-bit frame indicator, a 11-bit frame flag, a 7-bit segment payload length bit, a 11-bit CRC check bit in the frame header, a 6-bit Cycle count The load segment can contain up to 254 bytes. The trailer section contains only 3 bytes of CRC field Frame structure is shown in Figure 2.
Header Segment Payload Segment Trailer Segment FlexRay Frame Figure 2 FlexRay frame structure 3. FlexRay vehicle network prediction control principle By sampling the current state of the car vehicle network work status S, the utilization rate of monitoring information network resources U, time of transimission C, the sampling period of control system T. By predicting the running status of the network at the next moment, it can adapt the dynamic workload of the vehicle network system in a way of adjust the workload autonomously.
When , it shows that the network load is light, and all tasks can work stably under the original sampling period. , it shows that the network load is heavy, and the sampling period of tasks in the network should be adjusted online adaptively.
When it shows that the network load has been overloaded, and it is necessary to increase the sampling period to reduce the system load and release part of the bandwidth to higher priority tasks.
In which the is the estimated value of the network utilization rate and is the maximum value of the network utilization rate. The specific control process as shown in Figure 3. These two types of frames can be represented by the following formula [5]:

()
Where and are the number of bits of the two types of losses above And is the number of bits of the entire static segment loss. And represents the number of bits in the frame header and end of the data frame after frame encoding, represents the length of the valid data segment in the static frame, and represents the number of bits in the start sequence of bytes.
represents the number of signals transmitted in the static segment, and represents the length of the signal. According to the FlexRay protocol . So FlexRay vehicle network of network resource utilization rate: The maximum network utilization rate is:

neural network predictive control
The neural network predictive controller uses a nonlinear neural network model to predict the performance of the future model. The neural network controller resumes the nonlinear controlled object prediction model, and uses the prediction model to predict the future output value of the controlled system through the control input, so as to optimize the performance of the network model for a specified period of time in the future.

system identification
Neural network model prediction must first train the neural network, and the dynamic mechanism of the network is represented by the neural network. The training signal of the neural network is the prediction error between the model output and the neural network output The process is shown in Figure 4. In the figure2, represents the control signal, represents the expected output, represents the network model output, and represents the error.
The current input value and current output value can be used to predict the future output value of the neural network, and the network can be trained in batches online.

model prediction
The method based on level regression is used as a model prediction method, and the neural network model predicts the output of the prediction model in a given time.
The prediction uses a numerical optimization program to determine the control signal, and the criteria for optimal performance are as follows: In the mathematical expression, N 2 represents the length of the predicted time domain, N represents the length of the control time domain, u represents the control signal, y r represents the expected response, y m represents the network model response, andρ represents the control variable weighting coefficient.
The process of model predictive control is shown in Figure 5. The controller is composed of two parts: neural network and optimization module. Among them, the optimization module determines the control signal u, the optimal u value is used as the input of the neural network model, and the realization of the controller part is completed by Simulink.

Simulation study
Matlab software is selected for this simulation study. The neural network model predictive controller module used in simulink simulation in Matlab is suitable for predictive control of arbitrarily complex systems. Model prediction is divided into the following steps: (1)System identification, firstly generate training data, set a random reference signal at the input of the neural network predictive controller, and set the structure of the neural network The specific range of the agreed input signal is shown in Table 1. (2)Train the network model, trainlm is used here for training.
(3)Use Matlab/Simulink tools to establish a neural network-based predictive control model of network bandwidth utilization u, so as to control the vehicle in-vehicle network in real time.
By comparing with the actual network bandwidth, the comparative data shown in Figure 6 can be obtained. In the simulation process, the parameters of the neural network predictive controller predict the length of the time domain, the length of the control time domain, the weighting coefficient of the control quantity, and the value of the linear search parameter are 9, 2, 005, and 0001, respectively. Through the simulated experimental data, it can be concluded that the effect of the neural network model predictive control is better, and the predictive control of the FlexRay vehicle-mounted network can be well realized, which improves the safety and reliability of the FlexRay network control system. time(s) Resource utilization Figure 6 Utilization ratio of network resources

Conclusion
Based on the communication mechanism of the FlexRay vehicle network and the principle of FlexRay vehicle network predictive control, this paper proposes a design method of the FlexRay vehicle network predictive controller based on neural network. With the aid of simulation research, the nonlinear neural network model is used to predict the performance of the future model. The predictive controller obtains the corresponding control input through calculation, and then optimizes the performance of the network model for a specified period of time in the future through the control input. Simulation experiments show that this method has good adaptability and learning ability, and the performance of FlexRay vehicle network can be improved by this method.