Modern vehicles, that have to be considered as safety-critical cyber-physical systems, require highly accurate <i>clock synchronization</i> (CS) among their distributed computing devices. Since Controller Area Network (CAN) is the predominant in-vehicle communication bus, it is highly relevant to support CS for CAN. This article proposes an original CS method for distributed in-vehicle networks based on CAN with both <i>offset</i> and <i>drift correction</i> . While offset correction is performed based on timestamps in periodic reference messages (RMs), our new method benefits from the re-synchronization mechanism of the CAN bit timing to apply highly accurate drift correction. Our algorithm does not make any modifications to the CAN protocol but requires the measurement of the phase error from the CAN controller. We derive analytical bounds for the expected clock differences and further validate the practicability of the proposed method by comprehensive experiments. As the main result, our method achieves a clock accuracy below <inline-formula><tex-math notation="LaTeX">$2\;\mu$</tex-math></inline-formula> s independent of important parameters such as the bit rate, RM period, bus utilization and time-varying clock drifts.
Read full abstract