Font Size: a A A

CAN Bus Response Time Analysis Based On Bit Stuffing Mechanism And Scheduling Algorithm Research

Posted on:2015-06-27Degree:MasterType:Thesis
Country:ChinaCandidate:B Z CaoFull Text:PDF
GTID:2308330482952519Subject:Mechanical engineering
Abstract/Summary:PDF Full Text Request
CAN(Controller Area Network) is a serial communication bus that can effectively support distributed control and real-time control. It has high performance, high reliability, easy to develop, low cost, and other advantages, widely used in many fields of industrial automation, medical equipment, ships, vehicles, etc. Especially, it is widely used in in the automotive field. Most of the world famous automobile manufacturers adopt CAN bus to achieve the internal control system, detection, and data communication of automobile.Based on the introduction of CAN-bus, stuffing bit mechanism, worst case response time, and real-time scheduling algorithm are analyzed in detail. The main contents are as follows:Based on the CAN bus intrinsical bit stuffing mechanism, in order to study stuffing bits from the perspective of probability, the bit-stuffing model P(S1,m) is presented. The probabilities distribution curves of stuffed bits on standard format CAN messages with different data bytes are achieved via simulation; Analysis of the distribution curve illustrates the worst-case stuffed bits are too limited or almost impossible in actual conditions; Most importantly, on this basis the XOR is used in bit stuffing mechanism, which effectively reduces stuffing bits.The formula of worst case response time(WCR) is proposed and researched. The traditional formula is too conservative when uses worst-case stuffed bits. According to the probabilities distribution curves of stuffed bits we have analyzed, worst case response time is calculated based on probability. A real example shows different results of the two calculation method.CAN-bus model is established in Stateflow of MATLAB/Simulink, simulating the data transmission in fixed priority scheduling algorithm and EDF dynamic scheduling algorithm. The results shows that both scheduling algorithms can meet the bus scheduling requirements. However, as the bus load increases, a sharp decline happens in the scheduling performance of fixed priority scheduling algorithm, while EDF dynamic scheduling algorithm can keep a good scheduling performance. The resulting simulation curve shows the model and simulation are correct.The research above do good to design a CAN-bus system or validate the schedulability of a CAN-bus system. Using the worst case stuffing bit is too conservative, and it consumes large amounts of system resources, while the use of probabilistic stuffing bit is closer to reality.
Keywords/Search Tags:CAN bus, Bit Stuffing, Worst Case Response Time, Scheduling Algorithm, Stateflow
PDF Full Text Request
Related items