Advanced Driver Assistant Systems (ADAS) Simulation

Published:

Brief: This project's goal is to create a Simulink model of a vehicle with Adaptive Cruise Control (ACC). ACC adjusts the vehicle's speed based on traffic conditions, maintaining a safe distance from the car ahead. The model includes a steering mechanism controlled by a haptic wheel and switches between manual and ACC modes. The ACC system uses inputs from a CAN bus, which communicates with up to six simulated vehicles, to control speed and maintain a safe gap. Additionally, the project involves developing an automatic steering controller using PID control, aimed at guiding the vehicle along the road with minimal error and maintaining stability at various speeds. The challenge is to balance the ACC and steering systems' responsiveness and stability.

Role: Embedded Software Engineer

Result
- Developed Embedded C code, block diagrams, and S-functions to implement Manual Control, Adaptive Cruise Control, and Auto-Steering on the NXP S32 board. This system controls a car simulation in Simulink using a haptic wheel connected to an encoder-driven DC motor, demonstrating precise control and feedback integration.
- Programmed Embedded C code to enable communication with other car simulations via the CAN network, facilitating the real-time exchange of vehicle positions and displaying them on-screen, contributing to multi-agent coordination and interaction in simulation environments.

Manual Control test

- The Adaptive Cruise Control (ACC) system uses the ChooseFront_Outputs_wrapper function to select the lead car from six others based on relative distance and speed. This function takes distances and speeds as inputs and outputs the lead car's distance and speed. Initially, the ACC system had a malfunction causing reverse driving upon activation, which was resolved by completely rebuilding the ACC logic from scratch, leading to proper functioning.
- The automatic steering system, comprising two PD control loops for wheel and road position, initially calculated theoretical gains for both loops. During lab testing, these gains, particularly the derivative ones, were adjusted to ensure accurate road following. However, stability issues arose with the car oscillating off the road. This problem was solved by modifying the gains, notably increasing the outer derivative gain, to achieve stable and accurate road tracking.

Adaptive Cruise Control and Auto Steering test

[GitHub]

Skills: C, MATLAB, Simulink, Microcontroller, GPIO, ADC, PWM, ISR, CAN
Contributors' Acknowledgement: Prof. James Freudenberg, Adam Lake, Cody Dempster