Intelligent car with automatic route recognition
Project lifecycle: May.2014–Oct.2015
Table of Contents
This research taked Freescale (NXP) Cup Intelligent Car Race as the starting point, lasted for nearly two years, finally achieved excellent results in the race.
The intelligent car system (figure 1) is composed of camera, steering gear, motor, speed encoder, MCU and car model, with functions such as track information acquisition, steering control and speed control. The system operates by first using the camera to complete the track information collection, then processing the image to plan the driving path of the car, and finally using the steering gear to control the steering and the motor for acceleration and deceleration control.
In order to win the race, it is necessary to distinguish various complex track types, such as straights, curves, S-curves, cross-curves and right-angle curves, so as to achieve reasonable control of steering and speed and enable the car to pass different track types quickly and stably.
2. Hardware design
2.1. System constitute
The intelligent car mainly includes the main control board, drive board, camera, MCU, motor and steering gear, as shown in Figure 2.
2.2. PCB design
The main control board circuit includes: power supply, motor control interface, communication interface, switch, MCU slot, etc, as shown in Figure 3 and 4.
The motor driving circuit is designed according to the official Manual of BTS7960 chip, as shown in Figure 5 and 6.
3. Software Design
3.1. Image processing
The binary image is collected by digital camera, and then the edge information of the track is extracted, so as to calculate the center line position of the track. In order to speed up the S-curve, the weighted average algorithm is used to optimize the path, and the weight of each line in the whole image is adjusted to achieve better path planning.(Figure 7)
3.2. Control algorithm
Incremental PID control algorithm is used to control the steering gear and motor speed. Advantages of incremental algorithm: no integral calculation is needed in the calculation process, the calculation complexity is low, and the output result is the control increment each time, so the influence range is small when the machine fails.