Remote Data Collection for CAN-based Distributed Systems Ernie Pusateri Chris Martin Pratish Halady Aditi Bajoria Robust Self-Configuring Embedded Systems • Focus PC modeling data collection node – Design and optimize a system that remotely reads data from an automotive CAN bus in real-time • Resides on the CAN bus inside the car • Collects data from car by receiving messages from CAN bus. • Interacts with remote PC via wireless TCP/IP network. w ) dre oon • Can be configured remotely from laptop s An • Motivation – Collect information from a car’s internal distributed system for component evaluation and fault reporting DATA COLLECTION NODE PC modeling car distributed system • Simulates “electrical control units” (ECU) which are connected by a CAN bus. • ECUs use CAN bus to send messages to the data collection system. • System can also react to incoming CAN messages from data collection system. N CA ess ng rel omi i W (c Remote LA Wi N Laptop • Send and receive data from the Data Collection Node over a wireless TCP/IP connection. • Sends messages to configure the Data Collection Node, telling it which messages to receive from CAN bus. • Sends messages to put CAN messages onto the bus. What is CAN? CAN(Controller Area Network) is a network protocol designed for use in distributed embedded systems. System Analysis and Optimization: Using Bandwidth Efficiently CAN Message Reception as a Function of Transmission Rate 1 CAN msg per TCP/IP msg 4 CAN msg per TCP/IP msg Ideal (no transmission overhead) Maximum theoretical 60.00 50.00 40.00 30.00 20.00 10.00 Ideal (no trans m is s ion overhead) Maxim um Theoretical Approach description: Buffering places multiple CAN messages inside of a single TCP/IP message. Reason to try this approach: If the system bottleneck is in the TCP/IP connection, buffering will increase throughput by dividing the TCP/IP header overhead over many CAN messages. Results: Buffering provided no significant improvement in throughput. Conclusion: The TCP/IP connection is not the bottleneck in the system. Final Approach: More efficient use of Driver • • • • Approach description: Optimize hardware driver to more efficiently service incoming messages by reducing the time spent waiting for incoming control messages. Reasons to try this approach: Previous results indicated that system was handling message reception inefficiently. Drastic improvements using multiplexing indicated that the mailbox service algorithm had a large amount of associated overhead. Results: Dramatic throughput increase superior to previous approaches. Conclusion: System bottleneck determined to be control message waiting time. CAN Message Reception as a Function of Transmission Rate Initial Approach Final Approach Theoretical Maximum 200.00 180.00 160.00 140.00 120.00 Observed 100.00 Theoretical 80.00 60.00 40.00 20.00 0.00 1 2 3 4 5 6 7 8 9 10 Number of Multiplexed IDs GM Institute for Complex Engineered Systems 100 472.00 441.00 413.00 382.00 351.00 321.00 290.00 260.00 229.00 0 198.00 Approach description: ID Multiplexing rotates message IDs in a round-robin fashion when transmitting data on the CAN bus. • Reasons to try this approach: Decreasing the period between CAN messages causes message loss, limiting the data collection rate. Dividing the overhead of service time over multiple mailboxes increases throughput. • Results: Approach resulted in near linear increase in throughput. • Conclusions: Results showed CAN device driver would read EVERY “full” mailbox each time ANY mailbox was polled. 168.00 • Impact of Message Multiplexing on System Throughput 200 137.00 1 300 76.00 5 400 47.00 CAN m e s s age r e s e nd pe r iod (m s ) 500 107.00 70 65 60 55 50 45 40 35 30 25 20 15 10 Second Approach: CAN Message ID Multiplexing Reception Rate on laptop (msg / sec) 600 16.00 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% Throughput (msg / sec) Percentage of messages received 4 CAN m s g per TCP/IP m s g • • • Transmission Rate from CANalyzer (msg / sec) CAN M e s s age Re ce ption as a Function of M e s s age Pe r iod 1 CAN m s g per TCP/IP m s g • 98.00 91.00 84.00 77.00 70.00 63.00 56.00 49.00 35.00 28.00 21.00 14.00 42.00 0.00 Reception Rate on laptop (msg / sec) 100.00 90.00 80.00 70.00 First Approach: CAN message Buffering Transmission Rate from CANalyzer bus(msg / sec) Outcome: Demonstrated feasibility of real-time remote monitoring of a CAN bus via a wireless link using a CAN to TCP/IP gateway for automotive applications.
© Copyright 2023 ExpyDoc