Adaptive cruise control
A low-level adaptive cruise controller with automatic steering and haptic feedback, running on an NXP S32K with sensor and actuator traffic carried over CAN.
The problem
Adaptive cruise control is two loops wearing one name. The longitudinal loop holds a following distance and a speed; the lateral loop keeps the vehicle in its lane. Both have to run deterministically on a microcontroller, sharing a bus with everything else on the vehicle, at a rate fast enough that the vehicle dynamics never get ahead of the controller.
Approach
Lateral motion is modelled with a bicycle model — two wheels, one steer angle — coarse enough to run in real time and accurate enough at the speeds involved. Longitudinal control is a position- and velocity-based law on the measured headway. Steering torque comes from a DC motor that also renders haptic feedback back to the driver, so the loop closes through a human as well as through the vehicle.
On the bus
Motor commands, steer angle and feedback force all travel over CAN, including to other nodes on the same bus. That makes message timing and frame budget part of the control design rather than an afterthought — a controller that is correct but late is just a slower way of being wrong.
Specification
- Target
- NXP S32K144
- Actuation
- DC motor providing steering torque and haptic feedback
- Bus
- CAN — motor command, steer angle and feedback force
- Lateral model
- Bicycle model
- Longitudinal
- Position- and velocity-based headway control
On the bench
