Research and Realization of Intelligent Vehicle Non-uniform Speed ​​Memory Algorithm

Hardware implementation principle

According to some regulations of the competition, this paper designs the hardware block diagram shown in Figure 1. The infrared sensor adopts a row of 13 pairs of infrared transmitting and receiving tubes. The level of the received level passes through the ADC of the MCU. The MCU determines the current position of the black line. In order to reduce power consumption, a MOS switch tube is added to the system. When detecting an infrared sensor, the power supply of the sensor is turned on, and the rest is turned off. There are intersections in the track, and the start (that is, the end line) must be determined at the same time, so the smart car can be configured in advance with the total number of crosses on the current track, and at the same time, it can be determined by the software algorithm whether it has passed the century intersection The stop line can be used as a cross). When the system is running, according to the information collected by the infrared sensor, you can determine the current position of the guide line, that is, on the left, middle or right of the car, how much deviation, the MCU and the current car speed learned by the Hall speed sensor to determine the current car Behavior, mainly controlling the direction of the steering gear or the car and the speed of the motor or the car.

System hardware block diagram

Figure 1 System hardware block diagram

Software control algorithm

The system software control mainly includes two parts, namely the two processes of the memory algorithm. From the driving process, it is the first lap and the second lap. The flow diagram is shown in Figure 2.

System software control flow chart

Figure 2 System software control flow chart

First circle control and memory

The main purpose of the smart car when exercising the first lap is to remember the characteristics of the track information and perform certain processing. According to the conventional method, the car needs to travel at a constant speed in order to memorize relevant road information at fixed time intervals or fixed distance intervals. When data is memorized, 12 Hall sensors of magnetic steel are used, and the wheel gets 12 counts in one revolution. Even in the case of fast speed, the response time is also us level, and the accuracy is enough to meet the requirements.

Under the condition of non-uniform speed, a new data storage format is adopted. Firstly, the current state is judged to be straight, and according to the steering angle value c_ang of the steering gear obtained by the fuzzy control, the current vehicle's straightness is judged to be obtained. At the same time, because the car is driving at a non-constant speed, and the time interval and distance of the second lap are not necessarily the same as the first lap, so only the straightness is judged. When turning, remember the corner of each test point Value, while in a straight road, it is not necessary to store the corner and save a lot of storage space, so for a straight road, only the starting and ending distances of the straight road are memorized, and the distance is the absolute distance of the car relative to the starting point, that is, the Hall sensor The number of detected magnets ect_cnt.

The system separately stores data according to the different conditions of the previous state and the current state. The algorithm is as follows: the current state is a curve, and the current state is a straight road, that is, the straight curve, then write 0x7f, ect_cnt, where ect_cnt is the current Path count; when straight and straight, do not store; when straight, write current ect_cnt, 0x7f, current c_ang; when bend, write c_ang. When the system is initialized as a curve, it will enter the starting line after it starts driving. At this time, it is detected that it is a straight road and enters a straight curve. Write 0x47 and the current ect_cnt. This is the starting storage data of the road.

Data analysis and processing

When the second lap crosses the starting line, the system is configured to enter a straight state. At this time, the length of the straight road should be calculated according to the data recorded on the first lap, so that the car can run at a high speed on the straight line, and can be decelerated in advance, safe Enter the bend to achieve a good control effect.

When entering a curve from a straight line, if a straight line appears in the curve and its length is calculated to be less than a certain value, it is considered to be a small-scale straight line that appears during the curve-turning process. The core of this algorithm is also how to filter the straight lines that appear in the curve, and analyze the different curve forms. Divide the curve into the following categories:

(A) Sharp bend: The sharp bend mentioned here is the bend with the smallest curvature specified by the competition. In sharp corners, the number of corners is relatively small, the value of the corners is relatively large, and under normal circumstances all are in the same direction.

(B) Round corners: Compared to other race track elements, the recognition of a round track is relatively simple. When the corner in the same direction is greater than a certain value, and there is no reversal in the middle, it can be Think that the car has entered the round circuit. Because of the angle control, this system adopts fuzzy control, the car can quickly adjust the angle when entering a corner, and turns at a constant angle. The above data verifies this result.

(C) Small S-bend: The characteristics of the small S-bend are: there are both left and right turns in the entire process of turning, and the number of left and right angles should be greater than a certain one value. In addition, the number of angles for a single left or right turn is less than a certain value. Considering that the small S may follow other curves before and after, the system walks according to its curve before the first commutation point, adopts the small S walking strategy after the commutation point, and ends before the last commutation point .

(D) Big S bend: Compared to the small S, the big S has similar track characteristics, but the judgment criteria are slightly different. First of all, there is a straight road with a long distance between the big S, and the judgment range of the straight road must be enlarged to filter it out. Secondly, the number of single left or right angles should be greater than the number of small S.

Intelligent Ceiling Lamp is developed from ceiling lamp,our smart ceiling light has the basic function,like air purification and uv disinfection.

our intelligent ceiling lamp contains parlor,master bedroom , guest bedroom and kitchen ceiling light.the additional function is different for different item.

for example,parlor ceiling light has monitor function for parlor zone,while master bedroom ceiling lamp has beauty function,kitchen ceiling lamp has water and gas leakage function,you could choose according to your request.

Intelligent Ceiling Lamp

Smart App Control Parlor Light,Smart App Control Ceiling Light,Ceiling Lamp for Living Room,Remote Alarm Ceiling Lamp

Jilin Province Wanhe light Co.,Ltd , https://www.wanhelight.com