This project accomplishes an Adaptive Cruise Control (ACC) system based on the Robotcar. The ACC system is a longitude controller, which can adjust its speed according to the distance between the front car and ego car. To be more specific, if the front car is out of safety distance, ego car will run at the certain speed
that the driver set. However, if the distance is too close, ego car will keep running to keep the certain distance between ego car and front car.
To measure the distance between the front car and ego car, I use an ultrasonic sensor HC-SR04, which can provide 2cm to 400cm of non-contact distance measurement with accuracy can reach up to 3mm. I designed a shelf mount in the front of the breakout board and use Velcro to stick the shelf as figure shows:
I use a 4th-order Butterworth filter to filter the high frequency component of the distance measurement, to make the distance change smoother. As for the velocity measurement, I use a Kalman filter to combine the IMU and the encoder when measuring the velocity. To be more specific, I use the y-acceleration measured by the IMU to predict the velocity and use the encoder to correct the prediction. As I get the filtered front distance and ego car velocity, I use the distance as a judging condition to set the speed at the constant or keep identical to the front car.
Comments