Physical fault detection on the Controller Area Network - An investigation into the feasibility of detecting physical faults on the CAN bus with machine learning
| dc.contributor.author | Engström, Pontus | |
| dc.contributor.author | Roos, Rikard | |
| dc.contributor.department | Chalmers tekniska högskola / Institutionen för data och informationsteknik | sv |
| dc.contributor.department | Chalmers University of Technology / Department of Computer Science and Engineering | en |
| dc.contributor.examiner | Seger, Carl-Johan | |
| dc.contributor.supervisor | Seger, Carl-Johan | |
| dc.date.accessioned | 2026-05-27T05:49:34Z | |
| dc.date.issued | 2026 | |
| dc.date.submitted | ||
| dc.description.abstract | Detecting physical faults on a Controller Area Network is a complex task due to unpredictable signal behavior under normal circumstances, and signal behavior unique to the configuration of the specific network and its components. Furthermore, physical faults can lead to disruptive signal behavior, which are not always detected by the protocol’s error handling. If it does not activate the fault handling of the protocol, the disruptive behavior is only seen on the physical layer, potentially resembling unpredictable behavior under normal states. Such physical faults can imply a marginal system, leading to unpredictable signal behavior over time. If the fault is detected by the protocol, the source of the fault is not detected, and further investigation of how and where the fault occurred is required. Traditional fault detection methods include manual analysis, which requires time and expertise. This thesis investigates the feasibility of applying machine learning methods to achieve physical fault detection on a CAN bus. The aim was to determine if, and to which extent, this could be achieved. A physical test bench was configured to enable CAN traffic under normal and faulty configurations. By calculating the offsets of the expected position of recessive signal edges, minimal data was used to distinguish physical faults from normal conditions. A range of machine learning classifiers were trained and evaluated to exhaust the possibilities of achieving high accuracy on this task. The problem was narrowed down to detect termination faults, and in turn, to localize the faults. The results indicates that it is feasible to differentiate termination faults with data-driven methods. In particular, Gradient Boosting, a decision tree ensemble architecture, achieved a 99.98% accuracy on this task. However, localizing the faults was best achieved with Gradient Boosting with an accuracy of 93.74 %. Two distinct fault classes were of too similar shape to be separable to a perfect degree. The main limitation of this study included the lack of generalization capabilities. The signal data proved to be tightly connected to the physical setup of the CAN bus, and applying a model to different network than it was trained on is very likely to fail. Furthermore, the data was generated under stable, indoors conditions, with high-quality hardware. A further investigation of the real-world practical use is required. | |
| dc.identifier.coursecode | DATX05 | |
| dc.identifier.uri | https://hdl.handle.net/20.500.12380/311091 | |
| dc.language.iso | eng | |
| dc.setspec.uppsok | Technology | |
| dc.subject | Controller Area Network | |
| dc.subject | CAN bus | |
| dc.subject | fault detection | |
| dc.subject | machine learning | |
| dc.subject | classification | |
| dc.title | Physical fault detection on the Controller Area Network - An investigation into the feasibility of detecting physical faults on the CAN bus with machine learning | |
| dc.type.degree | Examensarbete för masterexamen | sv |
| dc.type.degree | Master's Thesis | en |
| dc.type.uppsok | H | |
| local.programme | Computer science – algorithms, languages and logic (MPALG), MSc |
