EcoCAR EV Challenge is a four-year collegiate automotive engineering competition with the goal of integrating a plethora of industry-standard autonomous and propulsion control systems into a 2023 Cadillac LYRIQ. Our group was enlisted by the rookie UC Davis EcoCAR team in order to help implement various Computer Science-related tasks within the LYRIQ, with a focus on intra-vehicle communication using common protocols like CAN-FD.
Controller Area Network Flexible Data-Rate (CAN-FD) is a High-integrity serial bus system used in nearly all modern in-vehicle networks, and thus a primary focus of our work on this project.
The Propulsion Supervisory Controller (PSC), also known as the Speedgoat, is a Real-Time Simulation platform for running models created in MATLAB and Simulink, essential for testing and validation. It has a wide range of I/O capabilities, allowing it to interface with a multitude of hardware and sensor components. The Speedgoat is a vital part of all parts of our project, allowing us to collect real-time data and process signals directly within the vehicle environment.
Facilitating the encryption/decryption of messages is a vital component of most modern smart cars and one of the tasks assigned to our team. In order to communicate with the vehicle, the PSC uses incrementing counter values along with a unique message identifier to encrypt messages sent out to the rest of the LYRIQ.
Upon startup, the controller sends a Data-by-IDentifier (DID) Request to the vehicle, which prompts vehicle modules to respond with their notion of their preexisting counter values. While DID Requests are typically only used for diagnostics and testing, it was mandatory to implement for the competition and thus fell on our team. These modules then respond with their respective counter values, which the controller processes. The controller can then use these values as an initial state until the next power cycle of the vehicle.
Every critical message is encrypted using the counter into two specific fields: the Message Authentication Code (MAC) and the Freshness Counter. The MAC is calculated depending on the freshness counter and the message itself. Specifically, it is a form of cyclic redundancy check. Only the most significant bits of the MAC and the counter are sent, not the entire value. Finally and at set periodic intervals, a Protected Counter Synchronization Message (PCSM) is sent out to all modules containing the full counter value.
The IO397, one of Speedgoat's FPGA I/O Modules, was essential for interfacing with various analog and digital sensors within the vehicle, translating signals into readable Simulink values for the PSC. Easily reconfigurable and capable of rapid signal processing, our team utilized these tools these tools in order to interact with the in-vehicle Thermistor and Flowmeter, both of which measure coolant from the Magna Drive Unit (MDU).
The Thermistor is part of a resistive divider circuit to determine the voltage drop across it, necessary to compute its resistance. This resistance is predictably correlated to temperature; an interpolated lookup table is used to make the conversion. The turbine-style Flowmeter generates a square wave, where high pulses are induced by a rotating vane passing by the sensor. Multiplying the number of pulses in t by the K-factor (volume of fluid per pulse) yields the flow rate for a given interval.
A mandatory part of EcoCAR's final deliverable, the Team-Added Display (TAD) is a dashboard-mounted control panel hosted on a Raspberry Pi that displays vital system and control signals for the driver. These signals originate from all over the vehicle but are collected within the PSC and sent over UDP to the Pi. Interfaced with the TAD is the Indicator Switch Panel (ISP) which displays LED signals alongside physical switches that control the braking and autonomous vehicle systems. Our team took up this task, working with tools like Linux, Python, and Streamlit to do so.
Special thanks to Dr. Christopher Nitta and TA Rico Rodriguez, as well as Members of EcoCAR: Project Manager Ajay Suresh, PCM Lead Abhigyan Majumdar, PCM Systems Lead Shana Ebrahimnejad, SDI Testing & Integrations Lead Luis Molina, and CAV Simulation & Modeling Lead Max Nelson.