Font Size: a A A

Study On Messages Scheduling Based On In-Vehicle CAN Network

Posted on:2009-07-07Degree:MasterType:Thesis
Country:ChinaCandidate:H Y ZhaoFull Text:PDF
GTID:2178360272975137Subject:Circuits and Systems
Abstract/Summary:PDF Full Text Request
The Controller Area Network (CAN), as a serial communication protocol based on uncorrupted arbitration, is widely used in automobile, industrial control, aerospace and other industries, because of its merits on EMC, transmission mechanism, error detection, etc. In the in-vehicle network, CAN-bus has already become the first choice for powertrain network and body control network, and is gradually applied to comfort network. In order to guarantee the accurate, real-time, stable transmission of signals with distributed functions, during the in-vehicle network design and implementation process, it is necessary to design the optimal software mechanism for integrative scheduling, and guarantee the real-time property of the system with multi-tasks and the stability of the in-vehicle network under poor conditions. As an important part of the software integrative scheduling, messages scheduling is an important issue on guaranteeing the real-time property of in-vehicle CAN network.Based on the introduction of the vehicle network and the analysis on the CAN-bus protocol, the messages scheduling of in-vehicle CAN network is studied systematically in this thesis.The main contents are as follows:1. The real-time property of vehicle CAN-bus is analyzed, and handling mechanism for signals and messages on CAN nodes during in-vehicle network design is introduced. After establishing the signal time model, the limited transmission time for messages to guarantee the real-time communication of network is analyzed, and the corresponding formulas are derived simultaneously.2. Three kinds of real-time scheduling algorithm are discussed, including static scheduling approach, dynamic priority scheduling (DPS), and fixed priority scheduling (FPS). The similarities and differences between scheduling of CAN messages and uni-processor tasks are also discussed. Based on the discussion, CAN network model is established in Stateflow of MATLAB/Simulink tool, and the performance of CAN messages scheduling is simulated using rate monotonic scheduling(RMS) and earliest deadline first algorithm(EDF), which are the typical methods of FPS and DPS respectively. The simulation results show that EDF performs better in scheduling while RMS in predictability. FPS is more suitable for in-vehicle CAN network messages scheduling, considering the realization difficulty, cost, predictability and stability, etc.3. The existing schedulability analysis for CAN messages is flawed, for it may provide guarantees for messages that will in fact miss their deadlines in the worst-case. CAN messages are abstracted into non-preemptive tasks in this thesis. According to the study on the worst-case response time of tasks under fixed-priority preemptive scheduling(FPPS), the worst-case response time of tasks under fixed-priority non-preemptive scheduling(FPNS) is analyzed in detail using extended notion of'level i busy period'. The types of tasks which are analyzed above can be periodic and sporadically periodic, and then the formulas for calculating the worst-case response time of messages are obtained, meanwhile the schedulability of messages can be judged exactly. Then, the scheduling performance of three FPNS approaches for general task sets (tasks with arbitrary deadlines) is compared by the formulas derived from this thesis, and the results indicates that optimal priority ordering algorithm has better performance than RMS and DMS in non-preemptive system.4. The methods to reduce the variation of message transmission time caused by the bit-stuffing mechanism in CAN are studied in the thesis. The number of stuff-bits in the worst case can be reduced by introducing some restrictions, such as reducing available priorities or consecutive bits of identical value in the data field of the frame before transmission, therefore, the worst-case response time of messages can be reduced. The effect of transmission error on message response time is also discussed. The results show that transmission error will lead to increment of the worst-case response time of messages, which may result in losing the real-time property of in-vehicle CAN network with high load.
Keywords/Search Tags:Controller Area Network, Fixed-Priority Scheduling, Worst-case Response Time, Real-Time Communication
PDF Full Text Request
Related items