The increasing complexity of electric vehicles (EVs) and the growing demand for propulsion and driver assistance have strengthened the need for CAN networks. This necessitates a detailed analysis of communication and CAN bus utilization. A low bus load does not guarantee a valid design if response times are insufficient. This paper presents a response time analysis (RTA) of a distributed real-time control system that uses an Arduino-based CAN network and an MCP2515 interface to check if the system can be scheduled. The RTA is based on calculating the worst-case response time of the message (WCRT), which is its longest response time. The prototype EV houses a system consisting of four (4) real-time embedded CAN nodes. We have implemented a PID controller within the motor speed control node. Based on existing literature, we proposed an algorithm to calculate the WCRT of the control system messages and another to address the priority inversion issue in network communication. The experimental results for the PID controller are satisfactory. The controller reaches the target speed with minimal oscillations with values 478ms, 31.81s, 0.62%, and 2.57%, corresponding to time rise, settling time, steady-state error, and overshoot at 90 rpm, demonstrating its robust performance. Experimental results confirm the scheduling analysis of the system with a low bus load (0.9% at 500 kbps). The tests conducted on the experimental and SAE benchmark data show that validity depends on message schedulability, bus load, and bandwidth. A system may be schedulable at 500 kbps but not at 125 kbps with the same traffic.
Read full abstract