Design and Implementation of visual high-speed line-seeking Robot

Source: Internet
Author: User
Design and Implementation of a visual high-speed line-seeking ROBOT: 14:35:58 Source: China transmission network Author: Guan Jun Yang Ming

In
In recent robot competitions, in addition to precision requirements, the robot has also put forward high requirements on the robot's line-seeking speed, which is often the key to winning some competitions. Recently pushed by the Ministry of Education
In the National College Students' Intelligent Automobile competition, the line-seeking speed was also set as the subject of the competition. In this paper, based on the summary of participation in such events, a single-chip microcomputer as the core controller, using low-resolution cameras
Design of robot high-speed wire-seeking walking mechanism instead of general Photoelectric Sensors.

1 car body Mechanical Design

In order to reflect the speed requirements, the simulation racing model is used as the vehicle body machine.
Platform. The rear-wheel drive and front-wheel steering are used to achieve high-speed steering. If the two-wheel structure is used, the steering movement is achieved through the double-motor differential mode. In the case of high-speed steering, motor synchronization
It is difficult to achieve high control requirements. The front wheel is driven by steering gear, and the rear wheel is driven by a DC motor to the rear axle to avoid steering skid by means of a mechanical differential mechanism. The installation position of each major component is 1.

Figure 1 physical body and Structure

The robot uses the camera as the wire-seeking sensor. In order to enable the camera to gain a good front view, the camera is installed on the height of the front of the car body, so as to capture sufficient route information in front of the car body, so as to predict the line, this is the key for the visual solution to greatly outperform the photoelectric sensor solution in line-seeking speed.

2 hardware circuit design

The performance of the single-chip microcomputer as the core controller and the circuit structure of the video acquisition module are introduced here. The hardware implementation of other modules is briefly introduced. The overall system structure 2 is shown below:

Figure 2 system hardware structure design diagram

2.1 core controller design

 
In order to achieve video collection, taking into account factors such as cost effectiveness and device installation into account, the core controller selects the 16-bit high-performance single-chip microcomputer-MC9S12DG128 (hereinafter referred to
S12 ). Its command processing clock can reach 38 MHz, and its A/D converter's working clock can reach 16 MHz for video collection. At the same time, it has 8 PWM channels, control steering gear and DC
The motor completes steering and speed control. 8-channel capturing/comparison channel obtains the pulse signal of the encoder as the speed sensor; serial communication interface is used for wireless debugging; up to 64 IO (through IO multiplexing) sufficient
Status display and parameter settings. In addition, it has K flash storage space and can store and call video data on a chip without memory expansion. As shown in figure 2, the entire system uses
A single-chip microcomputer, without adding other controllers and memory, becomes a real "single-chip" system.

2.2 video capture module

Due to the speed limit of single-chip A/D,
You need to select a low-resolution black/white camera. Because low resolution means an increase in the scanning time of A single video line, while black and white cameras mean that video collection can be completed only through A/D. Selected
The ov5116 chip produced by Omvision is a kernel CMOS black/white camera with a resolution of 320 × 240 and an image refresh frequency of 50Hz. Select LM1881 video synchronization signal
The separation chip extracts the line synchronization and field synchronization signals from video signals and connects them to the s12 pulse capturing channel. The AD module is triggered by capturing signals to collect and store video data.

Figure 3 schematic diagram of the Video Acquisition Circuit

2.3 motor control and power supply

 
The RS-380SH DC motor manufactured by Mabuchi is used as the main drive motor and controlled by PWM signal. Choose the MC33886 full-bridge driver from Freescale
Through two-way half-bridge to achieve positive and reverse motor. The motor reversal here is not used for reversing, but mainly for slowing down the vehicle body. When switching the motor forward and backward, the motor drive current will instantly increase as the load increases,
Therefore, it is necessary to increase the voltage regulation capability to ensure the normal operating voltage of the system and avoid the automatic restart of the single chip microcomputer. In the entire system, there are a variety of voltage requirements, single-chip microcomputer and steering gear for 5 V power supply; CMOS camera for 6 ~ 9 V.
Therefore, to facilitate development, the most common 7.2V rechargeable battery pack is selected here. You only need to add a 5 V voltage regulator chip to the system to provide 5 V voltage.

3. Video collection and processing

This section describes how to use s12 A/D to achieve video collection and video processing.

3.1 video collection

 
The standard active clock of AD on S12 is 2 MHz, while the active sampling requires at least 14 clock periods. Therefore, 7us = 14/2 M is required for each collection. Based on the video transmission principle and CMOS Camera
Image Header parameter. The single-line video scan time is. Therefore, when the default clock is used, the/D module can only collect nine video points in A single row, with A collection effect of 5.

Figure 4 Video Acquisition effect at 2 MHz A/D clock

 
This acquisition effect obviously cannot meet the tracing control requirements. Therefore, it is necessary to speed up the active clock and increase the speed by 8 times to 16 MHz. The sampling time is also 8 times faster than the video time. Theoretically, single Row
To collect 77 points. The actual acquisition result is 5, and the precision is 40x76 pixels. This video effect has already reached the line-seeking precision requirement. (Because of the high collection accuracy, multiple sampling points in each video line are located in
The hidden area of the video line, that is, the black area on both sides of the image)

Figure 5 Video Acquisition and Processing Performance at 16 MHz A/D clock

3.2 Video Processing

 
Extract the black line from the video through video processing. Because the video image is simple, the video processing algorithm uses the edge detection algorithm, that is, the adjacent two points in each row do the difference, according to the difference size and positive and negative, get the video image
The black line edge position of "white to black" and "Black to white. At the same time, the distance between the two edge locations is calculated to determine the "black line" width and filter out other interference. The video processing result is shown in Figure 5.

  
In order to save system resources, the system does not collect all 320 lines of video, and 40 lines of video are selected for acquisition, which still meets the tracing control requirements. At the same time, the idle time of the system that does not collect video lines
Video Processing and motion control to achieve edge acquisition and processing and control. In addition, this method does not need to save all the video data, but only stores the array of black line locations after video processing, reducing the amount of storage space occupied by the system.
And program execution time.

4. Motion Control Strategy

This walking robot is designed to increase the speed of line-seeking. The camera is used to increase the distance between the front line detection and provide sufficient decision-making time for motion control. Therefore, its motion control policy is also based on this solution. The system uses a combination of the pre-aiming and PID to achieve speed and steering control.

 
Based on the video collected by single-chip microcomputer, it can be used to determine the road conditions in front of the vehicle body, which can clearly distinguish the Straight Track of the curve and the curvature of the curve. In different road conditions, the car body is affected by factors such as its mechanical structure and motor characteristics,
Different driving performance. There is an optimal turning speed, curve driving speed, and curve driving route. While in direct driving, although the faster the vehicle body, the better, but in order to safely complete the straight into the bend
Road, must be in advance to slow down. This is the key for the camera solution to speed better than the infrared photoelectric sensor solution: sufficient pre-judgment distance, sufficient deceleration time and distance, and the fastest inbound bend
Effect

The control algorithm is described as follows: First, obtain the data variance of the black line location, determine the degree of bending of the black line based on the variance, and divide the track into three types: Straight Track, small curve, and big curve. Pass
A large number of tests are conducted to obtain the optimal speed of three tracks, and closed-loop PID control is used to control the speed. For steering control, because the pursuit of line-seeking speed is not precise horizontal control, the PD control algorithm is used in combination with the pre-view calculation.
Method. Adjust the steering control distance dynamically based on the line conditions. According to the fuzzy control model, horizontal control is implemented using distant video lines during direct road operation according to the driving habits of people. When a person enters the curve, the near-end video is used.
Line. The conversion formula is as follows:

Root
Based on this speed and steering control strategy, after a lot of practical tests, we finally achieved a good car body seeking motion. The average seeking speed can reach 2.5 m/s, which is significantly higher than the general walking robot design scheme.
As this article focuses on the system construction scheme, and for the control algorithm used, the mechanical and motor of each Car Body vary greatly, and the test data does not have reference value, therefore, only algorithm policies are described here.

5 Summary and prospects

 
This paper designs a vision-based walking robot system for high-speed line tracing. The system uses a high-performance single-chip microcomputer to complete a set of queries from video collection to video processing, and ultimately achieves speed and steering control.
Line walking function. The system is lightweight and smart, and does not require memory expansion and other programmable devices to work together, resulting in low construction costs. In the first national smart car competition for college students, the system was running smoothly and achieved excellent results.
.

Innovation: the system does not use a common infrared optical tube, but uses a low-resolution camera as a line-seeking sensor. At the same time, the traditional concept is broken, and only one single chip microcomputer is used to complete the video.
Because the route information obtained by the video is much richer than that obtained by the infrared photoelectric sensor, this low-cost video seeking solution provides high flexibility for motion control algorithm development. System ticket
Due to speed limitations, color video acquisition is not yet possible, so it is impossible to track complex video images.

In addition to some robot competitions, this system scheme can be used for Intelligent Vehicle Navigation Algorithm Research. The system implementation is simple and the cost is low, which solves the corresponding problems in intelligent vehicle research. At the same time, the system can also be used as a good teaching platform for control theory and video processing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.